summaryrefslogtreecommitdiffstats
path: root/libavcodec/libxavs.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2015-09-12 14:40:29 +0200
committerVittorio Giovara <vittorio.giovara@gmail.com>2016-01-21 15:33:19 -0500
commit5764d38173661c29d954711dd5abfddf709e9ba4 (patch)
treee5654771a1bb8245b22ce9feab7d7e1347fc5407 /libavcodec/libxavs.c
parent0ac9f33a9e69c64eee592791be3c5441a6a3d6b7 (diff)
downloadffmpeg-streaming-5764d38173661c29d954711dd5abfddf709e9ba4.zip
ffmpeg-streaming-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/libxavs.c')
-rw-r--r--libavcodec/libxavs.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libavcodec/libxavs.c b/libavcodec/libxavs.c
index 910d6c9..2183376 100644
--- a/libavcodec/libxavs.c
+++ b/libavcodec/libxavs.c
@@ -57,6 +57,7 @@ typedef struct XavsContext {
int mbtree;
int mixed_refs;
int b_frame_strategy;
+ int chroma_offset;
int64_t *pts_buffer;
int out_frame_count;
@@ -379,7 +380,15 @@ FF_ENABLE_DEPRECATION_WARNINGS
/* what is the RC method we are now using? Default NO */
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;
x4->params.analyse.b_psnr = avctx->flags & AV_CODEC_FLAG_PSNR;
x4->params.i_log_level = XAVS_LOG_DEBUG;
@@ -448,6 +457,7 @@ static const AVOption options[] = {
{ "esa", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = XAVS_ME_ESA }, INT_MIN, INT_MAX, VE, "motion-est" },
{ "tesa", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = XAVS_ME_TESA }, INT_MIN, INT_MAX, VE, "motion-est" },
{ "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},
{ NULL },
};
OpenPOWER on IntegriCloud