summaryrefslogtreecommitdiff
path: root/libavformat/mxfenc.c
diff options
context:
space:
mode:
authorHarry Mallon <harry.mallon@codex.online>2020-08-20 14:58:53 +0100
committerTomas Härdin <tjoppen@acc.umu.se>2020-08-29 11:02:35 +0200
commitabd58a4192e4c5ea721b22365c211d8fa874f3d2 (patch)
tree35740ef15ca82ab03671af11ddc3571aaf87d8fe /libavformat/mxfenc.c
parent719eb8a2e44099b395e8b70878f5f3f3c629865c (diff)
libavformat/mxfenc: color_range should be inclusive
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>
Diffstat (limited to 'libavformat/mxfenc.c')
-rw-r--r--libavformat/mxfenc.c2
1 files changed, 1 insertions, 1 deletions
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);