WO2011021238A1 - レート制御装置、レート制御方法及びレート制御プログラム - Google Patents

レート制御装置、レート制御方法及びレート制御プログラム Download PDF

Info

Publication number
WO2011021238A1
WO2011021238A1 PCT/JP2009/003966 JP2009003966W WO2011021238A1 WO 2011021238 A1 WO2011021238 A1 WO 2011021238A1 JP 2009003966 W JP2009003966 W JP 2009003966W WO 2011021238 A1 WO2011021238 A1 WO 2011021238A1
Authority
WO
WIPO (PCT)
Prior art keywords
nmr
scale factor
rate
candidate value
rate control
Prior art date
Application number
PCT/JP2009/003966
Other languages
English (en)
French (fr)
Inventor
庸介 高田
Original Assignee
トムソン ライセンシング
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by トムソン ライセンシング filed Critical トムソン ライセンシング
Priority to JP2011527482A priority Critical patent/JP5539992B2/ja
Priority to US13/391,264 priority patent/US9159330B2/en
Priority to PCT/JP2009/003966 priority patent/WO2011021238A1/ja
Publication of WO2011021238A1 publication Critical patent/WO2011021238A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/02Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders
    • G10L19/0204Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders using subband decomposition

Definitions

  • the present invention relates to a rate control apparatus, a rate control method, and a rate control program for performing rate control for optimally controlling noise energy and bit rate.
  • the goal of rate control in audio encoding is a predetermined number of data samples acquired from an audio signal (hereinafter referred to as “audio samples”), for example.
  • audio samples acquired from an audio signal
  • MDCT Modified Discrete Cosine Transform
  • MDCT Modified Discrete Cosine Transform
  • the code amount so as not to exceed a certain value, for example, the average bit rate.
  • AAC it is possible to control the bit rate to be constant in the long term while maintaining the quality as constant as possible by changing the bit rate in the short term by a mechanism called a bit reservoir.
  • Quantization of AAC is performed according to the following procedure. Prior to quantization for each band, the frequency spectrum is nonlinearly transformed in order to perform noise shaping according to the amplitude.
  • the non-linearly transformed frequency spectrum is divided into scale factor bands simulating the range covered by the mask effect, and quantization is controlled for each band.
  • the quantization of the scale factor band is controlled by a quantization scale that changes in about 1.5 dB steps, called the scale factor.
  • the scale factors themselves are encoded by DPCM (Differential Pulse Code Modulation).
  • the quantization value of each band is controlled to be within a certain range ([ ⁇ 8191, +8191]), and entropy coding is performed.
  • An optimum table can be selected from predetermined entropy coding tables according to the statistical properties of the distribution of quantized values. For bands where all quantized values are 0, the scale factor and quantized entropy code can be omitted to save the code.
  • FIG. 16 is a flowchart for explaining a conventional inner loop (rate control process)
  • FIG. 17 is a flowchart for explaining a conventional outer loop (distortion control process).
  • a code amount is calculated with a scale factor given for each band (S101).
  • S102 the average bit rate
  • S103 the scale factors of all bands are increased (S103), and the process returns to S101. If it is determined that the code amount is equal to or less than the average bit rate, the process is terminated.
  • the scale factor is initialized (S111).
  • the scale factor is initialized to the minimum value, that is, the finest quantization.
  • an inner loop is called (S112), and noise energy is calculated for each band (S113).
  • the noise energy is calculated by obtaining inversely quantized spectra for all bands. This method of obtaining the noise by inverse quantization is called AbS (Analysis-by-Synthesis).
  • AbS Analysis-by-Synthesis
  • the scale factor is reduced and the quantization is made finer (S114).
  • the ratio of noise energy to mask energy is NMR (Noise-to-Mask Ratio)
  • the condition for reducing the scale factor is NMR> 1.
  • step S115 It is determined whether or not the scale factors of all bands have been changed. If it is determined that the scale factors have not been changed, it is determined whether or not the scale factors of any bands have been changed (S116). . If it is determined in step S116 that there is a band whose scale factor has been changed, the process returns to step S112. If it is determined in step S115 that the scale factor has been changed for all bands, or if it is determined in step S116 that the scale factor of any band has not been changed, the scale factor is restored (S117).
  • This conventional method has a problem that there is no guarantee that the loop will converge. Furthermore, even if the loop converges, even if the amount of code is insufficient, even if the requirements of the psychoacoustic model are not satisfied, quantization is performed to keep the NMR constant so that noise is not as conspicuous as possible. There were cases where the conditions to be performed, that is, the optimal solution could not be found. This conventional method also has a problem that the bit reserve cannot be used effectively because the rate is controlled so as to obtain a predetermined code amount.
  • the present invention has been made in view of the above-described prior art, and an object thereof is to provide a rate control device, a rate control method, and a rate control program for performing rate control for optimally controlling the bit rate based on NMR.
  • a rate control device that performs rate control based on NMR (Noise-to-Mask Ratio), which is a ratio of noise energy to mask energy based on a predetermined psychoacoustic model, exceeding a target rate NMR determination unit for determining non-NMR by binary search, and scale factor determination unit for determining the maximum scale factor corresponding to NMR determined by the NMR determination unit for each scale factor band by binary search
  • the NMR determination unit searches the NMR for 2 minutes
  • the scale factor determining unit determines a scale factor and a rate for the NMR candidate value, and the NMR determining unit is based on the scale factor determined by the scale factor determining unit.
  • a rate control device determines the minimum NMR that does not exceed the target rate as the optimum NMR based on the difference between the rate for the NMR candidate value calculated in step S1 and the target rate.
  • the NMR determination unit is a section in which the NMR predicted value and a rate corresponding to the NMR predicted value are determined by the NMR candidate value selected so as to sandwich the target rate. A two-minute search may be started.
  • the scale factor determination unit determines, for each scale factor band, the smallest scale factor among the scale factors in which the absolute value of the quantized value of the frequency spectrum does not exceed the predetermined maximum value for the west scale. ⁇ Calculate the smallest scale factor among the scale factors where the quantized values of the frequency spectrum are all zero as the east scale factor, and use the west scale factor and the east scale factor. You may make it start the binary search of the largest scale factor corresponding to the NMR candidate value which the said NMR determination part selected from the defined area. With such a configuration, the rate control apparatus of the present invention can effectively shorten the interval for performing the binary search.
  • the scale factor determination unit calculates the minimum and maximum values of NMR based on the west scale factor and the east scale factor calculated by the scale factor determination unit.
  • the scale factor determination unit determines the west scale factor as the scale factor for the NMR candidate value when the NMR candidate value is below the minimum NMR, and determines the NMR having the maximum NMR candidate value. If it exceeds, the east scale factor may be determined as the scale factor for the NMR candidate value.
  • Scale factor NMR can be calculated as the ratio of noise energy to mask energy associated with quantization.
  • the scale factor mask energy is such that a signal with a signal energy not exceeding it is masked, i.e. incapable of being identified by human hearing.
  • the rate control apparatus of the present invention does not assign bits to audio signals that cannot be identified by human hearing, but efficiently assigns bits to signal components in the audible region. Can do.
  • the rate control apparatus of the present invention further includes a storage unit that stores a binary search process executed by the scale factor determination unit, and the scale factor determination unit stores the binary search stored in the storage unit.
  • a two-minute search may be executed based on the above process.
  • the rate control device of the present invention saves the process in the storage unit, thereby eliminating the need for recalculation and efficient processing. Can be realized.
  • the target rate may be variable within a predetermined range. If the target rate has a certain range, the NMR determination unit first calculates the code amount using the predicted value of NMR, and ends the rate control without searching for binary when the code amount is within the target rate. May be.
  • the predicted NMR value for example, the NMR used in the previous frame may be used.
  • the rate control apparatus of the present invention increases or decreases the code amount of the next frame in accordance with a deviation from a target value of the bit reserve, for example, 80% of the maximum value of the bit reserve. It is also possible to feedback control the predicted NMR value. By changing the rate in the short term, encoding can be performed at a constant rate in the long term while keeping the NMR or signal quality as constant as possible.
  • the NMR determination unit may update the predicted NMR value each time the frame is encoded.
  • the predicted NMR value may be corrected in accordance with a change from the target value of the bit reservoir every time a frame is encoded. Since the scale factor is determined based on an almost constant NMR prediction, short-term rate fluctuations are absorbed by the bit reservoir while keeping the quality as constant as possible, so that the rate is constant over the long term. Can be controlled. In this way, the bit reservoir can be used effectively, and more adaptive rate control can be realized.
  • a rate control method that performs rate control based on NMR, which is a ratio of noise energy to mask energy based on a predetermined psychoacoustic model, and determines an NMR that does not exceed the target rate by a binary search
  • NMR NMR
  • a scale factor determination step for determining a maximum scale factor corresponding to the NMR determined in the NMR determination step by a binary search for each scale factor band
  • the scale factor determination Before calculated based on the scale factor determined in the step Evaluating the difference between the rate for the NMR candidate value and the target rate, and determining whether the NMR candidate value is the minimum NMR that does not exceed the target rate, and includes the NMR determination step.
  • the scale factor determination step determines a scale factor for the NMR candidate value
  • the evaluation step determines the NMR candidate value. Is determined to be the minimum NMR that does not exceed the target rate, the NMR candidate value is determined as the optimal NMR, and it is determined that the NMR candidate value is not the minimum NMR that does not exceed the target rate in the evaluation step. If so, a rate control method is provided that repeats from the NMR determination step to the evaluation step.
  • the rate control method of the present invention can satisfy the target rate and at the same time make the NMR as constant as possible, that is, make the quality constant.
  • a rate control program for causing a computer to execute rate control processing for performing rate control based on NMR, which is a ratio of noise energy to mask energy based on a predetermined psychoacoustic model, wherein the rate control processing includes an NMR determination step for determining an NMR that does not exceed the target rate by a binary search, and for each scale factor band, the maximum scale factor and rate corresponding to the NMR determined in the NMR determination step is determined in two minutes.
  • a scale factor determination step determined by searching; By evaluating the difference between the rate for the NMR candidate value calculated based on the scale factor determined in the factor determination step and the target rate, the NMR candidate value is the smallest NMR that does not exceed the target rate
  • the scale factor determination step includes the NMR step.
  • the NMR candidate value is determined as the optimum NMR, and the evaluation If it is determined in the step that the NMR candidate value is not the minimum NMR that does not exceed the target rate, the NMR determination Provided is a rate control program that repeats from the step to the evaluation step, and causes the computer to execute the NMR determination step and the evaluation step as an outer loop and the scale factor determination step as an inner loop. .
  • the rate control program of the present invention can cause the computer to execute rate control so that the NMR is as constant as possible, that is, the quality is as constant as possible while satisfying the target rate.
  • FIG. 1 is a functional block diagram of an audio encoding device including a rate control device according to an embodiment of the present invention.
  • FIG. 7 is a schematic functional block diagram of the rate control device of FIG. 6. It is a flowchart explaining the process which the rate control apparatus of FIG. 6 performs.
  • 6 is a flowchart for explaining the flow of an outer loop for executing the function of the NMR determination unit 1 of the rate control device 15.
  • 6 is a flowchart for explaining the flow of an inner loop for executing the function of the scale factor determination unit 2 of the rate control device 15; It is a flowchart explaining the flow of the inner loop following FIG. 10A which performs the function of the scale factor determination part 2 of the rate control apparatus 15.
  • It is a figure which shows the pseudo code of an outer loop.
  • It which shows the 1st pseudo code of an outer loop.
  • It is a figure which shows the pseudo code of the 2nd stage of an outer loop.
  • It is a figure which shows the pseudo code of an inner loop.
  • FIG. 1 shows an example of the relationship between signal energy, noise energy, and mask energy.
  • NMR dB is used as NMR unless otherwise specified.
  • NMR dB is defined as follows.
  • FIG. 2 shows the relationship between rate and NMR. As shown in FIG. 2, there is a negative correlation between the rate, that is, the code amount and the NMR, but it does not necessarily become a monotonic phenomenon. Neither the rate, ie the code amount, nor the NMR can be controlled directly, but via the scale factor. For this reason, rate control may be performed using a double loop.
  • This search consists of two stages. In the first stage, further NMR candidate values are tried until the target rate is exceeded. In the example of FIG. 2, NMR candidate values a, b, and c are tried to obtain an NMR interval (b, c) that sandwiches the target rate.
  • the initial NMR candidate value a may be equal to the predicted NMR value. In the example of FIG. 2, the predicted value is 0.
  • the interval between NMR candidate values may be gradually increased until the target rate is exceeded.
  • the predicted NMR value for example, the NMR value used when encoding the previous frame or the value calculated based on the NMR used when encoding the previous frame may be used.
  • a binary search is performed from the section (b, c), the rate is obtained for the new candidate values d, e, and the section is narrowed ((b, c) ⁇ (d, c) ⁇ (D, e)), find the smallest NMR that does not exceed the target rate.
  • the target rate may have a certain range.
  • the target minimum code amount is set to, for example, 50% of the average code amount
  • the target maximum code amount is set to, for example, 200% of the average code amount
  • the code amount falls within the range of the target minimum code amount and the target maximum code amount.
  • Rate control may be performed.
  • the local code amount in the range from the target minimum code amount to the target maximum code amount, that is, the rate variation, can be absorbed using the bit reservoir.
  • the predicted NMR value may be updated each time a frame is encoded.
  • the predicted value of NMR may be feedback-controlled so that the code amount of the next frame is increased or decreased in accordance with a target value of the bit reservoir, for example, a deviation from 80% of the maximum occupied amount of the bit reservoir.
  • ABR rate control method
  • FIG. 3 shows an example of the relationship between the scale factor (SF) and the NMR.
  • SF scale factor
  • FIG. 3 shows an example of the relationship between the scale factor (SF) and the NMR.
  • the scale factors in which the quantized values of the frequency spectrum are all 0 in a certain band the smallest one is called the east scale factor (east SF).
  • point E corresponds to this.
  • NMR is maximized.
  • NMR can be determined by the above-described AbS.
  • the minimum scale factor that does not exceed the maximum value (8191 in AAC) of the quantized value is called the West scale factor (West SF).
  • West SF the minimum scale factor that does not exceed the maximum value (8191 in AAC) of the quantized value.
  • the W point corresponds to this.
  • NMR is minimized.
  • the east-west scale factor and the NMR maximum and minimum values can be determined in advance before executing the inner loop.
  • a binary search is performed for each band to determine a scale factor corresponding to the target NMR. Specifically, when the target NMR is between the maximum and minimum NMR of the band, a binary search is performed from the interval (W, E), and the maximum scale factor that does not exceed the given target NMR Explore. However, if the target NMR is above the maximum NMR of the band, the east scale factor is used, and if the target NMR is below the minimum NMR, the west scale factor is used.
  • FIG. 4 shows an example of a binary search tree for obtaining a scale factor corresponding to the target NMR.
  • the sections are narrowed in the order of (W, E) ⁇ (a, E) ⁇ (b, E) ⁇ (b, c).
  • This binary search process is stored as, for example, a binary search tree as shown in FIG.
  • the inner loop is executed again, the NMR recalculation by AbS can be omitted by following the saved binary search tree.
  • the inner loop is repeatedly executed with a similar target NMR. For this reason, in the repetition of the binary search of the inner loop, it can be expected to follow the binary search tree stored with a high probability, and the effect of omitting the recalculation becomes large.
  • FIG. 5 shows the NMR range for each scale factor band.
  • the vertical axis represents NMR
  • the horizontal axis represents an SFB (Scale Factor Band) index
  • the larger the index the higher the scale factor band.
  • the NMR range generally differs from band to band.
  • the maximum value of NMR is often 0 or less.
  • a binary search is not necessary.
  • the quantized value of all frequency spectra is set to 0, and the minimum value of NMR is the first when the target NMR is below the maximum NMR of the band. That is, the NMR at the west scale factor may be calculated, and the calculation of the minimum NMR may be omitted for bands where the target NMR is not always below the maximum NMR of the band.
  • the east-west scale factor can be obtained from the maximum absolute value of the frequency spectrum in the band.
  • FIG. 6 is a functional block diagram of an audio encoding device including the rate control device according to the embodiment of the present invention in the control unit.
  • the audio encoding device 10 includes an auditory psychological analysis unit 11, a filter bank 12, a TNS (Temporal Noise Shaping) unit 13, and an M / S (Middle / Side (Middle / Side)). (Middle / side))
  • the stereo unit 14, the rate control device 15 of the present embodiment, the quantization unit 16, the entropy encoding unit 17, and the bit stream generation unit 18 are provided.
  • the audio encoding device 10 divides a frame generated from an input signal into a plurality of scale factor bands, encodes each of the plurality of scale factor bands using the scale factor, The stream is output from the bit stream generation unit 18.
  • the audio signal is input to the psychoacoustic analysis unit 11 and the filter bank 12.
  • the auditory psychological analysis unit 11 performs an auditory psychological analysis according to an auditory psychological model, and based on the result, an encoding related unit including a filter bank, a TNS unit 13, an M / S stereo unit 14, and a control unit 20 are provided. Operate.
  • the filter bank 12 performs time-frequency conversion on a time signal composed of audio samples and converts it to a frequency spectrum.
  • the frequency spectrum is further input to some encoding related parts (not shown).
  • These encoding related sections output auxiliary information necessary for decoding to the bit stream generating section 18.
  • encoding related parts other than the TNS part 13 and the M / S stereo part 14 that can be used in AAC are omitted.
  • the frequency spectrum processed by the encoding-related unit is then input to the quantization unit 16.
  • the quantizing unit 16 quantizes the frequency spectrum to generate a quantized spectrum, and outputs the quantized spectrum to the entropy encoding unit 17.
  • the entropy encoding unit 17 entropy encodes the quantized spectrum.
  • the control unit 20 controls the quantization unit 16 and the entropy coding unit 17 to perform rate control. Specifically, in particular, the rate control device 15 is provided with information on the mask energy of the scale factor band from the psychoacoustic analysis unit 11. Further, noise energy information is given from a quantization unit 16 to be described later.
  • the scale factor determination unit 2 of the rate control device 15 uses NMR (Noise-to-Mask Ratio) as the ratio of the noise energy obtained by AbS and the given mask energy for each scale factor band. calculate. Further, an optimum scale factor is determined by comparing the calculated NMR with the target NMR.
  • the control unit 20 controls the quantization unit 16 and the entropy coding unit 17 using the optimum scale factor and rate based on NMR obtained from the rate control device 15.
  • the entropy encoding unit 17 When the rate control is completed, the entropy encoding unit 17 outputs auxiliary information and encoded data to the bit stream generating unit 18. All the auxiliary information and the encoded data are put together, and the bit stream generation unit outputs the encoded audio bit stream (Coded Audio Bit Stream).
  • FIG. 7 shows a schematic functional block diagram of the rate control device 15 of the present embodiment.
  • the rate control device 15 is a rate control device that performs NMR-based rate control that is a ratio of noise energy to mask energy based on a predetermined psychoacoustic model, and performs a binary search for NMR that does not exceed the target rate.
  • the scale factor determination unit 2 determines a scale factor for the NMR candidate value, and the NMR determination unit 1 -Rate and eye for NMR candidate values calculated based on the scale factor determined by the factor determination unit It is adapted to determine the minimum of NMR as the best NMR based on the difference between the rates.
  • FIG. 8 is a flowchart for explaining the rate control processing executed by the rate control device 15 of the present embodiment. The following processing is executed under the control of a CPU and a CPU related program (not shown) included in the rate control device 15.
  • the NMR determination unit 1 determines an NMR candidate value by a binary search.
  • the NMR used when encoding the previous frame may be used as the initial candidate value for NMR.
  • step S2 the scale factor determination unit 2 determines, for each scale factor band, the maximum scale factor corresponding to the NMR candidate value determined by the NMR determination unit 1 by binary search.
  • the scale factor determination unit 2 further calculates a rate corresponding to the determined scale factor.
  • the present invention is not limited to this, and it will be apparent to those skilled in the art that any other component may calculate the rate corresponding to the scale factor determined by the scale factor determination unit 2. .
  • step S3 the NMR determining unit 1 calculates and compares the difference between the rate and the target rate for the NMR candidate value calculated based on the scale factor determined by the scale factor determining unit 2.
  • step S4 the NMR determination unit 1 determines whether or not an optimal NMR candidate value has been found based on the difference between the target rate calculated in step S3 and the calculated rate. Specifically, the NMR determination unit 1 determines that an optimal NMR candidate value has been found when the NMR binary search section is sufficiently narrowed.
  • step S4 If it is determined in step S4 that the optimal NMR candidate value has been found, the process proceeds to step S5, where the candidate value for the eastern NMR in the sufficiently narrowed binary search section of the NMR, that is, the minimum that does not exceed the target rate The NMR candidate value is output as the optimum NMR. On the other hand, if it is determined in step S4 that the optimum NMR has not been found, the process returns to step S1.
  • the rate control device 15 of the present embodiment corresponds to the NMR determination unit 1 that determines the NMR that does not exceed the target rate by binary search, and the NMR determined by the NMR determination unit for each scale factor band.
  • the factor determination unit 2 determines the scale factor and rate for the NMR candidate value, and the NMR determination unit 1 determines the rate and target rate for the NMR candidate value calculated based on the scale factor determined by the scale factor determination unit 2.
  • the minimum NMR is determined as the optimum NMR based on the difference between the two.
  • the NMR determination unit 1 starts a binary search from an NMR predicted value and an interval determined by the NMR candidate value selected so that the corresponding rate sandwiches the target rate with respect to the NMR predicted value.
  • the scale factor determination unit 2 exceeds the predetermined maximum value of the quantized value of the frequency spectrum with respect to the NMR candidate value selected by the NMR range determination unit for each scale factor band.
  • the smallest scale factor among the non-scale factors is the west scale factor, and the smallest scale factor in which the quantized values of the frequency spectrum are all zero is calculated as the east scale factor.
  • a binary search for the largest scale factor corresponding to NMR is started from the interval defined by the west scale factor and the east scale factor. For this reason, the rate control apparatus 15 of this Embodiment can shorten the area
  • the scale factor determination unit 2 calculates the minimum and maximum values of NMR based on the west scale factor and the east scale factor calculated by the scale factor determination unit, and the scale factor determination unit 2 If the scale factor calculated for the NMR candidate value is lower than the west scale factor, the west scale factor is determined as the scale factor for the NMR candidate value, and the scale factor calculated for the NMR candidate value is determined. If is below the east scale factor, the west scale factor is determined as the scale factor for the NMR candidate value.
  • the rate control device 15 includes a storage unit 3 that stores a binary search process executed by the scale factor determination unit 2, and the scale factor determination unit 2 stores the binary search stored in the storage unit 3. Perform a binary search based on the process.
  • the target rate may be variable within a predetermined range. If the target rate has a certain range, the NMR determination unit 2 first calculates the code amount using the predicted value of NMR, and if the code amount is within the target rate, the NMR predicted value is converted to the optimum NMR. And rate control may be terminated without searching for two minutes.
  • the NMR determination unit is feedback-controlled so as to increase or decrease the code amount of the next frame, that is, the target rate, in accordance with a deviation from 80% of the target value of the bit reservoir, for example, the maximum value of the bit reservoir. You can also. By changing the rate in the short term, encoding can be performed at a constant rate in the long term while keeping the NMR or signal quality as constant as possible.
  • the NMR determination unit 1 may update the predicted value of NMR every time a frame is encoded. For example, every time a frame is encoded, the predicted value of NMR is corrected in accordance with a change from the target value of the bit reservoir. Since the scale factor is determined based on an almost constant NMR prediction, short-term rate fluctuations are absorbed by the bit reservoir while keeping the quality as constant as possible, so that the rate is constant over the long term. Can be controlled. In this way, the bit reservoir can be used effectively, and more adaptive rate control can be realized.
  • the rate control device 15 of the present invention can be realized by a rate control program that causes a general computer including a CPU and a memory to function as each means described above.
  • a rate control program can be distributed via a communication line, or can be distributed by writing in a recording medium such as a CD-ROM.
  • FIG. 9 is a flowchart for explaining the flow of the outer loop that causes the computer including the CPU and the memory to execute the function of the NMR determination unit 1 of the rate control device 15. The following processing is executed under the control of the CPU in accordance with a program included in the memory.
  • the NMR predicted value is set as the NMR candidate value (S11), and the inner loop is executed for the NNMR candidate value to obtain the NMR candidate value rate (S12). It is determined whether or not the NMR candidate value rate is higher than the target rate (S13). If it is determined that the NMR candidate value rate exceeds the target rate, the NMR candidate value is set to the west NMR, and the NMR candidate value is set to a predetermined value. (S14). On the other hand, if it is determined that the rate of the NMR candidate value does not exceed the target rate, the NMR candidate value is set to the eastern NMR, and the NMR candidate value is decreased by a predetermined value (S15).
  • the eastern NMR and rate are set to the optimum NMR and rate, respectively (S23), and the process is terminated. If it is determined that the difference between the east and west NMR is not sufficiently small, the average value of the east and west NMR is set as the NMR candidate value (S18).
  • An inner loop is executed for the NMR candidate values to obtain the NMR candidate value rate (S19). It is determined whether or not the rate of the NMR candidate value exceeds the target rate (S20). If it is determined that the rate of the NMR candidate value exceeds the target rate, the NMR candidate value is set to the west NMR (S21), and the NMR candidate value is determined. When it is determined that the rate does not exceed the target rate, the NMR candidate value is set as the eastern NMR (S22). Next, the process returns to step S17.
  • FIGS. 10A and 10B are flowcharts for explaining the flow of the outer loop that causes a computer including a CPU and a memory to execute the function of the NMR determination unit 1 of the rate control device 15.
  • the first scale factor band is set as the scale factor band to be processed (S31).
  • the east-west NMR and scale factor corresponding to the scale factor band to be processed are set as the east-west NMR and scale factor to be processed, respectively (S32).
  • the root of the binary search tree of the scale factor band to be processed is used as the binary search tree to be processed (S33).
  • step S34 it is determined whether or not the eastern NMR is below the target NMR (S34). If it is determined that the eastern NMR is equal to or less than the target NMR, the east scale factor is used as the scale factor of the scale factor band to be processed (S35), and the process proceeds to step S48. If it is determined that the eastern NMR exceeds the target NMR, it is determined whether or not the west NMR is equal to or greater than the target NMR (S36). If it is determined that the west NMR is equal to or greater than the target NMR, the west scale factor is used as the scale factor of the scale factor band to be processed (S37), and the process proceeds to step S48.
  • step S38 it is determined whether or not the difference in scale factor between east and west is sufficiently small. If it is determined that the difference in scale factor between east and west is sufficiently small, the process proceeds to step S47. If it is determined that the difference between the east and west scale factors is not sufficiently small, the average value of the east and west scale factors is set as the scale factor candidate value (S39). Whether or not the difference between the east and west scale factors is sufficiently small is, for example, comparing the difference between the east and west scale factors with a predetermined value. It is determined that the difference in scale factor between east and west is not sufficiently small.
  • step S40 it is determined whether or not a node corresponding to the scale factor candidate value exists in the root of the binary search tree (S40), and a node corresponding to the scale factor candidate value exists in the root of the binary search tree. If so, the process proceeds to step S43. If it is determined that there is no node corresponding to the scale factor candidate value at the root of the binary search tree, the quantized spectrum when the scale factor band to be processed is quantized with the scale factor candidate value is obtained. Further, NMR is obtained from the quantized spectrum by AbS (S41). Furthermore, a node corresponding to the scale factor candidate value including the obtained quantization spectrum and NMR is added to the root of the binary search tree (S42). The NMR of the scale factor candidate value is taken out from the node corresponding to the scale factor candidate value (S43).
  • the scale factor candidate value is set to the east.
  • the binary search tree is traced to the west (S45), and the process proceeds to step S38. If it is determined that the NMR of the scale factor candidate value does not exceed the target NMR, the scale factor candidate value is set to the west scale factor, the binary search tree is traced east (S46), and the process proceeds to step S38. .
  • step S38 If it is determined in step S38 that the difference between the east and west scale factors is sufficiently small, the west scale factor is used as the scale factor of the scale factor band to be processed (S47). It is determined whether or not the next scale factor band exists (S48). If it is determined that the next scale factor band exists, the next scale factor band is determined as the scale factor to be processed. As a band (S49), the process returns to step S32. On the other hand, when it is determined that the next scale factor band does not exist, the rate for the obtained combination of scale factors is calculated (S50).
  • FIG. 11 shows a pseudo code for explaining the flow of the outer loop that causes the computer including the CPU and the memory to execute the function of the MNR determining unit 1.
  • the NMR is changed and the rate control is performed so that the frame rate to be processed is equal to or lower than the target rate.
  • outer_loop () receives a set of an initial value (predicted value) of quantized NMR and a target rate as an argument.
  • outer_loop_first () performs a binary search, that is, the east-west quantized NMR and the corresponding rates are determined.
  • NMR max and NMR min respectively represent the maximum and minimum NMR that the frame to be processed can take, When Respectively represent the maximum and minimum quantized NMR that the frame can take.
  • outer_loop_second () then performs a binary search and returns the optimal quantized NMR and the current rate pair. If the target rate is not within the range of rates that the frame can take, the binary search interval cannot be determined.
  • the maximum rate is below the target rate, that is, if the west point cannot be determined, the east point that is the maximum rate is returned as the optimum value. If the minimum rate is above the target rate, ie if the eastern point cannot be determined, return a pair of special quantized NMR ⁇ ⁇ and the current code amount, indicating that all spectra and other auxiliary information will be omitted .
  • the rate is less than a certain value (this is called the lower limit of the rate) regardless of the contents of the frame, so rate control succeeds by always setting the target rate above the lower limit. Can be guaranteed (the rate can be controlled below the target rate).
  • FIG. 12 shows pseudo code for explaining the flow of the first stage of the outer loop.
  • the function outer_loop_first () takes, in order, an initial value of quantized NMR, a target rate, a maximum value of quantized NMR, and a minimum value of quantized NMR.
  • outer_loop_first () starts from the initial value and gradually changes the quantized NMR to search for a section sandwiching the target rate. When the search is finished, it returns the west and east quantized NMR and rates.
  • the function inner_loop () calculates the rate in a given quantized NMR.
  • the amount of change k in the quantized NMR is initialized to a value determined by the difference between the target rate and the actual rate, and increases at a constant rate (for example, 1.5 times).
  • FIG. 13 shows a pseudo code explaining the flow of the second stage of the outer loop.
  • the function outer_loop_second takes a binary search interval (west and east quantized NMR and rate) and a target rate as arguments. Find the minimum quantized NMR that does not exceed the target rate (referred to as optimized quantized NMR) by a binary search and return the set of optimized quantized NMR and the current rate. Specifically, when the range of the binary search for NMR is sufficiently narrowed, that is, when the difference between the east and west quantized NMR becomes 1, a set of west quantized NMR and west rate is returned.
  • FIG. 14 shows a pseudo code for explaining the flow of the inner loop for causing the computer including the CPU and the memory to execute the function of the scale factor determination unit 2.
  • the function inner_loop () takes (target) quantized NMR as an argument. If the quantized NMR is greater than or equal to ⁇ , the rate calculated by the function simulate_zero () is returned. The function simulate_zero () calculates the rate when all spectra and other auxiliary information are omitted. Smaller than the quantization NMR is iota ⁇ , determine the rate as follows. First, for each scale factor band, the largest scale factor that does not exceed a given NMR is found by the function allocate_noise ().
  • the rate is calculated by the function “simulate ()” for the combination of the scale factors obtained by “allocate_noise ()”.
  • ROOT j represents the root node of the j-th band binary search tree, and & ROOT j represents a pointer to the node.
  • SFB j represents data such as the spectrum of the j th band.
  • SF j west and SF j east represent the west and east scale factors of the j th band, respectively.
  • NMR j west and NMR j east represent the west and east NMR of the j th band, respectively.
  • the pseudo code is omitted for the functions simulate_zero () and simulate (). Note that it is not necessary to calculate the minimum NMR in a band where the target NMR is not always below the maximum NMR of the band.
  • FIG. 15 shows pseudo code for explaining the flow for obtaining the scale factor by binary search.
  • the function allocate_noise () sequentially returns a pointer to the root node of the binary search tree, scale factor band data, west scale factor, east scale factor, west NMR, eastern NMR, and target NMR. Takes an argument. Since the pointer to the root node is passed to the argument tt, the change to * tt is reflected in the caller.
  • the function new_node () returns a node having NMR when the scale factor band sfb is quantized with the scale factor sf (both are set to ⁇ for the child nodes).
  • the calculation may be omitted so that the quantization is not repeated in the code generation after rate control.
  • the pseudo code of the function new_node () is omitted.
  • the rate control apparatus of the present embodiment includes an NMR determination unit that determines a minimum NMR that does not exceed the target rate by a binary search, and a maximum scale that corresponds to the NMR determined by the NMR determination unit.
  • a scale factor determination unit that determines a factor by a binary search, and the NMR determination unit selects an NMR candidate value as a candidate when performing a binary search for NMR, and the scale factor determination unit determines the NMR candidate.
  • the rate control apparatus of the present embodiment satisfies the NMR requirement, that is, the quality requirement at the same time as the target rate. Succoth can. Since the NMR below the target rate is obtained by binary search and the scale factor is determined based on the obtained NMR, it is possible to cope with rate fluctuations of a certain width, and the bit reservoir is effectively used. Can be used.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Computational Linguistics (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

【課題】ノイズ・エネルギーとビットレートを最適に制御するレート制御を行う。 【解決手段】入力信号から生成したフレームを複数のスケール・ファクタ・バンドに分割し、スケール・ファクタ・バンドの各々をスケール・ファクタを用いて符号化を行うオーディオ符号化装置10において、NMRに基づくレート制御を行うレート制御装置15であって、目標レートを超えないNMRを2分探索によって決定するNMR決定部1と、NMR決定部1によって決定したNMRに対応する最大のスケール・ファクタとレートを2分探索によって決定するスケール・ファクタ決定部2と、を含む。NMR決定部1がNMRを2分探索する際に候補となるNMR候補値を選定する都度、スケール・ファクタ決定部2がNMR候補値に対するスケール・ファクタを決定する。

Description

レート制御装置、レート制御方法及びレート制御プログラム
 本発明は、ノイズ・エネルギーとビットレートを最適に制御するレート制御を行うレート制御装置、レート制御方法及びレート制御プログラムに関する。
 従来、AAC(Advanced Audio Coding:アドバンスト・オーディオ・コーディング)などのオーディオ符号化におけるレート制御の目標は、オーディオ信号から取得した所定数のデータサンプル(以後、「オーディオ・サンプル」と呼ぶ)を、例えば、MDCT(Modified Discrete Cosine Transform:修正離散コサイン変換)などにより時間周波数変換して得られる周波数スペクトルを、量子化ノイズ・エネルギーが聴覚心理モデルによって求められるマスク・エネルギーを超えないように、量子化することであった。同時に、符号量はある一定値、例えば平均ビットレートを超えないように制御する必要がある。AACでは、ビット・リザバと呼ばれる仕組みによって、ビットレートを短期的に変化させることで品質をできるだけ一定に保ちながら、長期的には一定のビットレートになるように制御することもできる。
 聴覚心理モデルによって求められるマスク・エネルギーを量子化ノイズ・エネルギーが超えないという条件、さらに符号量を一定値以下に制御するという条件、という2つの矛盾する条件をどのようにして満たすべきか、あるいは破るべきか、ということが、オーディオ符号化におけるレート制御の課題である。標準化された「最適な」レート制御の方法は存在していない。一例として、AACの規格書のinformative partで説明される、従来用いられている2重ループを用いる方法について説明する。以下の説明ではオーディオ・コーデックをAACと仮定する。
 AACの量子化は以下の手順で行われる。バンドごとの量子化の前に、振幅に応じてノイズ整形をするため、周波数スペクトルを非線形変換する。非線形変換した周波数スペクトルを、マスク効果の及ぶ範囲を模した、スケール・ファクタ・バンドに分割し、バンドごとに量子化を制御する。スケール・ファクタ・バンドの量子化は、スケール・ファクタと呼ばれる、約1.5dBステップで変化する量子化スケールによって制御される。スケール・ファクタそれら自身はDPCM(Differential Pulse Code Modulation:差分パルス符号変調)符号化される。各バンドの量子化値は一定の範囲([-8191,+8191])となるように制御し、エントロピー符号化する。量子化値の分布の統計的性質に応じて、あらかじめ定められたエントロピー符号化のテーブルの中から、最適なテーブルを選択することができる。すべての量子化値が0であるバンドについては、スケール・ファクタと量子化値のエントロピー符号を省略して、符号を節約することができる。
 従来法では、内部ループと外部ループからなる2重ループを用いて、符号量が平均ビットレート以下になるようにスケール・ファクタを決定する。図16に、従来法の内部ループ(レート制御処理)を説明するフローチャートを、図17に、従来法の外部ループ(歪み制御処理)を説明するフローチャートを示す。
 図16を参照して、従来法の内部ループについて説明する。
まず、各バンドごとに与えられたスケール・ファクタで符号量を計算する(S101)。次に、符号量が平均ビットレート以下か否かを判断する(S102)。符号量が平均ビットレートを上回ると判断された場合は、全てのバンドのスケール・ファクタを大きくし(S103)、処理はS101に戻る。符号量が平均ビットレート以下と判断された場合、処理を終了する。
 図17を参照して、従来法の外部ループについて説明する。まず、スケール・ファクタを初期化する(S111)。例えば、スケール・ファクタを最小値、すなわち一番細かい量子化となるように初期化する。次に、内部ループを呼び出し(S112)、バンドごとにノイズ・エネルギーを算出する(S113)。具体的には、すべてのバンドについて、逆量子化したスペクトルを求めて、ノイズ・エネルギーを算出する。このように逆量子化してノイズを求める方法をAbS(Analysis-by-Synthesis:合成による分析)と呼ぶ。さらに、ノイズ・エネルギーが、聴覚心理分析によって求めたマスク・エネルギーより大きいバンドについて、スケール・ファクタを小さくして、量子化を細かくする(S114)。ノイズ・エネルギーとマスク・エネルギーとの比を、NMR(Noise-to-Mask Ratio)とすると、スケール・ファクタを小さくする条件はNMR>1となる。
 すべてのバンドのスケール・ファクタを変化させたか否かを判断し(S115)、変化させていないと判断した場合は、どのバンドのスケール・ファクタも変化させてないか否かを判断する(S116)。ステップS116で、スケール・ファクタを変化させたバンドが存在すると判断すると、処理はステップS112に戻る。ステップS115で、すべてのバンドでスケール・ファクタを変化させた、あるいは、ステップS116でどのバンドのスケール・ファクタも変化させていない、と判断された場合は、スケール・ファクタを復元する(S117)。
特開平10-136362号公報
 この従来法には、ループが収束する保証がないという問題がある。さらに、例えループが収束する場合であっても、符号量が足りない場合などで、聴覚心理モデルによる要求を満たさなくても、可能な限りノイズが目立たないようにNMRを一定に保つ量子化を行う条件、すなわち最適解を見いだせない場合があった。そして、この従来法には、あらかじめ決められた符号量になるようにレート制御するのでビット・リザバを有効に使えないという課題もある。
 本発明は、上述した従来技術に鑑みてなされ、NMRに基づいて、ビットレートを最適に制御するレート制御を行うレート制御装置、レート制御方法及びレート制御プログラムを提供することを目的とする。
 本発明の第1の態様によると、入力信号から生成したフレームを複数のスケール・ファクタ・バンドに分割し、前記複数のスケール・ファクタ・バンドの各々をスケール・ファクタを用いて符号化を行う音声符号化装置において、ノイズ・エネルギーと所定の聴覚心理モデルに基づくマスク・エネルギーとの比であるNMR(Noise-to-Mask Ratio)に基づくレート制御を行うレート制御装置であって、目標レートを超えないNMRを2分探索によって決定するNMR決定部と、スケール・ファクタ・バンドごとに、前記NMR決定部によって決定したNMRに対応する最大のスケール・ファクタを2分探索によって決定するスケール・ファクタ決定部と、を含み、前記NMR決定部が、NMRを2分探索する際に候補となるNMR候補値を選定する都度、前記スケール・ファクタ決定部が前記NMR候補値に対するスケール・ファクタとレートを決定し、前記NMR決定部は、前記スケール・ファクタ決定部で決定したスケール・ファクタに基づいて算出した前記NMR候補値に対するレートと前記目標レートとの差分に基づいて目標レートを超えない最小のNMRを最適なNMRとして決定する、レート制御装置を提供する。このような構成により、本発明のレート制御装置は、目標レートを満たすと同時に、可能な限りNMRを一定にする、すなわち品質を一定に保つことができる。
 また、本発明のレート制御装置において、前記NMR決定部は、NMR予測値と、該NMR予測値に対するレートに対して対応するレートが前記目標レートを挟むようにして選定したNMR候補値により確定される区間から2分探索を開始するようにしてもよい。また、前記スケール・ファクタ決定部は、スケール・ファクタ・バンドごとに、周波数スペクトルの量子化値の絶対値が既定された最大値を超えないスケール・ファクタのうち最小のスケール・ファクタを西のスケール・ファクタとし、周波数スペクトルの量子化値がすべてゼロになるスケール・ファクタのうち最小のスケール・ファクタを東のスケール・ファクタとして算出し、前記西のスケール・ファクタと前記東のスケール・ファクタとによって画定される区間から、前記NMR決定部が選定したNMR候補値に対応する最大のスケール・ファクタの2分探索を開始するようにしてもよい。このような構成によって、本発明のレート制御装置は、2分探索を行う区間を効果的に短縮することができる。
 また、本発明のレート制御装置において、前記スケール・ファクタ決定部は、前記スケール・ファクタ決定部が算出した西のスケール・ファクタと東のスケール・ファクタに基づいてNMRの最小値と最大値を算出し、前記スケール・ファクタ決定部は、前記NMR候補値が最小のNMRを下回る場合は前記西のスケール・ファクタを前記NMR候補値に対するスケール・ファクタとして決定し、前記NMR候補値が最大のNMRを上回る場合は前記東のスケール・ファクタを前記NMR候補値に対するスケール・ファクタとして決定するようにしてもよい。
 スケール・ファクタのNMRは量子化に伴うノイズ・エネルギーとマスク・エネルギーとの比として計算できる。スケール・ファクタのマスク・エネルギーは、それを超えない信号エネルギーを持つ信号がマスクされる、すなわち人間が聞いても識別できないようなエネルギーである。このような構成によって、本発明のレート制御装置は、例えば、人間の聴覚が識別できない音声信号にはビットを割り当てず、可聴領域の信号成分に適応的にビットを割り当てるように効率的な符号化ができる。
 本発明のレート制御装置は、さらに、前記スケール・ファクタ決定部が実行する2分検索の過程を記憶する記憶部を備え、前記スケール・ファクタ決定部は、前記記憶部に記憶された2分検索の過程に基づいて2分検索を実行するようにしてもよい。
 このような構成によって、本発明のレート制御装置は、スケール・ファクタ決定部が2分探索を実行する際、その過程を記憶部に保存しておくことで再計算を不要にし、効率的な処理を実現することができる。
 また、本発明のレート制御装置において、前記目標レートは、所定の範囲で変動可能としてもよい。目標レートにある程度の幅を持たせれば、NMR決定部はまずNMRの予測値を用いて符号量を計算し、その符号量が目標レート内にあるとき2分探索せずにレート制御を終了してもよい。NMRの予測値として、例えば、前のフレームに用いたNMRを用いてもよい。このような構成によって、本発明のレート制御装置は、例えば、ビット・リザバの目標値、例えばビット・リザバの最大値の80%からのずれに応じて、次のフレームの符号量を増減させるようにNMRの予測値をフィードバック制御することもできる。短期的にレートを変動させることでNMR、あるいは信号の品質をできるだけ一定に保ちながら、長期的には一定のレートで符号化できる。
 さらに、前記NMR決定部は、前記フレームが符号化されるごとに、NMRの予測値を更新するようにしてもよい。NMRの予測値を、例えば、フレームを符号化するごとにビット・リザバの目標値からの変動に応じて修正するようにしてもよい。ほぼ一定のNMRの予測値に基づいてスケール・ファクタを決定するので、品質をできるだけ一定に保ちながら、短期的なレート変動はビット・リザバで吸収し、長期的には一定のレートになるように制御できる。このようにビット・リザバを有効に活用することが可能となり、より適応的なレート制御が実現できる。
 本発明の第2の態様によると、入力信号から生成したフレームを複数のスケール・ファクタ・バンドに分割し、前記複数のスケール・ファクタ・バンドの各々をスケール・ファクタを用いて符号化を行う音声符号化方法において、ノイズ・エネルギーと所定の聴覚心理モデルに基づくマスク・エネルギーとの比であるNMRに基づくレート制御を行うレート制御方法であって、目標レートを超えないNMRを2分探索によって決定するNMR決定ステップと、スケール・ファクタ・バンドごとに、前記NMR決定ステップで決定されたNMRに対応する最大のスケール・ファクタを2分探索によって決定するスケール・ファクタ決定ステップと、前記スケール・ファクタ決定ステップで決定されたスケール・ファクタに基づいて算出した前記NMR候補値に対するレートと前記目標レートとの差分を評価して、前記NMR候補値が目標レートを超えない最小のNMRであるか否かを判断する評価ステップと、を含み、前記NMR決定ステップで、NMRを2分探索する際に候補となるNMR候補値が選定される都度、前記スケール・ファクタ決定ステップで、前記NMRの候補値に対するスケール・ファクタが決定され、前記評価ステップで前記NMR候補値が目標レートを超えない最小のNMRであると判断された場合は、前記NMR候補値を最適なNMRとして決定し、前記評価ステップで前記NMR候補値が目標レートを超えない最小のNMRでないと判断された場合は、前記NMR決定ステップから前記評価ステップまでを反復する、レート制御方法を提供する。
 このような構成によって、本発明のレート制御方法は、目標レートを満たすと同時に、できるだけNMRを一定にすなわち品質を一定にできる。
 本発明の第3の態様によると、入力信号から生成したフレームを複数のスケール・ファクタ・バンドに分割し、前記複数のスケール・ファクタ・バンドの各々をスケール・ファクタを用いて符号化を行う音声符号化方法において、ノイズ・エネルギーと所定の聴覚心理モデルに基づくマスク・エネルギーとの比であるNMRに基づくレート制御を行うレート制御処理をコンピュータに実行させるレート制御プログラムであって、前記レート制御処理は、目標レートを超えないNMRを2分探索によって決定するNMR決定ステップと、スケール・ファクタ・バンドごとに、前記NMR決定ステップで決定されたNMRに対応する最大のスケール・ファクタとレートを2分探索によって決定するスケール・ファクタ決定ステップと、前記スケール・ファクタ決定ステップで決定されたスケール・ファクタに基づいて算出した前記NMR候補値に対するレートと前記目標レートとの差分を評価して、前記NMR候補値が目標レートを超えない最小のNMRであるか否かを判断する評価ステップと、を含み、前記NMR決定ステップで、NMRを2分探索する際に候補となるNMR候補値が選定される都度、前記スケール・ファクタ決定ステップで、前記NMRの候補値に対するスケール・ファクタが決定され、前記評価ステップで前記NMR候補値が目標レートを超えない最小のNMRであると判断された場合は、前記NMR候補値を最適なNMRとして決定し、前記評価ステップで前記NMR候補値が目標レートを超えない最小のNMRでないと判断された場合は、前記NMR決定ステップから前記評価ステップまでを反復するようになっており、前記NMR決定ステップと前記評価ステップとを外部ループとして、前記スケール・ファクタ決定ステップを内部ループとしてコンピュータに実行させる、レート制御プログラムを提供する。このような構成によって、本発明のレート制御プログラムは、目標レートを満たすと同時に、できるだけNMRを一定にすなわち品質を一定にするようにコンピュータにレート制御を実行させることができる。
信号エネルギー、ノイズ・エネルギーとマスク・エネルギーの関係の一例を示す図である。 レートとNMRの関係を示す図である。 スケール・ファクタとNMRの関係の一例を示す図である。 目標NMRに対応するスケール・ファクタを求めるための2分探索木の一例を示す図である。 スケール・ファクタ・バンドごとのNMRの範囲を示す図である。 本発明の一実施の形態のレート制御装置を含むオーディオ符号化装置の機能ブロック図である。 図6のレート制御装置の概略機能ブロック図である。 図6のレート制御装置が実行する処理を説明するフローチャートである。 レート制御装置15のNMR決定部1の機能を実行させる外部ループの流れを説明するフローチャートである。 レート制御装置15のスケール・ファクタ決定部2の機能を実行させる内部ループの流れを説明するフローチャートである。 レート制御装置15のスケール・ファクタ決定部2の機能を実行させる、図10Aに続く内部ループの流れを説明するフローチャートである。 外部ループの疑似コードを示す図である。 外部ループの第1段の擬似コードを示す図である。 外部ループの第2段の擬似コードを示す図である。 内部ループの擬似コードを示す図である。 スケール・ファクタを2分探索で求める擬似コードを示す図である。 従来のレート制御装置が実行する外部ループの処理を説明するフローチャートである。 従来のレート制御装置が実行する内部ループの処理を説明するフローチャートである。
 以下、本発明の具体的な実施の形態について、図面を参照して詳細に説明する。
 まず、本発明のレート制御の原理について説明する。
<本発明のレート制御の原理>
 図1に信号エネルギー、ノイズ・エネルギーとマスク・エネルギーの関係の一例を示す。本明細書では特に断らない限りNMRとして、そのデシベル値NMRdBを用いる。NMRdBを以下のように定義する。
Figure JPOXMLDOC01-appb-M000001
 図1に示すように、NMRが正の場合、ノイズはマスクされない。一方で、NMRが負の場合、ノイズはマスクされる。典型的なビットレートでは、聴覚心理モデルによる要求を完全に満たすことはまれであり、正のNMRでレート制御することが多い。
 図2に、レートとNMRの関係を示す。図2に示すように、レート、すなわち符号量とNMRには負の相関があるが、必ずしも単調現象とはならない。レート、すなわち符号量もNMRも直接的に制御することはできず、スケール・ファクタを介して制御する。このため、2重のループを使ってレート制御を行ってもよい。
 この外部ループでは目標レート(Target Rate)を超えない最小のNMRを探索する。
 この探索は2段階からなる。第1の段階では、目標レートを飛び越えるまでより遠くのNMRの候補値を試す。図2の例ではNMRの候補値a、b、cを試して目標レートを挟むNMRの区間(b,c)を得ている。また、NMRの初期候補値aはNMRの予測値と等しくなるようにしてもよい。図2の例では予測値を0としている。目標レートを飛び越えるまで、NMRの候補値の間隔を徐々に増やしてもよい。NMRの予測値として、例えば、前のフレームを符号化する際に用いたNMRの値、又は前のフレームを符号化する際に用いたNMRに基づいて算出した値を用いてもよい。
 第2の段階では、区間(b,c)から2分探索を実行し、新たな候補値d,eについてレートを求め、区間を狭めていき((b,c)→(d,c)→(d,e))、目標レートを超えない最小のNMRを見つける。
 目標レートにはある程度の幅を持たせてもよい。目標最小符号量を、例えば、平均符号量の50%として、目標最大符号量を、例えば、平均符号量の200%として、符号量が目標最小符号量と目標最大符号量の範囲に収まるようにレート制御してもよい。目標最小符号量から目標最大符号量までの範囲の局所的な符号量、すなわちレートの変動は、ビット・リザバを使って吸収することができる。
 また、NMRの予測値は、フレームを符号化するごとに更新してもよい。例えば、ビット・リザバの目標値、例えばビット・リザバの最大占有量の80%からのずれに応じて、次のフレームの符号量を増減させるようにNMRの予測値をフィードバック制御してもよい。以上のようにして、短期的にレートを変動させることでNMR、あるいは品質をできるだけ一定に保ちながら、長期的には一定のレートで符号化できる。このようなレート制御の方式をABRと呼ぶ。
 図3に、スケール・ファクタ(SF:Scale Factor)とNMRの関係の一例を示す。図3に示すように、スケール・ファクタとNMRには正の相関があるが、必ずしも単調増加にはならない。ここで、あるバンドにおいて、周波数スペクトルの量子化値がすべて0になるスケール・ファクタのうち、最小のものを東(East)のスケール・ファクタ(東SF)と呼ぶ。図3においてE点がこれに相当する。このときNMRは最大になる。NMRは上述のAbSによって求めることができる。
 また、あるバンドにおいて、量子化値の絶対値が規定された最大値(AACでは8191)を超えない最小のスケール・ファクタを西(West)のスケール・ファクタ(西SF)と呼ぶ。図3においてW点がこれに相当する。このときNMRは最小になる。各バンドについて、内部ループを実行する前に、あらかじめ東西のスケール・ファクタとNMRの最大値、最小値を求めることができる。
 本実施の形態では、各バンドについて、2分探索を実行して目標NMRに対応するスケール・ファクタを求める。具体的には、目標NMRがそのバンドの最大NMRと最小NMRの間にあるときは、区間(W,E)から2分探索を実行し、与えられた目標NMRを超えない最大のスケール・ファクタを探索する。ただし、目標NMRがそのバンドの最大NMR以上の場合は、東のスケール・ファクタを用い、目標NMRが最小NMR以下の場合は、西のスケール・ファクタを用いる。図4に、目標NMRに対応するスケール・ファクタを求めるための2分探索木の一例を示す。
 図3の例では、(W,E)→(a,E)→(b,E)→(b,c)の順で区間が狭められている。この2分探索の過程は、例えば、図4のような2分探索木として保存される。内部ループが再度実行されたとき、保存された2分探索木をたどることで、AbSによるNMRの再計算を省くことができる。外部ループでは、2分探索のため、似通った目標NMRによって内部ループを繰り返し実行する。このため、内部ループの2分探索の反復では、高い確率で保存された2分探索木をたどることが期待でき、再計算を省略する効果も大きくなる。
 図5に、スケール・ファクタ・バンドごとのNMRの範囲を示す。図5において、縦軸はNMRを、横軸はSFB(Scale Factor Band:スケール・ファクタ・バンド)インデックスを表し、インデクスが大きいほどより高周波のスケール・ファクタ・バンドを表す。図5に示すように、一般にNMRの範囲はバンドごとに異なる。特に、高周波領域ではマスク・エネルギーが大きくなるため、NMRの最大値が0以下になることが多い。目標NMRが最大NMR以上又は最小NMR以下となるバンドでは、2分探索の必要はない。目標NMRが最大NMR以上となる場合、東のスケール・ファクタを用いて、すべての周波数スペクトルの量子化値を0とし、目標NMRがそのバンドの最大NMRを下回るような場合に初めてNMRの最小値、つまり西のスケール・ファクタにおけるNMRを計算するようにして、常に目標NMRがそのバンドの最大NMRを下回らないバンドでは、最小NMRの計算を省略してもよい。また、東西のスケール・ファクタは、そのバンドにおける周波数スペクトルの最大の絶対値から求めることができる。
<一実施の形態>
 図6に本発明の一実施の形態のレート制御装置を制御部に含むオーディオ符号化装置の機能ブロック図を示す。
 図6に示すように、オーディオ符号化装置10は、聴覚心理分析部11と、フィルタ・バンク12と、TNS(Temporal Noise Shaping:時間領域ノイズ整形)部13と、M/S(Middle/Side(ミドル/サイド))ステレオ部14と、本実施の形態のレート制御装置15と、量子化部16と、エントロピー符号化部17と、ビット・ストリーム生成部18を備える。オーディオ符号化装置10は、入力信号から生成したフレームを複数のスケール・ファクタ・バンドに分割し、複数のスケール・ファクタ・バンドの各々をスケール・ファクタを用いて符号化を行い、符号化ビット・ストリームをビット・ストリーム生成部18から出力する。
 音声信号は、聴覚心理分析部11とフィルタ・バンク12に入力される。聴覚心理分析部11は聴覚心理モデルに従って聴覚心理分析を行い、その結果に基づいて、フィルタ・バンク、TNS部13、M/Sステレオ部14などを含む符号化関連部と、制御部20などが動作する。
 フィルタ・バンク12は、オーディオ・サンプルからなる時間信号に時間周波数変換を実行し、周波数スペクトルに変換する。周波数スペクトルは、さらにいくつかの符号化関連部(図示されていない)に入力される。これらの符号化関連部は、復号に必要な補助情報をビット・ストリーム生成部18に出力する。図6では、説明を容易にするため、AACで使用可能なTNS部13及びM/Sステレオ部14以外の符号化関連部は省略している。
 こうして符号化関連部で処理された周波数スペクトルは、次に、量子化部16に入力される。量子化部16は周波数スペクトルを量子化し量子化スペクトルを生成し、エントロピー符号化部17に出力する。エントロピー符号化部17は量子化スペクトルをエントロピー符号化する。制御部20は、量子化部16とエントロピー符号化部17を制御して、レート制御を行う。具体的には、特に、レート制御装置15には、聴覚心理分析部11からスケール・ファクタ・バンドのマスク・エネルギーの情報が与えられる。さらに、後述する量子化部16からノイズ・エネルギーの情報が与えられる。レート制御装置15のスケール・ファクタ決定部2は、それぞれのスケール・ファクタ・バンドについて、AbSによって求めたノイズ・エネルギーと与えられたマスク・エネルギーとの比としてNMR(Noise-to-Mask Ratio)を算出する。さらに、算出したNMRを目標NMRと比較することで最適なスケール・ファクタを決定する。制御部20は、レート制御装置15から得られる最適なNMRに基づくスケール・ファクタとレートを用いて量子化部16とエントロピー符号化部17とを制御する。
 レート制御が終了すると、エントロピー符号化部17はビット・ストリーム生成部18に補助情報と符号化データとを出力する。すべての補助情報と符号化データとをまとめて、ビット・ストリーム生成部は符号化した音声ビット・ストリーム(Coded Audio Bit Stream)として出力する。
 図7に、本実施の形態のレート制御装置15の概略機能ブロック図を示す。レート制御装置15は、ノイズ・エネルギーと所定の聴覚心理モデルに基づくマスク・エネルギーとの比であるNMRに基づくレート制御を行うレート制御装置であって、目標レートを超えないNMRを2分探索によって決定するNMR決定部1と、スケール・ファクタ・バンドごとに、NMR決定部1によって決定したNMRに対応する最大のスケール・ファクタを2分探索によって決定するスケール・ファクタ決定部2と、を含み、NMR決定部1は、NMRを2分探索する際に候補となるNMR候補値を選定する都度、スケール・ファクタ決定部2がNMR候補値に対するスケール・ファクタを決定し、NMR決定部1は、スケール・ファクタ決定部で決定したスケール・ファクタに基づいて算出したNMR候補値に対するレートと目標レートとの差分に基づいて最小のNMRを最適なNMRとして決定するようになっている。
 図8は、本実施の形態のレート制御装置15が実行するレート制御処理を説明するフローチャートである。以下の処理はレート制御装置15に含まれる、図示されないCPUやCPU関連プログラムの制御の下で実行される。
 先ず、ステップS1で、NMR決定部1は2分探索によってNMR候補値を決定する。また、2分探索の第1段階の場合は、NMRの初期候補値として、例えば、前のフレームを符号化する際に用いたNMRを用いてもよい。
 ステップS2で、スケール・ファクタ決定部2は、スケール・ファクタ・バンドごとに、NMR決定部1によって決定したNMR候補値に対応する最大のスケール・ファクタを2分探索によって決定する。本実施の形態では、スケール・ファクタ決定部2はさらに、決定したスケール・ファクタに対応するレートも算出する。ただし、本発明はこれに限定されず、スケール・ファクタ決定部2が決定したスケール・ファクタに対応するレートは、他のいかなる構成部が算出してもよいことは当業者であれば明らかである。
 ステップS3で、NMR決定部1は、スケール・ファクタ決定部2で決定したスケール・ファクタに基づいて算出したNMR候補値に対するレートと目標レートとの差分を算出して比較する。
 ステップS4で、NMR決定部1は、ステップS3で行った目標レートと算出したレートとの差分に基づいて最適なNMR候補値が見つかったか否かを判定する。具体的には、NMR決定部1は、NMRの2分探索の区間が十分に狭められたときに最適なNMRの候補値が見つかったと判断する。
 ステップS4で最適なNMR候補値が見つかったと判断された場合は、ステップS5に進み、十分に狭められたNMRの2分探索の区間の東のNMRの候補値、すなわち、目標レートを超えない最小のNMRの候補値を最適なNMRとして出力する。一方で、ステップS4で、最適なNMRが見つかっていないと判断された場合、処理はステップS1に戻る。
 このように、本実施のレート制御装置15は、目標レートを超えないNMRを2分探索によって決定するNMR決定部1と、スケール・ファクタ・バンドごとに、NMR決定部によって決定したNMRに対応する最大のスケール・ファクタを2分探索によって決定するスケール・ファクタ決定部2と、を含み、NMR決定部1が、NMRを2分探索する際に候補となるNMR候補値を選定する都度、スケール・ファクタ決定部2がNMR候補値に対するスケール・ファクタとレートを決定し、NMR決定部1は、スケール・ファクタ決定部2で決定したスケール・ファクタに基づいて算出したNMR候補値に対するレートと目標レートとの差分に基づいて最小のNMRを最適なNMRとして決定する。このような構成により、本実施のレート制御装置15は、目標レートを満たすと同時に、可能な限りNMRを一定にする、すなわち品質を一定に保つことができる。
 ここで、NMR決定部1は、NMR予測値と、該NMR予測値に対して、対応するレートが目標レートを挟むようにして選定したNMR候補値により確定される区間から2分探索を開始する。また、スケール・ファクタ決定部2は、スケール・ファクタ・バンドごとに、NMRの範囲決定部が選定したNMR候補値に対して、周波数スペクトルの量子化値の絶対値が既定された最大値を超えないスケール・ファクタのうち最小のスケール・ファクタを西のスケール・ファクタとし、周波数スペクトルの量子化値がすべてゼロになるスケール・ファクタのうち最小のスケール・ファクタを東のスケール・ファクタとして算出し、西のスケール・ファクタと東のスケール・ファクタとによって画定される区間からNMRに対応する最大のスケール・ファクタの2分探索を開始する。このため、本実施の形態のレート制御装置15は、2分探索を行う区間を効果的に短縮することができる。
 また、スケール・ファクタ決定部2は、スケール・ファクタ決定部が算出した西のスケール・ファクタと東のスケール・ファクタに基づいてNMRの最小値と最大値を算出し、スケール・ファクタ決定部2は、NMR候補値に対して算出したスケール・ファクタが西のスケール・ファクタを下回る場合は西のスケール・ファクタをNMR候補値に対するスケール・ファクタとして決定し、NMR候補値に対して算出したスケール・ファクタが東のスケール・ファクタを下回る場合は西のスケール・ファクタをNMR候補値に対するスケール・ファクタとして決定する。
 さらに、レート制御装置15は、スケール・ファクタ決定部2が実行する2分検索の過程を記憶する記憶部3を備え、スケール・ファクタ決定部2は、記憶部3に記憶された2分検索の過程に基づいて2分検索を実行する。また、目標レートは、所定の範囲で変動可能としてもよい。目標レートにある程度の幅を持たせれば、NMR決定部2はまずNMRの予測値を用いて符号量を計算し、その符号量が目標レート内にあるときはこのNMRの予測値を最適なNMRとして決定して、2分探索せずにレート制御を終了してもよい。例えば、ビット・リザバの目標値、例えばビット・リザバの最大値の80%からのずれに応じて、次のフレームの符号量、すなわち、目標レートを増減させるようにNMR決定部をフィードバック制御することもできる。短期的にレートを変動させることでNMR、あるいは信号の品質をできるだけ一定に保ちながら、長期的には一定のレートで符号化できる。
 さらに、NMR決定部1は、フレームが符号化されるごとに、NMRの予測値を更新するようにしてもよい。NMRの予測値を、例えば、フレームを符号化するごとにビット・リザバの目標値からの変動に応じて修正する。ほぼ一定のNMRの予測値に基づいてスケール・ファクタを決定するので、品質をできるだけ一定に保ちながら、短期的なレート変動はビット・リザバで吸収し、長期的には一定のレートになるように制御できる。このようにビット・リザバを有効に活用することが可能となり、より適応的なレート制御が実現できる。
 なお、本発明のレート制御装置15は、CPUとメモリを含む、一般的なコンピュータを上述した各手段として機能させるレート制御プログラムによって実現させることができる。かかるレート制御プログラムは、通信回線を介して配布することも可能であるし、CD-ROMなどの記録媒体に書き込んで配布することも可能である。
 本実施の形態では、CPUとメモリを含むコンピュータに、レート制御装置15のNMR決定部1の機能を外部ループとして、レート制御装置15のスケール・ファクタ決定部2の機能を内部ループとして実現させる場合を想定して説明を続ける。
 図9は、CPUとメモリを含むコンピュータに、レート制御装置15のNMR決定部1の機能を実行させる外部ループの流れを説明するフローチャートである。以下の処理はメモリに含まれるプログラムに従って、CPUの制御の下で実行される。
 まず、NMR予測値をNMR候補値とし(S11)、NNMR候補値について内部ループを実行し、NMR候補値のレートを取得する(S12)。NMR候補値のレートが目標レートより大きいか否かを判定し(S13)、NMR候補値のレートが目標レートを超えると判定すると、NMR候補値を西のNMRとし、NMR候補値を所定の値だけ増加させる(S14)。一方で、NMR候補値のレートが目標レートを超えないと判定すると、NMR候補値を東のNMRとし、NMR候補値を所定の値だけ減少させる(S15)。
 続いて、東西のNMRが両方みつかったか否かを判定し(S16)、見つかっていないと判定した場合はステップS12に戻り、見つかったと判定した場合は、東西のNMRの差が十分に小さいか否かを判定する(S17)。東西のNMRの差が十分に小さいか否かは、例えば、東西のNMRの差を所定の値と比較して、所定の値を下回る場合は東西のNMRの差が十分に小さいと判定し、所定の値以上の場合は東西のNMRの差が十分に小さいくはないと判定する。東西のNMRの差が十分に小さいと判定した場合、東のNMRとレートを、それぞれ、最適なNMRとレートとし(S23)、処理を終了する。東西のNMRの差が十分に小さくはないと判定した場合は、東西のNMRの平均値を、NMR候補値とする(S18)。NMR候補値について内部ループを実行し、NMR候補値のレートを得る(S19)。NMR候補値のレートが目標レートを超えるか否かを判定し(S20)、NMR候補値のレートが目標レートを超える判定した場合は、NMR候補値を西のNMRとし(S21)、NMR候補値のレートが目標レートを超えないと判定した場合は、NMR候補値を東のNMRとする(S22)。次に、ステップS17に戻る。
 図10A及び10Bは、CPUとメモリを含むコンピュータに、レート制御装置15のNMR決定部1の機能を実行させる外部ループの流れを説明するフローチャートである。
 まず、最初のスケール・ファクタ・バンドを、処理対象のスケール・ファクタ・バンドとする(S31)。続いて処理対象のスケール・ファクタ・バンドに対応する東西のNMRとスケール・ファクタを、それぞれ、処理対象の東西のNMRとスケール・ファクタとする(S32)。処理対象のスケール・ファクタ・バンドの二分探索木のルートを、処理対象の二分探索木として用いる(S33)。
 次に、東のNMRが目標NMR以下であるか否かを判定する(S34)。東のNMRが目標NMR以下であると判定した場合は、東のスケール・ファクタを、処理対象のスケール・ファクタ・バンドのスケール・ファクタとして用いて(S35)、処理はステップS48に進む。東のNMRが目標NMRを上回ると判定した場合は、西のNMRが目標NMR以上であるか否かを判定する(S36)。西のNMRが目標NMR以上であると判定した場合は、西のスケール・ファクタを、処理対象のスケール・ファクタ・バンドのスケール・ファクタとして用いて(S37)、処理はステップS48に進む。
 次に、東西のスケール・ファクタの差が十分小さいか否かを判定し(S38)、東西のスケール・ファクタの差が十分小さいと判定した場合、処理はステップS47に進む。東西のスケール・ファクタの差が十分小さくはないと判定した場合は、東西のスケール・ファクタの平均値を、スケール・ファクタ候補値とする(S39)。東西のスケール・ファクタの差が十分に小さいか否かは、例えば、東西のスケール・ファクタの差を所定の値と比較して、所定の値を下回る場合は東西のスケール・ファクタの差が十分に小さいと判定し、所定の値以上の場合は東西のスケール・ファクタの差が十分に小さいくはないと判定する。
 次に、二分探索木のルートに、スケール・ファクタ候補値に対応するノードが存在するか否かを判定し(S40)、二分探索木のルートに、スケール・ファクタ候補値に対応するノードが存在すると判定した場合、処理はステップS43に進む。二分探索木のルートに、スケール・ファクタ候補値に対応するノードが存在しないと判定した場合は、処理対象のスケール・ファクタ・バンドをスケール・ファクタ候補値で量子化したときの量子化スペクトルを求め、さらに、量子化スペクトルからAbSによってNMRを求める(S41)。さらに、求めた量子化スペクトルとNMRを含む、スケール・ファクタ候補値に対応するノードを、二分探索木のルートに追加する(S42)。スケール・ファクタ候補値に対応するノードから、スケール・ファクタ候補値のNMRを取り出す(S43)。
 続いて、スケール・ファクタ候補値のNMRが目標NMRを超えるか否かを判定し(S44)、スケール・ファクタ候補値のNMRが目標NMRを超えると判定した場合は、スケール・ファクタ候補値を東のスケール・ファクタとし、二分探索木を西にたどり(S45)、処理はステップS38に進む。スケール・ファクタ候補値のNMRが目標NMRを越えていないと判定した場合は、スケール・ファクタ候補値を西のスケール・ファクタとし、二分探索木を東にたどり(S46)、処理はステップS38に進む。
 ステップS38で東西のスケール・ファクタの差が十分小さいと判定した場合、西のスケール・ファクタを、処理対象のスケール・ファクタ・バンドのスケール・ファクタとして用いる(S47)。次のスケール・ファクタ・バンドが存在するか否かを判定し(S48)、次のスケール・ファクタ・バンドが存在すると判定した場合は、次のスケール・ファクタ・バンドを、処理対象のスケール・ファクタ・バンドとして(S49)、処理はステップS32に戻る。一方で次のスケール・ファクタ・バンドが存在しないと判定した場合は、求めたスケール・ファクタの組み合わせにおけるレートを計算する(S50)。
 図11に、CPUとメモリを含むコンピュータにMNR決定部1の機能を実行させる外部ループの流れを説明する擬似コードを示す。
 外部ループでは、NMRを変化させて、処理対象のフレームのレートが目標レート以下になるようにレート制御を行う。以下では特に断らない限り、NMRとしてデシベル値を用い、NMRを変化させる最小単位をΔNMRで表すものとする(例えばΔNMR=0.3dB)。量子化したNMRをiとすると、対応するNMRの値は逆量子化iΔNMRで求められる。
 関数outer_loop()は、量子化NMRの初期値(予測値)と目標レートの組を引数に受け取る。まず、outer_loop_first()が2分探索を行う区間、すなわち、東西の量子化NMRとそれらに対応するレートを決定する。NMRmaxとNMRminは、それぞれ、処理対象のフレームがとりうる最大と最小のNMRを表し、
Figure JPOXMLDOC01-appb-M000002

Figure JPOXMLDOC01-appb-M000003
は、それぞれ、そのフレームがとりうる最大と最小の量子化NMRを表す。
Figure JPOXMLDOC01-appb-M000004
2分探索の区間が決定されると、次に、outer_loop_second()が2分探索を実行し、最適な量子化NMRとそのときのレートの組を返す。目標レートがそのフレームのとりうるレートの範囲にない場合、2分探索の区間が決定できない。最大レートが目標レートを下回る場合、すなわち西の点が決定できない場合、最大レートとなる東の点を最適値として返す。最小レートが目標レートを上回る場合、すなわち東の点が決定できない場合、すべてのスペクトルとその他の補助情報を省略することを示す、特別な量子化NMRΙと、そのときの符号量の組を返す。
 量子化NMRがΙ以上のとき、レートはフレームの内容によらずある一定の値(これをレートの下限と呼ぶ)以下となるので、目標レートを常に下限以上にすることでレート制御が成功すること(目標レート以下にレート制御できること)を保証できる。
 図12に、外部ループの第1段階の流れを説明する擬似コードを示す。関数outer_loop_first()は、順に、量子化NMRの初期値、目標レート、量子化NMRの最大値、量子化NMRの最小値を引数にとる。outer_loop_first()は、初期値から初めて、量子化NMRを徐々に変化させて、目標レートを挟む区間を探す。探索を終えると、西と東の量子化NMRとレートを返す。関数inner_loop()は与えられた量子化NMRにおけるレートを計算する。量子化NMRの変化量kは、目標レートと実際のレートのずれによって決まる値に初期化され、一定の割合(例えば1.5倍)で増加する。定数DBRはレート1ビットあたりのNMRの変化量、又はNMRの変化量の近似値を表す。例えば、1サンプルあたりの符号量を1ビット増加させると6dBのNMRの改善が得られると仮定すると、1024サンプルのデータを含むフレームについて、DBR=6/1024となる。
 図13に、外部ループの第2段階の流れを説明する擬似コードを示す。関数outer_loop_second()は、2分探索の区間(西と東の量子化NMRとレート)と目標レートを引数にとる。目標レートを上回らない最小の量子化NMR(これを最適化された量子化NMRと呼ぶ)を2分探索によって見つけ、最適化された量子化NMRとそのときのレートの組を返す。具体的には、NMRの2分探索の範囲が十分に狭められたとき、すなわち、東西の量子化NMRの差が1になったとき、西の量子化NMRと西のレートの組を返す。
 図14に、CPUとメモリを含むコンピュータにスケール・ファクタ決定部2の機能を実行させる内部ループの流れを説明する擬似コードを示す。関数inner_loop()は(目標)量子化NMRを引数にとる。量子化NMRがΙ以上であれば、関数simulate_zero()によって計算されたレートを返す。関数simulate_zero()は、すべてのスペクトルとその他の補助情報を省略したときのレートを計算する。量子化NMRがΙより小さければ、以下のようにレートを求める。まず、スケール・ファクタ・バンドごとに、与えられたNMRを上回らない最大のスケール・ファクタを、関数allocate_noise()によって見つける。次に、allocate_noise()によって求めたスケール・ファクタの組み合わせについて、レートを関数simulate()によって計算する。ROOTはj番目のバンドの2分探索木のルートノードを表し、&ROOTはそのノードへのポインタを表す。SFBはj番目のバンドのスペクトルなどのデータを表す。SF westとSF eastは、それぞれ、j番目のバンドの西と東のスケール・ファクタを表す。NMR westとNMR eastは、それぞれ、j番目のバンドの西と東のNMRを表す。関数simulate_zero()とsimulate()については擬似コードを省略する。なお、常に目標NMRがそのバンドの最大NMRを下回らないようなバンドでは、最小NMRを計算する必要はない。
 図15に、スケール・ファクタを2分探索で求める流れを説明する擬似コードを示す。関数allocate_noise()は、順に、2分探索木のルートノードへのポインタ、スケール・ファクタ・バンドのデータ、西のスケール・ファクタ、東のスケール・ファクタ、西のNMR、東のNMR、目標NMRを引数にとる。引数ttにはルートノードへのポインタが渡されるので、ttに対する変更が呼び出し元に反映される。
 関数allocate_noise()は、目標NMRが東と西のNMRの間に存在しなければ、東か西のスケール・ファクタどちらか目標NMRに近いものを返す。目標NMRが東西の間にあれば、2分探索でスケール・ファクタを見つける。ルートノードを含む2分探索木のノードには、最初は、メモリが割り当てられておらず、探索の過程で、新たなノードをたどったときにメモリが割り当てられる。t=φが真ならメモリが割り当てられていない。ノードtはt≠φのとき、少なくとも、そのノードにおけるNMR t:nmr、西の子ノードt:nodewestと東の子ノードt:nodeeastにアクセスできる。
 関数new_node()は、スケール・ファクタ・バンドsfbをスケール・ファクタsfで量子化したときのNMRを持つノードを返す(子ノードにはどちらもφを設定する)。AACではスケール・ファクタsfに対応する量子化ステップはq=2sf/4で表される。これは約1.5dBで量子化を制御できることを意味する。ノードに量子化されたスペクトルをさらに含めることによって、レート制御後の符号生成において量子化を繰り返さないようにして計算を省いてもよい。関数new_node()の擬似コードは省略する。
 以上説明したように、本実施の形態のレート制御装置は、目標レートを超えない最小のNMRを2分探索によって決定するNMR決定部と、NMR決定部によって決定したNMRに対応する最大のスケール・ファクタを2分探索によって決定するスケール・ファクタ決定部と、を含み、NMR決定部は、NMRを2分探索する際に候補となるNMR候補値を選定する都度、スケール・ファクタ決定部がNMR候補値に対するスケール・ファクタを決定し、NMR決定部は、スケール・ファクタ決定部で決定したスケール・ファクタに基づいて算出したNMR候補値に対するレートと目標レートとの差分に基づいて最小のNMRを決定するため、本実施の形態のレート制御装置は、目標レートと同時にNMRの要件、すなわち品質の要件を満たすことができる。目標レートを下回るNMRを2分探索で求め、こうして求めたNMRに基づいてスケール・ファクタを決定するので、ある程度の幅のレートの変動に対しても対応することができ、ビット・リザバを有効に活用することができる。
 以上、本発明について様々な実施の形態を、図面を参照して詳述してきたが、具体的な構成はこれらの実施の形態に限られるものではない。本発明の目的を実現可能な範囲における様々な変形、改良などは本発明の範囲に含まれる。例えば、上述の実施の形態では、AACに従って符号化を行う音声符号化装置の場合について説明したが、本発明はAACに従った符号化方式に限定されず、ノイズ・エネルギーとマスク・エネルギーとに基づくレート制御に適用可能である
 1   NMR決定部
 2   スケール・ファクタ決定部
 3   記憶部
 10  オーディオ符号化装置(音声符号化装置)
 11  聴覚心理分析部
 12  フィルタ・バンク
 13  TNS部
 14  M/Sステレオ部
 15  レート制御装置
 16  量子化部
 17  エントロピー符号化部
 18  ビット・ストリーム生成部
 20  制御部
 

Claims (10)

  1.  入力信号から生成したフレームを複数のスケール・ファクタ・バンドに分割し、前記複数のスケール・ファクタ・バンドの各々をスケール・ファクタを用いて符号化を行う音声符号化装置において、ノイズ・エネルギーと所定の聴覚心理モデルに基づくマスク・エネルギーとの比であるNMRに基づくレート制御を行うレート制御装置であって、
     目標レートを超えないNMRを2分探索によって決定するNMR決定部と、
     スケール・ファクタ・バンドごとに、前記NMR決定部によって決定したNMRに対応する最大のスケール・ファクタを2分探索によって決定するスケール・ファクタ決定部と、
    を含み、
     前記NMR決定部が、NMRを2分探索する際に候補となるNMR候補値を選定する都度、前記スケール・ファクタ決定部が前記NMR候補値に対するスケール・ファクタとレートを決定し、
    前記NMR決定部は、前記スケール・ファクタ決定部で決定したスケール・ファクタに基づいて算出した前記NMR候補値に対するレートと前記目標レートとの差分に基づいて目標レートを超えない最小のNMRを最適なNMRとして決定する、前記レート制御装置。
  2.  前記NMR決定部は、
     NMR予測値と、該NMR予測値に対するレートに対して対応するレートが前記目標レートを挟むようにして選定したNMR候補値により確定される区間から、2分探索を開始する、請求項1記載のレート制御装置。
  3.  前記スケール・ファクタ決定部は、
     スケール・ファクタ・バンドごとに、周波数スペクトルの量子化値の絶対値が既定された最大値を超えないスケール・ファクタのうち最小のスケール・ファクタを西のスケール・ファクタとし、周波数スペクトルの量子化値がすべてゼロになるスケール・ファクタのうち最小のスケール・ファクタを東のスケール・ファクタとして算出し、前記西のスケール・ファクタと前記東のスケール・ファクタとによって画定される区間から、前記NMR決定部が選定したNMR候補値に対応する最大のスケール・ファクタの2分探索を開始する、請求項1記載のレート制御装置。
  4.  前記スケール・ファクタ決定部は、前記スケール・ファクタ決定部が算出した西のスケール・ファクタと東のスケール・ファクタに基づいてNMRの最小値と最大値を算出し、
     前記スケール・ファクタ決定部は、
     前記NMR候補値が最小のNMRを下回る場合は前記西のスケール・ファクタを前記NMR候補値に対するスケール・ファクタとして決定し、
     前記NMR候補値が最大のNMRを上回る場合は前記東のスケール・ファクタを前記NMR候補値に対するスケール・ファクタとして決定する、請求項3記載のレート制御装置。
  5.  さらに、前記スケール・ファクタ決定部が実行する2分検索の過程を記憶する記憶部を備え、
     前記スケール・ファクタ決定部は、前記記憶部に記憶された2分検索の過程に基づいて2分検索を実行する、請求項1記載のレート制御装置。
  6.  前記目標レートは、所定の範囲で変動可能である、請求項1記載のレート制御装置。
  7.  前記NMR決定部は、NMR予測値に基づいて算出したレートが前記所定の範囲の中にある場合、前記NMRを最適なNMRとして決定する、請求項6記載のレート制御装置。
  8.  前記NMR決定部は、前記フレームが符号化されるごとに、NMRの予測値を更新する、請求項1記載のレート制御装置。
  9.  入力信号から生成したフレームを複数のスケール・ファクタ・バンドに分割し、前記複数のスケール・ファクタ・バンドの各々をスケール・ファクタを用いて符号化を行う音声符号化方法において、ノイズ・エネルギーと所定の聴覚心理モデルに基づくマスク・エネルギーとの比であるNMRに基づくレート制御を行うレート制御方法であって、
     目標レートを超えないNMRを2分探索によって決定するNMR決定ステップと、
     スケール・ファクタ・バンドごとに、前記NMR決定ステップで決定されたNMRに対応する最大のスケール・ファクタを2分探索によって決定するスケール・ファクタ決定ステップと、
     前記スケール・ファクタ決定ステップで決定されたスケール・ファクタに基づいて算出した前記NMR候補値に対するレートと前記目標レートとの差分を評価して、前記NMR候補値が目標レートを超えない最小のNMRであるか否かを判断する評価ステップと、
    を含み、
     前記NMR決定ステップで、NMRを2分探索する際に候補となるNMR候補値が選定される都度、前記スケール・ファクタ決定ステップで、前記NMRの候補値に対するスケール・ファクタが決定され、
     前記評価ステップで前記NMR候補値が目標レートを超えない最小のNMRであると判断された場合は、前記NMR候補値を最適なNMRとして決定し、
     前記評価ステップで前記NMR候補値が目標レートを超えない最小のNMRでないと判断された場合は、前記NMR決定ステップから前記評価ステップまでを反復する、前記レート制御方法。
  10.  入力信号から生成したフレームを複数のスケール・ファクタ・バンドに分割し、前記複数のスケール・ファクタ・バンドの各々をスケール・ファクタを用いて符号化を行う音声符号化方法において、ノイズ・エネルギーと所定の聴覚心理モデルに基づくマスク・エネルギーとの比であるNMRに基づくレート制御を行うレート制御処理をコンピュータに実行させるレート制御プログラムであって、
     前記レート制御処理は、
     目標レートを超えないNMRを2分探索によって決定するNMR決定ステップと、
     スケール・ファクタ・バンドごとに、前記NMR決定ステップで決定されたNMRに対応する最大のスケール・ファクタとレートを2分探索によって決定するスケール・ファクタ決定ステップと、
     前記スケール・ファクタ決定ステップで決定されたスケール・ファクタに基づいて算出した前記NMR候補値に対するレートと前記目標レートとの差分を評価して、前記NMR候補値が目標レートを超えない最小のNMRであるか否かを判断する評価ステップと、
    を含み、
     前記NMR決定ステップで、NMRを2分探索する際に候補となるNMR候補値が選定される都度、前記スケール・ファクタ決定ステップで、前記NMRの候補値に対するスケール・ファクタが決定され、
     前記評価ステップで前記NMR候補値が目標レートを超えない最小のNMRであると判断された場合は、前記NMR候補値を最適なNMRとして決定し、
     前記評価ステップで前記NMR候補値が目標レートを超えない最小のNMRでないと判断された場合は、前記NMR決定ステップから前記評価ステップまでを反復するようになっており、
     前記NMR決定ステップと前記評価ステップとを外部ループとして、前記スケール・ファクタ決定ステップを内部ループとしてコンピュータに実行させる、レート制御プログラム。
PCT/JP2009/003966 2009-08-20 2009-08-20 レート制御装置、レート制御方法及びレート制御プログラム WO2011021238A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2011527482A JP5539992B2 (ja) 2009-08-20 2009-08-20 レート制御装置、レート制御方法及びレート制御プログラム
US13/391,264 US9159330B2 (en) 2009-08-20 2009-08-20 Rate controller, rate control method, and rate control program
PCT/JP2009/003966 WO2011021238A1 (ja) 2009-08-20 2009-08-20 レート制御装置、レート制御方法及びレート制御プログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2009/003966 WO2011021238A1 (ja) 2009-08-20 2009-08-20 レート制御装置、レート制御方法及びレート制御プログラム

Publications (1)

Publication Number Publication Date
WO2011021238A1 true WO2011021238A1 (ja) 2011-02-24

Family

ID=43606709

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2009/003966 WO2011021238A1 (ja) 2009-08-20 2009-08-20 レート制御装置、レート制御方法及びレート制御プログラム

Country Status (3)

Country Link
US (1) US9159330B2 (ja)
JP (1) JP5539992B2 (ja)
WO (1) WO2011021238A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013206924A (ja) * 2012-03-27 2013-10-07 Lapis Semiconductor Co Ltd 基準電圧調整部を含む半導体集積装置及び基準電圧調整方法

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10553228B2 (en) * 2015-04-07 2020-02-04 Dolby International Ab Audio coding with range extension
US10950251B2 (en) * 2018-03-05 2021-03-16 Dts, Inc. Coding of harmonic signals in transform-based audio codecs
US10762910B2 (en) 2018-06-01 2020-09-01 Qualcomm Incorporated Hierarchical fine quantization for audio coding

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0651795A (ja) * 1992-03-02 1994-02-25 American Teleph & Telegr Co <Att> 信号量子化装置及びその方法
JPH07210195A (ja) * 1993-12-30 1995-08-11 Internatl Business Mach Corp <Ibm> 高品質ディジタル・オーディオの効率的な圧縮のための方法および装置
JPH10136362A (ja) * 1996-10-29 1998-05-22 Sony Corp データ圧縮装置およびディジタルビデオ信号処理装置
JPH10207489A (ja) * 1997-01-22 1998-08-07 Sharp Corp デジタルデータの符号化方法
JP2000501846A (ja) * 1995-12-01 2000-02-15 デジタル・シアター・システムズ・インコーポレーテッド 心理音響学的アダプティブ・ビット割り当てを用いたマルチ・チャネル予測サブバンド・コーダ
JP2004172770A (ja) * 2002-11-18 2004-06-17 Tokai Univ 量子化ステップパラメータ決定装置と量子化ステップパラメータ決定方法と量子化ステップパラメータ決定プログラム、ならびに非線形量子化方法と非線形量子化装置と非線形量子化プログラム

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100261253B1 (ko) * 1997-04-02 2000-07-01 윤종용 비트율 조절이 가능한 오디오 부호화/복호화 방법및 장치
JP3352406B2 (ja) * 1998-09-17 2002-12-03 松下電器産業株式会社 オーディオ信号の符号化及び復号方法及び装置
SG120118A1 (en) * 2003-09-15 2006-03-28 St Microelectronics Asia A device and process for encoding audio data
US8332216B2 (en) * 2006-01-12 2012-12-11 Stmicroelectronics Asia Pacific Pte., Ltd. System and method for low power stereo perceptual audio coding using adaptive masking threshold
US8374857B2 (en) * 2006-08-08 2013-02-12 Stmicroelectronics Asia Pacific Pte, Ltd. Estimating rate controlling parameters in perceptual audio encoders

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0651795A (ja) * 1992-03-02 1994-02-25 American Teleph & Telegr Co <Att> 信号量子化装置及びその方法
JPH07210195A (ja) * 1993-12-30 1995-08-11 Internatl Business Mach Corp <Ibm> 高品質ディジタル・オーディオの効率的な圧縮のための方法および装置
JP2000501846A (ja) * 1995-12-01 2000-02-15 デジタル・シアター・システムズ・インコーポレーテッド 心理音響学的アダプティブ・ビット割り当てを用いたマルチ・チャネル予測サブバンド・コーダ
JPH10136362A (ja) * 1996-10-29 1998-05-22 Sony Corp データ圧縮装置およびディジタルビデオ信号処理装置
JPH10207489A (ja) * 1997-01-22 1998-08-07 Sharp Corp デジタルデータの符号化方法
JP2004172770A (ja) * 2002-11-18 2004-06-17 Tokai Univ 量子化ステップパラメータ決定装置と量子化ステップパラメータ決定方法と量子化ステップパラメータ決定プログラム、ならびに非線形量子化方法と非線形量子化装置と非線形量子化プログラム

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013206924A (ja) * 2012-03-27 2013-10-07 Lapis Semiconductor Co Ltd 基準電圧調整部を含む半導体集積装置及び基準電圧調整方法

Also Published As

Publication number Publication date
US9159330B2 (en) 2015-10-13
JPWO2011021238A1 (ja) 2013-01-17
US20120263312A1 (en) 2012-10-18
JP5539992B2 (ja) 2014-07-02

Similar Documents

Publication Publication Date Title
RU2696292C2 (ru) Аудиокодер и декодер
JP5474088B2 (ja) スケーラブルエンコーダでのノイズ変換を伴う音声デジタル信号の符号化
KR101190875B1 (ko) 차원 벡터 및 가변 분해능 양자화
US5206884A (en) Transform domain quantization technique for adaptive predictive coding
KR100304092B1 (ko) 오디오 신호 부호화 장치, 오디오 신호 복호화 장치 및 오디오 신호 부호화/복호화 장치
CN101057275B (zh) 矢量变换装置以及矢量变换方法
JP6452759B2 (ja) 先進量子化器
US20110075855A1 (en) method and apparatus for processing audio signals
KR101693280B1 (ko) 오디오 데이터 처리 방법, 장치 및 시스템
JPWO2005111568A1 (ja) 符号化装置、復号化装置、およびこれらの方法
JP3636094B2 (ja) 信号符号化装置及び方法、並びに信号復号装置及び方法
JP2007193043A (ja) 音声符号化装置、音声復号装置、音声符号化方法及び音声復号方法
JP2002023799A (ja) 音声符号化装置及びそれに用いる心理聴覚分析方法
JP5539992B2 (ja) レート制御装置、レート制御方法及びレート制御プログラム
CN115867966A (zh) 用于确定生成神经网络的参数的方法和装置
JPH1130998A (ja) オーディオ信号符号化装置,及び復号化装置、オーディオ信号符号化・復号化方法
JP4359949B2 (ja) 信号符号化装置及び方法、並びに信号復号装置及び方法
JP4273062B2 (ja) 符号化方法、符号化装置、復号化方法及び復号化装置
RU2793725C2 (ru) Аудиокодер и декодер
JP2001148632A (ja) 符号化装置、符号化方法、及びその記録媒体
JP4626261B2 (ja) 音声符号化装置及び音声符号化方法
JP2002311993A (ja) オーディオ符号化装置
SECTOR et al. ITU-Tg. 711.0
JP2002221997A (ja) オーディオ信号符号化方法
JPH03243996A (ja) 音声認識装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09848442

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2011527482

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 13391264

Country of ref document: US

122 Ep: pct application non-entry in european phase

Ref document number: 09848442

Country of ref document: EP

Kind code of ref document: A1