[FFmpeg-devel] [PATCH] lavc/hevc: set correct chroma location

Steinar H. Gunderson steinar+ffmpeg at gunderson.no
Tue Jun 23 01:01:54 EEST 2020


HEVC is left chroma like H.264, so add the proper location on init.

Signed-off-by: Steinar H. Gunderson <steinar+ffmpeg at gunderson.no>
---
 libavcodec/hevcdec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index c9e28f5826..3306cf3702 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -3534,6 +3534,8 @@ static av_cold int hevc_decode_init(AVCodecContext *avctx)
         else
             s->threads_type = FF_THREAD_SLICE;
 
+    avctx->chroma_sample_location = AVCHROMA_LOC_LEFT;
+
     return 0;
 }
 
-- 
2.20.1



More information about the ffmpeg-devel mailing list