View Full Version : Where to get HVS_GOOD matrix ?
Micro
31st March 2003, 00:25
I tried to search but the result was almost nonexistant.
Manao
31st March 2003, 00:38
here (http://forum.doom9.org/showthread.php?s=&threadid=34493&highlight=hvs+good), the zip contains hvs good, better and best.
Micro
31st March 2003, 08:13
Thanks, Manao
Micro
Dark-Cracker
31st March 2003, 08:44
hi,
i made a little publicity for my tool :)
if u want there is 13 custom matrix (classified by compressibility)
in my tool , if u are interested u can download autodub here : www.dark-angel.does.it
Bye.
kilg0r3
31st March 2003, 11:21
hi all,
i am currently trying to understand a bit of this matrix buisness. Does anyone here know what the values in the table stand for? I read something about frequencies, but frequencies in which sense?
JimiK
31st March 2003, 12:40
@kilg0r3
I'm not a graphics guru (far from it), but I'll try to explain what I understand about frequencies. Via DCT, the picture gets converted into frequency space (if it's called so in english). That's the reason why for decoding, you have to perform iDCT ("inverse" discrete cosinus transformation). Hard "edges" (when there is a transition between black and white for example), will be transform into higher frequencies. These thresholds are hard to compress. AFAIK the values in the lower right corner of the matrix says how much these frequencies are going to be compressed (higher value, higher compression). You would need more bits for such a hard break like from black to white and that's why you try to compress more. That is the reason why you get artifacts like mosquito noise around these edges (and I guess that could be why these strange artifacts show up on the top of the picture if you don't cut off all of the black bars).
But better wait for someone more experienced to explain. I'm hoping that anybody will correct what was wrong in my explanation, so I can learn a bit more about this issue.
Best regards,
JimiK
vinouz
1st April 2003, 01:59
you're right.
Exactly, in the matrix, the numbers are divisors for the values of the different frequency components of the image.
someone called Joseph Fourier once told every periodic signal can be decomposed into a sum of sinus and cosinus, which perdiods are the period, it's half, it's third, it's 4th, etc.. the fourier transform is the list of the intensities of these waves (called harmonics). supposedly there are an infinity of them but in a computer the signal is discrete (meaning it is decomposed in distincts points in the time. example in CD sound a 44100th a second (called a sample), in an image the pixel) so the FT (fourier Transform) has a finite number of harmonics. It is called the DFT : discrete FT.
a version of the DFT with only the coefficients of the cosines is called the DCT (discrete cosine transform).
That's what is used in image/sound compression.
Here we consider a block of following samples or pixels, apply DCT to it, and code the coefficients iwth more or less detail.
a Macroblock (8x8 or 16x16 pixels) being 2 dimensional, we apply the dct to it horizontally (meaning replacing each line of pixel by its DCT) then vertically. Then to take less place, each coefficient is divided by a value given by the quantizer matrix (then divided by the general qantizer, IIRC), then it is coded.
So the biggest the coefficient in this matrix, the less precise the harmonic concerned by it. harmonics go from lower to higher from left to right for horizontal frequencies, and from up to down for vertical frequencies.
And yes, rapid transitions code in many coefficients, from low to high ones. These are usually the ones the most distorted by the unequal quantization favoring low frequencies, so the ones which give the most important noise when quantized. (a square signal can be decomposed in the sum of odd harmonics, which coefficient is 1 divided by it's order ) (sigma[i=1 to i=max, i odd] of sin(2*pi*i)/i).
I hope it helps.
Vince
kilg0r3
1st April 2003, 08:47
wow, great! thanks.
kilg0r3
2nd April 2003, 09:46
just one further question. the matrix which is shown initially when opening the 'custom quantization matrix'-window seems to be the mpeg matrix since the h.263 is said to have only one value for all frequencies. Could some body tell me which value the h.263 uses.
deXtoRious
2nd April 2003, 23:48
I'm not guru enough to make my own matrixes, so could somebody tell me where to download some? Thanx...
vinouz
3rd April 2003, 00:25
By the way, an idea may be interesting.
abrupt transitions giving mosquito noise when heavily quantized, and being odd harmonics, some sort of even quantization (odd harmonics are even positions, the first being the linear component) favorising this form could permit lowering the general quantized without having more of this particular noise, which is very common.
But I'm wondering how to deal with the offset (exact position) of the transition. I should make some tests, but anyway an idea is just correcting a standard matrix to favor odd lines and columns :
adding for example
0 -6 0 -2 0 -1 0 0
-6 -12 -6 -8 -6 -7 -6 -6
0 -6 0 -2 0 -1 0 0
-2 -8 -2 -4 -2 -3 -2 -2
0 -6 0 -2 0 -1 0 0
-1 -7 -1 -3 -1 -2 -1 -1
0 -6 0 -2 0 -1 0 0
0 -6 0 -2 0 -1 0 0
to the matrix
Animaniac
3rd April 2003, 01:57
How do these HVS matracies compare to Andrea's? Is it even logical to compare them? >.<
Micro
3rd April 2003, 08:31
Originally posted by deXtoRious
I'm not guru enough to make my own matrixes, so could somebody tell me where to download some? Thanx...
@deXtoRious,
please read again the second post in this thread
vinouz
3rd April 2003, 15:36
Andrea ?
kilg0r3
3rd April 2003, 16:05
Andreas
vinouz
3rd April 2003, 16:12
Who is he ? (sorry I don't remember seeing his posts, but I don't come see that often...)
Animaniac
3rd April 2003, 19:10
Originally posted by vinouz
Who is he ? (sorry I don't remember seeing his posts, but I don't come see that often...)
http://forum.doom9.org/showthread.php?s=&postid=266092&highlight=78er#post266092
vinouz
3rd April 2003, 21:41
Mmmh ok, saved.
I didn't focus on matrices before, as I thought all had been done since long on that subject.
Anyways I'll give all this material a look, and try to integrate my own idea on it.
Does anyone have an idea on a quality comparison of andreas78er vs hvsgood/better/best (for typical film uses, not anime) ?
Did someone make many encodes using these different matrices ?
In my thought a good matrix for intra could have been round instead of zigzag (concentric values, some calculation where val = f(dist_to_0_0)). What about it ? Has anyone seen or tried this kind of matrices ?
For inter it's diferent. After having calculated the motion, what difference remains ?
OK, gotta try....
Dark-Cracker
3rd April 2003, 23:05
try with autodub there is al these matrix classified by compressibility and after making some tests i really like andreas matrix.
bye.
drebel
3rd April 2003, 23:56
try with autodub there is al these matrix classified by compressibility and after making some tests i really like andreas matrix.
That makes two of us :D
No ringing with YV12(without cpu2="ooooxx"),no nasty blocks ,compresses nicely
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.