]> git.sesse.net Git - ffmpeg/commitdiff
libavformat/mxfenc: color_range should be inclusive
authorHarry Mallon <harry.mallon@codex.online>
Thu, 20 Aug 2020 13:58:53 +0000 (14:58 +0100)
committerTomas Härdin <tjoppen@acc.umu.se>
Sat, 29 Aug 2020 09:02:35 +0000 (11:02 +0200)
MXF CDCI color range was being set to (1<<sc->component_depth) - 1
for full range but it should be (1<<sc->component_depth) as 0 is
a valid value.

Signed-off-by: Harry Mallon <harry.mallon@codex.online>
libavformat/mxfenc.c

index a38fa6b98368873ce76a9f7ca3c380f94f15f031..e495b5ba0ee31fad4c161fe294a8b986cf4e09c2 100644 (file)
@@ -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);