Revision 5c4b1b25

View differences:

libavcodec/cook.c
185 185
    int i;
186 186
    q->pow2tab[63] = 1.0;
187 187
    for (i=1 ; i<64 ; i++){
188
        q->pow2tab[63+i]=(float)pow(2.0,(double)i);
189
        q->pow2tab[63-i]=1.0/(float)pow(2.0,(double)i);
188
        q->pow2tab[63+i]=(float)((uint64_t)1<<i);
189
        q->pow2tab[63-i]=1.0/(float)((uint64_t)1<<i);
190 190
    }
191 191
}
192 192

  
......
195 195
    int i;
196 196
    q->rootpow2tab[63] = 1.0;
197 197
    for (i=1 ; i<64 ; i++){
198
        q->rootpow2tab[63+i]=sqrt((float)powf(2.0,(float)i));
199
        q->rootpow2tab[63-i]=sqrt(1.0/(float)powf(2.0,(float)i));
198
        q->rootpow2tab[63+i]=sqrt((float)((uint64_t)1<<i));
199
        q->rootpow2tab[63-i]=sqrt(1.0/(float)((uint64_t)1<<i));
200 200
    }
201 201
}
202 202

  

Also available in: Unified diff