diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-01-28 15:21:21 +0000 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-01-28 15:22:19 +0000 |
commit | 7c6e86c0cec17dfc020d58c82f4f1af5fcaea6c1 (patch) | |
tree | 55ab3a10f5d4333bfa6d4b628c404abe3d42922c /libavcodec/libx264.c | |
parent | 13be46c08e59141408f1a7afd4737826afa87f11 (diff) | |
parent | 5764d38173661c29d954711dd5abfddf709e9ba4 (diff) | |
download | ffmpeg-7c6e86c0cec17dfc020d58c82f4f1af5fcaea6c1.tar.gz |
Merge commit '5764d38173661c29d954711dd5abfddf709e9ba4'
* commit '5764d38173661c29d954711dd5abfddf709e9ba4':
lavc: Move chromaoffset to codec private options
Merged-by: Derek Buitenhuis <derek.buitenhuis@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 ffb9142923..480cbb67f0 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -87,6 +87,7 @@ typedef struct X264Context { int coder; int a53_cc; int b_frame_strategy; + int chroma_offset; char *x264_params; } X264Context; @@ -530,8 +531,16 @@ static av_cold int X264_init(AVCodecContext *avctx) x4->params.rc.f_ip_factor = 1 / fabs(avctx->i_quant_factor); if (avctx->b_quant_factor > 0) x4->params.rc.f_pb_factor = avctx->b_quant_factor; + +#if FF_API_PRIVATE_OPT +FF_DISABLE_DEPRECATION_WARNINGS if (avctx->chromaoffset) - x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset; + x4->chroma_offset = avctx->chromaoffset; +FF_ENABLE_DEPRECATION_WARNINGS +#endif + + if (x4->chroma_offset) + x4->params.analyse.i_chroma_qp_offset = x4->chroma_offset; if (avctx->gop_size >= 0) x4->params.i_keyint_max = avctx->gop_size; @@ -964,6 +973,7 @@ static const AVOption options[] = { { "vlc", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "coder" }, { "ac", 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 }, |