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 23rd September 2002, 15:56   #61  |  Link
sierrafoxtrot
asleep for far too long
 
Join Date: Oct 2001
Posts: 131
looking at rui's observation that Dali Lama's Ultimate Matrix lowers average quant by 2 (!) tends to back up iago's constant quant encodes where the it produced the smallest filesize ...

... bottom line is that i can't wait to get home to start encoding ...

PS: thanks for the new build koepi and -h
sierrafoxtrot is offline   Reply With Quote
Old 23rd September 2002, 16:55   #62  |  Link
rui
Registered User
 
Join Date: Dec 2001
Location: Portugal
Posts: 730
Well, my small test was made using the usual "The Replacements" trailer. It was made using 2-pass internal.
I don't have the data here now (was made at home, because here i still have comp problems), but i remember ultimate matrix was getting a lower quantizer average by those 2 points. The most used quantizers were much lower than using mpeg. But i noticed that mpeg used more value 2 quantizers than ultimate matrix. But in all, ultimate used more lower quantizers than using mpeg.
I also made the same test using h.263, and visually speaking, i liked much more ultimate matrix than h.263, also got lower average quantizer (h.263 got almost the same value as mpeg).

But this was a small test (trailer), so for much more definitive conclusions i advice all to wait for iago's tests

EDIT: and for Sierrafoxtrot tests also. Sorry Sierra
__________________
Rui

Last edited by rui; 23rd September 2002 at 17:02.
rui is offline   Reply With Quote
Old 23rd September 2002, 17:20   #63  |  Link
iago
retired
 
iago's Avatar
 
Join Date: Jun 2002
Location: hollywood
Posts: 1,013
hello again, "serial tester" back
(I've got a new alias btw, thanks to vlad59 )

Well, unfortunately I cannot provide any good news in my tests with the Ultimate Matrix. I have just run a short test again, this time with constant quant 2, using which any matrix is supposed to perform its best with minimal artifacts imho.

First 4000 frames of the same PAL progressive source, 512*272, this time with BicubicResize (0,0.5) -since I was inclined to blame LanczosResize for the edge-noise and ringing artifacts in the previous quant 4 test-, and comparing only h263 and Ultimate Matrix.

The results are as follows:

compressibility:
----------------
h263: 22670kb
Ultimate Matrix: 15286kb

Well, so far OK, compressibility is great. But... here comes the bad news...

visuals:
--------
Even with "quant2", Ultimate Matrix generated noticable blockiness (much more than h263), and the worse, proved to be the cause of those annoying edge noise/ringing artifacts.

As a result, as long as the great compressibility advantage isn't accompanied by a pleasing visual quality, unfortunately it is not preferable imho. With the help of compressibility, OK, you can even have almost all your quantizers ~2-3, maybe even you can get the codec saturated in most encodes , but I'm afraid that even the best possible quality (which means quant2) encode will come with these disturbing artifacts when using the Ultimate Matrix...

Attached in the below zip file, you can find two PNG screenshots for comparison: One with h263 the other with Ultimate Matrix (quantizer 2).

kindest regards,
iago

EDIT: However, since the custom-matrices are based on exploiting HVS to provide a better "looking" picture, either still or moving (though I haven't achieved this "perceptually better" result with Ultimate Matrix so far), as long as you're pleased with the video "playback" when watching, and as long as you won't compare that result with what other quantization types produce, then of course it can still be used imho.....

Last edited by iago; 23rd September 2002 at 20:36.
iago is offline   Reply With Quote
Old 23rd September 2002, 18:15   #64  |  Link
MfA
Registered User
 
Join Date: Mar 2002
Posts: 1,075
Quantizers are meaningless, you can make a custom matrix which at quant 4 gives near identical result to the standard matrix at quant 2. Just scale it by 2 and hey presto.

Just use fixed size encoding for comparisons.
MfA is offline   Reply With Quote
Old 23rd September 2002, 18:31   #65  |  Link
wotef
Registered User
 
wotef's Avatar
 
Join Date: Apr 2002
Posts: 272
hm, i've done a slightly different test today (koepi's 23/09 build), which is the bank robbery scene from heat

first i cropped, lanczos resized to 640x272 and saved the sequence to huffyuv -- this way, i've got a resized "source" where i can distinguish purely codec-specific artifacts later, p.s. i didn't see any such edge-noise introduced by lanczos

then i did some 2-pass internal h263, modulated, modulated experimental, mpeg and dali's "ultimate" custom matrix runs

i specified a desired video filesize of 72283 kb, as i was trying to stretch the codec ability as you would likely do with a real-world rip

right away, i have to say i prefer mpeg quants to h263 for that filmic quality

now, key-frame-wise, ALL the xvid outputs had some minor but discernable blocking that wasn't there on my huffyuv sample --

quality-wise, modulated experimental came out very, very close to straight mpeg, too close for me to see any material difference, in fact

what i found most interesting was that dali's "ultimate" matrix consistently distributed the blocks in a pleasing way, or rather, in a way that is less obvious to the eye - they're still there, but i found i noticed the mpeg artifacts quite a bit less using the ultimate matrix!

probably 640x272 for 70mb was too aggressive for this scene, but it was suprising to see the difference in how the "ultimate" matrix seems to euphonically manage any block artifacts that get through

look around the lock, the handle and the background areas, you'll get the idea

http://www.zenadsl5618.zen.co.uk/doorknob.htm

motion-wise, all the outputs looked real good to me, but then, that is an exciting scene to watch!
wotef is offline   Reply With Quote
Old 23rd September 2002, 19:14   #66  |  Link
Defiler
Asker of Questions
 
Join Date: Oct 2001
Location: Florida
Posts: 433
Quote:
Originally posted by wotef
look around the lock, the handle and the background areas, you'll get the idea
Whoa! Huffyuv smoked everything else in that test! I'm going to start using it for my 1-CD rips.
__________________
"The real trick to optimizing color space conversions is of course to not do them." --trbarry, April 2002
Defiler is offline   Reply With Quote
Old 23rd September 2002, 19:29   #67  |  Link
Rrrough
Registered User
 
Rrrough's Avatar
 
Join Date: Aug 2002
Location: Avantasia
Posts: 177
Hello fellowship of the custom-quant-matrices !

I've been testing some matrices by computing the perceptual error with DCTune between the avisynth-output and the decoded picture using quants 2-9, because those are the most used by me. I compared 5 randomly chosen pictures from a randomly chosen movie ( Tomb Raider) per quantizer and matrix and calculated the mean value. A value of 1.0 is regarded lossless. No filtering was used (except postprocessing of the source with MarcFD's MPEG2DEC, using cpu=6), only cropping and Lanczos-resize. Find the results attached as a textfile.
Obviously DCTune likes the HVS-matrix most, whereas ULTIMATE has the poorest result. Now that the code is fixed thanks to -h(ero ), I will take filesize into account as well, and try to find a "perceptual-error/filesize ratio". Maybe that can indicate the best matrix for each quant... as always, just an idea...

cheers
Rrrough is offline   Reply With Quote
Old 23rd September 2002, 23:18   #68  |  Link
iago
retired
 
iago's Avatar
 
Join Date: Jun 2002
Location: hollywood
Posts: 1,013
@Rrrough

Good work pal, please go on with it . Possibly a technical confirmation of my visual observations on the above mentioned tests. So far I have only tested Ultimate Matrix (short tests as stated above) and Custom HVS matrix (a full 2pass 1CD encode and it "looked" really great to my eyes, but unfortunately that was before the code was fixed so it could have been even better imho). I'm considering to test custom HVS matrix in a full 2pass encode again.

regards,
iago


@MfA

Btw, thanks for your suggestions, but I couldn't get your point and what the relation of your reply with my above posts is. Sorry for my lack of understanding.
iago is offline   Reply With Quote
Old 23rd September 2002, 23:33   #69  |  Link
MfA
Registered User
 
Join Date: Mar 2002
Posts: 1,075
My only point was that comparing results of a custom matrix at the same quantizer with the normal matrix is perfectly meaningless, unless it happens to give a file the same size, nothing more to read into it. Wasnt aimed specifically at you.
MfA is offline   Reply With Quote
Old 23rd September 2002, 23:46   #70  |  Link
Dali Lama
Registered User
 
Join Date: Jan 2002
Posts: 331
MfA, I understand exactly what you are talking about. Using Ultimate Matrix @ quant 5 gave me a much lower filesize than MPEG @ quant 5.

Iago, this means that quantization matrices have to be tested out in full 2-pass mode. Using two-pass, the codec will specify the quant it needs to achieve the quality/filesize which changes for each matrix.

Rui pointed this out when he said that the Ultimate matrix gives 2 lower quants. At first, I was skeptical, but now I believe this can happen.

Still testing,

Dali

Last edited by Dali Lama; 23rd September 2002 at 23:49.
Dali Lama is offline   Reply With Quote
Old 23rd September 2002, 23:56   #71  |  Link
Rrrough
Registered User
 
Rrrough's Avatar
 
Join Date: Aug 2002
Location: Avantasia
Posts: 177
@MfA,Dali

thus the idea of the "perceptual error / filesize" ratio. I didn't try that yet because I only had a build with the broken core, so that'd been senseless.
as for interpretation : ULTIMATE has the poorest results doesn't mean that ultimate is the worst matrix, it has to be interpreted with the filesize in- resp. decreases it gives. sorry if I didn't make that clear. I'm just trying to do a more objective approach. don't know if that'll work out.

@Dali

did you try DCTune-generated matrices yet ???

cheers & happy testing

Last edited by Rrrough; 23rd September 2002 at 23:59.
Rrrough is offline   Reply With Quote
Old 23rd September 2002, 23:56   #72  |  Link
iago
retired
 
iago's Avatar
 
Join Date: Jun 2002
Location: hollywood
Posts: 1,013
@Dali Lama

Quote:
Originally posted by Dali Lama
@ Iago, That is exactly how I tested out my matrix. Using constant quant at 4 or 5, since that is the most used quant for 1-CD. I hope you find excellent results.
???

My tests were not much different from those you mentioned I guess...

Last edited by iago; 23rd September 2002 at 23:59.
iago is offline   Reply With Quote
Old 24th September 2002, 00:02   #73  |  Link
Dali Lama
Registered User
 
Join Date: Jan 2002
Posts: 331
Iago, I know, we both were testing wrong. At first, I used that method, but when I performed 2 full length encodes the performance of the matrix is more clearly shown.

Take Care,

Dali

Edit: Rrrough I did get a chance, but still need time to interpret how to use those matrices.
Dali Lama is offline   Reply With Quote
Old 24th September 2002, 00:08   #74  |  Link
iago
retired
 
iago's Avatar
 
Join Date: Jun 2002
Location: hollywood
Posts: 1,013
@Dali,

OK, man . I know what you mean, and what mFa means as well; in a different thread a while ago we had discussed the same things with Koepi... I just wanted to see the "best possible" performance of the matrix at quant2, lets say for a very well compressible movie .

And I'd told you, I haven't tested it in a full 2-pass encode and I will do that very soon too.

best regards,
iago
iago is offline   Reply With Quote
Old 24th September 2002, 10:42   #75  |  Link
sierrafoxtrot
asleep for far too long
 
Join Date: Oct 2001
Posts: 131
i seem to have problems with dali's ultimate matrix using 2-pass. i got back home and decided to re-encode lola rennt (run lola run) with koepi's 23092002-1 build, and dali's ultimate matrix with lanczos resizing.

my previous encode with H263 and linear scaling gave a compressibility value of 57% and this encode gave a value of 85% (!). However, it looked horrific, with giant macroblocks everywhere. then i tried encoding at constant quant 2, 3 and 4 and these macroblocks just keep appearing everywhere, even at quant 2 for fairly demanding scenes. i haven't had any more time to try the custom matrix with previous builds, but i'll give that a shot tonight.

has anyone else had this kind of problem?
sierrafoxtrot is offline   Reply With Quote
Old 24th September 2002, 10:59   #76  |  Link
Koepi
Moderator
 
Koepi's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 4,454
I tried monster's inc. with the cg matrix and my latest build and honestly speaking I didn't like the result :-/ I'm trying with HVS matrix now, it seems to produce a compressability closer to h.263 than to mpeg, but since I'm on the second pass now I still don't know about the visual result.

Maybe I should keep my hands from lanczos in this case and use neutral bicubib instead as in that particular movie you can see the quantization effects very fast (because the "main monster" sullivan has plenty fine rendered hairs which are smoothed into a even level without details often).

Maybe this is a side effect of the mpeg2dec+PP, I've to recheck the source material after encoding as this effect is visible in all encodes I tried - but it's strength is always different and thus is influenced by quantization. Maybe I should switch off lumi masking as well, in this movie it might do more harm than good.

Don't get me wrong, I like the attempt of new custom matrices and I appreciate all your work here, I just wanted to write down that my "first" attempt failed, which just means that I need to tweak around

I have to make clear as well that the fact that quantizer levels rise or fall between different matrices doesn't mean anything. Looking at the CG matrix e.g. I can double the quantization level and the results should still be close to h.263 at half the quantizer...

Maybe it's really just the lumi masking effect, I'll reencode without lumi masking and with CG matrix later today again!

Thanks for all your efforts!

Best regards,
Koepi

P.S.: I plan on hacking in a cust. mod quant mode which takes a (hardcoded) file like "C:\cumodqu.txt" as input and modulates matrices like:
1 D:\video_ts\CG_matrix.txt
4 h.263
6 mpeg
...
which would be interpreted as quant 1-3 CG matrix, 4-5 h.263,...
Would that be useful?
Koepi is offline   Reply With Quote
Old 24th September 2002, 10:59   #77  |  Link
iago
retired
 
iago's Avatar
 
Join Date: Jun 2002
Location: hollywood
Posts: 1,013
@sierrafoxtrot

Actually I didn't want to make any more comments on Ultimate Matrix until I did a full-movie 2-pass encode, but exactly that was what I expected and what I was trying to remark. Unfortunately, I guess your results support all my above tests and the arguments put forward in my posts.

best regards,
iago

----------------------------------------------------------------
-> I plan on hacking in a cust. mod quant mode which takes a (hardcoded) file like "C:\cumodqu.txt" as input and modulates matrices like:
1 D:\video_ts\CG_matrix.txt
4 h.263
6 mpeg
...
which would be interpreted as quant 1-3 CG matrix, 4-5 h.263,...
Would that be useful?

(Koepi)
-----------------------------------------------------------------
That would absolutely be great Koepi!
I guess this hardcoded matrix determination file will be configurable to use the desired matrix for desired quantization? Is that what you mean?

many thanks,
iago

Last edited by iago; 24th September 2002 at 11:09.
iago is offline   Reply With Quote
Old 24th September 2002, 13:05   #78  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
Quote:
Originally posted by sierrafoxtrot
i seem to have problems with dali's ultimate matrix using 2-pass. i got back home and decided to re-encode lola rennt (run lola run) with koepi's 23092002-1 build, and dali's ultimate matrix with lanczos resizing.

my previous encode with H263 and linear scaling gave a compressibility value of 57% and this encode gave a value of 85% (!). However, it looked horrific, with giant macroblocks everywhere. then i tried encoding at constant quant 2, 3 and 4 and these macroblocks just keep appearing everywhere, even at quant 2 for fairly demanding scenes. i haven't had any more time to try the custom matrix with previous builds, but i'll give that a shot tonight.

has anyone else had this kind of problem?
Yes.
A few days ago, I tried the "Ultimate Matrix" the very first time (on the Neo-vs-Morpheus-KungFu-Scene), with const.quant 3 / mpeg.

Result:
*Everything* looked like "Div3-shit-frames", throughout the whole scene.

That day, I still was using koepi´s XviD-04092002. I have to repeat the test with the actual build.
The result of the above was completely unusable, more like a bad joke.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)

Last edited by Didée; 24th September 2002 at 13:08.
Didée is offline   Reply With Quote
Old 24th September 2002, 13:28   #79  |  Link
Defiler
Asker of Questions
 
Join Date: Oct 2001
Location: Florida
Posts: 433
Didée: I had the same experience with the Ultimate Matrix.

Some of the DCT documentation I read yesterday talked about how useless it was to put large values in the high-frequency section of the quantizer matrix. Perhaps it's best not to make changes that are quite this drastic.
__________________
"The real trick to optimizing color space conversions is of course to not do them." --trbarry, April 2002
Defiler is offline   Reply With Quote
Old 24th September 2002, 14:00   #80  |  Link
JimiK
just me
 
Join Date: Sep 2002
Posts: 158
@Koepi
Wouldn't such a custom modulation be hard to realize? You stated that different matrices would use different quantizers for a fixed filesize (2pass). If one assumes that matrix XY would use lower quantizers than the mpeg matrix, couldn't that screw up two pass encoding? I mean, the size predictability would no longer be given, because for the first pass was done with mpeg. Then you say for quantizers >3 use matrix XY. But this matrix "compresses" better at these quantizers and needs less bits. Most likely the visual quality won't be so good because for example it compresses at quant 2 with almost the same quality as mpeg at quant 4, but now the higher quantizer is being used.
I hope I could make my point clear (fear not). I don't know much about how the codec compensates for the "underuse" of bits in the 2nd pass. Maybe all my fears are in vain. But if this is not the case, then all matrices would have to be modified to "perfectly" play together.

sincerely,
JimiK
JimiK 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 21:06.


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