[Mp4-tech] How does block size is decided while encoding.
Tuukka Toivonen
tuukkat ee.oulu.fi
Fri Jul 15 19:41:21 EDT 2005
On Fri, 15 Jul 2005, tummala kalyani wrote:
>The standard says H.264 supports variable block size encoding. Each
>macro block can be divided into a maximum of 16 blocks. On what
>criteria the block sizes in a block is chosen.
It depends on the encoder, and the standard doesn't specify it.
In principle, to get best results, you should do rate-distortion
optimization, ie. encode a macroblock in each possible mode and select the
mode which gives the smallest Lagrangian cost which is
J(a) = E + a*R
where E = error (usually mean squared error) of the encoded macroblock, R =
bitrate of the encoded macroblock and a is a constant which depends
on target bit rate.
However, to use this you would need to encode the block in each mode
which would be slow. Therefore fast mode selection algorithms
are a popular topic of research (and many have been already developed).
More information about the Mp4-tech
mailing list