mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-20 17:03:05 +00:00
COMMON: Minor reduction of sine/cosine table size (8 bytes...).
This commit is contained in:
parent
8a5b08341e
commit
1809b9173c
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user