summaryrefslogtreecommitdiff
path: root/libavcodec/libx264.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2015-04-13 10:45:51 +0200
committerLuca Barbato <lu_zero@gentoo.org>2015-04-15 09:48:47 +0200
commit0cbb1473179d35d4eb9c9446c8ed84e197e5389b (patch)
tree775c99885304688a55f509a333c9d5734842fd32 /libavcodec/libx264.c
parent7a5f44476696b495e0de658ed859bcb8520b93d4 (diff)
x264: Map color parameters
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r--libavcodec/libx264.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 8e19be4782..2caef1743f 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -493,6 +493,11 @@ static av_cold int X264_init(AVCodecContext *avctx)
avctx->pix_fmt == AV_PIX_FMT_YUVJ444P ||
avctx->color_range == AVCOL_RANGE_JPEG;
+ // x264 validates the values internally
+ x4->params.vui.i_colorprim = avctx->color_primaries;
+ x4->params.vui.i_transfer = avctx->color_trc;
+ x4->params.vui.i_colmatrix = avctx->colorspace;
+
if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER)
x4->params.b_repeat_headers = 0;