diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-09-13 23:45:24 +0200 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2016-01-21 15:33:19 -0500 |
commit | 1482aff2048511b821ff9feac19426113cc641a2 (patch) | |
tree | b8254bb7874f24fe6f368afc7c0a37dba8175d3c /libavcodec/libxavs.c | |
parent | 7c79587d7407dab4b9445d66b5f111fe657c8c4d (diff) | |
download | ffmpeg-1482aff2048511b821ff9feac19426113cc641a2.tar.gz |
lavc: Move noise_reduction to codec private options
This option is only used by mpegvideoenc, x264, xavs, and vpx.
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.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libavcodec/libxavs.c b/libavcodec/libxavs.c index 91a92ec389..b7a6c41666 100644 --- a/libavcodec/libxavs.c +++ b/libavcodec/libxavs.c @@ -59,6 +59,7 @@ typedef struct XavsContext { int b_frame_strategy; int chroma_offset; int scenechange_threshold; + int noise_reduction; int64_t *pts_buffer; int out_frame_count; @@ -368,7 +369,15 @@ FF_ENABLE_DEPRECATION_WARNINGS x4->params.analyse.b_transform_8x8 = 1; //avctx->flags2 & AV_CODEC_FLAG2_8X8DCT; x4->params.analyse.i_trellis = avctx->trellis; - x4->params.analyse.i_noise_reduction = avctx->noise_reduction; + +#if FF_API_PRIVATE_OPT + FF_DISABLE_DEPRECATION_WARNINGS + if (avctx->noise_reduction >= 0) + x4->noise_reduction = avctx->noise_reduction; + FF_ENABLE_DEPRECATION_WARNINGS +#endif + + x4->params.analyse.i_noise_reduction = x4->noise_reduction; if (avctx->level > 0) x4->params.i_level_idc = avctx->level; @@ -467,6 +476,7 @@ static const AVOption options[] = { { "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}, + { "noise_reduction", "Noise reduction", OFFSET(noise_reduction), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, VE}, { NULL }, }; |