Ganesh Ajjanagadde
96786a12f6
avcodec/aac_tablegen: speed up table initialization
...
This speeds up aac_tablegen to a ludicruous degree (~97%), i.e to the point
where it can be argued that runtime initialization can always be done instead of
hard-coded tables. The only cost is essentially a trivial increase in
the stack size.
Even if one does not care about this, the patch also improves accuracy
as detailed below.
Performance:
Benchmark obtained by looping 10^4 times over ff_aac_tableinit.
Sample benchmark (x86-64, Haswell, GNU/Linux):
old:
1295292 decicycles in ff_aac_tableinit, 512 runs, 0 skips
1275981 decicycles in ff_aac_tableinit, 1024 runs, 0 skips
1272932 decicycles in ff_aac_tableinit, 2048 runs, 0 skips
1262164 decicycles in ff_aac_tableinit, 4096 runs, 0 skips
1256720 decicycles in ff_aac_tableinit, 8192 runs, 0 skips
new:
21112 decicycles in ff_aac_tableinit, 511 runs, 1 skips
21269 decicycles in ff_aac_tableinit, 1023 runs, 1 skips
21352 decicycles in ff_aac_tableinit, 2043 runs, 5 skips
21386 decicycles in ff_aac_tableinit, 4080 runs, 16 skips
21299 decicycles in ff_aac_tableinit, 8173 runs, 19 skips
Accuracy:
The previous code was resulting in needless loss of
accuracy due to the pow being called in succession. As an illustration
of this:
ff_aac_pow34sf_tab[3]
old : 0.000000000007598092294225
new : 0.000000000007598091426864
real: 0.000000000007598091778545
truncated to float
old : 0.000000000007598092294225
new : 0.000000000007598091426864
real: 0.000000000007598091426864
showing that the old value was not correctly rounded. This affects a
large number of elements of the array.
Patch tested with FATE.
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-27 06:38:06 -05:00
..
2015-10-13 17:22:56 +02:00
2015-11-22 16:16:16 -05:00
2015-11-07 14:31:34 -08:00
2015-11-24 20:36:40 -05:00
2015-11-27 06:38:06 -05:00
2015-10-17 02:31:20 +01:00
2015-10-11 17:29:50 -03:00
2015-11-26 03:46:09 -03:00
2015-11-26 03:27:06 -03:00
2015-10-15 13:48:55 -04:00
2015-11-10 02:12:38 +00:00
2015-10-15 14:00:24 -04:00
2015-10-17 02:31:20 +01:00
2015-10-11 17:29:50 -03:00
2015-10-11 17:29:50 -03:00
2015-11-26 18:20:42 +00:00
2015-10-17 02:31:20 +01:00
2015-10-17 02:31:20 +01:00
2015-10-17 02:31:20 +01:00
2015-10-12 03:56:22 -03:00
2015-10-12 15:41:50 +01:00
2015-10-17 11:10:26 +01:00
2015-10-17 11:10:26 +01:00
2015-10-17 03:17:27 +01:00
2015-11-26 03:27:06 -03:00
2015-10-17 02:31:20 +01:00
2015-10-17 03:17:27 +01:00
2015-11-24 20:36:40 -05:00
2015-11-24 20:36:40 -05:00
2015-11-10 01:33:24 +00:00
2015-10-11 18:06:02 -03:00
2015-11-20 03:46:43 +01:00
2015-11-20 23:25:24 +01:00
2015-11-19 13:52:05 +01:00
2015-10-17 02:31:20 +01:00
2015-10-22 19:43:44 +02:00
2015-10-22 00:34:54 +02:00
2015-10-22 00:34:54 +02:00
2015-11-22 16:16:16 -05:00
2015-10-22 00:34:54 +02:00
2015-10-10 14:43:22 +02:00
2015-10-29 21:26:43 +01:00
2015-10-06 20:22:00 -03:00
2015-10-06 20:22:00 -03:00
2015-10-06 20:22:00 -03:00
2015-11-07 19:24:49 +01:00
2015-11-21 08:51:49 -05:00
2015-10-08 23:29:18 +02:00
2015-11-21 11:38:45 +01:00
2015-11-22 17:41:27 +00:00
2015-10-26 15:39:09 +01:00
2015-10-29 14:18:03 +01:00
2015-10-27 12:40:04 +01:00
2015-11-14 13:06:25 +01:00
2015-10-10 10:41:10 -05:00
2015-10-18 09:22:49 -04:00
2015-10-22 19:43:44 +02:00
2015-10-10 09:52:18 +02:00
2015-10-10 09:52:18 +02:00
2015-10-10 09:52:18 +02:00
2015-10-30 01:24:50 +01:00
2015-11-06 13:45:50 +01:00
2015-11-22 16:16:16 -05:00
2015-10-20 13:02:18 +02:00
2015-10-30 15:06:19 -04:00
2015-10-10 09:32:59 +02:00
2015-10-10 09:32:59 +02:00
2015-11-22 17:01:42 -05:00
2015-10-13 16:03:04 +02:00
2015-11-14 21:52:11 +01:00
2015-11-06 21:59:42 +01:00
2015-10-15 02:46:29 +02:00
2015-10-15 02:46:29 +02:00
2015-11-06 00:15:21 +01:00
2015-10-20 12:36:29 -07:00
2015-10-26 10:08:01 +01:00
2015-11-14 16:12:15 +01:00
2015-10-24 12:16:04 +02:00
2015-10-22 21:41:53 +02:00
2015-10-22 21:41:53 +02:00
2015-11-22 19:26:05 +01:00
2015-10-22 21:41:53 +02:00
2015-11-15 00:32:19 +01:00
2015-10-14 23:02:00 +02:00
2015-10-14 23:02:00 +02:00
2015-10-14 23:02:00 +02:00
2015-10-14 23:02:00 +02:00
2015-11-14 22:51:30 +01:00
2015-11-26 11:19:03 -05:00
2015-11-20 08:20:53 -05:00
2015-11-05 21:36:14 +01:00
2015-11-22 16:57:43 +00:00
2015-11-22 16:57:43 +00:00
2015-11-22 16:57:43 +00:00
2015-11-22 16:57:43 +00:00
2015-11-22 17:10:42 +00:00
2015-11-14 13:34:52 +01:00
2015-10-10 09:13:32 +02:00
2015-10-09 22:09:08 +02:00
2015-11-10 15:44:46 +01:00
2015-11-10 23:21:27 +01:00
2015-11-02 11:58:01 +01:00
2015-10-10 01:37:00 +02:00
2015-11-01 14:52:01 +01:00
2015-11-20 11:30:18 +01:00
2015-11-02 11:54:34 +01:00
2015-11-24 22:17:36 +01:00
2015-10-14 23:06:06 +02:00
2015-10-14 23:06:06 +02:00
2015-10-24 13:09:58 +02:00
2015-10-25 22:48:04 +01:00
2015-11-05 15:04:57 +01:00
2015-11-12 13:16:25 +01:00
2015-11-12 13:16:25 +01:00
2015-11-07 12:10:55 +01:00
2015-11-20 00:50:06 +01:00
2015-10-25 10:18:00 -04:00
2015-10-21 12:25:32 -07:00
2015-10-19 16:57:33 -07:00
2015-10-19 16:57:33 -07:00
2015-10-12 00:21:13 +02:00
2015-10-27 12:40:04 +01:00
2015-11-17 01:23:10 +01:00
2015-11-03 12:01:27 +01:00
2015-11-02 08:44:05 +01:00
2015-11-14 02:37:12 +01:00
2015-11-15 22:11:05 +01:00
2015-11-15 22:11:05 +01:00
2015-11-15 22:11:05 +01:00
2015-11-15 22:11:05 +01:00
2015-11-15 22:11:05 +01:00
2015-10-27 14:28:56 +01:00
2015-11-10 17:43:17 +01:00
2015-10-27 13:49:37 +01:00
2015-11-06 21:55:15 +01:00
2015-10-27 14:35:30 +01:00
2015-10-14 15:00:53 +02:00
2015-10-14 15:00:53 +02:00
2015-10-14 15:00:53 +02:00
2015-10-27 14:35:30 +01:00
2015-10-27 12:48:27 +01:00
2015-11-19 14:08:42 +00:00
2015-11-04 04:40:00 +01:00
2015-11-20 08:20:13 -05:00
2015-11-10 23:21:27 +01:00
2015-11-10 23:21:27 +01:00
2015-11-07 19:24:49 +01:00
2015-10-11 17:29:50 -03:00
2015-11-07 01:01:19 +01:00
2015-11-10 17:56:48 +01:00
2015-11-25 19:24:24 -03:00
2015-10-09 20:58:07 +02:00
2015-11-10 13:47:37 +01:00
2015-10-28 21:44:24 -04:00
2015-11-06 00:56:52 +01:00
2015-10-19 22:16:20 +02:00
2015-11-14 10:58:39 -05:00
2015-11-14 10:58:39 -05:00
2015-11-23 22:47:41 +01:00
2015-11-23 10:55:15 +01:00
2015-10-13 00:01:39 +02:00
2015-10-22 19:43:44 +02:00
2015-10-22 19:43:44 +02:00
2015-10-22 19:43:44 +02:00
2015-10-29 18:46:00 -04:00
2015-10-22 21:13:59 +02:00
2015-11-09 13:05:02 +01:00
2015-10-26 15:39:09 +01:00
2015-11-22 01:49:18 +01:00
2015-10-21 11:59:59 +02:00
2015-11-14 18:26:11 +01:00
2015-10-31 17:25:30 -07:00
2015-11-16 18:48:02 +01:00
2015-10-30 12:46:56 +01:00
2015-10-22 20:48:54 +02:00
2015-10-22 20:48:54 +02:00
2015-10-30 01:32:39 +01:00
2015-10-11 18:06:02 -03:00
2015-10-11 17:29:50 -03:00
2015-10-09 09:56:08 -04:00
2015-11-26 00:56:12 +01:00
2015-10-22 15:55:43 +02:00
2015-10-15 15:47:16 +02:00
2015-10-15 15:47:16 +02:00
2015-10-22 17:01:13 +02:00
2015-11-24 13:48:28 +00:00
2015-11-24 13:48:28 +00:00
2015-11-24 13:48:28 +00:00
2015-11-22 17:46:57 +00:00
2015-11-24 13:48:28 +00:00
2015-10-14 14:56:16 +02:00
2015-10-05 11:30:53 +02:00
2015-11-14 10:58:39 -05:00
2015-10-22 20:08:26 +02:00
2015-11-04 04:41:22 +01:00
2015-11-20 08:20:30 -05:00
2015-10-27 14:07:36 +01:00
2015-11-10 17:50:51 +01:00
2015-11-22 01:44:18 +01:00
2015-11-20 23:25:24 +01:00
2015-11-19 14:08:42 +00:00
2015-10-13 02:10:51 +02:00
2015-11-14 10:58:39 -05:00
2015-10-11 18:40:28 +02:00
2015-11-15 15:25:51 +01:00
2015-11-23 10:55:15 +01:00
2015-10-29 18:46:00 -04:00
2015-10-26 23:23:59 -07:00
2015-11-15 01:23:25 +01:00
2015-10-09 21:38:15 +02:00
2015-10-09 21:38:15 +02:00
2015-10-22 20:48:54 +02:00
2015-11-05 03:16:15 +01:00
2015-11-10 17:58:14 +01:00
2015-10-22 19:43:44 +02:00
2015-11-14 01:38:15 +01:00
2015-10-09 22:09:08 +02:00
2015-10-22 20:48:54 +02:00
2015-11-02 11:58:01 +01:00
2015-11-06 21:55:15 +01:00
2015-11-22 17:41:27 +00:00
2015-11-20 11:30:18 +01:00
2015-10-15 13:02:23 +02:00
2015-11-06 17:12:03 -05:00
2015-10-24 15:11:59 -04:00
2015-10-15 13:02:23 +02:00
2015-10-15 13:02:20 +02:00
2015-11-11 00:40:37 +01:00
2015-11-15 18:32:22 +01:00
2015-10-16 23:04:46 +02:00
2015-10-22 21:41:53 +02:00
2015-10-22 21:41:53 +02:00
2015-10-09 19:01:08 -04:00
2015-10-29 18:46:00 -04:00