ffmpeg/libavutil
Ganesh Ajjanagadde bccc81dfa0 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>
2016-03-18 07:47:25 -07:00
..
aarch64 all: Add missing header guards 2016-01-28 19:49:48 -08:00
arm all: Add missing header guards 2016-01-28 19:49:48 -08:00
avr32
bfin
mips mips: add support for R6 2016-03-09 20:05:04 +01:00
ppc
sh4
tomi
x86 x86: use the new helper macros where useful 2016-02-14 20:00:21 -03:00
Makefile Add tests for functions in hash.c 2016-03-09 20:05:29 +01:00
adler32.c
adler32.h
aes.c lavu/aes: test CBC functionality 2015-10-28 09:38:21 -05:00
aes.h lavu: Drop deprecated context size variables 2015-08-28 16:04:27 +02:00
aes_ctr.c avutil/aes_crt: free AVAESCTR struct properly 2016-02-03 19:33:23 -03:00
aes_ctr.h libavutil: add aes-ctr support 2015-12-15 14:16:28 +01:00
aes_internal.h lavu/aes: align AVAES struct members 2015-10-28 04:23:14 -05:00
atomic.c
atomic.h
atomic_gcc.h
atomic_suncc.h Merge commit '29c2d06d67724e994980045afa055c6c34611b30' 2016-02-24 17:31:44 +00:00
atomic_win32.h
attributes.h avutil/attributes: add av_warn_unused_result 2015-10-05 19:30:20 +02:00
audio_fifo.c avfilter: add loop filters 2016-02-18 11:55:00 +01:00
audio_fifo.h avfilter: add loop filters 2016-02-18 11:55:00 +01:00
avassert.h
avstring.c avutil/avstring: add a "ALL" entry and the possibility to negate matches to av_match_name() 2016-02-13 16:40:11 +01:00
avstring.h avutil/avstring: add a "ALL" entry and the possibility to negate matches to av_match_name() 2016-02-13 16:40:11 +01:00
avutil.h doxygen: Remove lavu_internal group 2015-08-22 10:07:05 -07:00
avutilres.rc
base64.c
base64.h
blowfish.c avutil: undo FF_API_CRYPTO_CONTEXT deprecation 2015-10-16 19:13:38 -03:00
blowfish.h avutil: undo FF_API_CRYPTO_CONTEXT deprecation 2015-10-16 19:13:38 -03:00
bprint.c
bprint.h
bswap.h
buffer.c Merge commit '721a4efc0545548a241080b53ab480e34f366240' 2016-02-17 16:07:16 +00:00
buffer.h Merge commit '721a4efc0545548a241080b53ab480e34f366240' 2016-02-17 16:07:16 +00:00
buffer_internal.h Merge commit '721a4efc0545548a241080b53ab480e34f366240' 2016-02-17 16:07:16 +00:00
camellia.c avutil: use EINVAL instead of -1 for the return code of crypto related init functions 2015-10-18 15:17:58 -04:00
camellia.h
cast5.c avutil: use EINVAL instead of -1 for the return code of crypto related init functions 2015-10-18 15:17:58 -04:00
cast5.h avutil/cast5: update Doxygen for av_cast5_init with return information 2015-10-15 22:32:58 -04:00
channel_layout.c avutil/channel_layout: AV_CH_LAYOUT_6POINT1_BACK not reachable in parsing 2016-03-10 21:24:25 +01:00
channel_layout.h Merge commit 'e23f84d9652474353d8bbc42787a56ec1991908f' 2015-08-24 10:40:24 +02:00
color_utils.c avutil/color_utils: Mark test_data as static const 2016-03-03 21:17:45 +01:00
color_utils.h avutil/color_utils: Add basic transfer functions for each AVColorTransferCharacteristic 2015-09-10 23:53:05 +02:00
colorspace.h
common.h avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPAT 2016-01-27 16:36:46 +00:00
cpu.c avutil/cpu: add missing entry for vfp_vm to av_parse_cpu_caps 2016-01-02 19:07:08 +01:00
cpu.h Merge commit 'e2710e790c09e49e86baa58c6063af0097cc8cb0' 2016-01-02 11:01:29 +01:00
cpu_internal.h x86: add some more helper macros to check for slow cpuflags 2016-02-14 20:00:17 -03:00
crc.c avutil/crc: use EINVAL instead of -1 for the return code of av_crc_init() 2015-10-16 03:24:36 +02:00
crc.h avutil/crc: avoid needless space wastage of hardcoded crc table 2015-12-02 18:31:56 -05:00
des.c avutil: use EINVAL instead of -1 for the return code of crypto related init functions 2015-10-18 15:17:58 -04:00
des.h avutil: undo FF_API_CRYPTO_CONTEXT deprecation 2015-10-16 19:13:38 -03:00
dict.c avutil/dict: do not realloc entries when deleting a non-existing item 2016-03-15 00:55:16 +01:00
dict.h avutil/dict: add warning to docs about invalidating existing entries when adding a new entry 2016-03-15 00:55:16 +01:00
display.c
display.h
downmix_info.c
downmix_info.h
dynarray.h
error.c lavu/error: add missing error messages for errors supported on all platforms 2015-12-18 04:04:14 +01:00
error.h
eval.c lavu/eval: replace pow(10,x) by ff_exp10(x) 2015-12-25 10:48:13 -08:00
eval.h avutil/eval: minor typo 2015-11-01 19:35:01 -05:00
fifo.c avutil/fifo: add function av_fifo_generic_peek_at() 2015-10-14 20:23:58 +02:00
fifo.h avutil/fifo: add function av_fifo_generic_peek_at() 2015-10-14 20:23:58 +02:00
file.c avutil/file: Move av_tempfile() to avutil/file_open ff_tempfile() 2016-03-12 02:08:34 +01:00
file.h avutil/file: Move av_tempfile() to avutil/file_open ff_tempfile() 2016-03-12 02:08:34 +01:00
file_open.c avutil/file: Move av_tempfile() to avutil/file_open ff_tempfile() 2016-03-12 02:08:34 +01:00
fixed_dsp.c x86/fixed_dsp: add ff_butterflies_fixed_sse2 2016-01-16 21:09:38 -03:00
fixed_dsp.h x86/fixed_dsp: add ff_butterflies_fixed_sse2 2016-01-16 21:09:38 -03:00
float_dsp.c avutil: merge avpriv_float_dsp_init into avpriv_float_dsp_alloc 2015-10-21 00:24:58 +02:00
float_dsp.h avutil: merge avpriv_float_dsp_init into avpriv_float_dsp_alloc 2015-10-21 00:24:58 +02:00
frame.c Merge commit '29c2d06d67724e994980045afa055c6c34611b30' 2016-02-24 17:31:44 +00:00
frame.h Document and validate AVFrame plane pointers. 2016-02-28 13:33:14 +01:00
hash.c Add tests for functions in hash.c 2016-03-09 20:05:29 +01:00
hash.h
hmac.c lavu/hmac: remove deprecated type ids 2015-09-05 18:07:20 +02:00
hmac.h lavu/hmac: remove deprecated type ids 2015-09-05 18:07:20 +02:00
hwcontext.c Merge commit 'ad884d100259e55cb51a4239cd8a4fd5154c2073' 2016-02-24 15:23:16 +00:00
hwcontext.h Merge commit 'ad884d100259e55cb51a4239cd8a4fd5154c2073' 2016-02-24 15:23:16 +00:00
hwcontext_cuda.c Merge commit 'ad884d100259e55cb51a4239cd8a4fd5154c2073' 2016-02-24 15:23:16 +00:00
hwcontext_cuda.h Merge commit 'ad884d100259e55cb51a4239cd8a4fd5154c2073' 2016-02-24 15:23:16 +00:00
hwcontext_internal.h Merge commit 'ad884d100259e55cb51a4239cd8a4fd5154c2073' 2016-02-24 15:23:16 +00:00
hwcontext_vdpau.c Merge commit 'a001ce31bc2bcf875a39b5fb22dae49120293b42' 2016-02-17 16:16:34 +00:00
hwcontext_vdpau.h Merge commit 'a001ce31bc2bcf875a39b5fb22dae49120293b42' 2016-02-17 16:16:34 +00:00
imgutils.c avutil/imgutils: Assert that the 2nd av_image_fill_linesizes() call in av_image_fill_linesizes() still succeeds 2016-02-28 02:02:50 +01:00
imgutils.h
integer.c avutil/integer: Fix av_mod_i() with negative dividend 2015-12-01 13:26:12 +01:00
integer.h
internal.h lavc/aacenc_utils: replace powf(x,y) by expf(logf(x), y) 2016-03-18 07:47:25 -07:00
intfloat.h
intmath.c intmath: remove av_ctz. 2015-10-11 18:03:10 -04:00
intmath.h lavu: rename and move ff_parity to av_parity 2016-01-07 20:04:24 -03:00
intreadwrite.h
lfg.c lavu/lfg-test: add simple sample mean, stddev checks 2016-03-13 12:41:36 -04:00
lfg.h
libavutil.v
libm.h lavu/libm: add isfinite fallback 2016-01-13 20:00:19 -05:00
lls.c Merge commit '50078c1c8070dd8d1c329e8117ff30ec72489039' 2016-01-02 10:25:12 +01:00
lls.h Merge commit '50078c1c8070dd8d1c329e8117ff30ec72489039' 2016-01-02 10:25:12 +01:00
log.c avutil/log: fix zero length gnu_printf format string warning 2015-09-17 18:58:01 +02:00
log.h
log2_tab.c
lzo.c
lzo.h
macros.h Merge commit '50078c1c8070dd8d1c329e8117ff30ec72489039' 2016-01-02 10:25:12 +01:00
mastering_display_metadata.c libavutil: add mastering display metadata sidedata 2016-01-19 16:43:31 +01:00
mastering_display_metadata.h libavutil/mastering_display_metadata.h: change fields to be rationals as this is how they are typically coded. 2016-01-29 19:08:52 +01:00
mathematics.c avutil/mathematics: Fix division by 0 2015-12-09 17:39:38 +01:00
mathematics.h avutil/mathematics: correct documentation for av_gcd 2015-10-30 13:42:04 -04:00
md5.c lavu: Drop deprecated context size variables 2015-08-28 16:04:27 +02:00
md5.h lavu: Drop deprecated context size variables 2015-08-28 16:04:27 +02:00
mem.c avutil/mem: Add av_fast_mallocz() 2015-11-18 22:05:16 +01:00
mem.h avutil/mem: Add av_fast_mallocz() 2015-11-18 22:05:16 +01:00
mem_internal.h
motion_vector.h avutil/motion_vector: export subpel motion information 2015-11-23 10:55:15 +01:00
murmur3.c
murmur3.h
opencl.c lavu/opencl: restore #if HAVE_THREADS 2015-12-07 20:28:30 +01:00
opencl.h all: Make header guard names consistent 2016-01-31 15:44:11 -08:00
opencl_internal.c
opencl_internal.h all: Add missing header guards 2016-01-28 19:49:48 -08:00
opt.c avutil/opt: check for and handle errors in av_opt_set_dict2() 2016-01-26 17:36:08 +01:00
opt.h lavu/opt: add flag to return NULL when applicable in av_opt_get 2015-10-09 04:12:57 -05:00
parseutils.c avutil/parseutils: remove 2112 date from fate test 2016-02-14 20:13:15 +01:00
parseutils.h
pca.c
pca.h
pixdesc.c Merge commit '7bc780cd4413f688d3b834037b0f9ddfd6948140' 2016-02-24 15:11:06 +00:00
pixdesc.h Merge commit '6695f178a5929eab91d3da7e9023999f1774bd0e' 2016-02-16 16:55:28 +00:00
pixelutils.c
pixelutils.h
pixfmt.h Merge commit '29c2d06d67724e994980045afa055c6c34611b30' 2016-02-24 17:31:44 +00:00
qsort.h all: Add missing header guards 2016-01-28 19:49:48 -08:00
random_seed.c avutil/random_seed: Add the runtime in cycles of the main loop to the entropy pool 2016-03-10 22:56:37 +01:00
random_seed.h
rational.c lavu/rational: add more info regarding floor(x+0.5) usage 2016-02-29 19:26:55 -05:00
rational.h
rc4.c avutil: use EINVAL instead of -1 for the return code of crypto related init functions 2015-10-18 15:17:58 -04:00
rc4.h avutil: undo FF_API_CRYPTO_CONTEXT deprecation 2015-10-16 19:13:38 -03:00
replaygain.h Merge commit '29c2d06d67724e994980045afa055c6c34611b30' 2016-02-24 17:31:44 +00:00
reverse.c avutil: add ff_reverse as av_reverse replacement 2015-08-12 00:14:14 +02:00
ripemd.c avutil/ripemd: make rol macro more robust by adding parentheses 2015-10-28 21:42:15 -04:00
ripemd.h
samplefmt.c
samplefmt.h Merge commit '29c2d06d67724e994980045afa055c6c34611b30' 2016-02-24 17:31:44 +00:00
sha.c avutil: use EINVAL instead of -1 for the return code of crypto related init functions 2015-10-18 15:17:58 -04:00
sha.h lavu: Drop deprecated context size variables 2015-08-28 16:04:27 +02:00
sha512.c avutil: use EINVAL instead of -1 for the return code of crypto related init functions 2015-10-18 15:17:58 -04:00
sha512.h
softfloat.c avutil/softfloat: Include negative numbers in cmp/gt tests 2015-11-08 15:04:05 +01:00
softfloat.h avutil/softfloat: Assert that the exponent did not overflow the legal range in av_normalize1_sf() 2015-12-11 13:39:21 +01:00
softfloat_tables.h
stereo3d.c
stereo3d.h
tablegen.h libavutil/tablegen: add missing math.h include 2015-12-04 14:49:35 +01:00
tea.c Add support for TEA (Tiny Encryption Algorithm) 2015-07-21 23:10:44 +02:00
tea.h Add support for TEA (Tiny Encryption Algorithm) 2015-07-21 23:10:44 +02:00
thread.h lavu: add pthread asserts if ASSERT_LEVEL>1 2016-01-20 21:08:50 +01:00
threadmessage.c lavc, lavu: use avutil/thread.h instead of redundant conditional includes 2015-12-07 17:25:51 +01:00
threadmessage.h avutil/threadmessage: add av_thread_message_flush() 2015-12-07 11:39:28 +01:00
time.c
time.h
time_internal.h
timecode.c avutil/timecode: Fix fps check 2015-12-03 04:09:48 +01:00
timecode.h
timer.h Merge commit '64034849dad8410bedbe1def4c533490fb85cc4a' 2016-01-02 10:26:42 +01:00
timestamp.h
tree.c avutil/tree: clean up pointer incompatibility warnings 2015-10-25 12:45:10 -04:00
tree.h avutil/tree: Document the guaranteed ordering of compare arguments for av_tree_find() 2015-10-25 17:28:47 +01:00
twofish.c avutil: use EINVAL instead of -1 for the return code of crypto related init functions 2015-10-18 15:17:58 -04:00
twofish.h
utf8.c
utils.c Correct two build/built typos 2016-01-11 20:53:11 -08:00
version.h Add GBRAP12 pixel format 2016-02-24 03:22:31 +01:00
wchar_filename.h avutil/wchar_filename: add av_warn_unused_result 2015-10-30 13:47:28 -04:00
xga_font_data.c
xga_font_data.h
xtea.c Merge commit '588b6215b4c74945994eb9636b0699028c069ed2' 2015-11-22 14:29:09 +00:00
xtea.h Merge commit '588b6215b4c74945994eb9636b0699028c069ed2' 2015-11-22 14:29:09 +00:00