[FFmpeg-devel] [PATCH 2/2] avcodec/libaomdec: export chroma sample location
James Almer
jamrial at gmail.com
Sun Sep 16 21:29:50 EEST 2018
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavcodec/libaomdec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/libaomdec.c b/libavcodec/libaomdec.c
index 2530c9f76b..a21cace164 100644
--- a/libavcodec/libaomdec.c
+++ b/libavcodec/libaomdec.c
@@ -89,7 +89,11 @@ static int set_pix_fmt(AVCodecContext *avctx, struct aom_image *img)
static const enum AVColorRange color_ranges[] = {
AVCOL_RANGE_MPEG, AVCOL_RANGE_JPEG
};
+ static const enum AVColorRange chroma_locations[] = {
+ AVCHROMA_LOC_UNSPECIFIED, AVCHROMA_LOC_LEFT, AVCHROMA_LOC_TOPLEFT, AVCHROMA_LOC_UNSPECIFIED
+ };
avctx->color_range = color_ranges[img->range];
+ avctx->chroma_sample_location = chroma_locations[img->csp];
avctx->color_primaries = img->cp;
avctx->colorspace = img->mc;
avctx->color_trc = img->tc;
--
2.19.0
More information about the ffmpeg-devel
mailing list