libavcodec/libaomdec: add support for transfer characteristics and color primaries
authorJames Almer <jamrial@gmail.com>
Thu, 29 Mar 2018 04:03:14 +0000 (01:03 -0300)
committerJames Almer <jamrial@gmail.com>
Thu, 29 Mar 2018 04:03:14 +0000 (01:03 -0300)
Signed-off-by: James Almer <jamrial@gmail.com>
libavcodec/libaomdec.c

index 1d077e0..1352b42 100644 (file)
@@ -89,7 +89,9 @@ static int set_pix_fmt(AVCodecContext *avctx, struct aom_image *img)
         AVCOL_RANGE_MPEG, AVCOL_RANGE_JPEG
     };
     avctx->color_range = color_ranges[img->range];
+    avctx->color_primaries = img->cp;
     avctx->colorspace  = img->mc;
+    avctx->color_trc   = img->tc;
 
     switch (img->fmt) {
     case AOM_IMG_FMT_I420: