[MPlayer-users] Decreased MPEG-4 compression quality from changing pixel aspect r atio?
Francois Visagie
fvisagie at za.spescom.com
Tue Sep 25 10:46:59 CEST 2007
Hi All,
The below applies to MPEG-4 compression, specifically XviD but it probably
applies to all codecs doing intra-frame compression.
MPlayer.htm warns against using scaling for "squaring pixels" (i.e. scaling
the movie dimensions to achieve desired display aspect ratio) and correctly
substantiates why. However, an issue that's never really explored is the
following: is it possible that modifying the pixel aspect ratio
(horizontal_pixels / vertical_pixels) could cause an additional loss of
quality during compression?
For instance, some PAL DV and PAL DVD sources use 720 x 576 pixel
resolution. That gives a pixel aspect ratio of 720 / 576 = 1.25, whereas the
display aspect ratio is actually 4/3 ~ 1.33. Now, to reduce frame size
during encoding one could use a resolution of say 528 x 416 which yields a
pixel aspect ratio of ~1.27 which is close enough to the original. One
relies upon the display aspect ratio encoded into the container, as well as
the player during playback to render the proper 4/3 display aspect ratio.
Alternatively, one could scale the 720 x 576 movie to say 528 x 400 (e.g.
using the CQ formulae in MPlayer.htm) which yields a pixel aspect ratio of
1.32 (~4/3). In other words, the movie dimensions are scaled to the display
aspect ratio in this example (which may have its uses).
However, because in the latter example the pixel aspect ratio has been
modified, upon display pixels are now relatively closer together or further
apart (more so in one dimension than the other) than before scaling.
Typically, intra-frame compression relies heavily upon adjacent and
neighbouring pixel information. If relative spatial separation between
pixels is now modified by changing pixel aspect ratio, doesn't this cause
the compressor weighting of neighbouring information to become too heavy or
too light?
On the other hand, if the pixel aspect ratio ISN'T changed, but differs from
the display aspect ratio (as in the first example above), does the
compressor need to take into account the fact that on-screen inter-pixel
distances might be say 1:1.25 pixels:pixels, instead of 1:1? If so, how -
does the compressor use the aspect ratio provided in the codec configuration
(assuming it is)?
I'd be grateful for any light shed on what, if any, effect changing pixel
aspect ratio might have on MPEG-4 compression, and on what to do to minimise
it if needed.
Thanks,
Francois
This e-mail is sent on the Spescom Terms and Conditions
that can be accessed by clicking on this link http://www.spescom.com/email.html
More information about the MPlayer-users
mailing list