1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-29 22:00:58 +02:00

x264: Map color parameters

This commit is contained in:
Luca Barbato 2015-04-13 10:45:51 +02:00
parent 7a5f444766
commit 0cbb147317

View File

@ -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;