aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniil Cherednik <dan.cherednik@gmail.com>2015-11-22 13:10:22 +0300
committerDaniil Cherednik <dan.cherednik@gmail.com>2015-11-22 13:10:22 +0300
commit1f9fa0fb09afecc160f3022782572db1b0dae0c0 (patch)
tree170665d7e21c3915f354b9e73fd10376daff8550 /src
parent23287d2ae372e3d44f8810c3c5ecbf855b466c18 (diff)
downloadatracdenc-1f9fa0fb09afecc160f3022782572db1b0dae0c0.tar.gz
fix bitrate shift constant.
we could stuck on some frames
Diffstat (limited to 'src')
-rw-r--r--src/atrac/atrac1_bitalloc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/atrac/atrac1_bitalloc.cpp b/src/atrac/atrac1_bitalloc.cpp
index 5d3d70d..bbad317 100644
--- a/src/atrac/atrac1_bitalloc.cpp
+++ b/src/atrac/atrac1_bitalloc.cpp
@@ -94,7 +94,7 @@ uint32_t TAtrac1SimpleBitAlloc::Write(const std::vector<TScaledBlock>& scaledBlo
for (;;) {
bitsPerEachBlock.resize(BfuAmountTab[bfuIdx]);
const uint32_t bitsAvaliablePerBfus = SoundUnitSize * 8 - BitsPerBfuAmountTabIdx - 32 - 2 - 3 - bitsPerEachBlock.size() * (BitsPerIDWL + BitsPerIDSF);
- double maxShift = 6;
+ double maxShift = 9;
double minShift = -2;
double shift = 3.0;
const uint32_t maxBits = bitsAvaliablePerBfus;