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

Kostya kostya.shishkov
Mon Jan 24 07:21:19 CET 2011


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?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Extend-WavPack-demuxer-and-decoder-to-support-2-chan.patch
Type: text/x-diff
Size: 25936 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110124/85317bbe/attachment.patch>



More information about the ffmpeg-devel mailing list