diff options
author | Diego Biurrun <diego@biurrun.de> | 2012-10-04 21:12:32 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2012-10-12 20:39:17 +0200 |
commit | 930c9d4373e0f3cb7c64fcfc129127a309f6d066 (patch) | |
tree | 3b19450d2f717e3de3791f7a856c14b9a3799221 /libavutil/log2_tab.c | |
parent | f6c38c5f4ed6683a6a61db2ed418a68bbe5f5507 (diff) | |
download | ffmpeg-930c9d4373e0f3cb7c64fcfc129127a309f6d066.tar.gz |
avutil: Duplicate ff_log2_tab instead of sharing it across libs
The table is so small that the space gain is not worth the
performance overhead of cross-library access.
Diffstat (limited to 'libavutil/log2_tab.c')
-rw-r--r-- | libavutil/log2_tab.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/libavutil/log2_tab.c b/libavutil/log2_tab.c new file mode 100644 index 0000000000..f6cbe79063 --- /dev/null +++ b/libavutil/log2_tab.c @@ -0,0 +1,30 @@ +/* + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include <stdint.h> + +const uint8_t ff_log2_tab[256]={ + 0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 +}; |