mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-10 08:03:04 -04:00
Very low bitrate WMA files send their spectral envelope as LSP coefficients. The curve computed from them squares two products whose value can reach about a million, in 16.16 fixed point. Where the envelope should be lowest the squares overflowed, and those points came out near the curve's maximum instead: bands at the top of the spectrum up to 17 dB too loud, and everything else a few dB low, as levels are taken relative to the maximum. Sum the squares in 64 bits, and let pow_m1_4() take a value above the 16.16 range. Checked with perfsim (Sansa e200v1 build). The curve is within 0.2 dB of ffmpeg's formula at all 57600 points of 80 blocks traced from two files. Against ffmpeg's decode, as the mean difference in band levels over the whole file, with the noise coding fix applied before and after: StutteringFile (22 kHz mono, 20 kbps) 1.6 dB -> 0.3 dB shoujicomcn2117164 (same) 0.2 dB -> 0.1 dB terra8k (11 kHz mono, 8 kbps) 0.3 dB -> 0.0 dB Only the five files that use LSP exponents change; the other 23 are byte-identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| codecs | ||
| dsp | ||
| metadata | ||
| test | ||
| platform.h | ||
| rbcodec.make | ||
| rbcodecconfig-example.h | ||
| rbcodecplatform-unix.h | ||
| SOURCES | ||