- Jan 27, 2011
-
-
Jean-Marc Valin authored
-
Jean-Marc Valin authored
We now encode the highest bitrate part of the split first and transfer any unused bits to the other part. We use a dead zone of three bits to prevent redistributing in cases of random fluctuation (or else we will statistically lower the allocation of higher frequencies at low-mid bitrates).
-
Jean-Marc Valin authored
-
Jean-Marc Valin authored
-
Jean-Marc Valin authored
Makes celt_exp2() use Q10 input to avoid problems on very low energy. Also makes the pitch downsampling more conservative on gain to avoid problems later.
-
Jean-Marc Valin authored
-
-
Jean-Marc Valin authored
Also defining a 1-byte packet as triggering the PLC/CNG
-
This changes folding so that the LCG is never used on transients (either short blocks or long blocks with increased time resolution), except in the case that there's not enough decoded spectrum to fold yet. It also now only subtracts the anti-collapse bit from the total allocation in quant_all_bands() when space has actually been reserved for it. Finally, it cleans up some of the fill and collapse_mask tracking (this tracking was originally made intentionally sloppy to save work, but then converted to replace the existing fill flag at the last minute, which can have a number of logical implications). The changes, in particular: 1) Splits of less than a block now correctly mark the second half as filled only if the whole block was filled (previously it would also mark it filled if the next block was filled). 2) Splits of less than a block now correctly mark a block as un-collapsed if either half was un-collapsed, instead of marking the next block as un-collapsed when the high half was. 3) The N=2 stereo special case now keeps its fill mask even when itheta==16384; previously this would have gotten cleared, despite the fact that we fold into the side in this case. 4) The test against fill for folding now only considers the bits corresponding to the current set of blocks. Previously it would still fold if any later block was filled. 5) The collapse mask used for the LCG fold data is now correctly initialized when B=16 on platforms with a 16-bit int. 6) The high bits on a collapse mask are now cleared after the TF resolution changes and interleaving at level 0, instead of waiting until the very end. This prevents extraneous high flags set on mid from being mixed into the side flags for mid-side stereo.
-
Jean-Marc Valin authored
-
-
- Jan 26, 2011
-
-
Jean-Marc Valin authored
-
Jean-Marc Valin authored
The initialiser already takes care of this
-
Jean-Marc Valin authored
-
Jean-Marc Valin authored
-
Jean-Marc Valin authored
-
Jean-Marc Valin authored
-
Jean-Marc Valin authored
Using the min energy of the two last non-transient frames rather than the min of just the two last frames. Also slightly increasing the "thresh" upper bound coefficient to 0.5.
-
- Jan 25, 2011
-
-
Jean-Marc Valin authored
-
Jean-Marc Valin authored
-
- Jan 24, 2011
-
-
Jean-Marc Valin authored
-
Timothy B. Terriberry authored
di_max was counting the _number_ of code-points remaining, not the largest one that could be used.
-
Jean-Marc Valin authored
By moving the energy floor to the encoder, we can use a different floor for prediction than for the decay level. Also, the fixed-point dynamic range has been increased to avoid overflows when a fixed-point decoder is used on a stream encoded in floating-point.
-
- Jan 23, 2011
-
-
Jean-Marc Valin authored
If someone messed up scaling, they'll know because it'll sound bad
-
Jean-Marc Valin authored
-
Jean-Marc Valin authored
-
Jean-Marc Valin authored
The most important thing is to not screw up the energy. Then we compare the bit-rates.
-
Jean-Marc Valin authored
This was computing on uninitialized data (though the result was never used)
-
-
Correct an encoder/decoder mismatch at low volume levels. Relax some low level clamps so that the dynamic range can extend further below the 16bit floor.
-
- Jan 22, 2011
-
-
Jean-Marc Valin authored
Also a fix for the zero-ing of unused band energies.
-
- Jan 21, 2011
-
-
Jean-Marc Valin authored
-
We were always storing collapse_masks[i*C+1], which could have overflowed the buffer on the last band in mono. This also moves the stores outside the conditional, which allows common code to be used for masking the high bits, address generation, etc.
-
Jean-Marc Valin authored
-
Jean-Marc Valin authored
-
Jean-Marc Valin authored
This provides more entropy and allows some more flexibility on the encoder side.
-
- Jan 20, 2011
-
-
Jean-Marc Valin authored
-
-
Jean-Marc's original anti-collapse patch used a threshold on the content of a decoded band to determine whether or not it should be filled with random noise. Since this is highly sensitive to the accuracy of the implementation, it could lead to significant decoder output differences even if decoding error up to that point was relatively small. This patch detects collapsed bands from the output of the vector quantizer, using exact integer arithmetic. It makes two simplifying assumptions: a) If either input to haar1() is non-zero during TF resolution adjustments, then the output will be non-zero. b) If the content of a block is non-zero in any of the bands that are used for folding, then the folded output will be non-zero. b) in particular is likely to be false when SPREAD_NONE is used. It also ignores the case where mid and side are orthogonal in stereo_merge, but this is relatively unlikely. This misses just over 3% of the cases that Jean-Marc's anti-collapse detection strategy would catch, but does not mis-classify any (all detected collapses are true collapses). This patch overloads the "fill" parameter to mark which blocks have non-zero content for folding. As a consequence, if a set of blocks on one side of a split has collapsed, _no_ folding is done: the result would be zero anyway, except for short blocks with SPREAD_AGGRESSIVE that are split down to a single block, but a) that means a lot of bits were available so a collapse is unlikely and b) anti-collapse can fill the block anyway, if it's used. This also means that if itheta==0 or itheta==16384, we no longer fold at all on that side (even with long blocks), since we'd be multiplying the result by zero anyway.
-
- Jan 18, 2011
-
-
Jean-Marc Valin authored
This looks for bands in each short block that have no energy. For each of these "collapsed" bands, noise is injected to have an energy equal to the minimum of the two previous frames for that band. The mechanism can be used whenever there are 4 or more MDCTs (otherwise no complete collapse is possible) and is signalled with one bit just before the final fine energy bits.
-