[FFmpeg-devel] [PATCH 19/25] (WIP) lavc: set color_ranges for MPEG-only codecs
Niklas Haas
ffmpeg at haasn.xyz
Thu Nov 9 14:19:51 EET 2023
From: Niklas Haas <git at haasn.dev>
Mirroring the previous commit, all codecs which previously never
accepted YUVJ now need to be labelled as MPEG range only.
TODO:
- add the rest of the codecs
---
libavcodec/mpeg4videoenc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c
index d1e50612dd..bb98c84eab 100644
--- a/libavcodec/mpeg4videoenc.c
+++ b/libavcodec/mpeg4videoenc.c
@@ -1403,6 +1403,9 @@ const FFCodec ff_mpeg4_encoder = {
FF_CODEC_ENCODE_CB(ff_mpv_encode_picture),
.close = ff_mpv_encode_end,
.p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
+ .p.color_ranges = (const enum AVColorRange[]) {
+ AVCOL_RANGE_MPEG, AVCOL_RANGE_UNSPECIFIED
+ },
.p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS |
AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
--
2.42.0
More information about the ffmpeg-devel
mailing list