Signed-off-by: James Almer <[email protected]>
---
 libavcodec/libaomdec.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/libavcodec/libaomdec.c b/libavcodec/libaomdec.c
index 2530c9f76b..68157b253d 100644
--- a/libavcodec/libaomdec.c
+++ b/libavcodec/libaomdec.c
@@ -94,6 +94,15 @@ static int set_pix_fmt(AVCodecContext *avctx, struct 
aom_image *img)
     avctx->colorspace  = img->mc;
     avctx->color_trc   = img->tc;
 
+    switch (img->csp) {
+    case AOM_CSP_VERTICAL:
+        avctx->chroma_sample_location = AVCHROMA_LOC_LEFT;
+        break;
+    case AOM_CSP_COLOCATED:
+        avctx->chroma_sample_location = AVCHROMA_LOC_TOPLEFT;
+        break;
+    }
+
     switch (img->fmt) {
     case AOM_IMG_FMT_I420:
     case AOM_IMG_FMT_I42016:
-- 
2.19.0

_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to