Commit 9d95cc3f authored by michael's avatar michael

Merge init_rootpow2table and init_pow2table.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13364 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent a14b6697
...@@ -185,18 +185,11 @@ static void dump_short_table(short* table, int size, int delimiter) { ...@@ -185,18 +185,11 @@ static void dump_short_table(short* table, int size, int delimiter) {
/* table generator */ /* table generator */
static void init_pow2table(COOKContext *q){ static void init_pow2table(COOKContext *q){
int i; int i;
q->rootpow2tab[63] =
q->pow2tab[63] = 1.0; q->pow2tab[63] = 1.0;
for (i=1 ; i<64 ; i++){ for (i=1 ; i<64 ; i++){
q->pow2tab[63+i]=(float)((uint64_t)1<<i); q->pow2tab[63+i]=(float)((uint64_t)1<<i);
q->pow2tab[63-i]=1.0/(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((float)((uint64_t)1<<i));
q->rootpow2tab[63-i]=sqrt(1.0/(float)((uint64_t)1<<i)); q->rootpow2tab[63-i]=sqrt(1.0/(float)((uint64_t)1<<i));
} }
...@@ -1124,7 +1117,6 @@ static int cook_decode_init(AVCodecContext *avctx) ...@@ -1124,7 +1117,6 @@ static int cook_decode_init(AVCodecContext *avctx)
q->numvector_size = (1 << q->log2_numvector_size); q->numvector_size = (1 << q->log2_numvector_size);
/* Generate tables */ /* Generate tables */
init_rootpow2table(q);
init_pow2table(q); init_pow2table(q);
init_gain_table(q); init_gain_table(q);
init_cplscales_table(q); init_cplscales_table(q);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment