[FFmpeg-devel] [PATCH] swr: handle initial negative sample index outside DSP function.

Ronald S. Bultje rsbultje at gmail.com
Thu Jun 12 03:32:18 CEST 2014


Hi,

On Wed, Jun 11, 2014 at 7:44 AM, Michael Niedermayer <michaelni at gmx.at>
wrote:
>
> On Tue, Jun 10, 2014 at 09:50:14PM -0400, Ronald S. Bultje wrote:
> > The new function in struct Resampler and code therefore in resample()
> > are admittedly butt-ugly. I'll probably clean it up but at least it
> > works so I figured I'd send it out and see what people think. What I'd
> > really like to do is to be able to expose ResampleContext to
swresample.c
> > if people are OK with that.
>
> exposing it may be ok, but theres not always a ResampleContext
> we also support resampling through soxr (which uses a fft based
> resampler).
> i think the patch will break that due to
> invert_initial_buffer_func being NULL
>
> also this seems to give different output with
> ./ffmpeg -i matrixbench_mpeg2.mpg -af asetnsamples=1,aresample=8000 -t 30
foo.wav
> vs.
> ./ffmpeg -i matrixbench_mpeg2.mpg -af asetnsamples=1024,aresample=8000 -t
30 foo.wav


That's different already, no?

Before:
bash-3.2$ ./ffmpeg -nostats -cpuflags all -threads 1 -thread_type
frame+slice -i
/Users/ronaldbultje/Projects/ffmpeg/x86-64-gpl/tests/data/asynth-44100-1.wav
-af asetnsamples=1024,aresample=8000 -t 30 -f md5 -v 0 -
MD5=8939e8aacdd4493d8955f1c8e0d362ec
bash-3.2$ ./ffmpeg -nostats -cpuflags all -threads 1 -thread_type
frame+slice -i
/Users/ronaldbultje/Projects/ffmpeg/x86-64-gpl/tests/data/asynth-44100-1.wav
-af asetnsamples=1,aresample=8000 -t 30 -f md5 -v 0 -
MD5=ed3e37946eadc20221681d35c6386a49

After:
bash-3.2$ ./ffmpeg -nostats -cpuflags all -threads 1 -thread_type
frame+slice -i
/Users/ronaldbultje/Projects/ffmpeg/x86-64-gpl/tests/data/asynth-44100-1.wav
-af asetnsamples=1024,aresample=8000 -t 30 -f md5 -v 0 -
MD5=8939e8aacdd4493d8955f1c8e0d362ec
bash-3.2$ ./ffmpeg -nostats -cpuflags all -threads 1 -thread_type
frame+slice -i
/Users/ronaldbultje/Projects/ffmpeg/x86-64-gpl/tests/data/asynth-44100-1.wav
-af asetnsamples=1,aresample=8000 -t 30 -f md5 -v 0 -
MD5=7e6b6b9527a0011b56fb0e7af76f7b09

I mean, it changed, sure, but why is it different already?

Ronald


More information about the ffmpeg-devel mailing list