[FFmpeg-devel] [PATCH 5/5] lavfi: add audio resample filter

Mina Nagy Zaki mnzaki at gmail.com
Wed Aug 17 19:48:46 CEST 2011


On Tue, Aug 16, 2011 at 12:05:57AM +0200, Stefano Sabatini wrote:
> On date Friday 2011-08-12 12:41:19 +0300, Mina Nagy Zaki encoded:
> > +
> > +    /* copy resampled data to the output samplesref */
> > +    if (!inlink->planar && nb_channels > 1) {
> > +        interleave((int16_t *)aresample->outsamplesref->data[0],
> > +                   aresample->resampled_data,
> > +                   nb_channels, aresample->outsamplesref->audio->nb_samples);
> > +    } else {
> > +        for (i = 0; i < nb_channels; i++)
> > +            memcpy(aresample->outsamplesref->data[i], aresample->resampled_data[i],
> > +                   aresample->outsamplesref->audio->nb_samples * sizeof(int16_t));
> > +    }
> 
> I wonder if there is some way to directly process data in place, with
> no memcpy/memmove (but I don't think so...).
> 

This is possible only for downsampling AFAIK. It can be done if necessary.


More information about the ffmpeg-devel mailing list