[FFmpeg-devel] [PATCH 1/2] avcodec/fft_template: improve performance of the ff_fft_init in fft_template

Steven Liu lingjiujianke at gmail.com
Mon Dec 17 05:30:15 EET 2018


Carl Eugen Hoyos <ceffmpeg at gmail.com> 于2018年12月17日周一 上午8:29写道:
>
> 2018-12-16 14:19 GMT+01:00, Steven Liu <lq at chinaffmpeg.org>:
> > move the two if condition out of the loop, that can less
> > n-1 times than condition in loop.
>
> Please add some benchmarks to the commit message.

Hi Folks,

I tested the performance of the modify,
before the patch:
MacBook:dash StevenLiu$ bash get_performance.sh
3921
after the patch:
MacBook:dash StevenLiu$ bash get_performance.sh
3723
MacBook:dash StevenLiu$ cat get_performance.sh

get 10 times data of the speed, and compute an average value, the
script as is bellow:

#!/usr/bin/bash

DURATION=0
for((i=0;i<10;i++)) do
./libavcodec/tests/fft -n 15 &>output
T_DURATION=`grep "duration" output | awk -F"=" '{ print $2}'`
DURATION=`expr $DURATION + $T_DURATION`
done
TOTAL=`expr $DURATION / 10`
echo $TOTAL


>
> Carl Eugen
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list