View Full Version : 7 Questions about textures & motion vectors...
duartix
5th August 2002, 17:22
I have a general knowledge about how MPEG works.
I know that motion vectors (MV) are saved, textures (TX) too, and quantizers (QT) are aplied to make them smaller.
What I don't and would like to know is:
1 - Are QTs aplied to MV data or just to TX data?
Looking at the fddshow feature (Show MV) I got the feeling that those MV where integer values with pixel displacements for each macroblock (MB). I guess I've read around that at higher QTs, 4 MVs per MB are used to better define the movement of sub MBs.
2 - Do these 4 MVs have anything to do with QPME (quarter pixel motion estimation) or is it just a finer grain definition of MVs by going all the way to 1/4 of a pixel?
If it is the 1/4 of a pixel approach, at the expense of 4 times bigger MVs, there is only one advantage I can see coming out of this more elaborate motion estimation:
3 - Can QPME make the TX data smaller?
and I know this will vary almost too much with every source but
4 - What kind of data ratio can you typically have between TX data and MV data on a P-frame? 50-50, 90-10, 99-1?
I've read somewhere also that someone was aplying diferent QTs for each MB in a frame. From doom9 codec comparison I guess that RV9 has possibly made that aproach.
4 - Does XVid use this technique?
5 - Is this how lumimasking works? Or is the QT just aplied to the whole frame?
Knowing that saving diferences is cheaper than saving values, I think that an average MV is saved for the whole frame and then the MVs of each MB are saved as diferences to the average one.
6 - Is this correct?
7 - Is this what happens with the 4 MVs per MB approach? Or do you save another MV for the MB and 4 diferences to the MB average MV?
Thanks to those enlightened who find the time to answer...
Koepi
5th August 2002, 18:08
1 - Are QTs aplied to MV data or just to TX data?
The textures get quantized. The motion vectors are "shortened" accordingly to motion.
2 - Do these 4 MVs have anything to do with QPME (quarter pixel motion estimation) or is it just a finer grain definition of MVs by going all the way to 1/4 of a pixel?
It's a finer grain definition of MVs and can reproduce motion better sometimes. This has nothing to do with qpel.
3 - Can QPME make the TX data smaller?
It _can_, it sometimes does. But sometimes it increases this as well.
4 - What kind of data ratio can you typically have between TX data and MV data on a P-frame? 50-50, 90-10, 99-1?
The ratio is different and correlates between motion and MB difference.
Dunno how this correlates to your "each MB a QT" question, BUT yes, in MPEG4 every MB can have a different quantizer.
4 - Does XVid use this technique?
Of course it does.
5 - Is this how lumimasking works? Or is the QT just aplied to the whole frame?
Adaptive quantisation in XviD looks at the absolute brightness of a scene, when in "mid-range" (so not bright white and not pure black) it applies higher quantisation to textures which aren't easily to be detected by the eye (e.g. a dark suite on a daylight scene would get a little higher quantisation if the other parameters suite as well). This answers the previous 2 questions as well...
6 - Is this correct?
Dunno, didn't read it ;) My explanation is a little too short but should give you an overall idea.
7 - Is this what happens with the 4 MVs per MB approach? Or do you save another MV for the MB and 4 diferences to the MB average MV?
it's called Inter4V because it saves 4 _instead_ of 1 MVs (which hopefully are smaller than 1 MV - I already wrote that MVs can have different lengths.).
avih
5th August 2002, 18:14
nice reply koepi ;)
regarding q.7, after watching the mv in 'action', about the interv4 mode, i can say in much certainty that the 4 mv are NOT smaller than 1 mv, but they are used when the 4 blocks move on relatively different directions. hence using 4 mv will hopefully give a smaller number of bits than 1 mv + all the errors [=actual textures differences] that have to get encoded with it.
Koepi
5th August 2002, 18:17
I wanted to keep it as simple as possible, so small errors are the sacrifyce... :)
duartix
6th August 2002, 13:54
Thanks Koepi, it has been very enlightening. :)
I was asking about data ratios beetween motion and TXs because I was thinking that if the TX data was the biggest piece of the pie, one possible next approach could be to save it using wavelet compression, since it achieves better PSNR at lower bitrates than the DCT based JPEG compression. I know we are talking about simple profile for now but it's a path, and could be followed sometime in a near future.
Before trying to clear up questions 6 & 7, can you elaborate on how are MVs "shortened"?
Koepi
6th August 2002, 14:00
Nope :P
;)
Enough of deep-technical stuff, everything deeper will confuse the users :/
Just a hint: if there is not "much" motion for a MB, in the next frame it's MV gets less bits, it's as simple as that (and works surprisingly well since it sounds wrong in the first place). If you know vectors, you know what that means.
Regards,
Koepi
duartix
6th August 2002, 17:11
Nope :P bad Koepi ;)
From your hint I got the feeling that beyond frame compression there is some scene compression going on. Cool, hadn't thought of that before!
rui
6th August 2002, 18:13
duartix, i sent you a PM ;)
Daiamondo
5th December 2003, 13:22
so Adaptive Quantisation is similar to Psychovisual Enhancements in DivX, right?
mf
5th December 2003, 13:35
Originally posted by Daiamondo
so Adaptive Quantisation is similar to Psychovisual Enhancements in DivX, right?
Should be, but if they keep giving it vague names then it's not going to help any of us :p.
Daiamondo
5th December 2003, 16:15
Exactly! Neither by "psychovisual enhancements" or "Adaptive Quantisation" I would infer what it really does... BTW, I also learned not to use "Cartoon Mode" with anime :D
Leak
5th December 2003, 22:38
Originally posted by Daiamondo
Exactly! Neither by "psychovisual enhancements" or "Adaptive Quantisation" I would infer what it really does... BTW, I also learned not to use "Cartoon Mode" with anime :D
I'm curious - why?
np: Autechre - The Egg (Artificial Intelligence I comp.)
K-Dash
5th December 2003, 23:11
Originally posted by Daiamondo
Exactly! Neither by "psychovisual enhancements" or "Adaptive Quantisation" I would infer what it really does... BTW, I also learned not to use "Cartoon Mode" with anime :D
Cartoon mode works fine, just dont use it with VHQ or QPEL.
Daiamondo
8th December 2003, 12:07
Originally posted by Leak
I'm curious - why?
Because it produced ugly artifacts or blurried the image too much with me...
But maybe, like K-Dash said, because I was using it with VHQ4...
So, what would be preferable to use with Anime? To use cartoon mode and disable qpel and VHQ4 or to use both VHQ and qpel and disable cartoon mode ?.?
mf
8th December 2003, 13:09
Actually, I prefer waiting till after 1.0 final, because that's when the real fun starts, with quality-checking plugins and such. I've already got two ideas. They are:
Full-frame inverse lumimasking
Result texture coding
I'll let you fantasize about what that might mean :D.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.