Revision 47d62c96
libavcodec/bink.c  

1217  1217 
*/ 
1218  1218 
static av_cold void binkb_calc_quant() 
1219  1219 
{ 
1220 
float s[64];


1220 
double s[64];


1221  1221 
int i, j; 
1222  1222  
1223  1223 
for (j = 0; j < 8; j++) { 
1224  1224 
for (i = 0; i < 8; i++) { 
1225  1225 
if (j && j != 4) 
1226  1226 
if (i && i != 4) 
1227 
s[j*8 + i] = cos(j * M_PI/16.0f) * cos(i * M_PI/16.0f) * 2.0f;


1227 
s[j*8 + i] = cos(j * M_PI/16.0) * cos(i * M_PI/16.0) * 2.0;


1228  1228 
else 
1229 
s[j*8 + i] = cos(j * M_PI/16.0f) * sqrt(2.0f);


1229 
s[j*8 + i] = cos(j * M_PI/16.0) * sqrt(2.0);


1230  1230 
else 
1231  1231 
if (i && i != 4) 
1232 
s[j*8 + i] = cos(i * M_PI/16.0f) * sqrt(2.0f);


1232 
s[j*8 + i] = cos(i * M_PI/16.0) * sqrt(2.0);


1233  1233 
else 
1234 
s[j*8 + i] = 1.0f;


1234 
s[j*8 + i] = 1.0; 

1235  1235 
} 
1236  1236 
} 
1237  1237  
1238  1238 
for (j = 0; j < 16; j++) { 
1239  1239 
for (i = 0; i < 64; i++) { 
1240 
binkb_intra_quant[j][i] = (1L << 12) * binkb_intra_seed[i] * s[i] * 

1241 
binkb_num[j]/(float)binkb_den[j]; 

1242 
binkb_inter_quant[j][i] = (1L << 12) * binkb_inter_seed[i] * s[i] * 

1243 
binkb_num[j]/(float)binkb_den[j]; 

1240 
if (s[i] == 1.0) { 

1241 
binkb_intra_quant[j][i] = (1L << 12) * binkb_intra_seed[i] * 

1242 
binkb_num[j]/binkb_den[j]; 

1243 
binkb_inter_quant[j][i] = (1L << 12) * binkb_inter_seed[i] * 

1244 
binkb_num[j]/binkb_den[j]; 

1245 
} else { 

1246 
binkb_intra_quant[j][i] = (1L << 12) * binkb_intra_seed[i] * s[i] * 

1247 
binkb_num[j]/(double)binkb_den[j]; 

1248 
binkb_inter_quant[j][i] = (1L << 12) * binkb_inter_seed[i] * s[i] * 

1249 
binkb_num[j]/(double)binkb_den[j]; 

1250 
} 

1244  1251 
} 
1245  1252 
} 
1246  1253 
} 
Also available in: Unified diff