Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 ASP

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th April 2004, 15:41   #1  |  Link
Jawor
Ex-ter-mi-nate!
 
Jawor's Avatar
 
Join Date: Jan 2004
Location: www.videoaudio.pl
Posts: 218
Jawor's 1CD Quantization Matrix

If you'd like to test it, just follow the link in my signature

Feedback will be appreciated
__________________
Please excuse if my English is crappy.

Archive of my Xvid builds

http://www.videoaudio.pl
Jawor is offline   Reply With Quote
Old 17th April 2004, 06:11   #2  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,988
i will give it a try tonight. I'm feeling old-school so I think I'm going to encode breakfast at tiffany's

will get back to you on the results
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 19th April 2004, 14:03   #3  |  Link
Jawor
Ex-ter-mi-nate!
 
Jawor's Avatar
 
Join Date: Jan 2004
Location: www.videoaudio.pl
Posts: 218
Thanks for your CPU time.

So far I've tested this matrix on The Ninith Gate and The Matrix Revolutions (both R2 Poland). The 8% compressibility gain compared to HVS - Good Picture was observed when encoding with constant quantizers of 2, 3, 4, 5 and 6. The settings were:

Qpel, GMC, AQ, Trellis ON
Packed Bitstream OFF
Max I-frame interval 250
VHQ=4, MSP=6, ChromaME
B-frames 3/1.50/1.00
B-VOP sensitivity 3
Profile AS@l5
and the rest set to defaults

The Ninth Gate doesn't look brilliant even at quant=2 with both HVS - Good Picture and Jawor's 1CD (it seems to me that they overdid the edge enhancement while processing). I did not see any noticeable difference in quality.

The Matrix Revolutions encodes also look very similar to each other.

I had to use
Code:
SelectRangeEvery(500,25)
with both movies, so this was kinda compressibility test intended to check if further tests of this matrix have any sense. My computer is quite slow (it's a Celeron 1200 MHz), so further testing will take me a lot of time .

Now I'm doing a two-pass encode of The X-Files #8ABX03: Redrum, an analogue TV capture from TVP2 (one of the channels of the so-called public Polish TV, which is not public at all - they ask us to pay for it ) at desired video size of 180 MB (ca. 43 minutes, 512x384). I did an encode like this with the HVS - Good Picture matrix and this will be my first comparison at the same desired size, so that we could see how good is this matrix when working under difficult conditions. Unfortunately I won't be able to put here some screens or samples, but you can count on my report.
__________________
Please excuse if my English is crappy.

Archive of my Xvid builds

http://www.videoaudio.pl

Last edited by Jawor; 19th April 2004 at 14:36.
Jawor is offline   Reply With Quote
Old 19th April 2004, 15:08   #4  |  Link
Teegedeck
Moderator, Ex(viD)-Mascot
 
Teegedeck's Avatar
 
Join Date: Oct 2001
Posts: 2,564
How about comparing it to HVS-best as this one seems the 1-CD matrix of choice at least for bond, JasonFly and me?
__________________
It's a man's life in Doom9's 52nd MPEG division.
"The cat sat on the mat."
ATM I'm thoroughly enjoying the Banshee - a fantastic music player/ripper for Linux. Give it a whirl!
Teegedeck is offline   Reply With Quote
Old 19th April 2004, 18:41   #5  |  Link
Jawor
Ex-ter-mi-nate!
 
Jawor's Avatar
 
Join Date: Jan 2004
Location: www.videoaudio.pl
Posts: 218
I intend to do it, but it will take some time. Of course you can do it yourself
__________________
Please excuse if my English is crappy.

Archive of my Xvid builds

http://www.videoaudio.pl
Jawor is offline   Reply With Quote
Old 19th April 2004, 19:12   #6  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,988
Well... I did a test encode, but I am going to hold off passing judgment until I do a couple more encodes. My first test was pretty unsuccessful, with a lot of macroblocking and haloing. Here are the settings (which I think were a little flawed...):

AVS:
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec3.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\undot.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\peachsmoother.dll")

mpeg2source("D:\Tiffanys\Breakfast at Tiffany's.d2v")

crop(6,0,710,476)
LanczosResize(640,352)
Undot()
convertToYUY2()
PeachSmoother(NoiseReduction=45,Stability=15,Spatial=70,NoiseLevel=4.8,Baseline=3.2)
convertToYV12()

XviD RC4:
2 pass - target filesize: 609,612 kb
Adaptive Quant, Qpel
Bvops @ 5/1.0/1.5, Packed
MSP @ 6
VHQ @ 4
Trellis
All other settings at defaults

I got the following for the status window:
Average Quantizer: 5.04
B frame to P Frame ratio: 2.403
Only 1051 I Frames out of 164469 total!!

Whole thing encoded at about 25fps on the second pass with my system.

I think for this extremely grainy source ( Breakfast at Tiffany's ), PeachSmoother did a nice job of temporal smoothing, but even so this is a very difficult movie to encode. It looked nice in the I will do another run of this with some different settings. Exactly what those settings will be I am not totally sure, we'll see. Suggestions are welcome. I will get to the encoding in a few days since I don't want to stress my already highly tempermental power supply until my new 450 watt Antec arrives. I'm running like 400 watts of load on a 300 watt unit... It doesnt spin up the hard drives half of the time on boot now. scarry.

Sorry for the lengthy post, but I think this matrix has promise.
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 19th April 2004, 19:18   #7  |  Link
Jawor
Ex-ter-mi-nate!
 
Jawor's Avatar
 
Join Date: Jan 2004
Location: www.videoaudio.pl
Posts: 218
Thanks for the results.

I would suggest using GMC. I know it's slowing things down and the compressibility gain is not big (or sometimes none), but for 1CD encodes GMC is sometimes helpful, so I think it's important to test this matrix with it.

Tomorrow I'll write something about this X-Files episode.
__________________
Please excuse if my English is crappy.

Archive of my Xvid builds

http://www.videoaudio.pl
Jawor is offline   Reply With Quote
Old 20th April 2004, 07:07   #8  |  Link
Jawor
Ex-ter-mi-nate!
 
Jawor's Avatar
 
Join Date: Jan 2004
Location: www.videoaudio.pl
Posts: 218
As I promised, here are the results of tests performed on The X-Files #8ABX03: "Redrum" (25fps, progressive, 4:3)

XviD settings:
Profile: AS@L5
MSP=6, ChromaME, VHQ=1
Trellis, GMC, Qpel, AQ ON
Packed Bitstream OFF
B-frames 3/1.50/1.00
B-VOP Sensitivity 3 (movie), 10 (credits)
weight=0.4 for the end credits
Quantizers 2-31
maximum I-frame interval 250
"Fast" first pass
desired size 180 MB
I left the rest at their defaults

AviSynth script
Code:
AVISource(...)
ConvertToYV12()
Crop(4,4,-4,-2)
Deen("c3d",1,16,20)
UnDot()
LanczosResize(512,384)
UnDot()
I captured this episode using a Bt878A-based card at 768x576. The source was quite noisy, hence the usage of Deen() and 2*UnDot(). The clip was more compressible, than I thought, so artifacts were not so obvious. Jawor's 1CD Matrix achieved an average quantizer of 4.197, HVS - Good Picture gave avg. quant = 4.335.

Quantizers and frame types for Jawor's 1CD Matrix:
I-frames - 1.27 %
P-frames - 22.29 %
B-frames - 61.93 %
S-frames - 14.51 %
2 - 4.9 %
3 - 24.6 %
4 - 22.6 %
5 - 42.0 %
6 - 4.6 %
7 - 0.6 %
8 - 0.4 %
9 - 0.3 %
>9 - 0.1 %

Quantizers and frame types for HVS - Good Picture:
I-frames - 1.28 %
P-frames - 22.58 %
B-frames - 61.88 %
S-frames - 14.27 %
2 - 3.3 %
3 - 24.8 %
4 - 20.1 %
5 - 41.6 %
6 - 7.9 %
7 - 1.3 %
8 - 0.2 %
9 - 0.4 %
>9 - 0.3 %

Take a look at these two screenshots - the first one is Jawor's 1CD Matrix, the second one is from HVS - Good Picture encode:


Compare the mosquito noise on the edges - it's slightly more visible with HVS - Good Picture. Besides the mosquito noise, I haven't notice any diffrences between the two clips.

Currently I'm testing the same clip with the HVS - Best Picture matrix.
__________________
Please excuse if my English is crappy.

Archive of my Xvid builds

http://www.videoaudio.pl

Last edited by Jawor; 26th April 2004 at 10:31.
Jawor is offline   Reply With Quote
Old 20th April 2004, 10:59   #9  |  Link
SoonUDie
Registered User
 
Join Date: Dec 2003
Posts: 147
If you don't mind a little competition, would you mind testing this matrix? I'm sure you'll be interested once you see it
The Evil Matrix - v0.1
__________________
Stuff was here at some point.
SoonUDie is offline   Reply With Quote
Old 20th April 2004, 12:33   #10  |  Link
Jawor
Ex-ter-mi-nate!
 
Jawor's Avatar
 
Join Date: Jan 2004
Location: www.videoaudio.pl
Posts: 218
I don't mind a little competition

I'll test your matrix right after HVS - Best Picture with the same settings using the same X-Files episode.
__________________
Please excuse if my English is crappy.

Archive of my Xvid builds

http://www.videoaudio.pl
Jawor is offline   Reply With Quote
Old 20th April 2004, 13:00   #11  |  Link
SoonUDie
Registered User
 
Join Date: Dec 2003
Posts: 147
Thanks! I don't have time to run many tests, but on the material I've done so far (Men in Black II) it outperforms everything else at 1-CD bitrates. I got the values from a program designed to tune DCT matrices based on human perception, and adapted them for use in XviD (inter-frame matrix uses a higher compression tuning than intra-frame). I didn't exhuastively tune or test it though (came up with it a few hours ago, actually), which is why I'm asking for help. Thanks again for testing, I appreciate it. I'll make sure to try your matrix on my material too.
__________________
Stuff was here at some point.
SoonUDie is offline   Reply With Quote
Old 20th April 2004, 13:26   #12  |  Link
kilg0r3
! - User - !
 
kilg0r3's Avatar
 
Join Date: Nov 2001
Posts: 1,081
Ther seem to be a few typos in your matrix since the vlues are not allways increasing in the downward and rightward direction, or, is this intended?



And, please remember, the average quant does not tell you anything about image quality.

BTW, what is currently the best _free_ 'objective' method for measuring image quality.
__________________
Keep your tone warm and your sigs decent!

Last edited by kilg0r3; 20th April 2004 at 13:44.
kilg0r3 is offline   Reply With Quote
Old 20th April 2004, 14:04   #13  |  Link
SoonUDie
Registered User
 
Join Date: Dec 2003
Posts: 147
Yes, that's inteded for now, because it's the way the program calculates the values (it's designed to optimize JPEG DTC matrices). I may try to transpose the values, but I never found out exactly what XviD's scanning method was. I think it's right, down left, down, up right, etc. Also, this was optimized for a specific scene, so it's possible the values were affected by that. It's also possible that the numbers might reflect certain human perceptual traits (sensitivity to certain "zones" within the DCT table) since the program generated it according to it's perceptual model.

In any case, typo or not, I was able to run some short tests - and yet again, this matrix came up with more detail and less artifacts that any other matrix I've tested so far (h.263, Jawor's, HVS Best, mpeg, and a few more of my own). I eventually want to test every matrix that was included with LigH's quant editor. I also hope other people can test it, so that it can be exposed to a large number and type of test cases. If people report good results, I may try to come up with a better one based off of the same principles. At the moment, the scene that it's doing really well on is high-motion.
__________________
Stuff was here at some point.

Last edited by SoonUDie; 20th April 2004 at 14:21.
SoonUDie is offline   Reply With Quote
Old 20th April 2004, 14:06   #14  |  Link
SoonUDie
Registered User
 
Join Date: Dec 2003
Posts: 147
Quote:
Originally posted by kilg0r3
BTW, what is currently the best _free_ 'objective' method for measuring image quality.
I've heard SSIM is pretty good, and at least better than PSNR. There are a couple others available, many of which have been "advertised" in these forums.

The program I used to create these matrices also has a "quality metric" mode. It's called DCTune, and you can get it here: http://vision.arc.nasa.gov/dctune/
__________________
Stuff was here at some point.

Last edited by SoonUDie; 20th April 2004 at 14:18.
SoonUDie is offline   Reply With Quote
Old 20th April 2004, 14:39   #15  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
2Jawor
Nice matrix! I've made 1CD DVRRip "Gigli" (2hr3min 640*352) at 670kbps - it's fine and clear
thanx
dimzon is offline   Reply With Quote
Old 20th April 2004, 15:35   #16  |  Link
Jawor
Ex-ter-mi-nate!
 
Jawor's Avatar
 
Join Date: Jan 2004
Location: www.videoaudio.pl
Posts: 218
@dimzon: I'm glad I could help
__________________
Please excuse if my English is crappy.

Archive of my Xvid builds

http://www.videoaudio.pl
Jawor is offline   Reply With Quote
Old 21st April 2004, 08:59   #17  |  Link
Jawor
Ex-ter-mi-nate!
 
Jawor's Avatar
 
Join Date: Jan 2004
Location: www.videoaudio.pl
Posts: 218
Results of tests performed on The X-Files #8ABX03: "Redrum" with HVS - Best Picture:

Average quantizer = 4.194

Quantizers and frame types:
I-frames - 1.28 %
P-frames - 22.81 %
B-frames - 61.81 %
S-frames - 14.10 %
2 - 2.4 %
3 - 24.6 %
4 - 36.5 %
5 - 28.2 %
6 - 6.6 %
7 - 1.2 %
8 - 0.2 %
9 - 0.1 %
>9 - 0.1 %

And here's the screenshot:


It seems to me, that these both HVS matrices produced more perceptible mosquito noise and a softer image than my matrix. Is it only a matter of my imperfect sight or do you see it too?

I'm currently testing it with Evil 0.1 matrix by SoonUDie.
__________________
Please excuse if my English is crappy.

Archive of my Xvid builds

http://www.videoaudio.pl

Last edited by Jawor; 26th April 2004 at 10:30.
Jawor is offline   Reply With Quote
Old 21st April 2004, 09:30   #18  |  Link
ObiKenobi
Guest
 
Posts: n/a
I'll be doing some tests as well on Lupin III - Plot of the Fuma Clan which is a 70 minute ova. Should have some pics posted later this afternoon comparing Jawor's 1CD, Evil .1 and HVS-Best
  Reply With Quote
Old 21st April 2004, 13:05   #19  |  Link
SoonUDie
Registered User
 
Join Date: Dec 2003
Posts: 147
Jawor: in the shots you've posted so far, what I see is:
1) Your matrix is "rougher", and encodes more noise/"detail"...
2) ...at the price of more blocks, and a
3) loss of definition in some areas (see the red blotches)

Do you think you could post some other screen shots, showing areas with high deatil, and areas with motion, etc.?

At the moment, I'm stuck - in some cases, my matrix looks better than yours, and in others it doesn't. Take a look at the following pairs of shots:

Jawor's


Evil 0.1


Check out Gandalf's teeth! Evil does a much better job. Also, you can see that Evil has a slightly lower, but more consistent quality across the sleeve. HVS Best also gets it right (though I haven't included the image).

But in the next pair, the tables are turned:

Jawor's


Evil 0.1


Evil seems to suffer from high quantization here. Non-deblocked, Jawor's has much more blocking than Evil in the red smoke, but deblocking seems to take care of that. HVS Best seems to be on par with Jawor's.

So it looks like I still have some work to do... HVS best may still be the champ for now.
__________________
Stuff was here at some point.

Last edited by SoonUDie; 21st April 2004 at 13:20.
SoonUDie is offline   Reply With Quote
Old 21st April 2004, 13:12   #20  |  Link
Jawor
Ex-ter-mi-nate!
 
Jawor's Avatar
 
Join Date: Jan 2004
Location: www.videoaudio.pl
Posts: 218
Quote:
Do you think you could post some other screen shots, showing areas with high deatil, and areas with motion, etc.?
Yeah, sure... But it can take some days, because I'd have to get more webspace.
__________________
Please excuse if my English is crappy.

Archive of my Xvid builds

http://www.videoaudio.pl
Jawor is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:18.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.