[FFmpeg-cvslog] x264: Map color parameters

Luca Barbato git at videolan.org
Wed Apr 15 11:56:50 CEST 2015


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Mon Apr 13 10:45:51 2015 +0200| [0cbb1473179d35d4eb9c9446c8ed84e197e5389b] | committer: Luca Barbato

x264: Map color parameters

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0cbb1473179d35d4eb9c9446c8ed84e197e5389b
---

 libavcodec/libx264.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 8e19be4..2caef17 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;
 



More information about the ffmpeg-cvslog mailing list