[FFmpeg-devel] [PATCH] Fix CCE decoding and cleanup
Robert Swain
robert.swain
Mon Oct 6 18:23:03 CEST 2008
2008/9/18 Alex Converse <alex.converse at gmail.com>:
> On Thu, Sep 18, 2008 at 5:45 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
>>
>> 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;
>> }
>> }
>
> Fixed.
Slightly reworked and applied.
Thanks,
Rob
More information about the ffmpeg-devel
mailing list