diff options
author | Daniil Cherednik <dan.cherednik@gmail.com> | 2015-11-13 23:50:47 +0300 |
---|---|---|
committer | Daniil Cherednik <dan.cherednik@gmail.com> | 2015-11-13 23:50:47 +0300 |
commit | b45cd2e5bc5a26fa9b570be5246f6bf1b91d46b6 (patch) | |
tree | 34ba426bd92f5adeb212baee81cec97bf778698a /src | |
parent | 12cd5ab2654a1332671dab87d30fb300845a3d6f (diff) | |
download | atracdenc-b45cd2e5bc5a26fa9b570be5246f6bf1b91d46b6.tar.gz |
reduce aliasing near 5512Hz
Diffstat (limited to 'src')
-rw-r--r-- | src/atrac/atrac1_bitalloc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/atrac/atrac1_bitalloc.cpp b/src/atrac/atrac1_bitalloc.cpp index d43d9ef..e6065b6 100644 --- a/src/atrac/atrac1_bitalloc.cpp +++ b/src/atrac/atrac1_bitalloc.cpp @@ -40,7 +40,7 @@ vector<uint32_t> TAtrac1SimpleBitAlloc::CalcBitsAllocation(const std::vector<TSc vector<uint32_t> bitsPerEachBlock; bitsPerEachBlock.resize(scaledBlocks.size()); for (int i = 0; i < scaledBlocks.size(); ++i) { - int tmp = spread * ( (double)scaledBlocks[i].ScaleFactorIndex/5.2) + (1.0 - spread) * (FixedBitAllocTableLong[i] + 1) - shift; + int tmp = spread * ( (double)scaledBlocks[i].ScaleFactorIndex/3.2) + (1.0 - spread) * (FixedBitAllocTableLong[i]) - shift; if (tmp > 16) { bitsPerEachBlock[i] = 16; } else if (tmp < 2) { @@ -58,7 +58,7 @@ uint32_t TAtrac1SimpleBitAlloc::Write(const std::vector<TScaledBlock>& scaledBlo double spread = AnalizeSpread(scaledBlocks); bitsPerEachBlock.resize(scaledBlocks.size()); const uint32_t bitsAvaliablePerBfus = SoundUnitSize * 8 - BitsPerBfuAmountTabIdx - 32 - 2 - 3 - bitsPerEachBlock.size() * (BitsPerIDWL + BitsPerIDSF); - double maxShift = 4; + double maxShift = 6; double minShift = -2; double shift = 3.0; const uint32_t maxBits = bitsAvaliablePerBfus; |