Bit allocation method in subband coding

Abstract: A bit allocation method of a subband coding includes a first step of calculating a number of bits bf[m] needed for quantization for each block having q samples of each subband signal, a second step of selecting a subband jm having the largest needed number of bits bf[m], replacing needed number of bits bf[jm] with a value obtained by subtracting one from the needed number of bits bf[jm], replacing allocated number of bits ab[jm] with a value obtained by adding one to the allocated number of bits ab[jm], and replacing the available total number of bits TB with a value obtained by subtracting one from the total number of bits TB allocable to entire blocks, a third step of returning to the second step when available total number of bits TB is greater than or equal to one by checking the available total number of bits TB, and a fourth step of replacing the allocated number of bits ab[m] with a value obtained by subtracting one from the allocated number of bits ab[m], replacing the available total number of bits TB with a value obtained by adding the number of subbands K whose allocated number of bits ab[m] is one to the available total number of bits TB, and returning to the second step, when the presence of a subband whose allocated number of bits ab[m] equals one is checked under the state that the available total number of bits TB is below one. Thus, by single-bit incrementation during bit allocation, the hardware can be simplified.

Description: BACKGROUND OF THE INVENTION The present invention relates to subband coding of an audio signal, and more particularly to a bit allocation method for enhancing coding efficiency by decreasing each value of an initial bit allocation with respect to corresponding blocks of subbands. Various audio coding methods for processing audio signals have been suggested by utilizing statistical characteristics of a temporal or frequency region and the human auditory system. The audio coding method includes a waveform coding method for coding the instantaneous amplitude of audio signals: an analysis-synthesis coding method wherein an audio generating apparatus is approximated to a model in compliance with an audio source and vocal path characteristic, and audio is displayed by a parameter of the approximation: and a high-efficiency transmission method by multiplexing wherein the existence of an audio signal on time axis is detected, and a silent section is compressed to realize the high-efficiency transmission. Subband coding is a kind of the waveform coding method, wherein an audio signal is split into a plurality of frequency bands, the signal of each band is down-sampled at the nyquist rate to thereby be converted into a low-band signal, and then adaptive pulse code modulation is performed. In coding each band, overall audio quality can be enhanced by allocating more quantization bits to a band in which aural energy is concentrated. Also, quantization noise affects only a split band without affecting other bands. The Comité Consultatif International Télégraphique et Téléphonique (CCITT) specifies a subband coding and adaptive differential PCM (SBC-ADPCM) system which codes an audio signal of a 7KHz broad band into 64Kbits as a recommendation (see G722). Detailed description of such subband codings of audio signals are presented in the following papers: Journal of Audio Engineering Society, Vol. 27, No. 11, pp. 855-865, November 1979; The Bell System Technical Journal, pp. 1633-1653, September 1981; IEEE Transactions on Acoustics, Speech and Signal Processing, Vol, ASSP-30, No. 5, pp. 751-765, October 1982); and Philips Journal of Research, Vol. 44, Nos. 2/3, pp. 329-343, July 1989. In subband coding, an audio signal is split into subbands having a plurality of successive frequency bands via an analysis filter. Each subband signal SB m is quantized block-by-block via a quantizer. The quantized subband signal QSB m consists of a plurality of successive signal blocks, and each signal block has q-numbered samples. Respective samples in the signal block is quantized with an allocated number of bits ab[m]. Here, index m is an integer from 1 to M. The quantizer includes a bit-need determiner for determining a needed number of bits bf[m] for a certain signal block in the respectively corresponding signal blocks in the subband signal SB m . The needed number of bits bf[m] is related to the number of bits which represents the samples of each signal block. In addition to this, the quantizer includes a bit allocator for allocating an allocable number of bits TB in order to obtain allocated number of bits ab[m] in response to the needed number of bits of the corresponding signal blocks in the subband signals. The bit reallocator eliminates components which are below a threshold Wm in accordance with a noise-masking curve of the human auditory system. The quantized signal blocks are temporally divided and multiplexed, and then transmitted. The procedure for allocating the quantization bits to each subband will be described in detail with reference to European Patent No. 457,390 A1. First, a needed number of bits bf[m] required for the quantization of each block signal is determined. At this time, needed number of bits bf[m] is determined by a signal power pwr_m and a threshold Wm in each signal block of a subband signal. Signal power pwr_m can be produced by the following equation: where S i represents the amplitude of the ith signal in a block having q-sample blocks in subband signal SB m . All signal powers pwr_m with respect to the corresponding blocks of subband signals from SB 1 to SB M are determined in accordance with the foregoing equation. When all signal powers of the subband signals are produced, the signal powers can be given by a vector group {pwr}. By multiplying vector group {pwr} by an M × M matrix [D], and further adding a vector group {Wr}, a vector group {W} can be obtained as below: {W} = [D]{pwr} + {Wr} where [D] is a matrix of constants, whose coefficient d ij is multiplied by signal power pwr_j of the q-sample blocks of a subband signal SBj in order to calculate the threshold of a subband signal SBi induced by the q-sample blocks of subband signal SB j , and {Wr} represents the threshold of subband signal SB i . The needed number of bits bf[m] is obtained by the following equation: bf[m] = K 1 log 2 (SFm 2 /3Wm) 1/2 where, K 1 is a constant having a value of 1, and SF m is the largest sample value among the q-sample blocks of subband signal SB m . Thereafter, available total number of bits TB allocable to entire subbands is allocated to each subband. At this time, allocated number of bits ab[m] allocated to each subband is determined according to needed number of bits bf[m]. First, a subband jm which requires the largest number of bits among bf[m], that is bf[1], bf[2],... bf[M] is selected. Then, it is determined whether allocated number of bits ab[jm] of the selected subband is zero. If the allocated number of bits ab[jm] equals zero, the following values are assigned: bf[jm]:= bf[jm] - b 1 ab[jm]:= b 1 TB:= TB - b 1 where TB denotes available total number of bits allocable to every subband. If ab[jm] is not zero, the values are assigned as follows: bf[jm]:= bf[jm] - b 2 ab[jm]:= ab[jm] + b 2 TB: TB - b 2 where b 1 and b 2 are integers and b 1 > b 2 . The allocation of the needed number of bits to each subband according to the above-described methods is repeated until no bit is left in available total number of bits TB, but only when the number of bits allocable to a certain subband is limited within a maximum number of bits a_max. The sample values of the q-sample blocks in the subband signal have sign bits. Accordingly, at least two bits (the sign bit and an effective bit) are required for quantizing the sample values. Allocated number of bits ab[m] is provided to quantize the q-sample blocks of each subband in such a manner that b 1 -bit (e.g., two bits) is allocated for a first allocation, and b 2 -bit (e.g., one bit) is allocated for a second allocation. Here, initially allocated number of bits b 1 is greater than reallocated number of bits b 2 . In the conventional bit allocation, the initially allocated number of bits b 1 is different from reallocated number of bits b 2 , which requires a separate algorithm and apparatus to thereby complicate the system. It is the object of the invention to provide a simplified bit allocation method of subband coding. The object is achieved by the subject matter of independent claim 1. Preferred embodiments of the invention are defined by dependent claims. BRIEF DESCRIPTION OF THE DRAWINGS The above objects and other advantages of the present invention will become more apparent by describing in detail a preferred embodiment thereof with reference to the attached drawings in which: FIG. 1 is a flowchart showing a conventional bit allocation method; FIG. 2 is a flowchart showing a bit allocation method according to the present invention; and FIG. 3 is a block diagram showing an apparatus for performing the bit allocation program according to the flowchart shown in FIG. 2. DETAILED DESCRIPTION OF THE INVENTION Before performing a conventional bit allocation method according to a flowchart shown in FIG. 1, a needed number of bits bf[m] required for quantizing a block having q-numbered samples in each subband signal is determined. Here, "q" is assumed as one, for convenience. First, an allocated number of bits ab[m] which represents the number of bits allocated to the block of each subband signal is cleared (step 112). An initially allocated number of bits b 1 is allocated to allocated number of bits ab[m] of a block of a subband signal SB m whose signal power pwr_m is greater than a threshold Wm among respective blocks in the subbands. Here, initially allocated number of bits b 1 is an integer having a value. e.g., 2 (step 114). A needed number of bits having the largest value among the corresponding blocks of respective subbands is searched, and its index jm is obtained. Here, bf[jm] is a needed number of bits bf[m] of a subband which has the largest needed number of bits (step 120). Then it is determined whether the allocated number of bits ab[jm] of subband jm is greater than the maximum allocated number of bits a_max. If allocated number of bits ab[jm] is greater than maximum allocated number of bits a_max, the program branches to step 138 since more bits cannot be allocated to the searched block (step 122). If allocated number of bits ab[jm] is smaller than maximum allocated number of bits a_max, it is checked whether allocated number of bits ab[jm] equals zero. When allocated number of bits ab[jm] is not zero, the program branches to step 136 (step 130). Meanwhile, when allocated number of bits ab[jm] equals zero, it is checked whether available total number of bits TB is greater than or equal to initially allocated number of bits b 1 . If available total number of bits TB is smaller than initially allocated number of bits b 1 , the program branches to step 138 (step 132). If available total number of bits TB is greater than or equal to initially allocated number of bits b 1 , then, the following operations are executed: needed number of bits bf[jm] is replaced with a value obtained by subtracting initially allocated number of bits b 1 from bf[jm]; allocated number of bits ab[jm] is replaced with initially allocated number of bits b 1 ; available total number of bits TB is replaced with a value obtained by subtracting b 1 from TB; and the program proceeds to step 140 (step 134). Thereafter, needed number of bits bf[jm] is replaced with a value obtained by subtracting b 2 from bf[jm]; allocated number of bits ab[jm] is replaced with a value obtained by add b 2 to ab[jm]; TB is replaced with a value obtained by subtracting b 2 from available total number of bits TB; and the program proceeds to step 140 (step 136). In step 138, needed number of bits bf[jm] is changed into - ∞, and then the program proceeds to step 140. All needed number of bits bf[m] are checked whether they are - ∞ or not. When all needed number of bits bf[m] are - ∞, the bit reallocating program is finished (step 140). If there is a needed number of bits bf[m] which is not - ∞, it is checked whether or not available total number of bits TB is larger than or equal to reallocated number of bits b 2 . When available total number of bits TB is larger than or equal to reallocated number of bits b 2 , the program returns to step 120. If Tb is smaller than b 2 , the bit reallocating program is finished (step 142). In the conventional bit allocation method shown in FIG. 1, it is checked whether allocated number of bits ab[jm] is zero, to determine the initial allocation. Then, according to the determination, when allocated number of bits ab[jm] is zero, i.e., for the initial allocation, initially allocated number of bits b 1 is allocated in step 134. Conversely, reallocated number of bits b 2 is allocated in accordance with step 136. This is because each sample of a block having q-numbered samples in a subblock has a sign bit, so that at least two bits are required for quantizing the respective samples with signs. The minimum allocated number of bits is satisfied by setting initially allocated number of bits b 1 to two. However, in hardware performing the bit allocation in accordance with the flowchart shown in FIG. 1, separate blocks are required for performing the initial allocation and reallocation, which complicates the hardware. FIG. 2 is a flowchart for showing a bit allocation method according to the present invention. First, an allocated number of bits ab[m] which represents the number of bits allocated to the block of each subband signal is cleared (step 212). "One" is allocated to allocated number of bits ab[m] of a block of a subband whose signal power pwr_m is greater than a threshold Wm among respective blocks in the subbands (step 214). A needed number of bits having the largest value among the blocks of respective subbands is searched, and its index jm is obtained. Here, bf[jm] is a needed number of bits bf[m] of a subband which has the largest needed number of bits (step 220). Then, it is determined whether the allocated number of bits ab[jm] of subband jm is greater than or equal to the maximum allocated number of bits a_max. If allocated number of bits ab[jm] is greater than or equal to maximum allocated number of bits a_max, the program branches to step 238 since no more bits can be allocated to the searched block (step 222). If allocated number of bits ab[jm] is smaller than maximum allocated number bits a_max, then, the following operations are executed: needed number of bits bf[jm] is replaced with a value obtained by subtracting "one" from bf[jm]; allocated number of bits ab[jm] is replaced with a value obtained by adding "one" to allocated number of bits ab[jm]; available total number of bits TB is replaced with a value obtained by subtracting "one" from TB; and the program proceeds to step 240 (step 234). Thereafter, in step 238, needed number of bits bf[jm] is changed into - ∞, and then the program proceeds to step 240. All needed number of bits bf[m] are checked whether they are - ∞ or not. When all needed number of bits bf[m] are - ∞, the bit reallocating program is finished (step 240). If there is a needed number of bits bf[m] which is not - ∞, it is checked whether or not available total number of bits TB is smaller than "one." When TB is not smaller than "one," the program returns to step 220 (step 242). When available total number of bits TB is smaller than "one," the existence of a subband whose allocated number of bits ab[m] equals "one." If there is no subband whose allocated number of bits ab[m] equals "one," the bit reallocating program is finished (step 250). When a subband whose allocated number of bits ab[m] equals "one" exists, available total number of bits TB is replaced with a value obtained by adding to TB the number K of the subband whose allocated number of bits ab[m] is "one," allocated number of bits ab[m] is replaced with "zero" and then the program returns to step 220 (step 252). FIG. 3 is a block diagram showing an apparatus for performing the bit allocation program according to the flowchart shown in FIG. 2. The bit allocation apparatus shown in FIG. 3 has a first memory 310 which stores available total number of bits TB. Available total number of bits TB is decrement-counted one-by-one via an operation path consisting of first memory 310, first subtractor 312 and a first switch S1. Also, number K of the subband whose allocated number of bits ab[m] is "one" in step 252 is increment-counted via first memory 310, a first adder 314 and first switch S1. A first comparator 342 detects the result whether or not available total number of bits TB stored in first memory is smaller than "one," and the result is supplied to an OR operator 344. A second memory 320 stores allocated number of bits ab[m]. Allocated number of bits ab[m] is increment-counted one-by-one via an operation path consisting of second memory 320, a second adder 324 and a third switch S3. The replacement of allocated number of bits ab[m] with "zero" in step 252 of FIG. 2, is executed via an operation path consisting of a third memory 328, a second switch S2 and second memory 320. A second comparator 346 receives available total number of bits TB from first memory 310 and allocated number of bits ab[m] from second memory 320 to thereby detect number K of the subband which satisfies the condition (i.e., TB < 1 and ab[m]=1), so that the detected result is supplied to a fourth memory 316. A third comparator 340 receives both allocated number of bits ab[m] of subband SB jm whose needed number of bits occupies the largest number among the bf[m], and stored in second memory 320, and maximum allocated number of bits a_max stored in seventh memory 326, and checks whether the condition (i.e., ab[jm] ≥ a_max) is satisfied. Then, the result is supplied to OR operator 344. A fifth memory 330 stores needed number of bits bf[m] of each subband. Needed number of bits bf[m] is decrement-counted one-by-one via an operational path consisting of fifth memory 330, a second subtractor 334 and a fourth switch S4. Fourth switch S4 is driven by means of an output signal of OR operator 344, and allows - ∞ in a sixth memory 336 to be supplied to needed number of bits bf[jm] when allocated number of bits ab[jm] is more than or equal to maximum allocated number of bits a_max or available total number of bits TB is below "one." A fourth comparator 332 detects index jm of the subband having the largest value among needed number of bits bf[m] stored in fifth memory 330, and supplies the detected value to second memory 320 and fifth memory 330. In the bit allocation method according to the present invention, the bits allocated to the subband is consecutively increased one-by-one, so that the bit difference between subbands can be decreased. Moreover, after finishing the bit allocation, a subband whose allocated number of bits is "one" is searched to thus collect them, which are then reallocated to other subbands, so that the bit-utilization ratio can be increased. Furthermore, the bit allocation is incremented by one, which simplifies the hardware.

Claims: A bit allocation method in a subband coding method including the steps of dividing digital data with a sampling frequency into a plurality of subband signals having successive frequency bands, dividing each subband into a plurality of blocks having q samples, and allocating ab[m] bits to block m, wherein m assumes all values from 1 to M for quantizing each sample, said bit allocation method comprising the steps of: a first step of calculating a needed number of bits bf[m] required for quantization for each block having q samples of each subband signal; a second step (220) of selecting a subband SB jm whose blocks' needed number of bits bf[jm] is the largest among the result of first step, replacing (234) said largest needed number of bits bf[jm] with a value obtained by subtracting one from it, replacing (234) a number of bits ab[jm] allocated to the blocks of subband SB jm with a value obtained by adding one to said allocated number of bits ab[jm], and replacing (234) the available total number of bits TB with a value obtained by subtracting one from the total number of bits TB allocable to entire blocks; characterized by the following steps: a third step (242) of returning to said second step (220,234) when said available total number of bits TB is more than or equal to one; and a fourth step (252) of replacing said number of bits ab[m] allocated to block m with zero if said number of bits ab[m] allocated to block m equals one and replacing said available total number of bits TB with a value obtained by adding the number of subbands whose blocks' allocated number of bits (ab[m]) is one to said available total number of bits TB, and returning to said second step (220). The bit allocation method as claimed in claim 1, wherein, after said first step, further comprises the step (214) of allocating one bit to every subband block whose power is greater than a threshold. The bit allocation method as claimed in claim 1, wherein, before said step of replacing (234) said allocated number of bits (ab[jm]) with a value obtained by adding one to said allocated number of bits (ab[jm]) in said second step (220), further comprises the step (222) of ending bit allocation when said allocated number of bits (ab[jm]) is greater than or equal to a maximum allocated number of bits (a_max).

Inventors: KIM GA-YEONG, KIM, GA-YEONG
Applicants: SAMSUNG ELECTRONICS CO LTD, SAMSUNG ELECTRONICS CO., LTD.
Application year: 1993
Main classification: H04B1
IPC codes: H04B14, G10L19, G10L13, H03M7, H04B1