Log in

View Full Version : Whats the difference between MPEG-4 and DIVX '4' Padding


saad
17th November 2005, 15:48
well i was analysing the way they do padding. what i found out was

MPEG-4

pad after making frame width/height multiple of 16

DIVX 4

total_width= original_width + xtra_width + 64;
( xtra_width : length added to make it x16)

i.e. pad after making frame width/height multiple of 16

Questions:
-whts this 64 for...is that 32+32 padding on both ends
-mpeg-4 writes the decoded stream in the modified resolution i.e. if it was 294x340 it would become 304x340, does divx4 follows it in some way?????


any other information regarding their padding would be most helpful

Kopernikus
17th November 2005, 16:26
Hmmm, at least in AVC (also MPEG-4) its the decision of the encoder, how to pad the frame. You can specify a cropping rectangle to select the relevant parts of the image to display.

I think DivX pads more to make it easier for motion estimation.

akupenguin
18th November 2005, 00:02
DivX4 is MPEG-4 (simple profile). There's no requirement that the encoder pad only the minimum amount to make the frame mod16. For that matter, it's allowed to pad even if the frame is already mod16. But good codecs don't, because extra padding just wastes bits.

saad
18th November 2005, 07:31
what i have seen is ....
resolution of 632x344 DivX 4 file has been written in the same width/height...
but the mpeg4 has written it in 640x352. !!! ..can we resize the mepg4 file (decoding)to its original width/height :?