[FFmpeg-devel] MPEG-2 encoder question
jonathan at castus.tv
Tue Jan 3 22:01:18 CET 2012
I see. So my encoder program using the API needs to set macroblock
decision mode to "best rate distortion" and set the QP_RD flag. And
apparently, disable scene change detection. No modification to the
source needed. Thanks!
I also wanted to ask if MPEG-2 field picture encoding is implemented in
FFMPEG. I don't mean interlaced frame encoding with +ilme and +ildct I
mean field pictures, MPEG-2 picture types 1 (top field) and 2 (bottom
field) instead of picture type 3 (frame encoding).
> 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
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
More information about the ffmpeg-devel