Bit Rate Reduction
Encyclopedia
Bit Rate Reduction, or BRR, also called Bit Rate Reduced, is a name given to
an audio compression method used on the SPC700
sound coprocessor used in the SNES
. The method is a form of ADPCM.
BRR compresses each consecutive sequence of sixteen 16-bit PCM
samples into a block of 9 byte
s. From most to least significant, the first byte of each block
consists of four bits indicating the range of the block (see below),
two bits indicating the filter (see below), and
two bits of control information for the SPC700.
The remaining eight bytes consist of 16 signed 4-bit nibbles which correspond to the 16 samples,
packed in a big-endian
manner. As 32 bytes of input become 9 bytes of output, the BRR algorithm yields a 3.56:1 compression ratio.
st using the following second-order linear prediction
equation:
Here, st - 1 and st - 2 are the last-output and next-to-last-output PCM samples, respectively.
The filter type f is translated into IIR
prediction coefficients k using the following table:
Or in words:
an audio compression method used on the SPC700
SPC700
The Nintendo S-SMP is the audio CPU of the SNES video game console.The SNES contains a sound module called APU which is almost completely separate from the rest of the system: it is clocked at a nominal 24.576 MHz in both NTSC and PAL systems, and can only communicate with the main board via 4...
sound coprocessor used in the SNES
Super Nintendo Entertainment System
The Super Nintendo Entertainment System is a 16-bit video game console that was released by Nintendo in North America, Europe, Australasia , and South America between 1990 and 1993. In Japan and Southeast Asia, the system is called the , or SFC for short...
. The method is a form of ADPCM.
BRR compresses each consecutive sequence of sixteen 16-bit PCM
Pulse-code modulation
Pulse-code modulation is a method used to digitally represent sampled analog signals. It is the standard form for digital audio in computers and various Blu-ray, Compact Disc and DVD formats, as well as other uses such as digital telephone systems...
samples into a block of 9 byte
Byte
The byte is a unit of digital information in computing and telecommunications that most commonly consists of eight bits. Historically, a byte was the number of bits used to encode a single character of text in a computer and for this reason it is the basic addressable element in many computer...
s. From most to least significant, the first byte of each block
consists of four bits indicating the range of the block (see below),
two bits indicating the filter (see below), and
two bits of control information for the SPC700.
The remaining eight bytes consist of 16 signed 4-bit nibbles which correspond to the 16 samples,
packed in a big-endian
Endianness
In computing, the term endian or endianness refers to the ordering of individually addressable sub-components within the representation of a larger data item as stored in external memory . Each sub-component in the representation has a unique degree of significance, like the place value of digits...
manner. As 32 bytes of input become 9 bytes of output, the BRR algorithm yields a 3.56:1 compression ratio.
Decompression algorithm
A nibble n in a block with filter f and range r should be decoded into a PCM samplest using the following second-order linear prediction
Linear prediction
Linear prediction is a mathematical operation where future values of a discrete-time signal are estimated as a linear function of previous samples....
equation:
- st = 2r n + k1 st - 1 - k2 st - 2
Here, st - 1 and st - 2 are the last-output and next-to-last-output PCM samples, respectively.
The filter type f is translated into IIR
Infinite impulse response
Infinite impulse response is a property of signal processing systems. Systems with this property are known as IIR systems or, when dealing with filter systems, as IIR filters. IIR systems have an impulse response function that is non-zero over an infinite length of time...
prediction coefficients k using the following table:
Filter f | k1 | k2 |
---|---|---|
0 | 0 | 0 |
1 | 15/16 | 0 |
2 | 61/32 | 15/16 |
3 | 115/64 | 13/16 |
Or in words:
- Filter 0 linearly decodes the r bit downquantized version of the samples.
- Filter 1 adds an r bit downquantized version of the samples to a lowered previous input (delta pack or differential coding).
- Filters 2 and 3 add an r bit downquantized version of the samples to the linear extrapolation from the last two samples (2nd order differential coding).