ffmpeg/libavcodec
Ganesh Ajjanagadde bd9c58756a lavc/aacenc_utils: replace sqrtf(Q*sqrtf(Q)) by precomputed value
It makes no sense whatsoever to do this at each function call; we
already have a table for this.

Yields a 2x improvement in find_min_book (x86-64, Haswell+GCC):
ffmpeg -i sin.flac -acodec aac -y sin.aac
find_min_book
old
    605 decicycles in find_min_book, 8388453 runs,    155 skips.9x
    606 decicycles in find_min_book,16776912 runs,    304 skips.9x
    607 decicycles in find_min_book,33553819 runs,    613 skips.2x
    607 decicycles in find_min_book,67107668 runs,   1196 skips.3x
    607 decicycles in find_min_book,134215360 runs,   2368 skips3x

new
    359 decicycles in find_min_book, 8388552 runs,     56 skips.3x
    360 decicycles in find_min_book,16777112 runs,    104 skips.1x
    361 decicycles in find_min_book,33554218 runs,    214 skips.4x
    361 decicycles in find_min_book,67108381 runs,    483 skips.5x
    361 decicycles in find_min_book,134216725 runs,   1003 skips5x

and more importantly a non-negligible speedup (~ 8%) to overall AAC encoding:
old:
ffmpeg -i sin.flac -acodec aac -strict -2 -y sin_new.aac  6.82s user 0.03s system 104% cpu 6.565 total
new:
ffmpeg -i sin.flac -acodec aac -strict -2 -y sin_old.aac  6.24s user 0.03s system 104% cpu 5.993 total

This also improves accuracy of the expression by ~ 2 ulp in some cases.

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanag@gmail.com>
2016-03-01 22:57:44 -05:00
..
2016-02-27 16:31:46 -06:00
2016-01-20 16:56:53 +00:00
2016-01-20 16:56:53 +00:00
2015-08-22 06:16:31 +01:00
2015-12-19 09:32:53 -08:00
2015-12-19 09:32:53 -08:00
2015-11-30 18:29:57 -05:00
2015-11-22 16:16:16 -05:00
2015-10-29 21:26:43 +01:00
2015-11-21 08:51:49 -05:00
2016-01-11 21:51:11 +01:00
2015-11-30 10:58:46 -05:00
2016-01-30 17:44:13 +00:00
2016-02-02 18:06:13 -08:00
2016-01-30 17:44:13 +00:00
2015-09-10 16:36:47 +02:00
2016-01-31 17:09:38 +01:00
2016-01-31 17:09:38 +01:00
2016-01-31 17:09:38 +01:00
2015-10-13 16:03:04 +02:00
2015-12-26 20:29:22 -08:00
2016-02-07 09:09:13 -08:00
2016-02-07 09:26:15 -08:00
2015-10-26 10:08:01 +01:00
2016-01-28 10:31:41 +01:00
2016-01-28 10:31:41 +01:00
2016-01-11 21:51:11 +01:00
2016-01-30 13:38:16 +01:00
2015-12-07 16:10:51 +01:00
2015-10-09 22:09:08 +02:00
2015-08-11 23:16:35 +02:00
2016-01-11 21:51:11 +01:00
2016-01-18 19:56:37 +01:00
2016-01-31 15:44:11 -08:00
2015-07-27 16:21:14 +01:00
2015-10-25 22:48:04 +01:00
2015-12-05 21:11:52 +01:00
2015-12-05 21:11:52 +01:00
2015-12-20 21:31:55 +01:00
2016-02-01 01:36:44 +01:00
2015-11-20 08:20:13 -05:00
2016-02-29 21:44:06 +01:00
2015-10-11 17:29:50 -03:00
2016-01-28 17:24:53 +01:00
2016-01-11 21:51:11 +01:00
2016-02-28 13:32:01 +01:00
2016-02-14 22:31:47 +01:00
2016-01-29 19:58:41 -03:00
2016-02-09 19:19:43 +01:00
2015-08-18 11:48:49 -04:00
2015-07-22 23:23:29 +02:00
2016-01-27 00:08:23 +01:00
2016-02-29 21:44:06 +01:00
2016-01-30 13:31:44 +01:00
2015-10-09 22:09:08 +02:00
2015-12-22 12:54:23 +01:00
2015-09-07 15:32:08 +02:00
2015-08-03 10:12:10 +02:00
2015-12-07 09:25:02 +01:00
2016-01-11 21:51:11 +01:00
2016-01-20 16:41:19 -03:00
2016-01-11 21:51:11 +01:00
2016-01-28 19:49:48 -08:00
2015-07-27 15:24:58 +01:00