diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-09-12 14:40:29 +0200 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2016-01-21 15:33:19 -0500 |
commit | 5764d38173661c29d954711dd5abfddf709e9ba4 (patch) | |
tree | e5654771a1bb8245b22ce9feab7d7e1347fc5407 /libavcodec/libx264.c | |
parent | 0ac9f33a9e69c64eee592791be3c5441a6a3d6b7 (diff) | |
download | ffmpeg-5764d38173661c29d954711dd5abfddf709e9ba4.tar.gz |
lavc: Move chromaoffset to codec private options
This option is only used by 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/libx264.c')
-rw-r--r-- | libavcodec/libx264.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 5db00ff540..1caf0414d6 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -80,6 +80,7 @@ typedef struct X264Context { int forced_idr; int coder; int b_frame_strategy; + int chroma_offset; char *x264_params; } X264Context; @@ -412,7 +413,15 @@ static av_cold int X264_init(AVCodecContext *avctx) if (avctx->i_quant_factor > 0) x4->params.rc.f_ip_factor = 1 / fabs(avctx->i_quant_factor); x4->params.rc.f_pb_factor = avctx->b_quant_factor; - x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset; + +#if FF_API_PRIVATE_OPT +FF_DISABLE_DEPRECATION_WARNINGS + if (avctx->chromaoffset) + x4->chroma_offset = avctx->chromaoffset; +FF_ENABLE_DEPRECATION_WARNINGS +#endif + + x4->params.analyse.i_chroma_qp_offset = x4->chroma_offset; if (avctx->gop_size >= 0) x4->params.i_keyint_max = avctx->gop_size; @@ -739,6 +748,7 @@ static const AVOption options[] = { { "cavlc", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "coder" }, { "cabac", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, INT_MIN, INT_MAX, VE, "coder" }, { "b_strategy", "Strategy to choose between I/P/B-frames", OFFSET(b_frame_strategy), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 2, VE }, + { "chromaoffset", "QP difference between chroma and luma", OFFSET(chroma_offset), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, VE }, { "x264-params", "Override the x264 configuration using a :-separated list of key=value parameters", OFFSET(x264_params), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE }, { NULL }, |