diff options
author | Daniil Cherednik <dan.cherednik@gmail.com> | 2024-12-12 23:26:24 +0100 |
---|---|---|
committer | Daniil Cherednik <dan.cherednik@gmail.com> | 2024-12-12 23:52:19 +0100 |
commit | 39986e653def9d1130235c1cd6a38c3251bb6d79 (patch) | |
tree | 0d84f0c219a8784d6ab22c74face2be230fd939a /src/atrac/atrac_scale.h | |
parent | 2ca3d7fb3cfdc0b311bb20426d53782910dee64e (diff) | |
download | atracdenc-39986e653def9d1130235c1cd6a38c3251bb6d79.tar.gz |
[refactoring] Get rid of inheritance from data.
Diffstat (limited to 'src/atrac/atrac_scale.h')
-rw-r--r-- | src/atrac/atrac_scale.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/atrac/atrac_scale.h b/src/atrac/atrac_scale.h index ec83059..f15b14b 100644 --- a/src/atrac/atrac_scale.h +++ b/src/atrac/atrac_scale.h @@ -21,7 +21,6 @@ #include <map> #include <cstdint> -#include "atrac1.h" #include "lib/bitstream/bitstream.h" #include "../config.h" @@ -37,14 +36,10 @@ struct TScaledBlock { class TBlockSize; template <class TBaseData> -class TScaler : public TBaseData { - std::map<TFloat, uint8_t>ScaleIndex; +class TScaler { + std::map<TFloat, uint8_t> ScaleIndex; public: - TScaler() { - for (int i = 0; i < 64; i++) { - ScaleIndex[TBaseData::ScaleTable[i]] = i; - } - } + TScaler(); TScaledBlock Scale(const TFloat* in, uint16_t len); std::vector<TScaledBlock> ScaleFrame(const std::vector<TFloat>& specs, const TBlockSize& blockSize); }; |