COMMON: Minor reduction of sine/cosine table size (8 bytes...).

This commit is contained in:
D G Turner 2012-04-13 10:16:48 +01:00
parent 8a5b08341e
commit 1809b9173c
2 changed files with 4 additions and 6 deletions

View File

@ -8257,8 +8257,7 @@ static const float cosTable65536[32768] = {
1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f
};
static const float *cosTables[17] = {
0 , 0 , 0 , 0 ,
static const float *cosTables[13] = {
cosTable16 , cosTable32 , cosTable64 , cosTable128 ,
cosTable256 , cosTable512 , cosTable1024 , cosTable2048 ,
cosTable4096, cosTable8192, cosTable16384, cosTable32768,
@ -8268,7 +8267,7 @@ static const float *cosTables[17] = {
const float *getCosineTable(int bits) {
assert((bits >= 4) && (bits <= 16));
return cosTables[bits];
return cosTables[bits-4];
}
} // End of namespace Common

View File

@ -8257,8 +8257,7 @@ static const float sinTable65536[32768] = {
-1.000000f, -1.000000f, -1.000000f, -1.000000f, -1.000000f, -1.000000f, -1.000000f, -1.000000f
};
static const float *sinTables[17] = {
0 , 0 , 0 , 0 ,
static const float *sinTables[13] = {
sinTable16 , sinTable32 , sinTable64 , sinTable128 ,
sinTable256 , sinTable512 , sinTable1024 , sinTable2048 ,
sinTable4096, sinTable8192, sinTable16384, sinTable32768,
@ -8268,7 +8267,7 @@ static const float *sinTables[17] = {
const float *getSineTable(int bits) {
assert((bits >= 4) && (bits <= 16));
return sinTables[bits];
return sinTables[bits-4];
}
} // End of namespace Common