diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-05-24 22:28:33 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-05-24 22:28:33 +0000 |
commit | 158bf33e36fc5b5fecf628b25fd4e8dd001056f2 (patch) | |
tree | e6e7fa5f3e2c2298de329a811558c1837937fbbb /libavcodec | |
parent | 40756c172c9d31f2d3999d24b70c5640bdafbb24 (diff) | |
download | ffmpeg-158bf33e36fc5b5fecf628b25fd4e8dd001056f2.tar.gz |
simplify init_pow2table
Originally committed as revision 13365 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/cook.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 3b3f6e8ad1..cac3fdb8c4 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -185,13 +185,9 @@ static void dump_short_table(short* table, int size, int delimiter) { /* 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)); } } |