diff options
author | James Almer <jamrial@gmail.com> | 2017-03-25 21:35:15 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-03-25 21:37:05 -0300 |
commit | f5c8d004c28d930d780c9164f7ed6005b88b9be5 (patch) | |
tree | 5b7bb3096f4aa58c8ecd710b5dc59e7d1c2259ca /libavcodec/aaccoder.c | |
parent | 2f05d18ee2c74e4c3619bf2ef6a64f686519f3c7 (diff) | |
download | ffmpeg-f5c8d004c28d930d780c9164f7ed6005b88b9be5.tar.gz |
avcodec: stop using deprecated codec flags
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/aaccoder.c')
-rw-r--r-- | libavcodec/aaccoder.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c index 9f3b4ed389..abd0b9c636 100644 --- a/libavcodec/aaccoder.c +++ b/libavcodec/aaccoder.c @@ -557,13 +557,13 @@ static void search_for_pns(AACEncContext *s, AVCodecContext *avctx, SingleChanne const float pns_transient_energy_r = FFMIN(0.7f, lambda / 140.f); int refbits = avctx->bit_rate * 1024.0 / avctx->sample_rate - / ((avctx->flags & CODEC_FLAG_QSCALE) ? 2.0f : avctx->channels) + / ((avctx->flags & AV_CODEC_FLAG_QSCALE) ? 2.0f : avctx->channels) * (lambda / 120.f); /** Keep this in sync with twoloop's cutoff selection */ float rate_bandwidth_multiplier = 1.5f; int prev = -1000, prev_sf = -1; - int frame_bit_rate = (avctx->flags & CODEC_FLAG_QSCALE) + int frame_bit_rate = (avctx->flags & AV_CODEC_FLAG_QSCALE) ? (refbits * rate_bandwidth_multiplier * avctx->sample_rate / 1024) : (avctx->bit_rate / avctx->channels); @@ -694,12 +694,12 @@ static void mark_pns(AACEncContext *s, AVCodecContext *avctx, SingleChannelEleme const float pns_transient_energy_r = FFMIN(0.7f, lambda / 140.f); int refbits = avctx->bit_rate * 1024.0 / avctx->sample_rate - / ((avctx->flags & CODEC_FLAG_QSCALE) ? 2.0f : avctx->channels) + / ((avctx->flags & AV_CODEC_FLAG_QSCALE) ? 2.0f : avctx->channels) * (lambda / 120.f); /** Keep this in sync with twoloop's cutoff selection */ float rate_bandwidth_multiplier = 1.5f; - int frame_bit_rate = (avctx->flags & CODEC_FLAG_QSCALE) + int frame_bit_rate = (avctx->flags & AV_CODEC_FLAG_QSCALE) ? (refbits * rate_bandwidth_multiplier * avctx->sample_rate / 1024) : (avctx->bit_rate / avctx->channels); |