diff --git a/common/cosinetables.cpp b/common/cosinetables.cpp index 30f55b55fc4..bfa8ea67a3c 100644 --- a/common/cosinetables.cpp +++ b/common/cosinetables.cpp @@ -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 diff --git a/common/sinetables.cpp b/common/sinetables.cpp index 79721ec4015..44b12ba0b67 100644 --- a/common/sinetables.cpp +++ b/common/sinetables.cpp @@ -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