summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo_enc.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2015-07-02 12:14:22 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-07-02 22:37:59 +0100
commit910247f1720c6aae422723c05dac6d0b19f20bec (patch)
tree5f9fd6156cdb9d2e2d9111ad56e987127d7b1568 /libavcodec/mpegvideo_enc.c
parent1316df7aa98c4784f190d107206d0bb12c590b89 (diff)
lavc: Deprecate avctx.{inter,intra}_quant_bias
They are used by dnxhd and mpegvideo_enc exclusively, move them to codec private options instead. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r--libavcodec/mpegvideo_enc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 7975dd2277..f88e0096b4 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -542,10 +542,16 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
s->inter_quant_bias = -(1 << (QUANT_BIAS_SHIFT - 2));
}
- if (avctx->intra_quant_bias != FF_DEFAULT_QUANT_BIAS)
+#if FF_API_QUANT_BIAS
+FF_DISABLE_DEPRECATION_WARNINGS
+ if (s->intra_quant_bias == FF_DEFAULT_QUANT_BIAS &&
+ avctx->intra_quant_bias != FF_DEFAULT_QUANT_BIAS)
s->intra_quant_bias = avctx->intra_quant_bias;
- if (avctx->inter_quant_bias != FF_DEFAULT_QUANT_BIAS)
+ if (s->inter_quant_bias == FF_DEFAULT_QUANT_BIAS &&
+ avctx->inter_quant_bias != FF_DEFAULT_QUANT_BIAS)
s->inter_quant_bias = avctx->inter_quant_bias;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
if (avctx->codec_id == AV_CODEC_ID_MPEG4 &&
s->avctx->time_base.den > (1 << 16) - 1) {