From 70f50ddc5e97020d64ea0702748a00eddebc2473 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Wed, 26 Mar 2014 01:46:38 +0100 Subject: video: Add support for non-BT.709 primaries This add support for reading primary information from lavc, categorized into BT.601-525, BT.601-625, BT.709 and BT.2020; and passes it on to the vo. In vo_opengl, we always generate the 3dlut against the wider BT.2020 and transform our source into this colorspace in the shader. --- video/decode/vd_lavc.c | 1 + 1 file changed, 1 insertion(+) (limited to 'video/decode/vd_lavc.c') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 721461fdb7..a59fffa790 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -477,6 +477,7 @@ static void update_image_params(struct dec_video *vd, AVFrame *frame, .d_h = d_h, .colorspace = avcol_spc_to_mp_csp(ctx->avctx->colorspace), .colorlevels = avcol_range_to_mp_csp_levels(ctx->avctx->color_range), + .primaries = avcol_pri_to_mp_csp_prim(ctx->avctx->color_primaries), .chroma_location = avchroma_location_to_mp(ctx->avctx->chroma_sample_location), .rotate = vd->header->video->rotate, -- cgit v1.2.3