[FFmpeg-soc] [soc]: r3570 - eac3/eac3dec.c

Michael Niedermayer michaelni at gmx.at
Sun Aug 24 13:27:12 CEST 2008


On Sun, Aug 24, 2008 at 06:41:39AM +0200, jbr wrote:
> Author: jbr
> Date: Sun Aug 24 06:41:38 2008
> New Revision: 3570
> 
> Log:
> limit GAQ gain group code to valid values using av_clip()
> 
> Modified:
>    eac3/eac3dec.c
> 
> Modified: eac3/eac3dec.c
> ==============================================================================
> --- eac3/eac3dec.c	(original)
> +++ eac3/eac3dec.c	Sun Aug 24 06:41:38 2008
> @@ -104,7 +104,7 @@ void ff_eac3_get_transform_coeffs_aht_ch
>          for (bin = s->start_freq[ch]; bin < s->end_freq[ch]; bin++) {
>              if (s->bap[ch][bin] > 7 && s->bap[ch][bin] < end_bap) {
>                  if (gc++ == 2) {
> -                    int group_gain = get_bits(gbc, 5);
> +                    int group_gain = av_clip(get_bits(gbc, 5), 0, 26);
>                      gaq_gain[gs++] = ff_ac3_ungroup_3_in_5_bits_tab[group_gain][0];

this should be checked by if(>26)
av_clip() does a unneeded check against 0
also i think it would be better if such out of range coeffs wouldnt be silently
cliped

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20080824/879ea26d/attachment.pgp>


More information about the FFmpeg-soc mailing list