aboutsummaryrefslogtreecommitdiffstats
path: root/src/atracdenc_ut.cpp
diff options
context:
space:
mode:
authorDaniil Cherednik <dan.cherednik@gmail.com>2024-12-20 22:31:20 +0100
committerDaniil Cherednik <dan.cherednik@gmail.com>2024-12-21 16:30:07 +0100
commit74d6e04c21bddd435bd74c34dbe027b883772a76 (patch)
tree4221df9da5a17897296e5f7f841f01b1f6428c74 /src/atracdenc_ut.cpp
parent78649b2f5941e0649db960cafb2997b5ca432be1 (diff)
downloadatracdenc-74d6e04c21bddd435bd74c34dbe027b883772a76.tar.gz
[refactoring] Get rid of TFloat parameter. Use float.
Diffstat (limited to 'src/atracdenc_ut.cpp')
-rw-r--r--src/atracdenc_ut.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/atracdenc_ut.cpp b/src/atracdenc_ut.cpp
index efcd3df..416b972 100644
--- a/src/atracdenc_ut.cpp
+++ b/src/atracdenc_ut.cpp
@@ -24,7 +24,7 @@
using std::vector;
using namespace NAtracDEnc;
-void CheckResult128(const vector<TFloat>& a, const vector<TFloat>& b) {
+void CheckResult128(const vector<float>& a, const vector<float>& b) {
float m = 0.0;
for (int i = 0; i < a.size(); i++) {
m = fmax(m, (float)a[i]);
@@ -37,7 +37,7 @@ void CheckResult128(const vector<TFloat>& a, const vector<TFloat>& b) {
}
}
-void CheckResult256(const vector<TFloat>& a, const vector<TFloat>& b) {
+void CheckResult256(const vector<float>& a, const vector<float>& b) {
float m = 0.0;
for (int i = 0; i < a.size(); i++) {
m = fmax(m, (float)a[i]);
@@ -53,14 +53,14 @@ void CheckResult256(const vector<TFloat>& a, const vector<TFloat>& b) {
TEST(TAtrac1MDCT, TAtrac1MDCTLongEncDec) {
TAtrac1MDCT mdct;
- vector<TFloat> low(128 * 2);
- vector<TFloat> mid(128 * 2);
- vector<TFloat> hi(256 * 2);
- vector<TFloat> specs(512 * 2);
-
- vector<TFloat> lowRes(128 * 2);
- vector<TFloat> midRes(128 * 2);
- vector<TFloat> hiRes(256 * 2);
+ vector<float> low(128 * 2);
+ vector<float> mid(128 * 2);
+ vector<float> hi(256 * 2);
+ vector<float> specs(512 * 2);
+
+ vector<float> lowRes(128 * 2);
+ vector<float> midRes(128 * 2);
+ vector<float> hiRes(256 * 2);
for (int i = 0; i < 128; i++) {
low[i] = mid[i] = i;
@@ -82,25 +82,25 @@ TEST(TAtrac1MDCT, TAtrac1MDCTLongEncDec) {
TEST(TAtrac1MDCT, TAtrac1MDCTShortEncDec) {
TAtrac1MDCT mdct;
- vector<TFloat> low(128 * 2);
- vector<TFloat> mid(128 * 2);
- vector<TFloat> hi(256 * 2);
- vector<TFloat> specs(512 * 2);
-
- vector<TFloat> lowRes(128 * 2);
- vector<TFloat> midRes(128 * 2);
- vector<TFloat> hiRes(256 * 2);
+ vector<float> low(128 * 2);
+ vector<float> mid(128 * 2);
+ vector<float> hi(256 * 2);
+ vector<float> specs(512 * 2);
+
+ vector<float> lowRes(128 * 2);
+ vector<float> midRes(128 * 2);
+ vector<float> hiRes(256 * 2);
for (int i = 0; i < 128; i++) {
low[i] = mid[i] = i;
}
- const vector<TFloat> lowCopy = low; //in case of short wondow AtracMDCT changed input buffer during calculation
- const vector<TFloat> midCopy = mid;
+ const vector<float> lowCopy = low; //in case of short wondow AtracMDCT changed input buffer during calculation
+ const vector<float> midCopy = mid;
for (int i = 0; i < 256; i++) {
hi[i] = i;
}
- const vector<TFloat> hiCopy = hi;
+ const vector<float> hiCopy = hi;
const TBlockSize blockSize(true, true, true); //short