aboutsummaryrefslogtreecommitdiffstats
path: root/src/mdct/mdct.h
diff options
context:
space:
mode:
authorDaniil Cherednik <dan.cherednik@gmail.com>2024-06-16 20:43:56 +0000
committerDaniil Cherednik <dan.cherednik@gmail.com>2024-06-16 20:54:48 +0000
commit482f247c6a3a0615491eab6b90c19b929a87ab56 (patch)
tree354d0378018485a407fc7369e2a91cc6705ec4f2 /src/mdct/mdct.h
parent80a30dc68671d7e88082bd28684320a2680824a1 (diff)
downloadatracdenc-482f247c6a3a0615491eab6b90c19b929a87ab56.tar.gz
[AT3P] Use fast DCT-IV calculation for PQF
Diffstat (limited to 'src/mdct/mdct.h')
-rw-r--r--src/mdct/mdct.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mdct/mdct.h b/src/mdct/mdct.h
index 97d5437..b80d5e0 100644
--- a/src/mdct/mdct.h
+++ b/src/mdct/mdct.h
@@ -39,16 +39,16 @@ protected:
};
-template<size_t TN>
+template<size_t TN, typename TIO = TFloat>
class TMDCT : public TMDCTBase {
- std::vector<TFloat> Buf;
+ std::vector<TIO> Buf;
public:
TMDCT(float scale = 1.0)
: TMDCTBase(TN, scale)
, Buf(TN/2)
{
}
- const std::vector<TFloat>& operator()(TFloat* in) {
+ const std::vector<TIO>& operator()(const TIO* in) {
const size_t n2 = N >> 1;
const size_t n4 = N >> 2;
@@ -104,15 +104,15 @@ public:
}
};
-template<size_t TN>
+template<size_t TN, typename TIO = TFloat>
class TMIDCT : public TMDCTBase {
- std::vector<TFloat> Buf;
+ std::vector<TIO> Buf;
public:
TMIDCT(float scale = TN)
: TMDCTBase(TN, scale/2)
, Buf(TN)
{}
- const std::vector<TFloat>& operator()(TFloat* in) {
+ const std::vector<TIO>& operator()(const TIO* in) {
const size_t n2 = N >> 1;
const size_t n4 = N >> 2;