[FFmpeg-devel] [PATCH] Fix CCE decoding and cleanup

Michael Niedermayer michaelni
Thu Sep 18 23:45:29 CEST 2008


On Thu, Sep 18, 2008 at 05:19:39PM -0400, Alex Converse wrote:
> Hi,
> 
> The first patch fixes CCE decoding. The second patch cleans up some CCE
> related documentation and variable names.

[...]

> @@ -1001,12 +1001,13 @@
>                          int t = get_vlc2(gb, vlc_scalefactors.table, 7, 3) - 60;
>                          if (t) {
>                              int s = 1;
> +                            int g;
> +                            g = gain += t;
>                              if (sign) {
> -                                s  -= 2 * (t & 0x1);
> -                                t >>= 1;
> +                                s  -= 2 * (g & 0x1);
> +                                g >>= 1;
>                              }
> -                            gain += t;
> -                            gain_cache = pow(scale, gain) * s;
> +                            gain_cache = pow(scale, -g) * s;
>                          }
>                      }

    int t = get_vlc2(gb, vlc_scalefactors.table, 7, 3) - 60;
    if (t) {
        int s = 1;
        t = (gain += t);
        if (sign) {
            s  -= 2 * (t & 1);
            t >>= 1;
        }
        gain_cache = pow(scale, -t) * s;
    }
}


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- 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-devel/attachments/20080918/fb12d21c/attachment.pgp>



More information about the ffmpeg-devel mailing list