changeset 6859:2df67a1a76b7 libavcodec

Merge init_rootpow2table and init_pow2table.
author michael
date Sat, 24 May 2008 22:23:16 +0000
parents f8365275c4f4
children 75aa9d6df9ac
files cook.c
diffstat 1 files changed, 1 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/cook.c	Sat May 24 20:52:50 2008 +0000
+++ b/cook.c	Sat May 24 22:23:16 2008 +0000
@@ -185,18 +185,11 @@
 /* table generator */
 static void init_pow2table(COOKContext *q){
     int i;
+    q->rootpow2tab[63] =
     q->pow2tab[63] = 1.0;
     for (i=1 ; i<64 ; i++){
         q->pow2tab[63+i]=(float)((uint64_t)1<<i);
         q->pow2tab[63-i]=1.0/(float)((uint64_t)1<<i);
-    }
-}
-
-/* table generator */
-static void init_rootpow2table(COOKContext *q){
-    int i;
-    q->rootpow2tab[63] = 1.0;
-    for (i=1 ; i<64 ; i++){
         q->rootpow2tab[63+i]=sqrt((float)((uint64_t)1<<i));
         q->rootpow2tab[63-i]=sqrt(1.0/(float)((uint64_t)1<<i));
     }
@@ -1124,7 +1117,6 @@
     q->numvector_size = (1 << q->log2_numvector_size);
 
     /* Generate tables */
-    init_rootpow2table(q);
     init_pow2table(q);
     init_gain_table(q);
     init_cplscales_table(q);