[FFmpeg-cvslog] r24213 - trunk/libavcodec/dca.c

Benjamin Larsson banan
Tue Jul 13 00:35:21 CEST 2010


On 12/07/10 17:13, Vitor Sessak wrote:
> On 07/12/2010 02:32 PM, benoit wrote:
>> Author: benoit
>> Date: Mon Jul 12 14:32:24 2010
>> New Revision: 24213
>>
>> Log:
>> Use math constant instead of hardcoded rounded value for sqrt(0.5).
>> Patch by Christophe.Gisquet (gmail)
>>
>> Modified:
>>     trunk/libavcodec/dca.c
>>
>> Modified: trunk/libavcodec/dca.c
>> ==============================================================================
>>
>> --- trunk/libavcodec/dca.c    Mon Jul 12 12:17:20 2010    (r24212)
>> +++ trunk/libavcodec/dca.c    Mon Jul 12 14:32:24 2010    (r24213)
>> @@ -1403,8 +1403,8 @@ static int dca_decode_frame(AVCodecConte
>>               float* rt_chan   = s->samples +
>> s->channel_order_tab[s->xch_base_channel - 1] * 256;
>>               int j;
>>               for(j = 0; j<  256; ++j) {
>> -                lt_chan[j] -= (back_chan[j] - s->add_bias) * 0.707107f;
>> -                rt_chan[j] -= (back_chan[j] - s->add_bias) * 0.707107f;
>> +                lt_chan[j] -= (back_chan[j] - s->add_bias) * M_SQRT1_2;
>> +                rt_chan[j] -= (back_chan[j] - s->add_bias) * M_SQRT1_2;
> 
> Won't this patch make it use double-precision floating point math when
> not needed?
> 
> -Vitor

Feel free to fix it.

MvH
Benjamin Larsson



More information about the ffmpeg-cvslog mailing list