[FFmpeg-cvslog] r13365 - trunk/libavcodec/cook.c

michael subversion
Sun May 25 00:28:33 CEST 2008


Author: michael
Date: Sun May 25 00:28:33 2008
New Revision: 13365

Log:
simplify init_pow2table


Modified:
   trunk/libavcodec/cook.c

Modified: trunk/libavcodec/cook.c
==============================================================================
--- trunk/libavcodec/cook.c	(original)
+++ trunk/libavcodec/cook.c	Sun May 25 00:28:33 2008
@@ -185,13 +185,9 @@ static void dump_short_table(short* tabl
 /* 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);
-        q->rootpow2tab[63+i]=sqrt((float)((uint64_t)1<<i));
-        q->rootpow2tab[63-i]=sqrt(1.0/(float)((uint64_t)1<<i));
+    for (i=-63 ; i<64 ; i++){
+        q->    pow2tab[63+i]=     pow(2, i);
+        q->rootpow2tab[63+i]=sqrt(pow(2, i));
     }
 }
 




More information about the ffmpeg-cvslog mailing list