diff options
author | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-11-26 00:26:08 +0300 |
---|---|---|
committer | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-12-02 03:05:19 +0300 |
commit | 16d4c28cbb9add358d4e6f30c412860638dc4f90 (patch) | |
tree | c0cbf8772bd09b5e9903ba250f3ed9c528e3bb87 /libavcodec/mpegaudio_tablegen.c | |
parent | 538e8ab512ab1bee5c313f6a2e040e3f7cc7fe87 (diff) |
avcodec/mpegaudio_tablegen: speed up dynamic table creation
This does some miscellaneous stuff mainly avoiding the usage of pow to
achieve significant speedups. This is not speed critical, but is
unnecessary latency and cycles wasted for a user.
All tables tested and are identical to the old ones
(bit-exact even in floating point case).
Sample benchmark (x86-64, Haswell, GNU/Linux):
old:
102329530 decicycles in mpegaudio_tableinit, 1 runs, 0 skips
new:
34111900 decicycles in mpegaudio_tableinit, 1 runs, 0 skips
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'libavcodec/mpegaudio_tablegen.c')
-rw-r--r-- | libavcodec/mpegaudio_tablegen.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/mpegaudio_tablegen.c b/libavcodec/mpegaudio_tablegen.c index 90c9de430a..9a9bb4d056 100644 --- a/libavcodec/mpegaudio_tablegen.c +++ b/libavcodec/mpegaudio_tablegen.c @@ -23,6 +23,7 @@ #include <stdlib.h> #define CONFIG_HARDCODED_TABLES 0 #include "mpegaudio_tablegen.h" +#include "libavutil/tablegen.h" #include "tableprint.h" int main(void) |