aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_cover_rect.c
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanag@gmail.com>2016-03-07 21:16:29 -0500
committerRostislav Pehlivanov <atomnuker@gmail.com>2016-03-28 16:57:41 +0100
commitf281cb4ea93dc4c27ce93870eafffbe490b25247 (patch)
treefef62f24a6b0f1e579fbae2eb6d4e8ffb56cdf0a /libavfilter/vf_cover_rect.c
parentb176ab0556914a734932e934a5e904dad091ad71 (diff)
downloadffmpeg-f281cb4ea93dc4c27ce93870eafffbe490b25247.tar.gz
lavc/aacenc_utils: replace powf(x,y) by expf(logf(x), y)
This is ~2x faster for y not an integer on Haswell+GCC, and should generally be faster due to the fact that anyway powf essentially does this under the hood. Made an inline function in lavu/internal.h for this purpose. Note that there are some accuracy differences, that should generally be negligible. In particular, FATE still passes on this platform. Results in ~ 7% speedup in aac encoding with -march=native, Haswell+GCC. before: ffmpeg -i sin.flac -acodec aac -y sin_new.aac 6.05s user 0.06s system 104% cpu 5.821 total after: ffmpeg -i sin.flac -acodec aac -y sin_new.aac 5.67s user 0.03s system 105% cpu 5.416 total This is also faster than an alternative approach that pulls in powf, gets rid of the crufty NaN checks and other special cases, exploits knowledge about the intervals, etc. This of course does not exclude smarter approaches; just suggests that there would need to be significant work on this front of lower utility than searches for hotspots elsewhere. Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanag@gmail.com> (cherry picked from commit bccc81dfa08e6561df6ed37860e3a08f7d983825)
Diffstat (limited to 'libavfilter/vf_cover_rect.c')
0 files changed, 0 insertions, 0 deletions