diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-05-07 07:20:32 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:39 -0300 |
commit | 494760f971a41851630d7940abe914cd1115737e (patch) | |
tree | 33e017519b761fc8e6776fdc15b5fca627d02f68 /libavcodec/aaccoder_twoloop.h | |
parent | 2350a50bed6bd71c67947604f117a4dff73ebe35 (diff) | |
download | ffmpeg-494760f971a41851630d7940abe914cd1115737e.tar.gz |
aac: convert to new channel layout API
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/aaccoder_twoloop.h')
-rw-r--r-- | libavcodec/aaccoder_twoloop.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/aaccoder_twoloop.h b/libavcodec/aaccoder_twoloop.h index 8e1bc88a85..0504a916ad 100644 --- a/libavcodec/aaccoder_twoloop.h +++ b/libavcodec/aaccoder_twoloop.h @@ -71,7 +71,7 @@ static void search_for_quantizers_twoloop(AVCodecContext *avctx, { int start = 0, i, w, w2, g, recomprd; int destbits = avctx->bit_rate * 1024.0 / avctx->sample_rate - / ((avctx->flags & AV_CODEC_FLAG_QSCALE) ? 2.0f : avctx->channels) + / ((avctx->flags & AV_CODEC_FLAG_QSCALE) ? 2.0f : avctx->ch_layout.nb_channels) * (lambda / 120.f); int refbits = destbits; int toomanybits, toofewbits; @@ -186,7 +186,7 @@ static void search_for_quantizers_twoloop(AVCodecContext *avctx, float rate_bandwidth_multiplier = 1.5f; int frame_bit_rate = (avctx->flags & AV_CODEC_FLAG_QSCALE) ? (refbits * rate_bandwidth_multiplier * avctx->sample_rate / 1024) - : (avctx->bit_rate / avctx->channels); + : (avctx->bit_rate / avctx->ch_layout.nb_channels); /** Compensate for extensions that increase efficiency */ if (s->options.pns || s->options.intensity_stereo) |