diff common.c @ 609:153a7ffd289b libavcodec

faster ff_sqrt()
author michaelni
date Thu, 22 Aug 2002 19:41:39 +0000
parents 7f1b09bb34c6
children 4c22dcf3ba65
line wrap: on
line diff
--- a/common.c	Thu Aug 22 19:41:06 2002 +0000
+++ b/common.c	Thu Aug 22 19:41:39 2002 +0000
@@ -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,