[MPlayer-dev-eng] new results & bugs report

Loren Merritt lorenm at u.washington.edu
Tue Jun 15 11:54:38 CEST 2004


On Tue, 15 Jun 2004, Romain Dolbeau wrote:

> D Richard Felker III wrote:
> > Umm, macroblocks are 16x16. Need I say more??
>
> Yes (I suppose I'm a bit dumb, and I know I don't know much
> about MPEG-4). I don't understand why it actually works if
> the unit of work is 16x16. Or are macroblocks only an optional
> part of the encoding ? In that case, I assume the bottom lines
> would waste bits by not using them (no enough lines), or
> alternatively the quality would be worse.

MPEG-4 always works in 16x16 macroblocks (and 8x8 lumablocks). If your
video is not a multiple of the block size, then the partial blocks will
be padded with black.
This wastes bits and/or loses quality for several reasons:
- There is some overhead per macroblock: block type, motion vectors,
and quantizer (maybe more?).
- You encode pixels that are never seen, but still take bits.
- There is a sharp edge between your video and the black filler. Discrete
Cosine Transforms don't like edges.
- It impedes motion compensation near the edge of the video, because the
filler is always static while the video around it moves.
- Many media players under Windows have problems playing the video at
all. This is entirely their fault, but you still have to consider whether
you care about compatibility.

> But then, it is
> of interest to compare the various encoding options in the
> case were macroblocks cannot be used. We may not be able
> to (sanely) extrapolate to the multiple-of-16 case, but
> it still can be of interest. Maybe an academic interest
> only, but then I belong to an academic institution ATM :-)

It's only useful if you plan to encode that way. If we all use mod16
sizes, then it's better to test lavc options using mod16 samples, and
extrapolate the other way.


AFAIK no one has done a rigorous test to determine exactly how much
quality is lost on non-mod16 sizes. Nor do I know exactly how to go about
that: You can't just compare size or PSNR, because different settings will
have different source videos.

--Loren Merritt




More information about the MPlayer-dev-eng mailing list