Skip to content

Commit

Permalink
COMMON: Update RDFT and DCT cos/sin table constructor usage
Browse files Browse the repository at this point in the history
When the constructor for the cos/sin table was changed from
number of bits to number of points all usages thoughout the
code should of been changed, but this was missed in RDFT and DCT.

Fixes Trac#10683.
  • Loading branch information
dafioram authored and sev- committed Aug 25, 2018
1 parent b00395b commit cf99bb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/dct.cpp
Expand Up @@ -30,7 +30,7 @@


namespace Common { namespace Common {


DCT::DCT(int bits, TransformType trans) : _bits(bits), _cos(_bits + 2), _trans(trans), _rdft(nullptr) { DCT::DCT(int bits, TransformType trans) : _bits(bits), _cos(1 << (_bits + 2) ), _trans(trans), _rdft(nullptr) {
int n = 1 << _bits; int n = 1 << _bits;


_tCos = _cos.getTable(); _tCos = _cos.getTable();
Expand Down
2 changes: 1 addition & 1 deletion common/rdft.cpp
Expand Up @@ -28,7 +28,7 @@


namespace Common { namespace Common {


RDFT::RDFT(int bits, TransformType trans) : _bits(bits), _sin(bits), _cos(bits), _fft(nullptr) { RDFT::RDFT(int bits, TransformType trans) : _bits(bits), _sin(1 << bits), _cos(1 << bits), _fft(nullptr) {
assert((_bits >= 4) && (_bits <= 16)); assert((_bits >= 4) && (_bits <= 16));


_inverse = trans == IDFT_C2R || trans == DFT_C2R; _inverse = trans == IDFT_C2R || trans == DFT_C2R;
Expand Down

0 comments on commit cf99bb0

Please sign in to comment.