Log in

View Full Version : Custom matrices TEST with encoded samples.


Q-W-Y
3rd February 2004, 23:32
Hi,
I have done testing samples of all available custom matrices. I have encoded it with SinglePass at Q 3.00 and Q 7.00


There are packed encodes:
Q 3.00 qwytest_matrices.zip (8,63_MB) (http://www.talalay.cz/temp/qwytest_matrices.zip)

and Q 7.00: qwytest_matricesQ7.zip (3,42_MB) (http://www.talalay.cz/temp/qwytest_matricesQ7.zip)


---------filesizes for Q 3.00

Andreas_78er.matrix (765.952)

Andreas_doppelte_99er.matrix (765.952)

Andreas_einfache_99er.matrix (765.952)

CG-Animation Matrix (614.400)

MPEG_custom (612.352)

Bulletproof's High Quality Matrix (512.000)

H.263 (509.952)

MPEG (507.904)

Low Bitrate Matrix (505.856)

Standard (505.856)

Very Low Bitrate Matrix (503.808)

hvs-best-picture (493.568)

Ultra Low Bitrate Matrix (487.424)

hvs-better-picture (481.280)

hvs-good-picture (471.040)

Bulletproof's Heavy Compression Matrix (423.936)

Ultimate Matrix (362.496)
---------


It's interesting how much is compressibility different, though picture quality is nearly comparable... :eek:


QWY

The Edge
4th February 2004, 00:22
40 Meg Limit Exceeded!

:eek: :(

Q-W-Y
4th February 2004, 00:43
Originally posted by The Edge
:eek: :(
:eek: I have transfered the files to another hosting. :)

CruNcher
4th February 2004, 02:34
Q-W-Y testing custom matrices with fixed quants is useless those results don't tell you mutch

Selur
4th February 2004, 07:03
yup, if you want to compare custom matrices you should do two pass encoding with a target filesize for all matrixes.
(e.g. doing 4 encodes per Matrix target a size with an average bitrate of 500/1000/1500/2000 kBit/s to see how the different matrices compare quality vise restricted to the different bitrates)

Cu Selur

Q-W-Y
4th February 2004, 07:16
Originally posted by CruNcher
Q-W-Y testing custom matrices with fixed quants is useless those results don't tell you mutch

Heh, Do you tell me that QualityBased encoding is useless? :D

kilg0r3
4th February 2004, 09:31
As you are at it, and if you want to do some thing new (if it be), it would be a good idea to make a two-pass series of tests with special focus on cartoon content. this kind of movies do not havea lot of fine details which means that you can use matrices with very high values in the lower right area of the grid. It should filter out much of useless noise and hence keep down the filesize without adding cpu load.

Just an idea of a transitional Xvid pensioneer.

Cheers to everyone holding up Xvid's banner.

amango
4th February 2004, 13:22
Could someone upload a zip with all matrices?

kilg0r3
4th February 2004, 13:28
The Niltze installation has it included. Please look in the Startmenu

Q-W-Y
4th February 2004, 15:22
Originally posted by Selur
yup, if you want to compare custom matrices you should do two pass encoding with a target filesize for all matrixes.
(e.g. doing 4 encodes per Matrix target a size with an average bitrate of 500/1000/1500/2000 kBit/s to see how the different matrices compare quality vise restricted to the different bitrates)

Cu Selur

I will do something like you have written in this week... :cool:

The Edge
4th February 2004, 16:36
I'll look forward to it mate ;)

yaz
5th February 2004, 10:55
Originally posted by kilg0r3
... The Niltze installation has it included ...
the list is more than that. 15 qm from the pack + h263 (xvid inner matrix, never published, iirc) + mpeg_custom (???)

@qwy
imho, your list is very useful if ... reliable. say, at fixed quant hvs-best gave less compression (bigger file) than h263 to me. in general, this list differs significantly from that published for devapi3 branch (see here (http://forum.doom9.org/showthread.php?s=&threadid=53594&highlight=quant+matrix)). who knows why ?
add.
- imho, 'mpeg_custom' is the mpeg qm of xvid & 'mpeg' (in the list) is taken from an mpeg2 encoder (cce, tsunami, whatever). the same for 'standard'. can sy confirm ?
- u should specify the conditions in detail. there are some options affecting heavily the results of such kinda tests. say, qpel, msp, aq, trellis(!). see soulhunter's psnr tests here (http://forum.doom9.org/showthread.php?s=&threadid=57096&highlight=quant+matrix)
- the hvs-good matrix is a buggy one. the 4th dct coeff in the bottom row is faked. (after a short debate we agreed on 35/36 as the most probable value. anyway, it causes insignificant differences both in psnr and compression)
- a quant=2 encode would show more significant differences (& it'd be something similar to the traditional way of compressibility testing)

@criticizers :-)
i think this test says what it intented to. info about compression differences given by changing the qm while keeping everything constatnt. it's a correct way of comparison (even if some of u find this info quite irrelevant :-)
imho, the other way u proposed is more problematic. iiuw, u want some kinda quality comparison. but how ? cbr or vbr ? with what compression ? with what settings ? what'd be an exact parameter for its quantification ? psnr, ssim, or what ? ... ... ? imho, wout such 'specification' qwy would do anything but good for u :-)))

again, i found this test very usuful. thx, qwy, for your efforts

the bests
y

Bear
5th February 2004, 14:49
Thanks Q-W-Y.

I would like to say, your comparison is very useful for me. Becasue I only do 1 pass quality based encoding. In your test, I can see different matrix output different file size. And I can decide which matrix to use accordingly. Thanks.

sysKin
5th February 2004, 15:10
Oh guys come on, you absolutely can't test different quantization methods by looking at filesize. For the millionth time: it makes no sense. Just purely no sense at all. It's completely identical to comparing filesizes at different quants - of course low quants will give bigger filesize, just like low matrix's values will give bigger filesize, simply because they are the same thing.

What exactly can you make out of it? You can achive any "compressability" just by making the right quant matrix. So instead of saying "this matrix gives smaller filesize" you should say "I want smaller filesize, let's make a matrix to achive that". And you don't even have to think, just put higher values - just like in one-pass quantizer mode, you use higher quantizer to achive lower filesize. It's the same quantization and the same "higher".

In some rare cases mpeg coding is pure science. If it's so, you're lucky and you can use simple scietific methods to figure out some facts. Don't ignore these facts, beliving in something else will lead you no where.

Regards,
Radek


This is not a complaint or rant at anyone. This is just an explaination aimed at people who want to learn. Everyone is free to believe whatever they want to believe, I was never against that - it's just that from *scientific* point of view, facts are as I've written above. If you're new and want to learn, you should acknowladge that.

yaz
5th February 2004, 17:09
@syskin
sorry for 'whirling' u up (again :-) ! i know u feel a kinda 'personal offence' every time sy pops up this topic. & i must say, u're right, in a way ... but i think, so are they, in an other way.
imho, u misunderstand a bit what poeple aim with this matrix comparison. they consider it a way of affecting compression (just read bear's answer!). the logic is, say, 'if i used another matrix while keeping everything else constant, i'd get a different filesize (so different compression)'. with different quality, of course. for such an approach (typical for that doing only 1 pass encodes) it's a good guideline.
u're absolutely right that this business is not as simple cus different matrices means different quality too (whatever it means). but (imho) nobody has ever stated it. at least i've never read it anywhere in this forum. i'm sure, they all make the final decision on keeping or dropping the encode made this way by judging the final quality.

as for me, i never use other than the built-in mpeg qm but after all i do the same. i just manipulate the compression in a different way. but the aim is the same; fitting the movie to a certain space with the best quality. (that's why i use xvid:-)

the bests
y

MfA
5th February 2004, 21:21
How is it a good guideline when only the filesizes are presented?

Factual information in itself can always be usefull, but the fairy tale these kinds of threads spread by implying that in isolation this kind of "compressibility" information can be usefull is harmfull.

Soulhunter
6th February 2004, 00:03
Originally posted by MfA
How is it a good guideline when only the filesizes are presented?
Hey, Q-W-Y gave also info about "his" visual impression !!!

But on the other hand, I wont believe that the quality is nearly comparable... ;)


Bye

BoNz1
6th February 2004, 00:57
Originally posted by kilg0r3
As you are at it, and if you want to do some thing new (if it be), it would be a good idea to make a two-pass series of tests with special focus on cartoon content. this kind of movies do not havea lot of fine details which means that you can use matrices with very high values in the lower right area of the grid. It should filter out much of useless noise and hence keep down the filesize without adding cpu load.

I actually had something like this cooked up about 6 months ago. I was having some problems with some particular cartoons and had been scratching my head on how to get the bitrate lower, btw this was before cartoon mode. I made a matrix that basically did exactly as you said, it used large block of 255 in the right hand corner; btw 255 is the highest IIRC. I also used higher values in the upper left hand corner so you do not throw away important high frequencies of sharp lines. When there was not too much motion this matrix worked wonderful it drastically lowered the bitrate without hurting quality but when there was quite a bit of motion it didn't work so well it turned very blocky. But if you spent some time you could tune it to work properly. My problem with it was I didn't exactly know what the matix was doing. You could play with it until it works but I like to actually have scientific reasons as to why it works. Something I was wondering was does a matrix work like a typical matrix works like you use in linear algebra or calculus and if so what is it calculating? And what does it actually do? Does it just tell the codec what frequencies in the macroblock that it can throw away? Maybe I will take a look at the actual XviD code and see if I can figure it out.

Koepi
6th February 2004, 07:17
Bonz1:

Sorry, we had very lengthy discussions about matrices and how theyx work/what they do in the past. You'll find that information by searching the forum.

And - you expect too much from a matrix. All you do is something you could describe as "quantize as much information away at quant2 which would else require quant 8 in h263 quantisation matrix".

Maybe that explanation helps you understanding quantisation / the matrix.

Regards
Koepi

Sagittaire
6th February 2004, 12:07
My test with XviD and quant Matrix

trailler HPII with quant2 VHQ4, Ultra High, Trelli, CM, bframe 1/1.50/0.75

andreas_78er.matrix: 38 988 Ko
Extreme quality

andreas_einfache_99er.matrix: 38 984 Ko
Extreme quality

andreas_doppelte_99er.matrix: 38 984 Ko
Extreme quality

Bulletproof's High Quality Matrix: 33 196 Ko
Very high quality

Bulletproof's Heavy Compression Matrix: 20 150 Ko
Bad quality

hvs-best-picture: 32 180 Ko
Very high quality

hvs-better-picture: 29 712 Ko
Very high quality

hvs-good-picture: 28 924 Ko
Very high quality

MPEG-1: 31 238 Ko
Very high quality

H263: 29 284 Ko
Very high quality

Low Bitrate Matrix: 30 248 Ko
Very high qulity

Very Low Bitrate Matrix: 29 712 Ko
High quality

Ultra Low Bitrate Matrix: 26 998 Ko
Medium quality

Ultimate Matrix: 20 658 Ko
Medium quality

Koepi
6th February 2004, 12:37
The results are nice - but still useless. What do they tell about usage in a "usual 2pass encode"? Unfortunately nothing. And at higher quantization the matrices start to really behave differently, much more (visible) than at fixed q2 encoding.

The only thing you now know is that different matrices quantize more/less data away at quant2 already than others.

Just one example about properly doing quant matrix testing (on the first page already, the post from dali lama...:"I have tried that custom matrix at high quantizations ~8, and I can say it underperforms h.263 in blocking and ringing artifacts". Find it here (http://forum.doom9.org/showthread.php?s=&threadid=33499&highlight=quantization+matrix) .

If you search for "quant matrix" in the xvid forum you'll find plenty of old posts which help you understanding the issues with your tests which we try to describe.

I hope this helps.

Regards
Koepi

Q-W-Y
6th February 2004, 14:47
Originally posted by MfA
How is it a good guideline when only the filesizes are presented?

Factual information in itself can always be usefull, but the fairy tale these kinds of threads spread by implying that in isolation this kind of "compressibility" information can be usefull is harmfull.

I have posted packed samples of encodes too, just look at the top :rolleyes:

sysKin
6th February 2004, 15:32
Originally posted by Q-W-Y
I have posted packed samples of encodes too, just look at the top :rolleyes: Yes but they don't have the same filesize. You don't even have to look to figure out that smaller files will get worse quality, so extra looking at the samples won't tell you anything new, anyway.

Radek

chilledoutuk
6th February 2004, 21:27
these are useful for people like me who sometimes get undersized encodes.

On very compressible encodes if desperatly need to hit a filesize you could use an andreas matrix that quantizes less than a h.263 matrix resulting in a first pass thats bigger than your target size thus hitting the size you want but thats the only case i can see it being useful.

ps i dont like quant 1 as size prediction is imposible unless using a inflated overflow which i dont want as it will harm the quant distribution.

BoNz1
7th February 2004, 03:42
Originally posted by Koepi
Bonz1:

Sorry, we had very lengthy discussions about matrices and how theyx work/what they do in the past. You'll find that information by searching the forum.

Yup, if you are referring to this http://forum.doom9.org/showthread.php?s=&threadid=54147&highlight=matrix I have read it through a couple times myself. Probably it is the most helpful. I actually used DCTune which Acaila linked to on the third page to help make my matrix. Anyhow, I'll look at it and xvid again and see what I can come up with. I had hoped for a real mathematical explaination rather than just a theoretical one. But that is ok, I can figure it out myself if I care to one day.


And - you expect too much from a matrix. All you do is something you could describe as "quantize as much information away at quant2 which would else require quant 8 in h263 quantisation matrix".

Maybe that explanation helps you understanding quantisation / the matrix.

Regards
Koepi

Ok, thanks Koepi that helps a little. Like I said when I get time I might look into this a little more. It might be possible to get a slight gain in quality or even a large gain in the case of cartoons.