[FFmpeg-devel] [PATCH] avfilter: take_samples: do not directly return frame when samples are skipped

Michael Niedermayer michael at niedermayer.cc
Fri May 19 23:26:57 EEST 2017


On Thu, May 18, 2017 at 08:37:21PM +0700, Muhammad Faiz wrote:
> Should fix Ticket6349.
> Modifying data pointer may make it unaligned.
> 
> Also change frame->nb_samples < max to frame->nb_samples <= max.
> This improves performance. Benchmark:
> ./ffmpeg -filter_complex "aevalsrc=0:n=1166,firequalizer=fixed=on" -f null null
> old:
>   25767 decicycles in take_samples,    1023 runs,      1 skips
>   25422 decicycles in take_samples,    2047 runs,      1 skips
>   25181 decicycles in take_samples,    4095 runs,      1 skips
>   24904 decicycles in take_samples,    8191 runs,      1 skips
> 
> new:
>     550 decicycles in take_samples,    1024 runs,      0 skips
>     548 decicycles in take_samples,    2048 runs,      0 skips
>     545 decicycles in take_samples,    4096 runs,      0 skips
>     544 decicycles in take_samples,    8192 runs,      0 skips
> 
> Signed-off-by: Muhammad Faiz <mfcc64 at gmail.com>
> ---
>  libavfilter/avfilter.c   | 3 ++-
>  libavfilter/framequeue.c | 2 ++
>  libavfilter/framequeue.h | 5 +++++
>  3 files changed, 9 insertions(+), 1 deletion(-)

This patch also fixes a crash/regression with avxsynth


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

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170519/a63b7e7c/attachment.sig>


More information about the ffmpeg-devel mailing list