From 0e6c8532215790bbe560a9eea4f3cc82bb55cf92 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Wed, 9 Sep 2015 04:18:26 +0200 Subject: lavc: Move b_frame_strategy and b_sensitivity to codec private options The b_frame_strategy option is only used by mpegvideoenc, qsv, x264, and xavs, while b_sensitivity is only used by mpegvideoenc. These are very codec-specific options, so deprecate the global variants. Set proper limits to the maximum allowed values. Signed-off-by: Vittorio Giovara --- libavcodec/qsvenc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libavcodec/qsvenc.c') diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 4a33adea08..bf3dc0f620 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -498,8 +498,14 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q) #endif #if QSV_HAVE_BREF_TYPE +#if FF_API_PRIVATE_OPT +FF_DISABLE_DEPRECATION_WARNINGS if (avctx->b_frame_strategy >= 0) - q->extco2.BRefType = avctx->b_frame_strategy ? MFX_B_REF_PYRAMID : MFX_B_REF_OFF; + q->b_strategy = avctx->b_frame_strategy; +FF_ENABLE_DEPRECATION_WARNINGS +#endif + if (q->extco2.b_strategy >= 0) + q->extco2.BRefType = q->b_strategy ? MFX_B_REF_PYRAMID : MFX_B_REF_OFF; if (q->adaptive_i >= 0) q->extco2.AdaptiveI = q->adaptive_i ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF; if (q->adaptive_b >= 0) -- cgit v1.2.3