[FFmpeg-devel] atrac1 decoder and aea demuxer rev 6

Benjamin Larsson banan
Sun Sep 6 22:11:14 CEST 2009


Vitor Sessak wrote:
> Benjamin Larsson wrote:
>> Changes:
>>
>> Lots of cosmetics fixes.
>> Optimized the mdct window use.
>> Removed one memcopy.
>> Changed some code.
>>
>> Did not do anything to the qmf routines that will be shared with atrac3
>> as it will be a svn copy and I'll take comments on that when the code is
>>  split out in it's own file.
> 
> [...]
> 
>> +
>> +    /* round, convert to 16bit and interleave */
>> +    if (q->channels == 1) {
>> +        /* mono */
>> +        for (i = 0; i<AT1_SU_SAMPLES; i++)
>> +            samples[i]     = av_clipf(q->out_samples[0][i],
>> -32700./(1<<15), 32700./(1<<15));
>> +    } else {
>> +        /* stereo */
>> +        for (i = 0; i < AT1_SU_SAMPLES; i++) {
>> +            samples[i*2]   = av_clipf(q->out_samples[0][i],
>> -32700./(1<<15), 32700./(1<<15));
>> +            samples[i*2+1] = av_clipf(q->out_samples[1][i],
>> -32700./(1<<15), 32700./(1<<15));
>> +        }
>> +    }
> 
> av_clipf() is slow...
> 
> -Vitor

Yes I know but there is no stride argument in the vector clip routine
and the destination has to be aligned which it is not. So I could only
use it for the mono path. Thus I left it.

MvH
Benjamin Larsson



More information about the ffmpeg-devel mailing list