aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/common.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-08-22 19:41:39 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-08-22 19:41:39 +0000
commitf36db5dfd3c3cfd5d2e9feb0462c18431183cff5 (patch)
treedd74494896ac8b73d360250d263229b5f3a8e573 /libavcodec/common.c
parent1fb4890b5195db4de31733a234abb946f9399f3e (diff)
downloadffmpeg-f36db5dfd3c3cfd5d2e9feb0462c18431183cff5.tar.gz
faster ff_sqrt()
Originally committed as revision 859 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/common.c')
-rw-r--r--libavcodec/common.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/common.c b/libavcodec/common.c
index 63d17b6c2b..fde12d9270 100644
--- a/libavcodec/common.c
+++ b/libavcodec/common.c
@@ -20,6 +20,13 @@
*/
#include "avcodec.h"
+const UINT8 ff_sqrt_tab[128]={
+ 0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 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,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11
+};
+
void init_put_bits(PutBitContext *s,
UINT8 *buffer, int buffer_size,
void *opaque,