[FFmpeg-devel] Small modifcation to libavformat/dvbsubdec.c

JULIAN GARDNER joolzg at btinternet.com
Mon Sep 16 09:46:39 CEST 2013



>________________________________
> From: JULIAN GARDNER <joolzg at btinternet.com>
>To: FFmpegdevelopment discussions and patches <ffmpeg-devel at ffmpeg.org> 
>Sent: Wednesday, 4 September 2013, 23:51
>Subject: Small modifcation to libavformat/dvbsubdec.c
> 
>
>
>diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
>index 955925a..faa510a 100644
>--- a/libavcodec/dvbsubdec.c
>+++ b/libavcodec/dvbsubdec.c
>@@ -1015,9 +1015,9 @@ static void dvbsub_parse_clut_segment(AVCodecContext *avctx,
> 
>         if (depth & 0x80)
>             clut->clut4[entry_id] = RGBA(r,g,b,255 - alpha);
>-        if (depth & 0x40)
>+        else if (depth & 0x40)
>             clut->clut16[entry_id] = RGBA(r,g,b,255 - alpha);
>-        if (depth &
0x20)
>+        else if (depth & 0x20)
>             clut->clut256[entry_id] = RGBA(r,g,b,255 - alpha);
>     }
>     }
>
>
>Just so it adheres to spec. Page 25 of ETS300743 V1.2.1, page 25.
>
>2-bit/entry_CLUT_flag: If set to '1', this indicates that this CLUT value is to be loaded into the identified entry of the
2-bit/entry CLUT.  
>4-bit/entry_CLUT_flag: If set to '1', this indicates that this CLUT value is to be loaded into the identified entry of the
4-bit/entry CLUT. 
>8-bit/entry_CLUT_flag: If set to '1', this indicates that this CLUT value is to be loaded into the identified entry of the
8-bit/entry CLUT. 
>NOTE 1: Only one N-bit/entry_CLUT_flag shall be set to 1 per CLUT_entry_id and its associated Y-, Cr-, Cb- and
T -values. 
>joolz
>
Any comment on this, will it be pushed?

joolz



More information about the ffmpeg-devel mailing list