Method for decoding coefficients of quantization per subband using a compressed table

Abstract: Method disclosed is used for compressing the four quantization per subband tables used in MPEG1 layer 2 audio to minimize required memory size. The method also describes how to decode the compressed tables and use the data to maximize efficiency when reading the audio samples from the input stream, de-grouping and requantization of the audio samples. The efficiency of this method is suitable for use with the implantation of RISC/micro-processor based MPEG1 layer 2 audio decoder.

Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to the implementation of linear quantization for use in digital audio encoder and decoder applications. 2. Description of the Related Art When coding an analogue signal to a digital representation, the values of the analogue signal which can be encoded are restricted to a number of values or quantized steps. For efficient digital encoding, the number of bits representing the audio samples will vary in number. The number of bits per audio sample are stored in a table, being quantization per subband. MPEG1 (Layer 2) uses four such quantization tables, of which only one table is used depending on the sampling frequency and bitrate. Each table has sixteen columns and contains data for each of the thirty two subbands. The memory required to store the uncompressed data is 2048 x 2 bytes. There are several methods of compressing the four quantization tables, one method is to compress each tables row of data. Repeated rows are not encoded. Also, if other quantization tables comprise of the same row information as one previously compressed, then these tables need not be encoded. In this manner, the four quantization tables used in MPEG1 (Layer 2) can be compressed into two tables. However, to recreate the original tables, an additional four tables are required. These consist of thirty two values used to point to the start location of the row data stored in one of the two previously compressed tables. This compression method requires a memory space of 776 x 2 bytes. There are several problems to be solved. The need for better quality digital audio has prompted the increase of quantization levels and thus quantization tables. When designing an audio decoder in LSI using a RISC based processor, the cost of the chip increases with increase in size. A major factor contributing to the chip size is the amount of memory used. When implementing a software method of de-compression, the processing load increases. SUMMARY OF THE INVENTION The object of this invention is to provide an efficient method of compression requiring minimal decompression time. Each of the said quantization per subband tables are compressed into tables containing a number of parts, each of said parts being the compressed format of one column. The said parts consist of three pairs of data. The first data value of the pair defines the subband up to which the value nbits, indicating the number of bits per audio sample, remains the same, hereafter known as subband marker. For the first pair, the value nbits remains constant for all subbands from zero to the subband marker. Second and third subband markers refer to the range from that of the previous subband marker to that of the current subband marker. tf the current subband number is less than or equal to the subband marker, then the value nbits is equal to the second value of the pair. Each pair of data is examined until the value nbits has been found, or/all three pairs have been searched. If the value nbits is not found, the value nbits is by default equal to zero. The subband marker of the third pair need not be equal to the last subband. For all subbands greater than the value of the subband marker in the last pair the value nbits is equal to zero. In the case of MPEG1 (layer 2) audio decoder, the invention eliminates memory wastage by encoding each of the original quantization per subband tables column into one part containing three pairs of data. For subbands up to and including the first value of the pair, the number of bits representing the audio sample (nbits) is equal the second value of the pair. The second pair is decoded such that, for subbands greater than that of the first subband marker up to and including the second subband marker, the nbits value is equal the second value of the second pair. Similarly for the third pair, for subbands greater than the second subband marker up to and including the third subband marker, the value nbits is equal the second value of the third pair. Each pair is tested until the quantization has been determined. Should the value nbits remain unresolved after examining the third pair, the value nbits is equal to zero. The quantization data is decoded for each of the subbands using sb as the counter, the appropriate part being indexed by multiplying the bit allocation data by six. The quantization data for all subbands are stored in the array_nbits. Encoding operation is as follows. The nominal number of bits required to store an audio sample is identified. If the samples are similar in amplitude, then grouping may be implemented. If so, this is signified by setting bit five of the value nbits high. After identifying the value nbits, the quantized sample is applied to a linear formula. As stated in ISO/IEC 11172-3:1993(E), the subband sample is quantized by applying the value to the following linear formula: Q = AX + B X, being the subband sample divided by the scale factor. The constants A and B are quantization coefficients read from a table. A and B are indexed by the value nbits. If nbit equals three, then the value nbits is equal to zero. Should the value nbits be greater than sixteen, the indexing value is equal to the least significant two bits of the value nbits. Otherwise, the indexing value is equal to the value nbits. After generating the index value, the A and B values are read and the linear formula is executed. Decoding operation is as follows. After storing all quantization data, the quantized audio samples can be read from the bit stream. The number of bits to be read for each quantized audio sample is equal to the value nbits, nbits being read from the array_nbits indexed by pointer sb from zero to thirty one, indexing the 32 subbands. The number of bits to be read is equal to the value of the least significant four bits of the value nbits. Should the number of bits read from memory be greater than sixteen, then the quantized audio sample must be degrouped to three quantized audio samples. The quantized audio samples for each subbabnd are stored in memory. . As stated in ISO/IEC 11172-3 1993(E), the quantized audio samples are dequantized by means of a linear formula: S[sb] = C x (D + qspl[sb]) The constants C and D are classes of quantization read from a table, C and D are indexed by the value nbits for subband sb. If nbit equal three, then the value nbits is equal to zero. Should the value nbits be greater than sixteen, the indexing value is equal to the least significant two bits of the value nbits. Otherwise, the indexing value is equal to the value nbits. After generating the index value, the C and D values are read and the linear formula executed. The aspects of the invention are as described in claim 1. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a flow chart giving an overview of the processes to decode the compressed quantized levels per subband tables to the value nbits, using the value nbits to read the audio samples from the input data steam and dequantization of the audio samples read. Figure 2 is a flow chart illustrating the decoding and generation on the value nbits per subband. Figure 3 shows a flow chart showing the processes involved in the dequantization of the audio samples. Figure 4 shows a flow chart to illustrate the use of the value nbits to index the reordered classes of quantization table. DESCRIPTION OF THE PREFERRED EMBODIMENTS An example of the embodiment will be discussed hereafter. First, a general picture of implementation is explained. Figure 1 shows the use of compressed quantization tables and data. With reference to Figure 1, this diagram highlights a small section of the decoding process. First, the number of bits (nbits) to be read from the stream per audio sample is decoded. The process is repeated for each subband, thus using a subband loop pointer, sb, being initialized to zero (step 101). The decoding process (step 102) implements the compressed quantization per sample tables, the value nbits is stored in array _nbits, indexed by sb pointer. Following the decoding of the value nbits for each subband, the subband pointer sb is checked to verify if all subbands have been decoded (step 103) and, if not, the sb pointer is incremented (step 103') and the process repeated. The implementation of this process will be discussed later. The next stage is to read the audio samples from the stream (step 105), the number of bits read is equal the value in array nbits, being indexed by the current sb pointer. After reading the value nbits, if the value is greater than sixteen, the sample read from the stream must be de-grouped (steps 106 and 106'). The audio samples are stored in an array_qspl, indexed by the sb pointer. Similarly, this process is repeated for all subbands thus looping until sb pointer is equal thirty one (steps 105-107'). The reading of audio samples and de-grouping can be executed as described in ISO/IEC 11172-3:1993 (E) and will not be described any further. After reading and storing the quantized audio samples (qspl), the audio samples must be dequantized (step 109). Again, this process is repeated for all subbands, thus using a sb pointer (steps 109-110'). The dequantization process will be discussed in greater detail later. Next, the decoding of the number of bits per audio sample is described. Figure 2 shows a flow chart for decoding the number of bits per subband sample. With reference to Figure 2, in order to determine which of the four compressed tables to decode, first the sampling frequency and bitrate (step 201) must be decoded from the audio stream header. This information is used to determine the value of sb limit and thus which of the four compressed quantization per subband tables to use, Table 1, Table 2, Table 3 and Table 4. Compressed 2Ba Quantization per subband sb marker quant. sb marker quant. sb marker quant. 31 0 31 0 31 0 26 21 31 0 31 0 2 3 26 23 31 0 2 4 22 3 26 16 2 5 22 26 31 0 2 6 22 4 31 0 2 7 22 5 31 0 2 8 10 6 22 16 2 9 10 7 31 0 2 10 10 8 31 0 2 11 10 9 31 0 2 12 10 10 31 0 2 13 10 11 31 0 2 14 10 12 31 0 2 15 10 13 31 0 10 16 31 0 31 0 Compressed 2Bb Quantization per subband sb marker quant. sb marker quant. sb marker quant. 31 0 31 0 31 0 29 21 31 0 31 0 2 3 29 23 31 0 2 4 22 3 29 16 2 5 22 26 31 0 2 6 22 4 31 0 2 7 22 5 31 0 2 8 10 6 22 16 2 9 10 7 31 0 2 10 10 8 31 0 2 11 10 9 31 0 2 12 10 10 31 0 2 13 10 11 31 0 2 14 10 12 31 0 2 15 10 13 31 0 10 16 31 0 31 0 Compressed 2Bc Quantization per subband sb marker quant. sb marker quant. sb marker quant. 31 0 31 0 31 0 7 21 31 0 31 0 7 23 31 0 31 0 7 26 31 0 31 0 7 4 31 0 31 0 7 5 31 0 31 0 7 6 31 0 31 0 7 7 31 0 31 0 1 8 31 0 31 0 1 9 31 0 31 0 1 10 31 0 31 0 1 11 31 0 31 0 1 12 31 0 31 0 1 13 31 0 31 0 1 14 31 0 31 0 1 15 31 0 31 0 compressed 2Bd Quantization per subband sb marker quant. sb marker quant. sb marker quant. 31 0 31 0 31 0 7 21 31 0 31 0 11 23 31 0 31 0 11 26 31 0 31 0 11 4 31 0 31 0 11 5 31 0 31 0 11 6 31 0 31 0 11 7 31 0 31 0 1 8 31 0 31 0 1 9 31 0 31 0 1 10 31 0 31 0 1 11 31 0 31 0 1 12 31 0 31 0 1 13 31 0 31 0 1 14 31 0 31 0 1 15 31 0 31 0 The selected table hereafter will be referred to as quant_tbl. The number of bits per audio sample is decoded for each of the thirty two subbands using the loop counter sb, initialized to zero (step 202). The pointer to quant_tbl (step 203) is generated by reading the bit allocation data for the current subband and multiplying it by six since there are six data for each subband. The subband marker indexed by the previously derived pointer is compared with the current subband counter, sb (step 204). If sb is less than or equal to the value being indexed, the number of audio bits to be read, nbits, is equal the value indexed by the pointer plus one (step 212). However, if sb is greater than the indexed subband marker, the pointer is incremented by two (step 205) in order to point to the next pair of data. Similarly, the current sb is compared to the subband marker (step 206). Again, if the current sb is less than or equal the subband marker, the value nbits is equal quant_tbl indexed by the pointer plus one. If sb is greater than the subband marker, the pointer is incremented by two (step 207) before comparing the next pair. Similarly, if the current sb is less than or equal to the final subband marker (step 208), the value nbits is assigned to the value of quant_tbl, indexed by the pointer plus one. Since this is the final part, if sb is greater than the subband marker, the value nbits is set to zero (step 209). The value nbits is stored in memory array _nbits (step 210), this being indexed by sb. The decoding of the value nbits is executed for all thirty two subband samples, therefore, if sb is not equal thirty one (step 211), sb is incremented by one (step 211') and the decoding process repeats from (step 203) onward. Next, dequantization is described. Figure 3 is a flow chart for dequantization of quantized audio samples. After the decoding of audio samples (qspl) from the bit stream, the samples must be dequantized. The dequantization process is carried out in three sections, with reference to Figure 3. Firstly, (step 302) the most significant bit of qspl is inverted thus producing a two's complement fractional number. Secondly, a linear formula is applied to the new value of qspl (step 303), this is the only section which differs from the original specification (ISO/IEC 11172-3:1993(E)) and will be described in greater detail later. The final part is to scale the dequantized value (step 304). The dequantization process is executed on all subband samples, thus implementing a subband pointer (sb) first being initiated to zero (step 301) and evaluated after the dequantization of each sample (step 305). A linear formula is described next. The linear formula is as specified in ISO/IEC 11172-3:1993(E): S = C x (D+s") The process of execution differs from that of the original specification by the process of finding the values of C and D, as these are read from the modified table 5. Modified, meaning that the order of rows has been changed to make decoding simpler. Columns 'C' and 'D' have been omitted in table 5, but can be found in ISO/IEC 11172-3: 1993(E) on page 232 in the original table 3-B.4. Layer II Classes of Quantization Number of steps Grouping Samples per code word Bits per code word Encoded quantization 7 no 1 3 3 3 yes 3 5 21 9 yes 3 10 26 5 yes 3 7 23 15 no 1 4 4 31 no 1 5 5 63 no 1 6 6 127 no 1 7 7 255 no 1 8 8 511 no 1 9 9 1023 no 1 10 10 2047 no 1 11 11 4095 no 1 12 12 8191 no 1 13 13 16383 no 1 14 14 32768 no 1 15 15 65535 no 1 16 16 Figure 4 is a flow chart of decoding C and D index pointer. With reference to figure 4, C and D are read from the reordered table by a pointer (C_D_ptr), the pointer is initiated to nbits for the current subband (step 401). Should C_D_ptr be less than or equal to sixteen (step 402), the current C_D - ptr value stands valid. However, if C_D_ptr is three (step 403), C_D_ptr becomes zero (step 404). In the case when C_D_ptr is greater than sixteen, only the least significant two bits of C_D_ptr are valid (step 405). The C and D values can now be read from table 5 using the C_D_ptr as the index. Clearly, from the above description of this novel table compression technique, implementing this method reduces the amount of memory required to store and decode the quantization levels per subband. The tables are compressed to 384 x 2Bytes data values being decoded to 32 data values. Not only is this compression method efficient on memory, but also the decoding process is also efficient on processing time.

Claims: An audio decoder for decoding digital audio data comprising a memory having stored therein four tables for indicating the amount of quantization per subband, CHARACTERIZED IN THAT : said four tables are provided by Table 1, Table 2, Table 3 and Table 4 given below sb marker quant. sb marker quant. sb marker quant. 31 0 31 0 31 0 26 21 31 0 31 0 2 3 26 23 31 0 2 4 22 3 26 16 2 5 22 26 31 0 2 6 22 4 31 0 2 7 22 5 31 0 2 8 10 6 22 16 2 9 10 7 31 0 2 10 10 8 31 0 2 11 10 9 31 0 2 12 10 10 31 0 2 13 10 11 31 0 2 14 10 12 31 0 2 15 10 13 31 0 10 16 31 0 31 0 sb marker quant. sb marker quant. sb marker quant. 31 0 31 0 31 0 29 21 31 0 31 0 2 3 29 23 31 0 2 4 22 3 29 16 2 5 22 26 31 0 2 6 22 4 31 0 2 7 22 5 31 0 2 8 10 6 22 16 2 9 10 7 31 0 2 10 10 8 31 0 2 11 10 9 31 0 2 12 10 10 31 0 2 13 10 11 31 0 2 14 10 12 31 0 2 15 10 13 31 0 10 16 31 0 31 0 sb marker quant. sb marker quant. sb marker quant. 31 0 31 0 31 0 7 21 31 0 31 0 7 23 31 0 31 0 7 26 31 0 31 0 7 4 31 0 31 0 7 5 31 0 31 0 7 6 31 0 31 0 7 7 31 0 31 0 1 8 31 0 31 0 1 9 31 0 31 0 1 10 31 0 31 0 1 11 31 0 31 0 1 12 31 0 31 0 1 13 31 0 31 0 1 14 31 0 31 0 1 15 31 0 31 0 sb marker quant. sb marker quant. sb marker quant. 31 0 31 0 31 0 7 21 31 0 31 0 11 23 31 0 31 0 11 26 31 0 31 0 11 4 31 0 31 0 11 5 31 0 31 0 11 6 31 0 31 0 11 7 31 0 31 0 1 8 31 0 31 0 1 9 31 0 31 0 1 10 31 0 31 0 1 11 31 0 31 0 1 12 31 0 31 0 1 13 31 0 31 0 1 14 31 0 31 0 1 15 31 0 31 0 wherein each table has three pairs of columns, each pair having a column of sb marker and a column of quant., wherein sb marker represents the subband up to which the number of bits per audio sample remains constant and quant represents the number of bits per sample. An audio decoder for decoding digital audio data according to claim 1 characterized by a memory for storing a table for indicating classes of quantization, said table having at least columns representing "Number of steps", "Grouping", "Samples per code word", and "Bits per code word", in which the rows are aligned in the order of small to large of the entries in the column "Number of steps" said table is modified to change the order of rows such that the first four rows are changed, such that the order of the first four entries in the column "Number of steps" is: 7, 3, 9 and 5.

Inventors: BETT RUSSELL, BETT, RUSSELL
Applicants: MATSUSHITA ELECTRIC IND CO LTD, MATSUSHITA ELECTRIC INDUSTRIAL CO., LTD.
Application year: 1998
Main classification: H04B1
IPC codes: H04B1, G10L19, H03M7