diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-01-28 16:38:04 +0000 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-01-28 16:42:32 +0000 |
commit | b986a4625d0e67710f155a9816dbab186a98020e (patch) | |
tree | 118c89f94a652571276175a55de0f4b21e00faea /libavcodec/libxavs.c | |
parent | c79252897096b89376bcf17a5bca6cdf8d21b6a0 (diff) | |
parent | 1482aff2048511b821ff9feac19426113cc641a2 (diff) | |
download | ffmpeg-b986a4625d0e67710f155a9816dbab186a98020e.tar.gz |
Merge commit '1482aff2048511b821ff9feac19426113cc641a2'
* commit '1482aff2048511b821ff9feac19426113cc641a2':
lavc: Move noise_reduction to codec private options
Merged-by: Derek Buitenhuis <derek.buitenhuis@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 42bddb7164..f257e5584d 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; @@ -366,7 +367,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; @@ -465,6 +474,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 }, }; |