Bit Rate Reduction

This article is about the compression scheme used on the SPC-700. For other methods of bit-rate reduction, see data compression.

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, as well as the audio processors of the Philips CD-i and the PlayStation. The method is a form of ADPCM.

BRR compresses each consecutive sequence of sixteen 16-bit PCM samples into a block of 9 bytes. 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.

Decompression algorithm

A nibble n in a block with filter f and range r should be decoded into a PCM sample st using the following second-order linear prediction 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 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

These calculations are all done in signed 16.16 fixed-point arithmetic.

Or in words:

The PlayStation APU and the Philips CD-i CDIC add another set of coefficients to the above and reorders them, for five unique of 8 filters total (these come from the Green Book and Yellow Book specifications):

Filter f k1 k2
0 0 0
1 15/16 0
2 115/64 13/16
3 49/32 55/64
4 61/32 15/16

These calculations are all done in signed 16.16 fixed-point arithmetic.

References

This article is issued from Wikipedia - version of the 10/30/2015. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.