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

Måns Rullgård mans
Mon Jan 24 18:27:11 CET 2011


"Ronald S. Bultje" <rsbultje at gmail.com> writes:

> Hi,
>
> On Mon, Jan 24, 2011 at 5:45 AM, Alex Converse <alex.converse at gmail.com> wrote:
>> On Mon, Jan 24, 2011 at 12:26 AM, Kostya <kostya.shishkov at gmail.com> wrote:
>>> 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.
>>
>> Cool, cool.
>>
>> Add a fate test and I think we are good to go.
>
> Patch thus OK, Janne/Mans can you queue it?

I need a properly formatted (git format-patch) patch.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list