The specification does not allow multiple bits to be set,
but some encoders do it anyway.
Applying it only to the first seems to give better results.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
... | ... |
@@ -1015,9 +1015,9 @@ static void dvbsub_parse_clut_segment(AVCodecContext *avctx, |
1015 | 1015 |
|
1016 | 1016 |
if (depth & 0x80) |
1017 | 1017 |
clut->clut4[entry_id] = RGBA(r,g,b,255 - alpha); |
1018 |
- if (depth & 0x40) |
|
1018 |
+ else if (depth & 0x40) |
|
1019 | 1019 |
clut->clut16[entry_id] = RGBA(r,g,b,255 - alpha); |
1020 |
- if (depth & 0x20) |
|
1020 |
+ else if (depth & 0x20) |
|
1021 | 1021 |
clut->clut256[entry_id] = RGBA(r,g,b,255 - alpha); |
1022 | 1022 |
} |
1023 | 1023 |
} |