---
libavcodec/libx265.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index b5c94b64a3..c58882170b 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -210,6 +210,14 @@ static av_cold int libx265_encode_init(AVCodecContext
*avctx)
ctx->params->vui.matrixCoeffs = avctx->colorspace;
}
+ if (avctx->chroma_sample_location != AVCHROMA_LOC_UNSPECIFIED) {
+ ctx->params->vui.bEnableChromaLocInfoPresentFlag = 1;
+
+ ctx->params->vui.chromaSampleLocTypeTopField =
+ ctx->params->vui.chromaSampleLocTypeBottomField =
+ avctx->chroma_sample_location - 1;
+ }
+
if (avctx->sample_aspect_ratio.num > 0 && avctx->sample_aspect_ratio.den >
0) {
char sar[12];
int sar_num, sar_den;
--
2.31.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".