1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Harry Mallon 2020-08-20 14:58:53 +01:00 committed by Tomas Härdin
parent 719eb8a2e4
commit abd58a4192

View 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) { if (st->codecpar->color_range != AVCOL_RANGE_UNSPECIFIED) {
int black = 0, int black = 0,
white = (1<<sc->component_depth) - 1, 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) { if (st->codecpar->color_range == AVCOL_RANGE_MPEG) {
black = 1 << (sc->component_depth - 4); black = 1 << (sc->component_depth - 4);
white = 235 << (sc->component_depth - 8); white = 235 << (sc->component_depth - 8);