[FFmpeg-devel] [PATCH 2/2] swresample/resample: rework resample_one function to work the same way as the others

Michael Niedermayer michael at niedermayer.cc
Thu Feb 29 00:45:24 EET 2024


On Tue, Feb 27, 2024 at 09:50:49PM +0100, Marton Balint wrote:
> 
> 
> On Tue, 27 Feb 2024, Michael Niedermayer wrote:
> 
> > On Tue, Feb 27, 2024 at 10:48:10AM +0100, Marton Balint wrote:
> > > Signed-off-by: Marton Balint <cus at passwd.hu>
> > > ---
> > >  libswresample/resample.c          | 29 +++++++----------------------
> > >  libswresample/resample.h          |  4 ++--
> > >  libswresample/resample_template.c | 14 ++++++++++++--
> > >  3 files changed, 21 insertions(+), 26 deletions(-)
> > 
> > what effect does this have on speed ?
> 
> For the following command line
> 
> time ./ffprobe -f lavfi \
> "sine=440:r=8000:d=86400:samples_per_frame=2048,aresample=24000:filter_size=1:phase_shift=0" \
> -show_packets >/dev/null
> 
> Before the patch:
> 
> real	0m3,916s
> user	0m3,812s
> sys	0m0,104s
> 
> After the patch:
> 
> real    0m3,597s
> user    0m3,457s
> sys     0m0,140s
> 
> So it actually speed things up.

is resample_one used in both cases ?

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20240228/b9078106/attachment.sig>


More information about the ffmpeg-devel mailing list