summaryrefslogtreecommitdiffstats
path: root/libavcodec/libxavs.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2015-09-12 22:27:59 +0200
committerVittorio Giovara <vittorio.giovara@gmail.com>2016-01-21 15:33:19 -0500
commit7c79587d7407dab4b9445d66b5f111fe657c8c4d (patch)
tree4cc0c43d332a0ceb44149eca3769a499b6af46d1 /libavcodec/libxavs.c
parent5764d38173661c29d954711dd5abfddf709e9ba4 (diff)
downloadffmpeg-streaming-7c79587d7407dab4b9445d66b5f111fe657c8c4d.zip
ffmpeg-streaming-7c79587d7407dab4b9445d66b5f111fe657c8c4d.tar.gz
lavc: Move scenechange_threshold to codec private options
This option is only used by mpegvideoenc, x264, and xavs. It is a very codec-specific option, so deprecate the global variant. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/libxavs.c')
-rw-r--r--libavcodec/libxavs.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libavcodec/libxavs.c b/libavcodec/libxavs.c
index 2183376..91a92ec 100644
--- a/libavcodec/libxavs.c
+++ b/libavcodec/libxavs.c
@@ -58,6 +58,7 @@ typedef struct XavsContext {
int mixed_refs;
int b_frame_strategy;
int chroma_offset;
+ int scenechange_threshold;
int64_t *pts_buffer;
int out_frame_count;
@@ -330,7 +331,14 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (x4->params.i_keyint_min > x4->params.i_keyint_max)
x4->params.i_keyint_min = x4->params.i_keyint_max;
- x4->params.i_scenecut_threshold = avctx->scenechange_threshold;
+#if FF_API_PRIVATE_OPT
+FF_DISABLE_DEPRECATION_WARNINGS
+ if (avctx->scenechange_threshold)
+ x4->scenechange_threshold = avctx->scenechange_threshold;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
+
+ x4->params.i_scenecut_threshold = x4->scenechange_threshold;
// x4->params.b_deblocking_filter = avctx->flags & AV_CODEC_FLAG_LOOP_FILTER;
@@ -458,6 +466,7 @@ static const AVOption options[] = {
{ "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},
{ "chromaoffset", "QP difference between chroma and luma", OFFSET(chroma_offset), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, VE},
+ { "sc_threshold", "Scene change threshold", OFFSET(scenechange_threshold), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, VE},
{ NULL },
};
OpenPOWER on IntegriCloud