Encoding method of multi-channel signal and encoder
By determining multi-channel parameters based on both current frame characteristics and previous frame differences, the method stabilizes parameters, addressing instability issues in PS coding and improving audio encoding quality.
Patent Information
- Application Number
- JP2025132508
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2016-08-10
- Filing Date
- 2025-08-07
- Publication Date
- 2025-11-18
Smart Images

Figure 2025170283000001_ABST
Abstract
Description
[Technical Field]
[0001] This application claims priority to Chinese Patent Application No. 201610652506.X, entitled "MULTI-CHANNEL SIGNAL ENCODING METHOD AND ENCODER," filed with the China Patent Office on August 10, 2016, and is incorporated herein by reference in its entirety.
[0002] The present application relates to the field of coding of audio signals, and in particular to a method and encoder for coding multi-channel signals. [Background technology]
[0003] The improvement of quality of life is accompanied by an increasing demand for high-quality audio. Compared with mono signals, stereo signals are more popular because they can provide a sense of directionality and distribution of the sound source, improving clarity, intelligibility, and immediacy of sound.
[0004] Stereo processing techniques mainly include Mid / Sid (MS) coding, Intensity Stereo (IS) coding, and Parametric Stereo (PS) coding.
[0005] In MS coding, mid / side conversion is performed on two signals based on inter-channel coherence, and the channel energy is mainly concentrated in the mid-channel, eliminating inter-channel redundancy. In MS coding technology, the reduction of the coding rate depends on the coherence between the input signals. If the coherence between the left and right channel signals is poor, the left and right channel signals need to be transmitted separately.
[0006] IS coding simplifies the high-frequency components of the left and right channel signals, based on the fact that the human auditory system is not sensitive to phase differences between high-frequency components (e.g., components above 2 kHz). However, IS coding is only effective for high-frequency components. If IS coding is extended to low frequencies, serious artifacts will occur.
[0007] PS coding is a coding method based on the binaural auditory model. As shown in Figure 1 (where xL is the time-domain signal for the left channel and xR is the time-domain signal for the right channel), the encoder converts the stereo signal into a mono signal and several spatial parameters (or spatial perception parameters) that describe the spatial sound field. As shown in Figure 2, after obtaining the mono signal and spatial parameters, the decoder restores the stereo signal by referring to the spatial parameters. Compared to MS coding, PS coding has a higher compression ratio. Therefore, PS coding can achieve a higher coding gain while maintaining relatively good sound quality. Furthermore, PS coding can be performed across the entire audio bandwidth and effectively restore the stereo spatial perception effect.
[0008] In PS coding, multichannel parameters (also known as spatial parameters) include inter-channel coherence (IC), inter-channel level difference (ILD), inter-channel time difference (ITD), overall phase difference (OPD), and inter-channel phase difference (IPD). IC represents inter-channel cross-correlation or coherence. This parameter determines the perception of sound field range and can improve the spatiality and sound stability of audio signals. ILD is used to distinguish the horizontal orientation of stereo sound sources and represents the energy difference between channels. This parameter affects the frequency components of the entire spectrum. ITD and IPD are spatial parameters that represent the horizontal orientation of sound sources and represent the time difference and phase difference between channels. ILD, ITD, and IPD can determine the human ear's perception of sound source location and can be used to effectively determine sound field location, playing an important role in stereo signal restoration.
[0009] In the stereo recording process, the multi-channel parameters calculated using existing PS coding methods are always unstable (the multi-channel parameter values change frequently and rapidly) due to factors such as background noise, reverberation, and multiple conversations. The downmix signal calculated based on such multi-channel parameters is discontinuous. As a result, the stereo quality obtained at the decoder side is poor. For example, the stereo sound image reproduced at the decoder side frequently jitters, and even auditory freezing occurs. Summary of the Invention [Means for solving the problem]
[0010] This application provides a method and an encoder for encoding a multi-channel signal to improve the stability of multi-channel parameters in PS encoding, thereby improving the encoding quality of an audio signal.
[0011] According to a first aspect, there is provided a multi-channel signal encoding method, the method comprising: obtaining a multi-channel signal of a current frame; determining initial multi-channel parameters for a current frame; determining difference parameters based on initial multi-channel parameters of the current frame and multi-channel parameters of K frames previous to the current frame, where the difference parameters are used to represent differences between the initial multi-channel parameters of the current frame and the multi-channel parameters of the K frames previous to the current frame, where K is an integer greater than or equal to 1; determining multi-channel parameters for the current frame based on the differential parameters and the characteristic parameters of the current frame; encoding the multi-channel signal based on the multi-channel parameters of the current frame; Includes:
[0012] The multi-channel parameters of the current frame are determined by comprehensively considering the characteristic parameters of the current frame and the differences between the current frame and the previous K frames. This determination method is more appropriate than directly reusing the multi-channel parameters of the previous frame for the current frame, and can more reliably ensure the accuracy of the inter-channel information of the multi-channel signal.
[0013] Referring to the first aspect, in some implementation forms of the first aspect, the step of determining the multi-channel parameters of the current frame based on the differential parameters and the characteristic parameters of the current frame includes: determining multi-channel parameters of the current frame based on the characteristic parameters of the current frame if the difference parameters satisfy the first preset condition; Includes:
[0014] Referring to the first aspect, in some implementation forms of the first aspect, the difference parameter is an absolute value of a difference between an initial multi-channel parameter of a current frame and a multi-channel parameter of a frame preceding the current frame, and the first preset condition is that the difference parameter is greater than a preset first threshold.
[0015] Referring to the first aspect, in some implementation forms of the first aspect, the difference parameter is a product of an initial multi-channel parameter of a current frame and a multi-channel parameter of a frame preceding the current frame, and the first preset condition is that the difference parameter is less than or equal to 0.
[0016] Referring to the first aspect, in some implementation forms of the first aspect, the step of determining the multi-channel parameters of the current frame based on the characteristic parameters of the current frame includes: determining multi-channel parameters for the current frame based on correlation parameters for the current frame, the correlation parameters being used to represent a degree of correlation between the current frame and a frame preceding the current frame; Includes:
[0017] Referring to the first aspect, in some implementations of the first aspect, a method includes: determining a correlation parameter based on a target channel signal in the multi-channel signal of the current frame and a target channel signal in the multi-channel signal of the previous frame; Further includes:
[0018] Referring to the first aspect, in some implementation forms of the first aspect, the step of determining a correlation parameter based on a target channel signal in the multi-channel signal of the current frame and a target channel signal in the multi-channel signal of the previous frame includes: determining correlation parameters based on frequency domain parameters of a target channel signal in the multi-channel signal of a current frame and frequency domain parameters of a target channel signal in the multi-channel signal of a previous frame, the frequency domain parameters being at least one of a frequency domain amplitude value and a frequency domain coefficient of the target channel signal; Includes:
[0019] Referring to the first aspect, in some implementations of the first aspect, a method includes: determining a correlation parameter based on the pitch period of the current frame and the pitch period of the previous frame; Further includes:
[0020] Referring to the first aspect, in some implementation forms of the first aspect, the step of determining the multi-channel parameters of the current frame based on the characteristic parameters of the current frame includes: determining multi-channel parameters of the current frame based on multi-channel parameters of T frames preceding the current frame if the characteristic parameters satisfy a second preset condition, where T is an integer greater than or equal to 1; Includes:
[0021] Referring to the first aspect, in some implementation forms of the first aspect, the step of determining the multi-channel parameters of the current frame based on the multi-channel parameters of T frames preceding the current frame includes: determining multi-channel parameters of T previous frames as multi-channel parameters of a current frame, where T is equal to 1; Includes:
[0022] Referring to the first aspect, in some implementation forms of the first aspect, the step of determining the multi-channel parameters of the current frame based on the multi-channel parameters of T frames preceding the current frame includes: determining multi-channel parameters of a current frame based on the change trends of multi-channel parameters of previous T frames, where T is equal to or greater than 2; Includes:
[0023] Referring to the first aspect, in some implementation forms of the first aspect, the characteristic parameter includes at least one of a correlation parameter and a peak-to-average ratio parameter of the current frame, the correlation parameter is used to represent the degree of correlation between the current frame and a frame previous to the current frame, the peak-to-average ratio parameter is used to represent the peak-to-average ratio of a signal of at least one channel in a multi-channel signal of the current frame, and the second preset condition is that the characteristic parameter is greater than a preset threshold.
[0024] Referring to the first aspect, in some implementation forms of the first aspect, the initial multi-channel parameters for the current frame include at least one of an initial inter-channel coherence IC value for the current frame, an initial channel time difference ITD value for the current frame, an initial inter-channel phase difference IPD value for the current frame, an initial overall phase difference OPD value for the current frame, and an initial inter-channel level difference ILD value for the current frame.
[0025] Referring to the first aspect, in some implementation forms of the first aspect, the characteristic parameters of the current frame include at least one of parameters of the current frame, namely, a correlation parameter, a peak-to-average ratio parameter, a signal-to-noise ratio parameter, and a spectral tilt parameter, wherein the correlation parameter is used to represent the degree of correlation between the current frame and the previous frame, the peak-to-average ratio parameter is used to represent the peak-to-average ratio of the signal of at least one channel in the multi-channel signal of the current frame, the signal-to-noise ratio parameter is used to represent the signal-to-noise ratio of the signal of at least one channel in the multi-channel signal of the current frame, and the spectral tilt parameter is used to represent the spectral tilt of the signal of at least one channel in the multi-channel signal of the current frame.
[0026] According to a second aspect, there is provided an encoder, the encoder comprising: an acquisition unit configured to acquire a multi-channel signal of a current frame; a first determining unit configured to determine initial multi-channel parameters of a current frame; a second determining unit configured to determine a difference parameter based on an initial multi-channel parameter of a current frame and a multi-channel parameter of K frames previous to the current frame, the difference parameter being used to represent a difference between the initial multi-channel parameter of the current frame and the multi-channel parameter of the K frames previous to the current frame, where K is an integer greater than or equal to 1; a third determining unit configured to determine multi-channel parameters of the current frame based on the differential parameters and the characteristic parameters of the current frame; a coding unit configured to code the multi-channel signal based on the multi-channel parameters of the current frame; Includes:
[0027] The multi-channel parameters of the current frame are determined by comprehensively considering the characteristic parameters of the current frame and the differences between the current frame and the previous K frames. This determination method is more appropriate than directly reusing the multi-channel parameters of the previous frame for the current frame, and can more reliably ensure the accuracy of the inter-channel information of the multi-channel signal.
[0028] Referring to the second aspect, in some implementation forms of the second aspect, the third determination unit is particularly configured to determine multi-channel parameters of the current frame based on the characteristic parameters of the current frame when the difference parameters satisfy a first preset condition.
[0029] Referring to the second aspect, in some implementation forms of the second aspect, the difference parameter is an absolute value of a difference between an initial multi-channel parameter of a current frame and a multi-channel parameter of a frame preceding the current frame, and the first preset condition is that the difference parameter is greater than a preset first threshold.
[0030] Referring to the second aspect, in some implementation forms of the second aspect, the difference parameter is a product of an initial multi-channel parameter of the current frame and a multi-channel parameter of a frame preceding the current frame, and the first preset condition is that the difference parameter is less than or equal to 0.
[0031] Referring to the second aspect, in some implementation forms of the second aspect, the third determination unit is particularly configured to determine multi-channel parameters of the current frame based on correlation parameters of the current frame, and the correlation parameters are used to represent the degree of correlation between the current frame and a frame previous to the current frame.
[0032] Referring to the second aspect, in some implementations of the second aspect, the encoder a fourth determining unit configured to determine a correlation parameter based on the target channel signal in the multi-channel signal of the current frame and the target channel signal in the multi-channel signal of the previous frame; Further includes:
[0033] Referring to the second aspect, in some implementation forms of the second aspect, the fourth determination unit is particularly configured to determine a correlation parameter based on a frequency domain parameter of a target channel signal in the multi-channel signal of a current frame and a frequency domain parameter of a target channel signal in the multi-channel signal of a previous frame, where the frequency domain parameter is at least one of a frequency domain amplitude value and a frequency domain coefficient of the target channel signal.
[0034] Referring to the second aspect, in some implementations of the second aspect, the encoder a fifth determining unit configured to determine a correlation parameter based on the pitch period of the current frame and the pitch period of the previous frame; Further includes:
[0035] Referring to the second aspect, in some implementation forms of the second aspect, the third determination unit is particularly configured to determine the multi-channel parameters of the current frame based on the multi-channel parameters of T frames preceding the current frame when the characteristic parameters satisfy a second preset condition, where T is an integer greater than or equal to 1.
[0036] Referring to the second aspect, in some implementation forms of the second aspect, the third determination unit is particularly configured to determine the multi-channel parameters of the previous T frames as the multi-channel parameters of the current frame, where T is equal to 1.
[0037] Referring to the second aspect, in some implementation forms of the second aspect, the third determination unit is particularly configured to determine the multi-channel parameters of the current frame based on the change trends of the multi-channel parameters of the previous T frames, where T is 2 or more.
[0038] Referring to the second aspect, in some implementation forms of the second aspect, the characteristic parameter includes at least one of a correlation parameter and a peak-to-average ratio parameter of the current frame, the correlation parameter is used to represent the degree of correlation between the current frame and a frame previous to the current frame, the peak-to-average ratio parameter is used to represent the peak-to-average ratio of a signal of at least one channel in a multi-channel signal of the current frame, and the second preset condition is that the characteristic parameter is greater than a preset threshold.
[0039] Referring to the second aspect, in some implementation forms of the second aspect, the initial multi-channel parameters for the current frame include at least one of an initial inter-channel coherence IC value for the current frame, an initial channel time difference ITD value for the current frame, an initial inter-channel phase difference IPD value for the current frame, an initial overall phase difference OPD value for the current frame, and an initial inter-channel level difference ILD value for the current frame.
[0040] Referring to the second aspect, in some implementation forms of the second aspect, the characteristic parameters of the current frame include at least one of parameters of the current frame, namely, a correlation parameter, a peak-to-average ratio parameter, a signal-to-noise ratio parameter, and a spectral tilt parameter, wherein the correlation parameter is used to represent the degree of correlation between the current frame and the previous frame, the peak-to-average ratio parameter is used to represent the peak-to-average ratio of the signal of at least one channel in the multi-channel signal of the current frame, the signal-to-noise ratio parameter is used to represent the signal-to-noise ratio of the signal of at least one channel in the multi-channel signal of the current frame, and the spectral tilt parameter is used to represent the spectral tilt of the signal of at least one channel in the multi-channel signal of the current frame.
[0041] According to a third aspect, there is provided an encoder including a memory and a processor, the memory configured to store a program, and the processor configured to execute the program, which, when executed, causes the processor to perform the method of the first aspect.
[0042] According to a fourth aspect, there is provided a computer-readable medium storing program code for execution by an encoder, the program code including instructions used to perform the method of the first aspect.
[0043] In this application, the multi-channel parameters of the current frame are determined by comprehensively considering the characteristic parameters of the current frame and the differences between the current frame and the previous K frames. This determination method is more appropriate than the method of directly reusing the multi-channel parameters of the previous frame for the current frame, and can more reliably ensure the accuracy of the inter-channel information of the multi-channel signal. [Brief explanation of the drawings]
[0044] [Figure 1] 1 is a flowchart of PS encoding in the prior art. [Figure 2] 1 is a flowchart of PS decoding in the prior art. [Figure 3] 1 is a schematic flowchart of a time-domain-based ITD parameter extraction method in the prior art; [Figure 4] 1 is a schematic flowchart of a frequency domain-based ITD parameter extraction method in the prior art; [Figure 5] 1 is a schematic flowchart of a multi-channel signal encoding method according to an embodiment of the present application; [Figure 6] 6 is a detailed flowchart of step 540 in FIG. 5. [Figure 7] 1 is a schematic flowchart of a multi-channel signal encoding method according to an embodiment of the present application; [Figure 8] FIG. 1 is a schematic block diagram of an encoder according to an embodiment of the present application; [Figure 9] 1 is a schematic structural diagram of an encoder according to an embodiment of the present application; DETAILED DESCRIPTION OF THE INVENTION
[0045] It should be noted that a stereo signal is also called a multi-channel signal. The functions and meanings of ILD, ITD, and IPD, which are multi-channel parameters of a multi-channel signal, have been briefly described above. For ease of understanding, the following will describe ILD, ITD, and IPD in more detail using an example in which the signal picked up by a first microphone is the first channel signal, and the signal picked up by a second microphone is the second channel signal.
[0046] ILD represents the energy difference between a first channel signal and a second channel signal. Typically, the ratio of the left channel energy to the right channel energy is calculated, and then the ratio is converted to a logarithmic domain value. For example, an ILD value greater than 0 indicates that the energy of the first channel signal is higher than the energy of the second channel signal; an ILD value equal to 0 indicates that the energy of the first channel signal is equal to the energy of the second channel signal; or an ILD value less than 0 indicates that the energy of the first channel signal is lower than the energy of the second channel signal. In another example, an ILD less than 0 indicates that the energy of the first channel signal is higher than the energy of the second channel signal; an ILD equal to 0 indicates that the energy of the first channel signal is equal to the energy of the second channel signal; or an ILD greater than 0 indicates that the energy of the first channel signal is lower than the energy of the second channel signal. It should be understood that the above values are merely examples, and the relationship between the ILD value and the energy difference between the signal of the first channel and the signal of the second channel can be defined based on experience or practical requirements.
[0047] ITD represents the time difference between the signal of the first channel and the signal of the second channel, i.e., the difference between the time when the sound generated by the sound source arrives at the first microphone and the time when the sound generated by the sound source arrives at the second microphone. For example, if the ITD value is greater than 0, it indicates that the time when the sound generated by the sound source arrives at the first microphone is earlier than the time when the sound generated by the sound source arrives at the second microphone; if the ITD value is equal to 0, it indicates that the sound generated by the sound source arrives at the first microphone and the second microphone simultaneously; or, if the ITD value is less than 0, it indicates that the time when the sound generated by the sound source arrives at the first microphone is later than the time when the sound generated by the sound source arrives at the second microphone. In another example, when ITD is less than 0, it indicates that the time when the sound generated by the sound source arrives at the first microphone is earlier than the time when the sound generated by the sound source arrives at the second microphone; when ITD is equal to 0, it indicates that the sound generated by the sound source arrives at the first microphone and the second microphone simultaneously; or when ITD is greater than 0, it indicates that the time when the sound generated by the sound source arrives at the first microphone is later than the time when the sound generated by the sound source arrives at the second microphone. It should be understood that the above values are merely examples, and the relationship between the ITD value and the time difference between the signal of the first channel and the signal of the second channel can be defined based on experience or practical requirements.
[0048] IPD represents the phase difference between the first and second channel signals. This parameter is usually used together with ITD to restore the phase information of a multi-channel signal at the decoder side.
[0049] From the above description, it can be understood that the existing multi-channel parameter calculation method causes discontinuity of the multi-channel parameter. For ease of understanding, with reference to Figures 3 and 4, the following will use an example in which the multi-channel signal includes a left channel signal and a right channel signal, and the multi-channel parameter is an ITD value, to describe in detail the existing multi-channel parameter calculation method and its drawbacks.
[0050] In the prior art, ITD values can be calculated in multiple ways: for example, the ITD values can be calculated in the time domain, or the ITD values can be calculated in the frequency domain.
[0051] 3 is a schematic flowchart of a time-domain-based ITD value calculation method. The method of FIG. 3 includes the following steps:
[0052] 310: Calculate an ITD value based on the left channel time domain signal and the right channel time domain signal.
[0053] Specifically, a time-domain cross-correlation function can be used to calculate the ITD parameters based on the time-domain signals of the left and right channels, for example, within the range 0≦i≦Tmax:
[0054]
number
[0055]
number
[0056] If i is the index value of the cross-correlation function, xR is the time-domain signal of the right channel, xL is the time-domain signal of the left channel, Tmax corresponds to the maximum ITD value at different sampling rates, and Length is the frame length.
[0057] 320: Perform quantization processing on the ITD values.
[0058] 4 is a schematic flowchart of a frequency domain-based ITD value calculation method. The method of FIG. 4 includes the following steps:
[0059] 410: Perform a time-frequency transform on the left channel time domain signal and the right channel time domain signal to obtain a left channel frequency domain signal and a right channel frequency domain signal.
[0060] Specifically, time-frequency transformation can convert time-domain signals into frequency-domain signals by using techniques such as the Discrete Fourier Transform (DFT) or the Modified Discrete Cosine Transform (MDCT).
[0061] For example, a time-frequency transform may be performed on the input left channel time domain signal and right channel time domain signal using a DFT transform. Specifically, the DFT transform can be performed using the following equations:
[0062]
number
[0063] where n is the index value of the sample in the time-domain signal, k is the index value of the frequency bin in the frequency-domain signal, L is the time-frequency transform length, and x(n) is the time-domain signal of the left channel or the time-domain signal of the right channel.
[0064] 420: Calculate an ITD value based on the frequency domain signal of the left channel and the frequency domain signal of the right channel.
[0065] Specifically, the L frequency bins of the frequency domain signal can be divided into multiple subbands. The frequency bins included in the b-th subband are b-1 ≦k≦A b -1. Search range:-T max ≦j≦T max Within, the amplitude value can be calculated using the following formula:
[0066]
number
[0067] In this case, the ITD value of the b-th subband is
[0068]
number
[0069] That is, it may be the index value of the sample corresponding to the maximum value calculated based on the above formula.
[0070] 430: Perform quantization processing on the ITD values.
[0071] In the prior art, if the peak value of the cross-correlation coefficients of the multi-channel signals of the current frame is relatively small, the calculated ITD value may be considered inaccurate. In this case, the ITD value of the current frame is zero. Due to factors such as background noise, reverberation, and multiple-person conversations, the ITD value calculated according to the existing PS coding scheme is often zero. As a result, the ITD value changes frequently and abruptly, causing discontinuities between frames in the downmix signal calculated based on such ITD values, resulting in poor acoustic quality of the multi-channel signal.
[0072] To solve the problem of frequent and rapid changes in multi-channel parameters, a viable processing method is as follows: if the calculated multi-channel parameters of the current frame are considered inaccurate, the multi-channel parameters of the frame preceding the current frame can be reused. This processing method can effectively solve the problem of frequent and rapid changes in multi-channel parameters. However, this processing method may cause the following problem: if the signal quality of the current frame is relatively good, the calculated multi-channel parameters of the current frame are usually relatively accurate. In this case, if the processing method is still used, the multi-channel parameters of the previous frame can still be reused as the multi-channel parameters of the current frame, and the relatively accurate multi-channel parameters of the current frame are discarded. As a result, the inter-channel information of the multi-channel signal becomes inaccurate.
[0073] Hereinafter, the method for encoding an audio signal according to an embodiment of the present application will be described in detail with reference to FIGS.
[0074] 5 is a schematic flowchart of a multi-channel signal encoding method according to an embodiment of the present application. The method of FIG. 5 includes the following steps:
[0075] 510. Acquire the multi-channel signal of the current frame.
[0076] It should be noted that in this embodiment of the present application, the amount of the multi-channel signal is not particularly limited. Specifically, the multi-channel signal may be a dual-channel signal, a three-channel signal, or a signal with more than three channels. For example, the multi-channel signal may include a left channel signal and a right channel signal. In another example, the multi-channel signal may include a left channel signal, a middle channel signal, a right channel signal, and a rear channel signal.
[0077] 520. Determine initial multi-channel parameters for the current frame.
[0078] In some embodiments, the initial multi-channel parameters of the current frame may be used to represent the correlation between the multi-channel signals.
[0079] In some embodiments, the initial multi-channel parameters for the current frame include at least one of an initial IC value for the current frame, an initial ITD value for the current frame, an initial IPD value for the current frame, an initial OPD value for the current frame, an initial ILD value for the current frame, etc.
[0080] The initial multi-channel parameters of the current frame can be calculated in several ways. For details, please refer to the prior art. For example, the multi-channel parameters are ITD values. In step 520, the time domain-based ITD value calculation method shown in FIG. 3 or the frequency domain-based ITD value calculation method shown in FIG. 4 can be used. Alternatively, a hybrid domain (time domain + frequency domain)-based ITD value calculation method can be used based on the following formula:
[0081]
number
[0082] where Li(f) represents the frequency-domain coefficients of the left-channel frequency-domain signal,
[0083]
number
[0084] denotes the conjugate of the frequency domain coefficients of the right channel frequency domain signal, arg max() means selecting the maximum value from multiple values, and IDFT() denotes the inverse discrete Fourier transform.
[0085] 530. Determine a difference parameter based on the initial multi-channel parameter of the current frame and the multi-channel parameter of K frames preceding the current frame, where the difference parameter is used to represent a difference between the initial multi-channel parameter of the current frame and the multi-channel parameter of the K frames preceding the current frame, where K is an integer greater than or equal to 1.
[0086] It should be understood that the K frames before the current frame are the K frames closest to the current frame in all frames of the audio signal to be coded. For example, assuming that the audio signal to be coded includes 10 frames and K=1, if the current frame is the fifth frame of the 10 frames, the K frames before the current frame are the fourth frame of the 10 frames. In another example, assuming that the audio signal to be coded includes 10 frames and K=2, if the current frame is the seventh frame of the 10 frames, the K frames before the current frame are the fifth and sixth frames of the 10 frames.
[0087] Unless otherwise specified, the K previous frames appearing below are the K frames before the current frame, and the previous frame appearing below is the frame before the current frame.
[0088] 540. Determine multi-channel parameters for the current frame based on the differential parameters and characteristic parameters for the current frame.
[0089] It should be noted that the multi-channel parameters (including the initial multi-channel parameters) may be expressed in the form of numerical values, and therefore the multi-channel parameters are also referred to as multi-channel parameter values.
[0090] In some embodiments, the characteristic parameters of the current frame may include mono parameters of the current frame, which may be used to characterize the signals of the channels within the multi-channel signal of the current frame.
[0091] In some embodiments, determining the multi-channel parameters for the current frame in step 540 may include modifying the initial multi-channel parameters to obtain the multi-channel parameters for the current frame. For example, the characteristic parameters for the current frame are mono parameters for the current frame. Step 540 may include modifying the initial multi-channel parameters for the current frame based on the differential parameters and the mono parameters for the current frame to obtain the multi-channel parameters for the current frame.
[0092] In some embodiments, the characteristic parameters of the current frame include at least one of a correlation parameter, a peak-to-average ratio parameter, a signal-to-noise ratio parameter, and a spectral tilt parameter of the current frame. The correlation parameter is used to represent the degree of correlation between the current frame and a previous frame. The peak-to-average ratio parameter is used to represent the peak-to-average ratio of the signal of at least one channel in the multi-channel signal of the current frame. The signal-to-noise ratio parameter is used to represent the signal-to-noise ratio of the signal of at least one channel in the multi-channel signal of the current frame. The spectral tilt parameter is used to represent the spectral tilt degree or the spectral energy change tendency of the signal of at least one channel in the multi-channel signal of the current frame.
[0093] 550. Encode the multi-channel signal based on the multi-channel parameters of the current frame.
[0094] For example, it can perform operations such as mono audio encoding, spatial parameter encoding, and bitstream multiplexing as shown in Figure 1. For specific encoding methods, please refer to the prior art.
[0095] In this embodiment of the present application, the multi-channel parameters of the current frame are determined by comprehensively considering the characteristic parameters of the current frame and the differences between the current frame and the previous K frames. This determination method is more appropriate than the method of directly reusing the multi-channel parameters of the previous frame for the current frame, and can more reliably ensure the accuracy of the inter-channel information of the multi-channel signal.
[0096] An embodiment of step 540 is described in detail below.
[0097] Optionally, in some embodiments, step 540 may include adjusting values of initial multi-channel parameters of the current frame based on values of characteristic parameters of the current frame to obtain multi-channel parameters of the current frame if the difference parameters satisfy a first preset condition.
[0098] Optionally, in some embodiments, step 540 may include adjusting values of initial multi-channel parameters of the current frame based on values of the difference parameters to obtain multi-channel parameters of the current frame if the characteristic parameters of the current frame satisfy a first preset condition.
[0099] It should be understood that the first preset condition may be one condition or a combination of multiple conditions. Furthermore, if the first preset condition is met, a decision may be further made based on other conditions. If all conditions are met, the next step is executed.
[0100] Optionally, in some embodiments, as shown in FIG. 6, step 540 may include the following substeps:
[0101] 542. Determine whether the difference parameters satisfy a first preset condition.
[0102] 544. If the difference parameters satisfy a first preset condition, determine multi-channel parameters of the current frame based on the characteristic parameters of the current frame.
[0103] It should be understood that the difference parameter can be defined in multiple ways. Different ways of defining the difference parameter can correspond to different first preset conditions. The difference parameter and the first preset conditions corresponding to the difference parameter are described in detail below.
[0104] Optionally, in some embodiments, the difference parameter may be a difference between the initial multi-channel parameters of the current frame and the multi-channel parameters of the previous frame, or an absolute value of the difference. The first preset condition may be that the difference parameter is greater than a preset first threshold. The first threshold may be 0.3 to 0.7 times the target value. For example, the first threshold may be 0.5 times the target value. The target value is the multi-channel parameter with the larger absolute value between the multi-channel parameters of the previous frame and the initial multi-channel parameters of the current frame.
[0105] Optionally, in some embodiments, the difference parameter may be a difference between the initial multi-channel parameters of the current frame and the average value of the multi-channel parameters of the previous K frames, or an absolute value of the difference. The first preset condition may be that the difference parameter is greater than a preset first threshold. The first threshold may be 0.3 to 0.7 times the target value. For example, the first threshold may be 0.5 times the target value. The target value is the multi-channel parameter with the larger absolute value between the multi-channel parameters of the previous frame and the initial multi-channel parameters of the current frame.
[0106] Optionally, in some embodiments, the difference parameter may be a product of the initial multi-channel parameter of the current frame and the multi-channel parameter of the previous frame, and the first preset condition may be that the difference parameter is less than or equal to 0.
[0107] A specific embodiment of step 544 is described in detail below.
[0108] Optionally, in some embodiments, step 544 may include determining multi-channel parameters of the current frame based on correlation parameters and / or spectral tilt parameters of the current frame, where the correlation parameters are used to represent the degree of correlation between the current frame and the previous frame, and the spectral tilt parameters are used to represent the spectral tilt degree or spectral energy change tendency of the signal of at least one channel in the multi-channel signal of the current frame.
[0109] Optionally, in some embodiments, step 544 may include determining multi-channel parameters for the current frame based on correlation parameters and / or peak-to-average ratio parameters for the current frame, where the correlation parameters are used to represent the degree of correlation between the current frame and the previous frame, and the peak-to-average ratio parameters are used to represent the peak-to-average ratio of the signal of at least one channel in the multi-channel signal of the current frame.
[0110] The correlation parameters of the current frame are described in detail below.
[0111] Specifically, the correlation parameter can be used to represent the degree of correlation between the current frame and the previous frame. The degree of correlation between the current frame and the previous frame can be represented in multiple ways. Different representation methods may correspond to different methods of calculating the correlation parameter. The following provides a detailed description with reference to specific embodiments.
[0112] Optionally, in some embodiments, the degree of correlation between a current frame and a previous frame can be expressed using the degree of correlation between a target channel signal in the multi-channel signal of the current frame and a target channel signal in the multi-channel signal of the previous frame. It should be understood that the target channel signal of the current frame corresponds to the target channel signal of the previous frame. Specifically, if the target channel signal of the current frame is a left channel signal, the target channel signal of the previous frame is the left channel signal; if the target channel signal of the current frame is a right channel signal, the target channel signal of the previous frame is the right channel signal; or, if the target channel signal of the current frame includes a left channel signal and a right channel signal, the target channel signal of the previous frame includes a left channel signal and a right channel signal. It should further be understood that the target channel signal can be a target channel time-domain signal or a target channel frequency-domain signal.
[0113] For example, the target channel signal is a frequency domain signal. The step of determining a correlation parameter based on the target channel signal in the multi-channel signal of the current frame and the target channel signal in the multi-channel signal of the previous frame may specifically include the step of determining a correlation parameter based on a frequency domain parameter of the target channel signal in the multi-channel signal of the current frame and a frequency domain parameter of the target channel signal in the multi-channel signal of the previous frame, where the frequency domain parameter of the target channel signal includes a frequency domain amplitude value and / or a frequency domain coefficient of the target channel signal.
[0114] In some embodiments, the frequency-domain amplitude values of the target channel signal may be frequency-domain amplitude values of some or all of the subbands of the target channel signal, for example, frequency-domain amplitude values of subbands in the low-frequency portion of the target channel signal.
[0115] Specifically, for example, the target channel signal is a frequency domain signal of a left channel. Assuming that the low frequency portion of the frequency domain signal of the left channel includes M subbands, and each subband includes N frequency domain amplitude values, the normalized cross-correlation values of the frequency domain amplitude values of the subbands of the current frame and the previous frame can be calculated based on the following formula to obtain M normalized cross-correlation values that correspond one-to-one to the M subbands:
[0116]
number
[0117] where |L(i*N+j)| represents the j-th frequency domain amplitude value of the i-th subband in the low frequency part of the frequency domain signal of the left channel of the current frame, and |L (-1) (i*N+j)| represents the j-th frequency domain amplitude value of the i-th subband in the low frequency part of the frequency domain signal of the left channel of the previous frame, and cor(i) represents the normalized cross-correlation value of the i-th subband among M subbands.
[0118] Next, M normalized cross-correlation values may be determined as the correlation parameters of the current frame and the previous frame; alternatively, the sum of the M normalized cross-correlation values or the average value of the M normalized cross-correlation values may be determined as the correlation parameter of the current frame.
[0119] In some embodiments, the above-described method of calculating correlation parameters based on frequency domain amplitude values may be replaced with a method of calculating correlation parameters based on frequency domain coefficients.
[0120] In some embodiments, the above-described method of calculating correlation parameters based on frequency domain amplitude values may be replaced with a method of calculating correlation parameters based on absolute values of frequency domain coefficients.
[0121] It should be understood that the multi-channel signal of the current frame may be the multi-channel signals of one or more sub-frames of the current frame. Similarly, the multi-channel signal of the previous frame may be the multi-channel signals of one or more sub-frames of the previous frame. In other words, the correlation parameters may be calculated based on all the multi-channel signals of the current frame and all the multi-channel signals of the previous frame, or may be calculated based on the multi-channel signals of one or more sub-frames of the current frame and one or more sub-frames of the previous frame.
[0122] For example, the target channel signal includes a left channel time-domain signal and a right channel time-domain signal. The normalized cross-correlation values of the left channel time-domain signal and the right channel time-domain signal of the current frame and the left channel time-domain signal and the right channel time-domain signal of the previous frame at each sample may be calculated based on the following formula to obtain N normalized cross-correlation values, and the N normalized cross-correlation values are searched for the maximum normalized cross-correlation value:
[0123]
number
[0124] where L(n) represents the left channel time-domain signal, R(n) represents the right channel time-domain signal, N is the total number of samples of the left channel time-domain signal, and L is the number of offset samples between the nth sample of the right channel time-domain signal and the nth sample of the left channel time-domain signal.
[0125] In some embodiments, the maximum normalized cross-correlation value calculated by the above equation may be used as the correlation parameter for the current frame.
[0126] It should be understood that the multi-channel signal of the current frame may be the multi-channel signal of one or more subframes of the current frame. Similarly, the multi-channel signal of the previous frame may be the multi-channel signal of one or more subframes of the previous frame. For example, multiple maximum normalized cross-correlation values that correspond one-to-one to multiple subframes may be calculated based on the above formula, with each subframe being a unit. Then, one or more of the multiple maximum normalized cross-correlation values, the sum of the multiple maximum normalized cross-correlation values, or the average value of the multiple maximum normalized cross-correlation values may be used as the correlation parameter of the current frame.
[0127] The above provides a method for calculating correlation parameters based on time-domain signals. Below, we will explain in detail how to calculate correlation parameters based on pitch periods.
[0128] Optionally, in some embodiments, the degree of correlation between the current frame and the previous frame can be represented by using the degree of correlation between the pitch period of the current frame and the pitch period of the previous frame, in which case the correlation parameter may be determined based on the pitch period of the current frame and the pitch period of the previous frame.
[0129] In some embodiments, the pitch period of the current frame or previous frame may include the pitch period of each subframe of the current frame or previous frame.
[0130] Specifically, the pitch period of the current frame or the pitch period of each subframe of the current frame, and the pitch period of the previous frame or the pitch period of each subframe of the previous frame may be calculated based on an existing pitch period algorithm. Then, a deviation value between the pitch period of the current frame and the pitch period of each subframe of the previous frame, or a deviation value between the pitch period of each subframe of the current frame and the pitch period of each subframe of the previous frame, may be calculated. Then, the calculated pitch period deviation value may be used as a correlation parameter between the current frame and the previous frame.
[0131] The peak-to-average ratio parameter of the current frame is described in detail below.
[0132] The peak-to-average ratio parameter of the current frame may be used to represent the peak-to-average ratio of the signal of at least one channel in the multi-channel signal of the current frame.
[0133] For example, the multi-channel signal includes a left channel signal and a right channel signal, and the peak-to-average ratio parameter may be the peak-to-average ratio of the left channel signal, or the peak-to-average ratio of the right channel signal, or a combination of the peak-to-average ratio of the left channel signal and the peak-to-average ratio of the right channel signal.
[0134] The peak-to-average ratio parameter can be calculated in several ways. For example, the peak-to-average ratio parameter can be calculated based on the frequency-domain amplitude values of the frequency-domain signal. In another example, the peak-to-average ratio parameter can be calculated based on the frequency-domain coefficients of the frequency-domain signal or the absolute values of the frequency-domain coefficients.
[0135] In some embodiments, the frequency domain amplitude values of the frequency domain signal may be frequency domain amplitude values of some or all sub-bands of the frequency domain signal, for example, frequency domain amplitude values of sub-bands in a low frequency portion of the frequency domain signal.
[0136] As an example, the frequency-domain signal of the left channel is used. Assuming that the low-frequency portion of the frequency-domain signal of the left channel includes M subbands, each of which includes N frequency-domain amplitude values, the peak-to-average ratios of the N frequency-domain amplitude values of each subband can be calculated to obtain M peak-to-average ratios that correspond one-to-one to the M subbands. Then, the M peak-to-average ratios, the sum of the M peak-to-average ratios, or the average of the M peak-to-average ratios are used as the peak-to-average ratio parameter for the current frame. Note that in the process of calculating the peak-to-average ratio of each subband, the ratio of the maximum frequency-domain amplitude value of each subband to the sum of the N frequency-domain amplitude values of each subband can be used as the peak-to-average ratio to reduce computational complexity. When the peak-to-average ratio is compared with a predetermined threshold, the maximum frequency-domain amplitude value may be compared with the product of the preset threshold and the sum of the N frequency-domain amplitude values of each subband, or the maximum frequency-domain amplitude value may be compared with the product of the preset threshold and the average of the N frequency-domain amplitude values of each subband.
[0137] In some embodiments, the multi-channel signal of the current frame may be the multi-channel signal of one or more sub-frames of the current frame.
[0138] The characteristic parameters of the current frame may further include a signal-to-noise ratio parameter of the current frame, which will be described in detail below.
[0139] The signal-to-noise ratio parameter of the current frame may be used to represent the signal-to-noise ratio or a characteristic of the signal-to-noise ratio of the signal of at least one channel in the multi-channel signal of the current frame.
[0140] It should be understood that the signal-to-noise ratio parameter of the current frame may include one or more parameters. The specific parameter selection method is not limited in this embodiment of the present application. For example, the signal-to-noise ratio parameter of the current frame may include at least one of the sub-band signal-to-noise ratio, the modified sub-band signal-to-noise ratio, the segment signal-to-noise ratio, the modified segment signal-to-noise ratio, the full-band signal-to-noise ratio, and the modified full-band signal-to-noise ratio of the multi-channel signal, and another parameter that can represent the signal-to-noise ratio characteristics of the multi-channel signal.
[0141] It should be noted that the method for determining the signal-to-noise ratio parameter is not particularly limited in this embodiment of the present application.
[0142] For example, the signal-to-noise ratio parameter of the current frame may be calculated by using all signals in the multi-channel signal.
[0143] In another example, the signal-to-noise ratio parameter of the current frame may be calculated by using several signals in a multi-channel signal.
[0144] In another example, the signal-to-noise ratio parameter of the current frame may be calculated by adaptively selecting the signal of any channel within the multi-channel signal.
[0145] In another example, a weighted average may first be performed on data representing a multi-channel signal to form a new signal, and then the signal-to-noise ratio parameter of the current frame may be expressed using the signal-to-noise ratio of the new signal.
[0146] The characteristic parameters of the current frame may further include a spectral tilt parameter of the current frame, which will be described in detail below.
[0147] The spectral tilt parameter of the current frame can be used to represent the spectral tilt or spectral energy change tendency of the signal of at least one channel in the multi-channel signal of the current frame. It should be understood that a larger spectral tilt indicates a weaker signal voicing, and a smaller spectral tilt indicates a stronger signal voicing.
[0148] The method for determining the multi-channel parameters of the current frame based on the characteristic parameters of the current frame in step 544 is described in detail below.
[0149] Optionally, in some embodiments, it may be determined whether to reuse multi-channel parameters of a previous frame for the current frame based on characteristic parameters of the current frame.
[0150] For example, if the characteristic parameters satisfy the second preset condition, the multi-channel parameters of the previous frame are reused for the current frame. Alternatively, if the characteristic parameters do not satisfy the second preset condition, the initial multi-channel parameters of the current frame are used as the multi-channel parameters of the current frame. It should be understood that the processing method used when the characteristic parameters do not satisfy the second preset condition is not particularly limited in this embodiment of the present application. For example, the initial multi-channel parameters may be modified by other existing methods.
[0151] Optionally, in some embodiments, based on the characteristic parameters of the current frame, it can be determined whether to determine the multi-channel parameters of the current frame based on the change trends of the multi-channel parameters of the previous T frames, where T is 2 or more.
[0152] For example, if the characteristic parameters satisfy the second preset condition, the multi-channel parameters of the current frame are determined based on the change trends of the multi-channel parameters of the previous T frames. Alternatively, if the characteristic parameters do not satisfy the second preset condition, the initial multi-channel parameters of the current frame are used as the multi-channel parameters of the current frame. It should be understood that the processing method used when the characteristic parameters do not satisfy the second preset condition is not particularly limited in this embodiment of the present application. For example, the initial multi-channel parameters may be modified using other existing methods.
[0153] It should be understood that the second preset condition may be one condition or a combination of multiple conditions. Furthermore, if the second preset condition is met, the decision may be further made based on other conditions. If all conditions are met, the next step is executed.
[0154] It should be understood that the T frames before the current frame are the T frames closest to the current frame in all frames of the audio signal to be coded. For example, if the audio signal to be coded contains 10 frames, T=2, and the current frame is the fifth frame of the 10 frames, the T frames before the current frame are the third and fourth frames of the 10 frames.
[0155] It should be understood that the multi-channel parameters of the current frame can be determined in several ways based on the change trends of the multi-channel parameters of the previous T frames. For example, the multi-channel parameters are ITD values. The ITD value ITD[i] of the current frame can be calculated in the following way: ITD[i]=ITD[i-1]+delta, where delta=ITD[i-1]-ITD[i-2], where ITD[i-1] represents the ITD value of the frame before the current frame, and ITD[i-2] represents the ITD value of the frame before the frame before the current frame.
[0156] The second preset condition will be described in detail below.
[0157] It should be understood that the second preset condition can be defined in multiple ways, and the setting of the second preset condition is related to the selection of the characteristic parameter, which is not particularly limited in this embodiment of the present application.
[0158] For example, the characteristic parameter is a correlation parameter and / or a peak-to-average ratio parameter, where the correlation parameter is an average value of the correlation value between the multi-channel signal of the current frame and the multi-channel signal of the previous frame in the subband, and the peak-to-average ratio parameter is an average value of the peak-to-average ratio of the multi-channel signal of the current frame in the subband. The second preset condition may be one or more of the following conditions: The correlation parameter is greater than a second threshold, and the value range of the second threshold may be, for example, 0.6 to 0.95, for example, the second threshold may be 0.85; The peak-to-average ratio parameter is greater than a third threshold, and the value range of the third threshold may be, for example, 0.4 to 0.8, for example, the third threshold may be 0.6; The correlation parameter is greater than a fourth threshold, and the correlation value within the subband is greater than a fifth threshold, and the value range of the fourth threshold may be 0.6 to 0.85, for example, the fourth threshold may be 0.7; the value range of the fifth threshold may be 0.8 to 0.95, for example, the fifth threshold may be 0.9; The peak-to-average ratio parameter is greater than a sixth threshold, and the peak-to-average ratio within the subband is greater than a seventh threshold, and the value range of the sixth threshold may be 0.4 to 0.75, for example, the sixth threshold may be 0.55, and the value range of the seventh threshold may be 0.6 to 0.9, for example, the seventh threshold may be 0.7.
[0159] The second threshold may be greater than the fourth threshold, and the fourth threshold may be less than the fifth threshold; or the third threshold may be greater than the sixth threshold, and the sixth threshold may be less than the seventh threshold.
[0160] If the characteristic parameter includes a peak-to-average ratio parameter and the second preset condition includes the peak-to-average ratio parameter being equal to or greater than a preset threshold, it is necessary to determine a value relationship between the peak-to-average ratio parameter and the preset threshold. To simplify the calculation, the process of comparing the peak-to-average ratio parameter with a preset threshold may be converted into a comparison between the peak value of the peak-to-average ratio and a target value. The target value may be the product of the preset threshold and the average value of the peak-to-average ratio, or the product of the preset threshold and the sum of the parameters used to calculate the peak-to-average ratio. For example, the parameters used to calculate the peak-to-average ratio are frequency-domain amplitude values of subbands, each of which includes N frequency-domain amplitude values. When the peak-to-average ratio is compared with the preset threshold, the maximum frequency-domain amplitude value of each subband may be compared with the product of the preset threshold and the sum of the N frequency-domain amplitude values of each subband, or the maximum frequency-domain amplitude value of each subband may be compared with the product of the preset threshold and the average value of the N frequency-domain amplitude values of each subband.
[0161] Hereinafter, the embodiment of the present application will be described in more detail with reference to the example of FIG. 7. In FIG. 7, the description will be mainly based on an example in which the multi-channel signal of the current frame includes a left channel signal and a right channel signal, and the multi-channel parameters are ITD values. The example of FIG. 7 is intended merely to help those skilled in the art understand the embodiment of the present application, and is not intended to limit the embodiment of the present application to the specific values or specific scenarios given as examples. Obviously, those skilled in the art can perform various equivalent modifications or variations based on the example provided in FIG. 7, and such modifications or variations also fall within the scope of the embodiment of the present application.
[0162] 7 is a schematic flowchart of a multi-channel signal encoding method according to one embodiment of the present application. It should be understood that the processing steps or operations shown in FIG. 7 are merely examples, and other operations or variations of the operations in FIG. 7 may also be performed in this embodiment of the present application. Furthermore, the steps in FIG. 7 may be performed in a different sequence than that shown in FIG. 7, and some operations in FIG. 7 may not need to be performed.
[0163] The method of FIG. 7 includes the following steps.
[0164] 710: Perform a time-frequency transform on the left channel time domain signal and the right channel time domain signal of the current frame to obtain a left channel frequency domain signal and a right channel frequency domain signal.
[0165] 720: Perform a normalized cross-correlation operation on the left channel frequency domain signal and the right channel frequency domain signal to obtain a target frequency domain signal.
[0166] 730: Perform a frequency-time transform on the target frequency-domain signal to obtain a target time-domain signal.
[0167] 740: Determine an initial ITD value for the current frame based on the target time-domain signal.
[0168] The processing described in steps 720 to 740 can be expressed using the following equations:
[0169]
number
[0170] where Li(f) represents the frequency-domain coefficients of the left-channel frequency-domain signal,
[0171]
number
[0172] denotes the conjugate of the frequency domain coefficients of the right channel frequency domain signal, arg max() means selecting the maximum value from multiple values, and IDFT() denotes the inverse discrete Fourier transform.
[0173] 750: Perform fine-grained ITD control to calculate the ITD value for the current frame.
[0174] 760: Perform a phase offset on the left channel time domain signal and the right channel time domain signal based on the ITD value of the current frame.
[0175] 770: Downmixing is performed on the left channel time domain signal and the right channel time domain signal.
[0176] The implementation of steps 760 and 770 can be found in the prior art and will not be described in detail here.
[0177] Step 750 corresponds to step 530 in Figure 5. Any of the examples provided for step 530 may be used for step 750. Below are some optional examples:
[0178] Example 1:
[0179] Step 1: Divide the low frequency part of the frequency domain signal of the left channel of the current frame into M subbands, each of which contains N frequency domain amplitude values.
[0180] Step 2: Calculate the correlation parameters between the current frame and the previous frame according to the following formula:
[0181]
number
[0182] where |L(i*N+j)| represents the j-th frequency domain amplitude value of the i-th subband in the low frequency part of the frequency domain signal of the left channel of the current frame, and |L (-1) (i*N+j)| represents the jth frequency domain amplitude value of the ith subband in the low frequency part of the frequency domain signal of the left channel of the previous frame, and cor(i) represents the normalized cross-correlation value corresponding to the ith subband among the M subbands.
[0183] It should be understood that the correlation parameters between the current frame and the previous frame are obtained by the calculation in step 2. The correlation parameters may be the normalized cross-correlation values of each subband, or may be the average value of the normalized cross-correlation values of the subbands.
[0184] Step 3: Calculate the peak-to-average ratio for each subband of the current frame.
[0185] It should be understood that steps 2 and 3 may be performed simultaneously or sequentially. The peak-to-average ratio of each subband can be expressed by the ratio of the peak frequency domain amplitude value of each subband to the average frequency domain amplitude value of each subband, or by the ratio of the peak frequency domain amplitude value of each subband to the sum of the frequency domain amplitude values of the subband. This can reduce the computational complexity.
[0186] It should be understood that the peak-to-average ratio parameter of the multi-channel signal of the current frame can be obtained through the calculation of step 3. The peak-to-average ratio parameter can be the peak-to-average ratio of each subband, the sum of the peak-to-average ratios of the subbands, or the average value of the peak-to-average ratios of the subbands.
[0187] Step 4: If the initial ITD value of the current frame and the ITD value of the previous frame satisfy a first preset condition, determine whether to reuse the ITD value of the previous frame for the current frame based on the correlation parameter and / or peak-to-average ratio parameter of the current frame.
[0188] For example, the first preset condition may be: The product of the ITD value of the previous frame and the initial ITD value of the current frame is 0; The product of the ITD value of the previous frame and the initial ITD value of the current frame is negative; or The absolute value of the difference between the ITD value of the previous frame and the initial ITD value of the current frame is greater than half of the target value, and the target value is the ITD value whose absolute value is greater than that of the ITD value of the previous frame or the initial ITD value of the current frame.
[0189] It should be noted that the first preset condition may be one condition or a combination of multiple conditions. Furthermore, if the first preset condition is met, the decision may be further made based on other conditions. If all conditions are met, the next step is executed.
[0190] The step of determining whether to reuse the ITD value of the previous frame for the current frame based on the correlation parameters and / or peak-to-average ratio parameters of the current frame may specifically include the steps of determining whether the correlation parameters and / or peak-to-average ratio parameters of the current frame satisfy a second preset condition; and reusing the ITD value of the previous frame for the current frame if the correlation parameters and / or peak-to-average ratio parameters of the current frame satisfy the second preset condition.
[0191] For example, the second preset condition may be: The average value of the normalized cross-correlation values of the subbands is greater than a first threshold; The average value of the peak-to-average ratio of the subband is greater than a second threshold; the average value of the normalized cross-correlation values of the subbands is greater than a third threshold and the normalized cross-correlation values of the subbands are greater than a fourth threshold; or The average value of the subband peak-to-average ratio is greater than a fifth threshold, and the subband peak-to-average ratio is greater than a sixth threshold.
[0192] The first threshold is greater than the third threshold, and the third threshold is less than the fourth threshold; or the second threshold is greater than the fifth threshold, and the fifth threshold is less than the sixth threshold.
[0193] It should be noted that the second preset condition may be one condition or a combination of multiple conditions. Furthermore, if the second preset condition is met, the decision may be further made based on other conditions. If all conditions are met, the next step is executed.
[0194] It should be noted that the aforementioned frequency-domain signal of the left channel of the current frame may be the frequency-domain signal of the left channel of one or more subframes of the current frame, and the aforementioned frequency-domain signal of the left channel of the previous frame may be the frequency-domain signal of the left channel of one or more subframes of the previous frame. In other words, the correlation parameter may be calculated using parameters of the current frame and parameters of the previous frame, or may be calculated using parameters of one or more subframes of the current frame and parameters of one or more subframes of the previous frame. Similarly, the peak-to-average ratio parameter may be calculated using parameters of the current frame or parameters of one or more subframes of the current frame.
[0195] Example 2:
[0196] The difference between the second embodiment and the previous embodiments is that in the previous embodiments, the correlation parameters between the current frame and the previous frame are calculated based on the frequency domain amplitude values of the subbands, while in the second embodiment, the correlation parameters between the current frame and the previous frame are calculated based on the frequency domain coefficients of the subbands or the absolute values of the frequency domain coefficients. The specific implementation process of the second embodiment is the same as that of the previous embodiments, and the details will not be described here.
[0197] Example 3:
[0198] The difference between the third embodiment and the previous embodiments is that in the previous implementations, the peak-to-average ratio parameter is calculated based on the frequency domain amplitude value of the subband, while in the third embodiment, the peak-to-average ratio parameter is calculated based on the absolute value of the frequency domain coefficient of the subband. The specific implementation process of the third embodiment is the same as that of the previous embodiments. The details will not be described here.
[0199] Example 4:
[0200] The difference between Example 4 and the preceding embodiments is that in the preceding embodiments, the correlation parameters and / or peak-to-average ratio parameters are calculated based on the frequency domain signal of the left channel, while in Example 4, the correlation parameters and / or peak-to-average ratio parameters are calculated based on the frequency domain signal of the right channel. The specific implementation process of Example 4 is the same as that of the preceding embodiments, and the details will not be described here.
[0201] Example 5:
[0202] The difference between Example 5 and the previous examples is that in the previous examples, the correlation parameters and / or peak-to-average ratio parameters are calculated based on the frequency domain signal of the left channel or the frequency domain signal of the right channel, whereas in Example 5, the correlation parameters and / or peak-to-average ratio parameters are calculated based on the frequency domain signal of the left channel and the frequency domain signal of the right channel.
[0203] In a specific implementation, a set of correlation parameters and / or peak-to-average ratio parameters may be calculated based on the frequency domain signal of the left channel, and then a set of correlation parameters and / or peak-to-average ratio parameters may be calculated using the frequency domain signal of the right channel.The larger of the two sets of parameters may then be selected as the final correlation parameters and / or peak-to-average ratio parameters.The other processes of Example 5 are similar to those of the previous examples.Details will not be described here.
[0204] Example 6:
[0205] The difference between the sixth embodiment and the previous embodiments is that in the previous embodiments, the correlation parameters are calculated based on frequency domain signals, while in the sixth embodiment, the correlation parameters are calculated based on time domain signals.
[0206] Specifically, the correlation parameters of the current frame and the previous frame may be calculated using the following formula:
[0207]
number
[0208] where L(n) represents the time-domain signal of the left channel, R(n) represents the time-domain signal of the right channel, N is the total number of samples of the time-domain signal of the left channel, and L is the number of offset samples between the nth sample of the right channel signal and the nth sample of the left channel.
[0209] It should be understood that the left channel time-domain signal and the right channel time-domain signal in this specification may be all the left channel signals and right channel signals of the current frame, or may be the left channel signals and right channel signals of one or more subframes of the current frame.
[0210] Another implementation process of Example 6 is similar to the implementation process of the previous examples, and the details will not be described here.
[0211] Example 7:
[0212] The difference between Example 7 and the above-mentioned examples is that in the above-mentioned examples, it is necessary to determine whether to reuse the ITD value of the previous frame for the current frame, while in Example 7, it is necessary to determine whether to estimate the ITD value of the current frame based on the change trend of the ITD values of T frames before the current frame, where T is an integer greater than or equal to 2.
[0213] The ITD value ITD[i] of the current frame may be calculated in the following way: ITD[i]=ITD[i-1]+delta, where delta=ITD[i-1]-ITD[i-2], where ITD[i-1] represents the ITD value of the frame before the current frame, and ITD[i-2] represents the ITD value of the frame before the frame before the current frame.
[0214] Example 8:
[0215] The difference between Example 8 and the aforementioned examples is that in the aforementioned examples, the correlation parameters between the current frame and the previous frame are calculated based on the time / frequency signals of the current frame and the previous frame, while in Example 8, the correlation parameters are calculated based on the pitch periods of the current frame and the previous frame.
[0216] Specifically, the pitch period of the current frame and the pitch period of the corresponding previous frame may be calculated based on an existing pitch period algorithm; the deviation between the pitch period of the current frame and the pitch period of the previous frame is calculated; and the deviation between the pitch period of the current frame and the pitch period of the previous frame is used as a correlation parameter between the current frame and the previous frame.
[0217] It should be understood that the deviation between the pitch period of the current frame and the pitch period of the previous frame may be the deviation between the entire pitch period of the current frame and the entire pitch period of the previous frame, or the deviation between the pitch period of one or more subframes of the current frame and the pitch period of one or more subframes of the previous frame, or the sum of the deviations between the pitch periods of several subframes of the current frame and the pitch periods of several subframes of the previous frame, or the average value of the deviations between the pitch periods of several subframes of the current frame and the pitch periods of several subframes of the previous frame.
[0218] Example 9:
[0219] The difference between Example 9 and the previous examples is that in the previous examples, the ITD value of the current frame is determined based on the correlation parameters and / or the peak-to-average ratio parameters, while in Example 9, the ITD value of the current frame is determined based on the correlation parameters and / or the spectral tilt parameters.
[0220] In this case, the second pre-set condition may be that the correlation value of the correlation parameter between the current frame and the previous frame is greater than a threshold value, and / or that the spectral tilt value of the spectral tilt parameter is less than a threshold value (it should be understood that a greater spectral tilt value indicates a weaker signal voicing, and a smaller spectral tilt value indicates a stronger signal voicing).
[0221] Other processes of Example 9 are similar to those of the previous examples, and will not be described in detail here.
[0222] Example 10:
[0223] The difference between Example 10 and the previous examples is that the ITD value of the current frame is calculated in the previous examples, but the IPD value of the current frame is calculated in Example 10. It should be understood that the ITD value-related calculation processes in steps 710 to 770 need to be replaced with IPD value-related processes. For the IPD value calculation method, please refer to the prior art, and the details will not be described here.
[0224] Other processes of Example 10 are almost the same as those of the previous examples, and the details will not be described here.
[0225] It should be understood that the above ten embodiments are merely examples for illustrative purposes. In fact, these embodiments may be interchanged or combined with one another to obtain new embodiments. For the sake of brevity, the examples will not be listed one by one in this specification.
[0226] The following describes the device embodiments of the present application. The device embodiments can be used to implement the aforementioned method. Therefore, for the parts not described in detail, please refer to the aforementioned method embodiments.
[0227] 8 is a schematic block diagram of an encoder according to an embodiment of the present application. The encoder 800 of FIG. an acquiring unit 810 configured to acquire a multi-channel signal of a current frame; a first determining unit 820 configured to determine initial multi-channel parameters of the current frame; a second determining unit 830 configured to determine a difference parameter based on the initial multi-channel parameters of the current frame and the multi-channel parameters of K frames previous to the current frame, where the difference parameter is used to represent a difference between the initial multi-channel parameters of the current frame and the multi-channel parameters of the K frames previous to the current frame, where K is an integer greater than or equal to 1; a third determining unit 840 configured to determine multi-channel parameters of the current frame based on the differential parameters and the characteristic parameters of the current frame; an encoding unit 850 configured to encode the multi-channel signal based on the multi-channel parameters of the current frame; include.
[0228] In this embodiment of the present application, the multi-channel parameters of the current frame are determined by comprehensively considering the characteristic parameters of the current frame and the differences between the current frame and the previous K frames. This determination method is more appropriate than the method of directly reusing the multi-channel parameters of the previous frame for the current frame, and can more reliably ensure the accuracy of the inter-channel information of the multi-channel signal.
[0229] Optionally, in some embodiments, the third determining unit 840 is specifically configured to determine the multi-channel parameters of the current frame based on the characteristic parameters of the current frame when the difference parameters satisfy a first preset condition.
[0230] Optionally, in some embodiments, the difference parameter is an absolute value of a difference between an initial multi-channel parameter of the current frame and a multi-channel parameter of a frame preceding the current frame, and the first preset condition is that the difference parameter is greater than a preset first threshold.
[0231] Optionally, in some embodiments, the difference parameter is a product of an initial multi-channel parameter of the current frame and a multi-channel parameter of a frame preceding the current frame, and the first preset condition is that the difference parameter is less than or equal to 0.
[0232] Optionally, in some embodiments, the third determining unit 840 is specifically configured to determine the multi-channel parameters of the current frame based on correlation parameters of the current frame, where the correlation parameters are used to represent the degree of correlation between the current frame and the frame preceding the current frame.
[0233] Optionally, in some embodiments, the third determining unit 840 is specifically configured to determine the multi-channel parameters of the current frame based on a peak-to-average ratio parameter of the current frame, where the peak-to-average ratio parameter is used to represent the peak-to-average ratio of a signal of at least one channel in the multi-channel signal of the current frame.
[0234] Optionally, in some embodiments, the third determining unit 840 is specifically configured to determine multi-channel parameters of the current frame based on a correlation parameter and a peak-to-average ratio parameter of the current frame, where the correlation parameter is used to represent the correlation degree between the current frame and a frame previous to the current frame, and the peak-to-average ratio parameter is used to represent the peak-to-average ratio of a signal of at least one channel in the multi-channel signal of the current frame.
[0235] Optionally, in some embodiments, the encoder: a fourth determining unit configured to determine a correlation parameter based on the target channel signal in the multi-channel signal of the current frame and the target channel signal in the multi-channel signal of the previous frame; Further includes:
[0236] Optionally, in some embodiments, the fourth determining unit is particularly configured to determine the correlation parameter based on a frequency domain parameter of a target channel signal in the multi-channel signal of the current frame and a frequency domain parameter of the target channel signal in the multi-channel signal of the previous frame, where the frequency domain parameter is at least one of a frequency domain amplitude value and a frequency domain coefficient of the target channel signal.
[0237] Optionally, in some embodiments, the encoder: a fifth determining unit configured to determine a correlation parameter based on the pitch period of the current frame and the pitch period of the previous frame; Further includes:
[0238] Optionally, in some embodiments, the third determining unit 840 is specifically configured to determine the multi-channel parameters of the current frame based on the multi-channel parameters of T frames preceding the current frame, where T is an integer greater than or equal to 1, if the characteristic parameters satisfy a second preset condition.
[0239] Optionally, in some embodiments, the third determining unit 840 is specifically configured to determine the multi-channel parameters of the previous T frames as the multi-channel parameters of the current frame, where T is equal to 1.
[0240] Optionally, in some embodiments, the third determining unit 840 is specifically configured to determine the multi-channel parameters of the current frame based on the change trends of the multi-channel parameters of the previous T frames, where T is greater than or equal to 2.
[0241] Optionally, in some embodiments, the characteristic parameter includes a correlation parameter and / or a peak-to-average ratio parameter of the current frame, the correlation parameter is used to represent the degree of correlation between the current frame and a frame previous to the current frame, the peak-to-average ratio parameter is used to represent the peak-to-average ratio of a signal of at least one channel in the multi-channel signal of the current frame, and the second preset condition is that the characteristic parameter is greater than a preset threshold.
[0242] Optionally, in some embodiments, the initial multi-channel parameters for the current frame include at least one of an initial inter-channel coherence IC value for the current frame, an initial channel time difference ITD value for the current frame, an initial inter-channel phase difference IPD value for the current frame, an initial overall phase difference OPD value for the current frame, and an initial inter-channel level difference ILD value for the current frame.
[0243] Optionally, in some embodiments, the characteristic parameters of the current frame include at least one of parameters of the current frame, namely, a correlation parameter, a peak-to-average ratio parameter, a signal-to-noise ratio parameter, and a spectral tilt parameter, wherein the correlation parameter is used to represent the degree of correlation between the current frame and the previous frame, the peak-to-average ratio parameter is used to represent the peak-to-average ratio of the signal of at least one channel in the multi-channel signal of the current frame, the signal-to-noise ratio parameter is used to represent the signal-to-noise ratio of the signal of at least one channel in the multi-channel signal of the current frame, and the spectral tilt parameter is used to represent the spectral tilt of the signal of at least one channel in the multi-channel signal of the current frame.
[0244] 9 is a schematic block diagram of an encoder according to an embodiment of the present application. The encoder 900 of FIG. a memory 910 configured to store a program; a processor 920 configured to execute a program; When the program is executed, the processor 920 is configured to: obtain a multi-channel signal of a current frame; determine initial multi-channel parameters for the current frame; determine difference parameters based on the initial multi-channel parameters of the current frame and multi-channel parameters of K frames previous to the current frame, where the difference parameters are used to represent differences between the initial multi-channel parameters of the current frame and the multi-channel parameters of the K frames previous to the current frame, where K is an integer greater than or equal to 1; determine multi-channel parameters of the current frame based on the difference parameters and the characteristic parameters of the current frame; and encode the multi-channel signal based on the multi-channel parameters of the current frame.
[0245] In this embodiment of the present application, the multi-channel parameters of the current frame are determined by comprehensively considering the characteristic parameters of the current frame and the differences between the current frame and the previous K frames. This determination method is more appropriate than the method of directly reusing the multi-channel parameters of the previous frame for the current frame, and can more reliably ensure the accuracy of the inter-channel information of the multi-channel signal.
[0246] Optionally, in some embodiments, the processor 920 is specifically configured to determine the multi-channel parameters of the current frame based on the characteristic parameters of the current frame if the difference parameters satisfy a first preset condition.
[0247] Optionally, in some embodiments, the difference parameter is an absolute value of a difference between an initial multi-channel parameter of the current frame and a multi-channel parameter of a frame preceding the current frame, and the first preset condition is that the difference parameter is greater than a preset first threshold.
[0248] Optionally, in some embodiments, the difference parameter is a product of an initial multi-channel parameter of the current frame and a multi-channel parameter of a frame preceding the current frame, and the first preset condition is that the difference parameter is less than or equal to 0.
[0249] Optionally, in some embodiments, the processor 920 is specifically configured to determine the multi-channel parameters of the current frame based on correlation parameters of the current frame, the correlation parameters being used to represent the degree of correlation between the current frame and a frame preceding the current frame.
[0250] Optionally, in some embodiments, the processor 920 is specifically configured to determine the multi-channel parameters of the current frame based on a peak-to-average ratio parameter of the current frame, the peak-to-average ratio parameter being used to represent the peak-to-average ratio of a signal of at least one channel in the multi-channel signal of the current frame.
[0251] Optionally, in some embodiments, the processor 920 is specifically configured to determine multi-channel parameters for the current frame based on a correlation parameter and a peak-to-average ratio parameter for the current frame, where the correlation parameter is used to represent the degree of correlation between the current frame and a frame previous to the current frame, and the peak-to-average ratio parameter is used to represent the peak-to-average ratio of a signal of at least one channel in the multi-channel signal of the current frame.
[0252] Optionally, in some embodiments, the processor 920 is further configured to determine a correlation parameter based on the target channel signal in the multi-channel signal of the current frame and the target channel signal in the multi-channel signal of the previous frame.
[0253] Optionally, in some embodiments, the processor 920 is specifically configured to determine the correlation parameter based on a frequency domain parameter of a target channel signal in the multi-channel signal of the current frame and a frequency domain parameter of a target channel signal in the multi-channel signal of the previous frame, where the frequency domain parameter is a frequency domain amplitude value of the target channel signal.
[0254] Optionally, in some embodiments, the processor 920 is specifically configured to determine the correlation parameters based on frequency domain parameters of the target channel signal in the multi-channel signal of the current frame and frequency domain parameters of the target channel signal in the multi-channel signal of the previous frame, where the frequency domain parameters are frequency domain coefficients of the target channel signal.
[0255] Optionally, in some embodiments, the processor 920 is specifically configured to determine correlation parameters based on frequency domain parameters of a target channel signal in the multi-channel signal of the current frame and frequency domain parameters of a target channel signal in the multi-channel signal of the previous frame, where the frequency domain parameters are frequency domain amplitude values and frequency domain coefficients of the target channel signal.
[0256] Optionally, in some embodiments, the processor 920 is further configured to determine a correlation parameter based on the pitch period of the current frame and the pitch period of the previous frame.
[0257] Optionally, in some embodiments, the processor 920 is specifically configured to determine the multi-channel parameters of the current frame based on the multi-channel parameters of T frames preceding the current frame, where T is an integer greater than or equal to 1, if the characteristic parameters satisfy a second preset condition.
[0258] Optionally, in some embodiments, the processor 920 is specifically configured to determine the multi-channel parameters of the previous T frames as the multi-channel parameters of the current frame, where T is equal to one.
[0259] Optionally, in some embodiments, the processor 920 is specifically configured to determine the multi-channel parameters of the current frame based on the change trends of the multi-channel parameters of the previous T frames, where T is 2 or greater.
[0260] Optionally, in some embodiments, the characteristic parameter includes a correlation parameter and / or a peak-to-average ratio parameter of the current frame, the correlation parameter is used to represent the degree of correlation between the current frame and a frame previous to the current frame, the peak-to-average ratio parameter is used to represent the peak-to-average ratio of a signal of at least one channel in the multi-channel signal of the current frame, and the second preset condition is that the characteristic parameter is greater than a preset threshold.
[0261] Optionally, in some embodiments, the initial multi-channel parameters for the current frame include at least one of an initial inter-channel coherence IC value for the current frame, an initial channel time difference ITD value for the current frame, an initial inter-channel phase difference IPD value for the current frame, an initial overall phase difference OPD value for the current frame, and an initial inter-channel level difference ILD value for the current frame.
[0262] Optionally, in some embodiments, the characteristic parameters of the current frame include at least one of parameters of the current frame, namely, a correlation parameter, a peak-to-average ratio parameter, a signal-to-noise ratio parameter, and a spectral tilt parameter, wherein the correlation parameter is used to represent the degree of correlation between the current frame and the previous frame, the peak-to-average ratio parameter is used to represent the peak-to-average ratio of the signal of at least one channel in the multi-channel signal of the current frame, the signal-to-noise ratio parameter is used to represent the signal-to-noise ratio of the signal of at least one channel in the multi-channel signal of the current frame, and the spectral tilt parameter is used to represent the spectral tilt of the signal of at least one channel in the multi-channel signal of the current frame.
[0263] The term "and / or" herein indicates that a three-way relationship may exist. For example, A and / or B can indicate three cases: A alone, A and B together, and B alone. Furthermore, the character " / " herein generally indicates that the related objects are in an "or" relationship.
[0264] Those skilled in the art can recognize from the examples described in the embodiments disclosed herein that the units and algorithm steps can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether a function is performed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but the implementation should not be considered outside the scope of this application.
[0265] It can be clearly understood by those skilled in the art that for the purpose of convenient description, for the detailed operating processes of the above-mentioned systems, devices and units, reference can be made to the processes corresponding to the above-mentioned method embodiments, and the details will not be described again here.
[0266] In some embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods may be realized in other manners. For example, the described device embodiments are merely examples. For example, portions of a unit may merely be portions of a logical function and may be other portions in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some functions may be ignored and not performed. Also, the shown or discussed mutual couplings or direct couplings or communication connections may be realized by using some interfaces. Indirect couplings or communication connections between devices or units may be realized electrically, mechanically, or in other forms.
[0267] The units described as separate parts may or may not be physically separated, and the parts shown as units may or may not be physical units, in other words, they may be located in one location or distributed across multiple network units. Some or all of the units may be selected based on actual needs to achieve the objectives of the solution of the present embodiment.
[0268] Furthermore, the functional units in the embodiments of the present application may be incorporated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
[0269] When a function is implemented in the form of a software functional unit and sold or used as an independent product, the function may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or a portion contributing to the prior art, or some of the technical solutions may be realized in the form of a software product. The computer software product is stored in a storage medium and includes some instructions for instructing a computer device (which may be a personal computer, a server, a network device, etc.) to execute all or some of the steps of the method described in the embodiments of the present application. The storage medium includes any medium that can store program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0270] The above description is merely a specific implementation of the present application and is not intended to limit the scope of protection of the present application. Any changes or substitutions that are easily conceived by those skilled in the art within the technical scope disclosed in the present application shall fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the scope of protection of the claims. [Explanation of symbols]
[0271] 800 Encoder 810 Acquisition Units 820 First Decision Unit 830 Second Decision Unit 840 Third Decision Unit 850 coding units 900 Encoder 910 memory 920 processor
Claims
1. 1. A method for encoding a multi-channel signal, comprising: obtaining a multi-channel signal of a current frame; determining initial multi-channel parameters for the current frame; determining difference parameters based on the initial multi-channel parameters of the current frame and multi-channel parameters of K frames previous to the current frame, wherein the difference parameters are used to represent differences between the initial multi-channel parameters of the current frame and the multi-channel parameters of the K frames previous to the current frame, where K is an integer greater than or equal to 1; determining multi-channel parameters for the current frame based on the differential parameters and characteristic parameters for the current frame; encoding the multi-channel signal based on the multi-channel parameters of the current frame; A method comprising:
2. determining multi-channel parameters for the current frame based on the differential parameters and characteristic parameters for the current frame, determining the multi-channel parameters of the current frame based on the characteristic parameters of the current frame if the difference parameters satisfy a first preset condition; 2. The method of claim 1, comprising:
3. 3. The method of claim 2, wherein the difference parameter is an absolute value of a difference between the initial multi-channel parameters of the current frame and multi-channel parameters of a frame preceding the current frame, and the first preset condition is that the difference parameter is greater than a first preset threshold.
4. 3. The method of claim 2, wherein the difference parameter is a product of the initial multi-channel parameter of the current frame and a multi-channel parameter of a frame preceding the current frame, and the first preset condition is that the difference parameter is less than or equal to 0.
5. determining the multi-channel parameters of the current frame based on the characteristic parameters of the current frame, determining the multi-channel parameters of the current frame based on correlation parameters of the current frame, the correlation parameters being used to represent a degree of correlation between the current frame and the previous frame of the current frame; 5. The method of any one of claims 2 to 4, comprising:
6. The method comprises: determining the correlation parameters based on a target channel signal in the multi-channel signal of the current frame and a target channel signal in the multi-channel signal of the previous frame; 6. The method of claim 5, further comprising:
7. determining the correlation parameters based on a target channel signal in the multi-channel signal of the current frame and a target channel signal in the multi-channel signal of the previous frame, determining the correlation parameters based on frequency domain parameters of the target channel signal in the multi-channel signal of the current frame and frequency domain parameters of the target channel signal in the multi-channel signal of the previous frame, wherein the frequency domain parameters are at least one of frequency domain amplitude values and frequency domain coefficients of the target channel signal; 7. The method of claim 6, comprising:
8. The method comprises: determining the correlation parameters based on the pitch period of the current frame and the pitch period of the previous frame; 6. The method of claim 5, further comprising:
9. determining the multi-channel parameters of the current frame based on the characteristic parameters of the current frame, determining the multi-channel parameters of the current frame based on multi-channel parameters of T frames preceding the current frame if the characteristic parameters satisfy a second preset condition, where T is an integer greater than or equal to 1; 9. The method of any one of claims 2 to 8, comprising:
10. determining the multi-channel parameters of the current frame based on multi-channel parameters of T frames preceding the current frame, determining the multi-channel parameters of the previous T frames as the multi-channel parameters of the current frame, where T is equal to 1; 10. The method of claim 9, comprising:
11. determining the multi-channel parameters of the current frame based on multi-channel parameters of T frames preceding the current frame, determining the multi-channel parameters of the current frame based on the change trends of the multi-channel parameters of the previous T frames, where T is 2 or greater; 10. The method of claim 9, comprising:
12. 12. The method of claim 9, wherein the characteristic parameter of the current frame includes at least one of the correlation parameter and the peak-to-average ratio parameter of the current frame, the correlation parameter being used to represent the degree of correlation between the current frame and the previous frame of the current frame, and the peak-to-average ratio parameter being used to represent the peak-to-average ratio of a signal of at least one channel in the multi-channel signal of the current frame, and the second preset condition is that the characteristic parameter is greater than a preset threshold.
13. 13. The method of claim 1, wherein the initial multi-channel parameters for the current frame include at least one of an initial inter-channel coherence (IC) value for the current frame, an initial channel time difference (ITD) value for the current frame, an initial inter-channel phase difference (IPD) value for the current frame, an initial overall phase difference (OPD) value for the current frame, and an initial inter-channel level difference (ILD) value for the current frame.
14. 14. The method of claim 1, wherein the characteristic parameters of the current frame include at least one of the parameters of the current frame, namely the correlation parameter, the peak-to-average ratio parameter, the signal-to-noise ratio parameter, and the spectral tilt parameter, wherein the correlation parameter is used to represent the degree of correlation between the current frame and the previous frame, the peak-to-average ratio parameter is used to represent the peak-to-average ratio of the signal of the at least one channel in the multi-channel signal of the current frame, the signal-to-noise ratio parameter is used to represent the signal-to-noise ratio of the signal of the at least one channel in the multi-channel signal of the current frame, and the spectral tilt parameter is used to represent the spectral tilt of the signal of the at least one channel in the multi-channel signal of the current frame.
15. an acquisition unit configured to acquire a multi-channel signal of a current frame; a first determining unit configured to determine initial multi-channel parameters of the current frame; a second determining unit configured to determine a difference parameter based on the initial multi-channel parameters of the current frame and multi-channel parameters of K frames previous to the current frame, wherein the difference parameter is used to represent a difference between the initial multi-channel parameters of the current frame and the multi-channel parameters of the K frames previous to the current frame, where K is an integer greater than or equal to 1; a third determining unit configured to determine multi-channel parameters of the current frame based on the difference parameters and characteristic parameters of the current frame; a coding unit configured to code the multi-channel signal based on the multi-channel parameters of the current frame; An encoder comprising:
16. 16. The encoder of claim 15, wherein the third determining unit is particularly configured to determine the multi-channel parameters of the current frame based on the characteristic parameters of the current frame if the difference parameters satisfy a first preset condition.
17. 17. The encoder of claim 16, wherein the difference parameter is an absolute value of a difference between the initial multi-channel parameters of the current frame and multi-channel parameters of a frame preceding the current frame, and the first preset condition is that the difference parameter is greater than a first preset threshold.
18. 17. The encoder of claim 16, wherein the difference parameter is a product of the initial multi-channel parameter of the current frame and a multi-channel parameter of a frame preceding the current frame, and the first preset condition is that the difference parameter is less than or equal to 0.
19. 19. The encoder of claim 16, wherein the third determination unit is specifically configured to determine the multi-channel parameters of the current frame based on correlation parameters of the current frame, the correlation parameters being used to represent a degree of correlation between the current frame and the previous frame of the current frame.
20. The encoder a fourth determining unit configured to determine the correlation parameter based on a target channel signal in the multi-channel signal of the current frame and a target channel signal in the multi-channel signal of the previous frame; The encoder of claim 19 further comprising:
21. 21. The encoder of claim 20, wherein the fourth determination unit is specifically configured to determine the correlation parameter based on a frequency domain parameter of the target channel signal in the multi-channel signal of the current frame and a frequency domain parameter of the target channel signal in the multi-channel signal of the previous frame, the frequency domain parameter being at least one of a frequency domain amplitude value and a frequency domain coefficient of the target channel signal.
22. The encoder a fifth determining unit configured to determine the correlation parameter based on the pitch period of the current frame and the pitch period of the previous frame. The encoder of claim 19 further comprising:
23. 23. The encoder of claim 16, wherein the third determining unit is specifically configured to determine the multi-channel parameters of the current frame based on multi-channel parameters of T frames preceding the current frame if the characteristic parameters satisfy a second preset condition, where T is an integer greater than or equal to 1.
24. The encoder of claim 23 , wherein the third determining unit is specifically configured to determine the multi-channel parameters of the T previous frames as the multi-channel parameters of the current frame, where T is equal to 1.
25. 24. The encoder of claim 23, wherein the third determining unit is specifically configured to determine the multi-channel parameters of the current frame based on change trends of the multi-channel parameters of the previous T frames, where T is greater than or equal to 2.
26. 26. The encoder of claim 23, wherein the characteristic parameter includes at least one of a correlation parameter and a peak-to-average ratio parameter of the current frame, the correlation parameter being used to represent the degree of correlation between the current frame and the previous frame of the current frame, and the peak-to-average ratio parameter being used to represent a peak-to-average ratio of a signal of at least one channel in the multi-channel signal of the current frame, and the second preset condition is that the characteristic parameter is greater than a preset threshold.
27. 27. The encoder of claim 15, wherein the initial multi-channel parameters for the current frame include at least one of an initial inter-channel coherence (IC) value for the current frame, an initial channel time difference (ITD) value for the current frame, an initial inter-channel phase difference (IPD) value for the current frame, an initial overall phase difference (OPD) value for the current frame, and an initial inter-channel level difference (ILD) value for the current frame.
28. 28. The encoder of claim 15, wherein the characteristic parameters of the current frame include at least one of the parameters of the current frame, namely the correlation parameter, the peak-to-average ratio parameter, the signal-to-noise ratio parameter, and the spectral tilt parameter, wherein the correlation parameter is used to represent the degree of correlation between the current frame and the previous frame, the peak-to-average ratio parameter is used to represent the peak-to-average ratio of the signal of the at least one channel in the multi-channel signal of the current frame, the signal-to-noise ratio parameter is used to represent the signal-to-noise ratio of the signal of the at least one channel in the multi-channel signal of the current frame, and the spectral tilt parameter is used to represent the degree of spectral tilt of the signal of the at least one channel in the multi-channel signal of the current frame.