[FFmpeg-devel] [PATCH 1/2] Extend WavPack demuxer and decoder to support >2 channel audio
Alex Converse
alex.converse
Mon Jan 24 07:41:57 CET 2011
On Sun, Jan 23, 2011 at 10:21 PM, Kostya <kostya.shishkov at gmail.com> wrote:
> On Sun, Jan 23, 2011 at 04:15:16PM -0800, Alex Converse wrote:
>> On Sat, Jan 22, 2011 at 6:43 AM, Kostya <kostya.shishkov at gmail.com> wrote:
> [...]
>> > ? ? ? ? }else if(s->stereo && avctx->sample_fmt == AV_SAMPLE_FMT_S32){
>> > - ? ? ? ? ? ?int32_t *dst = (int32_t*)samples + samplecount * 2;
>> > - ? ? ? ? ? ?int32_t *src = (int32_t*)samples + samplecount;
>> > + ? ? ? ? ? ?int32_t *dst = (int32_t*)samples + 1;
>> > + ? ? ? ? ? ?int32_t *src = (int32_t*)samples;
>> > ? ? ? ? ? ? int cnt = samplecount;
>> > ? ? ? ? ? ? while(cnt--){
>> > - ? ? ? ? ? ? ? ?*--dst = *--src;
>> > - ? ? ? ? ? ? ? ?*--dst = *src;
>> > + ? ? ? ? ? ? ? ?*dst = *src;
>> > + ? ? ? ? ? ? ? ?src += channel_stride;
>>
>> trailing whitespace
>>
>> > + ? ? ? ? ? ? ? ?dst += channel_stride;
>> > ? ? ? ? ? ? }
>> > - ? ? ? ? ? ?samplecount *= 2;
>> > ? ? ? ? }else if(s->stereo){
>> > - ? ? ? ? ? ?float *dst = (float*)samples + samplecount * 2;
>> > - ? ? ? ? ? ?float *src = (float*)samples + samplecount;
>> > + ? ? ? ? ? ?float *dst = (float*)samples + 1;
>> > + ? ? ? ? ? ?float *src = (float*)samples;
>> > ? ? ? ? ? ? int cnt = samplecount;
>> > ? ? ? ? ? ? while(cnt--){
>> > - ? ? ? ? ? ? ? ?*--dst = *--src;
>> > - ? ? ? ? ? ? ? ?*--dst = *src;
>> > + ? ? ? ? ? ? ? ?*dst = *src;
>> > + ? ? ? ? ? ? ? ?src += channel_stride;
>>
>> trailing whitespace
> [...]
>
> Fixed those, anything else?
>
I don't know much about wavPack but it seems to look ok.
More information about the ffmpeg-devel
mailing list