[MPlayer-users] encoding questions
D Richard Felker III
dalias at aerifal.cx
Sat Feb 7 02:31:57 CET 2004
On Fri, Feb 06, 2004 at 11:20:03PM +0100, Alexander Noé wrote:
> D Richard Felker III wrote:
>
> >IMO it's not worth trying to make the comparison. DVDs use extremely
> >high bitrates to make up for the fact that the idiots mastering them
> >don't (can't) crop black borders
> >
> Black borders should be 8x8-Blocks of Zeros after the quantization,
> meaning that you
> only need the DC component. I cannot believe that this takes a
> noticeable amount
> of data.
Think again. There are two problems:
1. First of all, black borders are usually not aligned on
multiple-of-16 pixel boundaries. (Note that 16, not 8, is the magic
number because of chroma!!) Do you have ANY IDEA what a sharp
sudden black-to-image transition looks like in DCT space?? Yes,
huge coefficients on the high-frequency terms. Very very bad!!
2. Even if the black borders are aligned, they ruin motion estimation
at the boundaries. If the image goes all the way to the edge, the
final edge pixel is effectively extended for 8 (or 16, I forget)
pixels outside the image, so that you can use the edges as a source
for motion estimation. On the other hand, if you have black outside
the actual picture, then motion estimation will (and should!) pick
a (0,0) motion vector and encode the entire difference with just
DCT. This is very inefficient and will waste lots of bits during
pans or motion of objects into or out from the movie region.
You're right that the all-black blocks don't take any significant
space themselves. A huge black border shouldn't be any worse than a
small one; this is why it's important that you FULLY crop the black
border and any crap/noise at the image edge before encoding.
Rich
More information about the MPlayer-users
mailing list