[FFmpeg-devel] [PATCH]Sanitize VBR setting for libfdk-aac

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Sep 12 20:03:20 CEST 2012


On Wed, Sep 12, 2012 at 11:22:33AM -0400, Derek Buitenhuis wrote:
> On 11/09/2012 4:46 PM, Carl Eugen Hoyos wrote:
> >>> -        int mode = avctx->global_quality;
> >>> +        int mode = avctx->global_quality / FF_QP2LAMBDA;
> >>
> >> I'm not really sure how this can be right.
> > 
> > Please elaborate how this is supposed to be done.
> 
> This doesn't make it better in any way. Nothing that uses global_quality uses
> the same scale anyway, and libfdk-aac uses a discrete set of values from it. 
> Using FF_QP2LAMBDA will only complicate and/or break this functionality.

Are you by chance not aware of this line of code?
ffmpeg_opt.c:        st->codec->global_quality = FF_QP2LAMBDA * qscale;
Note that lots of encoders like the vorbis, libspeex, ... one do exactly that same division.


More information about the ffmpeg-devel mailing list