diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-09-09 05:18:26 +0300 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2016-01-21 23:33:19 +0300 |
commit | 0e6c8532215790bbe560a9eea4f3cc82bb55cf92 (patch) | |
tree | 0a45577e3a85a8aa3205093c39ef2d8dcca2d4a5 /libavcodec/libxavs.c | |
parent | 55c7e5bf7c8d368c9bc60a219b04849ec9f4c84c (diff) |
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 <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/libxavs.c')
-rw-r--r-- | libavcodec/libxavs.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libavcodec/libxavs.c b/libavcodec/libxavs.c index 43b0915c52..910d6c965e 100644 --- a/libavcodec/libxavs.c +++ b/libavcodec/libxavs.c @@ -56,6 +56,7 @@ typedef struct XavsContext { int motion_est; int mbtree; int mixed_refs; + int b_frame_strategy; int64_t *pts_buffer; int out_frame_count; @@ -311,7 +312,14 @@ FF_ENABLE_DEPRECATION_WARNINGS /* cabac is not included in AVS JiZhun Profile */ x4->params.b_cabac = 0; - x4->params.i_bframe_adaptive = avctx->b_frame_strategy; +#if FF_API_PRIVATE_OPT +FF_DISABLE_DEPRECATION_WARNINGS + if (avctx->b_frame_strategy) + x4->b_frame_strategy = avctx->b_frame_strategy; +FF_ENABLE_DEPRECATION_WARNINGS +#endif + + x4->params.i_bframe_adaptive = x4->b_frame_strategy; avctx->has_b_frames = !!avctx->max_b_frames; @@ -439,6 +447,7 @@ static const AVOption options[] = { { "umh", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = XAVS_ME_UMH }, INT_MIN, INT_MAX, VE, "motion-est" }, { "esa", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = XAVS_ME_ESA }, INT_MIN, INT_MAX, VE, "motion-est" }, { "tesa", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = XAVS_ME_TESA }, INT_MIN, INT_MAX, VE, "motion-est" }, + { "b_strategy", "Strategy to choose between I/P/B-frames", OFFSET(b_frame_strategy), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 2, VE}, { NULL }, }; |