Claims
- 1. An audio decoder that comprises:
- frame control logic configured to receive an audio packet header and configured to extract a range control field value;
- a coefficient memory configured to store pre-calculated factors;
- an arithmetic logic unit (ALU) coupled to the coefficient memory to receive a sequence of pre-calculated factors; and
- ALU control logic coupled to the frame control logic to receive the range control field value, coupled to the coefficient memory to responsively provide address values for the pre-calculated factors in the sequence of pre-calculated factors, and configured to direct the ALU to calculate a gain value by finding a product of the pre-calculated factors in the sequence of pre-calculated factors.
- 2. The audio decoder of claim 1, further comprising an input interface configured to receive an audio packet data block and configured to responsively produce a sequence of unscaled audio samples, wherein the ALU is configured to receive the sequence of unscaled audio samples and multiply each unscaled audio sample by the gain value to produce a sequence of scaled audio samples.
- 3. The audio decoder of claim 2, wherein the range control field value has a binary representation which can be partitioned into four parts, wherein a first part corresponds to a shift operation, and wherein a second, third, and fourth part correspond to pre-calculated factors in the sequence of pre-calculated factors.
- 4. The audio decoder of claim 3, wherein addresses for non-unity valued pre-calculated factors are provided to the coefficient memory by the ALU control logic only if the corresponding parts of the binary representation are non-zero.
- 5. The audio decoder of claim 4, wherein control signals for a shift operation corresponding to the first part of the binary representation is provided to the ALU by the ALU control logic after the product of the sequence of pre-calculated factors has been found.
- 6. The audio decoder of claim 2, wherein the range control field value has a binary representation which can be partitioned into six parts, wherein a first part corresponds to a shift operation, and wherein a second, third, fourth, fifth, and sixth part correspond to pre-calculated factors in the sequence of pre-calculated factors.
- 7. The audio decoder of claim 6, wherein addresses for non-unity valued pre-calculated factors are provided to the coefficient memory by the ALU control logic only if the corresponding parts of the binary representation are non-zero, thereby dropping unity-valued factors from the sequence.
- 8. A method for providing an audio signal with gain control, wherein the method comprises:
- extracting a range control field value from an audio packet header;
- partitioning a binary representation of the range control field value into a plurality of portions, wherein a first portion corresponds to a shift operation and remaining portions correspond to factors of a product;
- generating an address for each non-zero remaining portion;
- retrieving a pre-calculated factor indicated by each address;
- multiplying the pre-calculated factors to determine the product.
- 9. The method of claim 8, further comprising:
- performing the shift operation on the product to determine a gain value.
- 10. The method of claim 9, further comprising:
- reconstructing a sequence of unscaled audio samples from an audio packet payload;
- multiplying each unscaled audio sample by the gain value to produce a sequence of output audio samples.
- 11. The method of claim 10, wherein the plurality of portions comprises four portions.
- 12. The method of claim 11, wherein the first portion is a three-bit portion, wherein the remaining portions are one-bit, two-bit, and two-bit portions, respectively.
- 13. The method of claim 8, further comprising:
- setting a shift value in accordance with the first portion;
- reconstructing a sequence of unscaled audio samples from an audio packet payload;
- shifting each unscaled audio sample to produce a sequence of shifted audio samples;
- multiplying each shifted audio sample by the product to produce a sequence of output audio samples.
- 14. The method of claim 13, wherein the plurality of portions comprises four portions.
- 15. The method of claim 14, wherein the first portion is a three-bit portion, wherein the remaining portions are one-bit, two-bit, and two-bit portions, respectively.
RELATED APPLICATIONS
This application is related to U.S. patent application Ser. No. 09/105,719 entitled "Arithmetic logic unit controller for linear PCM scaling and decimation in an audio decoder" by Ning Xue and Takumi Nagasako, and U.S. patent application Ser. No. 09/105,720 entitled "Method and apparatus for dual output interface control of an audio decoder" by Ning Xue and Takumi Nagasako, both of which are filed concurrently herewith and incorporated by reference.
US Referenced Citations (4)
Number |
Name |
Date |
Kind |
4837830 |
Wrench et al. |
Jun 1989 |
|
5630033 |
Purcell et al. |
May 1997 |
|
5706395 |
Arslan et al. |
Jan 1998 |
|
5727123 |
Mcdonough et al. |
Mar 1998 |
|
Non-Patent Literature Citations (1)
Entry |
ATSC, Digital Audio Compression (AC-3 Standard, Dec. 20, 1995, pp. 76-81. |