[FFmpeg-devel] [PATCH v5 2/2] libavformat/mxfenc: color_range should be inclusive
Harry Mallon
harry.mallon at codex.online
Thu Aug 20 16:58:53 EEST 2020
MXF CDCI color range was being set to (1<<sc->component_depth) - 1
for full range but it should be (1<<sc->component_depth) is 0 is
a valid value.
Signed-off-by: Harry Mallon <harry.mallon at codex.online>
---
libavformat/mxfenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index a38fa6b983..e495b5ba0e 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -1160,7 +1160,7 @@ static int64_t mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID
if (st->codecpar->color_range != AVCOL_RANGE_UNSPECIFIED) {
int black = 0,
white = (1<<sc->component_depth) - 1,
- color = (1<<sc->component_depth) - 1;
+ color = (1<<sc->component_depth);
if (st->codecpar->color_range == AVCOL_RANGE_MPEG) {
black = 1 << (sc->component_depth - 4);
white = 235 << (sc->component_depth - 8);
--
2.28.0
More information about the ffmpeg-devel
mailing list