[FFmpeg-devel] MPEG-2 encoder question

Michael Niedermayer michaelni at gmx.at
Tue Jan 3 21:23:49 CET 2012


On Tue, Jan 03, 2012 at 12:09:44PM -0800, Jonathan Campbell wrote:
> I'm looking at libavcodec/mpegvideo_enc.c and encode_thread(). It
> uses s->qscale for the entire set of macroblock rows assigned to it
> (start_mb_y to end_mb_y), which means that it uses the same fixed
> quantization for the /entire frame/.
> 
> Couldn't we improve the encoder by dynamically changing the qscale
> per macroblock row, or even mid-row? I know for a fact the MPEG-1/2
> video standard has macroblock codes to allow for it, so why is
> FFMPEG not taking advantage of it?
> 
> Anyone else here worked on this? I'm willing to patch
> mpegvideo_enc.c to do this and submit upstream to make FFMPEG a
> better MPEG-2 encoder.

please see the qp_rd code that adjust qp per MB, and the various
psychovissual variables from the ratecontrol code.

Iam sure things can be improved and such improvments are very welcome
but qscale is not a constant within a row

[....]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120103/77e16bd3/attachment.asc>


More information about the ffmpeg-devel mailing list