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/libvpxenc.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/libvpxenc.c')
-rw-r--r-- | libavcodec/libvpxenc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index 766b7bd755..643855accc 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -103,6 +103,7 @@ typedef struct VP8EncoderContext { int frame_parallel; int aq_mode; int drop_threshold; + int noise_sensitivity; } VP8Context; /** String mappings for enum vp8e_enc_control_id */ @@ -612,7 +613,13 @@ FF_ENABLE_DEPRECATION_WARNINGS codecctl_int(avctx, VP8E_SET_ARNR_TYPE, ctx->arnr_type); if (CONFIG_LIBVPX_VP8_ENCODER && avctx->codec_id == AV_CODEC_ID_VP8) { - codecctl_int(avctx, VP8E_SET_NOISE_SENSITIVITY, avctx->noise_reduction); +#if FF_API_PRIVATE_OPT +FF_DISABLE_DEPRECATION_WARNINGS + if (avctx->noise_reduction) + ctx->noise_sensitivity = avctx->noise_reduction; +FF_ENABLE_DEPRECATION_WARNINGS +#endif + codecctl_int(avctx, VP8E_SET_NOISE_SENSITIVITY, ctx->noise_sensitivity); codecctl_int(avctx, VP8E_SET_TOKEN_PARTITIONS, av_log2(avctx->slices)); } #if FF_API_MPV_OPT @@ -1017,6 +1024,7 @@ static int vp8_encode(AVCodecContext *avctx, AVPacket *pkt, { "crf", "Select the quality for constant quality mode", offsetof(VP8Context, crf), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 63, VE }, \ { "static-thresh", "A change threshold on blocks below which they will be skipped by the encoder", OFFSET(static_thresh), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE }, \ { "drop-threshold", "Frame drop threshold", offsetof(VP8Context, drop_threshold), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, VE }, \ + { "noise-sensitivity", "Noise sensitivity", OFFSET(noise_sensitivity), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 4, VE}, \ { "undershoot-pct", "Datarate undershoot (min) target (%)", OFFSET(rc_undershoot_pct), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 100, VE }, \ { "overshoot-pct", "Datarate overshoot (max) target (%)", OFFSET(rc_overshoot_pct), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1000, VE }, \ |