[FFmpeg-devel] [PATCH 1/2] Extend WavPack demuxer and decoder to support >2 channel audio

Kostya kostya.shishkov
Mon Jan 24 09:26:32 CET 2011


On Sun, Jan 23, 2011 at 10:41:57PM -0800, Alex Converse wrote:
> 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.

Also Jean-Baptiste mentioned yesterday on IRC that it seemed to work
for him.



More information about the ffmpeg-devel mailing list