On Tue, May 14, 2013 at 11:53:15AM +0300, Martin Storsjö wrote:
> From: Claudio Freire <[email protected]>
> 
> This fixes a case where multichannel bitrate isn't accurately
> targetted by psy model alone, never achieving the target bitrate.
> ---
>  libavcodec/aaccoder.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c
> index d65d8d9..35b98a9 100644
> --- a/libavcodec/aaccoder.c
> +++ b/libavcodec/aaccoder.c
> @@ -710,7 +710,7 @@ static void search_for_quantizers_twoloop(AVCodecContext 
> *avctx,
>                                            const float lambda)
>  {
>      int start = 0, i, w, w2, g;
> -    int destbits = avctx->bit_rate * 1024.0 / avctx->sample_rate / 
> avctx->channels;
> +    int destbits = avctx->bit_rate * 1024.0 / avctx->sample_rate / 
> avctx->channels * (lambda / 120.f);
>      float dists[128] = { 0 }, uplims[128];
>      float maxvals[128];
>      int fflag, minscaler;
> -- 

LGTM except that the log message itself could be more informative, like
"aacenc: fix target bitrate for twoloop quantiser search" or something.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to