diff options
author | 4BDA26H33GTZ4HYUMIO <4BDA26H33@GTZ4HYUM.IO> | 2024-06-06 13:36:16 +0000 |
---|---|---|
committer | 4BDA26H33GTZ4HYUMIO <4BDA26H33@GTZ4HYUM.IO> | 2024-06-15 15:01:08 +0000 |
commit | 80a30dc68671d7e88082bd28684320a2680824a1 (patch) | |
tree | 60ec7963e0bf48bcc68521c57945cfc3bb9aa726 | |
parent | ee120708d72db31012a6aa7b2f6b99960ae1f6d7 (diff) | |
download | atracdenc-80a30dc68671d7e88082bd28684320a2680824a1.tar.gz |
Use well known analyze/synthesis naming instead of split/merge
-rw-r--r-- | src/atrac/atrac1_qmf.h | 14 | ||||
-rw-r--r-- | src/atrac/atrac3_qmf.h | 12 | ||||
-rw-r--r-- | src/atrac1denc.cpp | 2 | ||||
-rw-r--r-- | src/atrac1denc.h | 2 | ||||
-rw-r--r-- | src/atrac3denc.cpp | 2 | ||||
-rw-r--r-- | src/atrac3denc.h | 2 | ||||
-rw-r--r-- | src/qmf/qmf.h | 4 |
7 files changed, 19 insertions, 19 deletions
diff --git a/src/atrac/atrac1_qmf.h b/src/atrac/atrac1_qmf.h index 8b3e5e4..d8fdae3 100644 --- a/src/atrac/atrac1_qmf.h +++ b/src/atrac/atrac1_qmf.h @@ -23,7 +23,7 @@ namespace NAtracDEnc { template<class TIn> -class Atrac1SplitFilterBank { +class Atrac1AnalysisFilterBank { const static int nInSamples = 512; const static int delayComp = 39; TQmf<TIn, nInSamples> Qmf1; @@ -31,14 +31,14 @@ class Atrac1SplitFilterBank { std::vector<TFloat> MidLowTmp; std::vector<TFloat> DelayBuf; public: - Atrac1SplitFilterBank() { + Atrac1AnalysisFilterBank() { MidLowTmp.resize(512); DelayBuf.resize(delayComp + 512); } - void Split(TIn* pcm, TFloat* low, TFloat* mid, TFloat* hi) { + void Analysis(TIn* pcm, TFloat* low, TFloat* mid, TFloat* hi) { memcpy(&DelayBuf[0], &DelayBuf[256], sizeof(TFloat) * delayComp); - Qmf1.Split(pcm, &MidLowTmp[0], &DelayBuf[delayComp]); - Qmf2.Split(&MidLowTmp[0], low, mid); + Qmf1.Analysis(pcm, &MidLowTmp[0], &DelayBuf[delayComp]); + Qmf2.Analysis(&MidLowTmp[0], low, mid); memcpy(hi, &DelayBuf[0], sizeof(TFloat) * 256); } @@ -59,8 +59,8 @@ public: void Synthesis(TOut* pcm, TFloat* low, TFloat* mid, TFloat* hi) { memcpy(&DelayBuf[0], &DelayBuf[256], sizeof(TFloat) * delayComp); memcpy(&DelayBuf[delayComp], hi, sizeof(TFloat) * 256); - Qmf2.Merge(&MidLowTmp[0], &low[0], &mid[0]); - Qmf1.Merge(&pcm[0], &MidLowTmp[0], &DelayBuf[0]); + Qmf2.Synthesis(&MidLowTmp[0], &low[0], &mid[0]); + Qmf1.Synthesis(&pcm[0], &MidLowTmp[0], &DelayBuf[0]); } }; diff --git a/src/atrac/atrac3_qmf.h b/src/atrac/atrac3_qmf.h index 6f26d54..2fc33fa 100644 --- a/src/atrac/atrac3_qmf.h +++ b/src/atrac/atrac3_qmf.h @@ -23,7 +23,7 @@ namespace NAtracDEnc { template<class TIn> -class Atrac3SplitFilterBank { +class Atrac3AnalysisFilterBank { const static int nInSamples = 1024; TQmf<TIn, nInSamples> Qmf1; TQmf<TIn, nInSamples / 2> Qmf2; @@ -31,14 +31,14 @@ class Atrac3SplitFilterBank { std::vector<TFloat> Buf1; std::vector<TFloat> Buf2; public: - Atrac3SplitFilterBank() { + Atrac3AnalysisFilterBank() { Buf1.resize(nInSamples); Buf2.resize(nInSamples); } - void Split(TIn* pcm, TFloat* subs[4]) { - Qmf1.Split(pcm, Buf1.data(), Buf2.data()); - Qmf2.Split(Buf1.data(), subs[0], subs[1]); - Qmf3.Split(Buf2.data(), subs[3], subs[2]); + void Analysis(TIn* pcm, TFloat* subs[4]) { + Qmf1.Analysis(pcm, Buf1.data(), Buf2.data()); + Qmf2.Analysis(Buf1.data(), subs[0], subs[1]); + Qmf3.Analysis(Buf2.data(), subs[3], subs[2]); } }; diff --git a/src/atrac1denc.cpp b/src/atrac1denc.cpp index 93a69b8..d622007 100644 --- a/src/atrac1denc.cpp +++ b/src/atrac1denc.cpp @@ -177,7 +177,7 @@ TPCMEngine<TFloat>::TProcessLambda TAtrac1Encoder::GetLambda() { src[i] = data[i * srcChannels + channel]; } - SplitFilterBank[channel].Split(&src[0], &PcmBufLow[channel][0], &PcmBufMid[channel][0], &PcmBufHi[channel][0]); + AnalysisFilterBank[channel].Analysis(&src[0], &PcmBufLow[channel][0], &PcmBufMid[channel][0], &PcmBufHi[channel][0]); uint32_t windowMask = 0; if (Settings.GetWindowMode() == TAtrac1EncodeSettings::EWindowMode::EWM_AUTO) { diff --git a/src/atrac1denc.h b/src/atrac1denc.h index f171bf5..e898788 100644 --- a/src/atrac1denc.h +++ b/src/atrac1denc.h @@ -64,7 +64,7 @@ class TAtrac1Encoder : public IProcessor<TFloat>, public TAtrac1MDCT, public vir TFloat PcmBufMid[2][256 + 16]; TFloat PcmBufHi[2][512 + 16]; - Atrac1SplitFilterBank<TFloat> SplitFilterBank[2]; + Atrac1AnalysisFilterBank<TFloat> AnalysisFilterBank[2]; class TTransientDetectors { std::vector<TTransientDetector> transientDetectorLow; diff --git a/src/atrac3denc.cpp b/src/atrac3denc.cpp index c6be93e..e5a0da9 100644 --- a/src/atrac3denc.cpp +++ b/src/atrac3denc.cpp @@ -301,7 +301,7 @@ TPCMEngine<TFloat>::TProcessLambda TAtrac3Encoder::GetLambda() { TFloat* p[4] = {PcmBuffer.GetSecond(channel), PcmBuffer.GetSecond(channel+2), PcmBuffer.GetSecond(channel+4), PcmBuffer.GetSecond(channel+6)}; - SplitFilterBank[channel].Split(&src[0], p); + AnalysisFilterBank[channel].Analysis(&src[0], p); } } diff --git a/src/atrac3denc.h b/src/atrac3denc.h index febf6f7..1aea07e 100644 --- a/src/atrac3denc.h +++ b/src/atrac3denc.h @@ -86,7 +86,7 @@ class TAtrac3Encoder : public IProcessor<TFloat>, public TAtrac3MDCT { TFloat PrevPeak[2][4]; //2 channel, 4 band - peak level (after windowing), used to check overflow during scalling - Atrac3SplitFilterBank<TFloat> SplitFilterBank[2]; + Atrac3AnalysisFilterBank<TFloat> AnalysisFilterBank[2]; TScaler<TAtrac3Data> Scaler; std::vector<NAtrac3::TAtrac3BitStreamWriter::TSingleChannelElement> SingleChannelElements; public: diff --git a/src/qmf/qmf.h b/src/qmf/qmf.h index 67bbef2..2e71444 100644 --- a/src/qmf/qmf.h +++ b/src/qmf/qmf.h @@ -41,7 +41,7 @@ public: } } - void Split(TPCM* in, TFloat* lower, TFloat* upper) { + void Analysis(TPCM* in, TFloat* lower, TFloat* upper) { TFloat temp; for (size_t i = 0; i < 46; i++) PcmBuffer[i] = PcmBuffer[nIn + i]; @@ -61,7 +61,7 @@ public: } } - void Merge(TPCM* out, TFloat* lower, TFloat* upper) { + void Synthesis(TPCM* out, TFloat* lower, TFloat* upper) { memcpy(&PcmBufferMerge[0], &DelayBuff[0], 46*sizeof(TFloat)); TFloat* newPart = &PcmBufferMerge[46]; for (int i = 0; i < nIn; i+=4) { |