Inter-channel phase difference parameter coding method and device

The adaptive IPD parameter encoding method addresses inefficiencies in stereo audio coding by selecting encoding schemes based on frame characteristics, improving encoding quality and resource efficiency.

JP2025168499APending Publication Date: 2025-11-07HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2025146258
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2017-06-30
Filing Date
2025-09-03
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Existing IPD parameter encoding methods in stereo audio coding are inefficient in resource usage and either occupy multiple resources or result in low accuracy, leading to poor encoding quality.

Method used

An adaptive IPD parameter encoding method that selects from multiple predefined schemes based on reference parameters, including signal characteristics of the current and previous frames, to optimize encoding efficiency and quality.

Benefits of technology

The method improves encoding quality by adaptively processing IPD parameters, ensuring consistent encoding with the frame characteristics, reducing resource usage, and enhancing decoding performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025168499000001_ABST
    Figure 2025168499000001_ABST
Patent Text Reader

Abstract

To provide an IPD parameter encoding method and device.SOLUTION: This application discloses an IPD parameter encoding method including the steps of: obtaining a reference parameter used to determine an IPD parameter encoding scheme of a current frame of a multi-channel signal; determining the IPD parameter encoding scheme of the current frame based on the reference parameter, where the determined IPD parameter encoding scheme of the current frame is one of at least two preset IPD parameter encoding schemes; and processing an IPD parameter of the current frame based on the determined IPD parameter encoding scheme of the current frame. The technical solutions provided in this application can improve encoding quality of the multi-channel signal.SELECTED DRAWING: Figure 5
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This application claims priority to Chinese Patent Application No. 201710524352.0, entitled "Method and Apparatus for Inter-Channel Phase Difference Parameter Encoding," filed with the China Patent Office on June 30, 2017, the entirety of which is incorporated herein by reference.

[0002] The present invention relates to the field of communication technology, and in particular to an inter-channel phase difference parameter encoding method and apparatus. [Background technology]

[0003] As the quality of life improves, the requirements for high-quality audio are constantly increasing. Compared with mono audio, stereo audio can show the sense of direction and distribution of each sound source, improve the clarity and intelligibility of audio information, and enhance the presence of audio playback. Therefore, stereo audio is very popular.

[0004] Parametric stereo (PS) coding is a common stereo coding technology. In PS coding, encoding and decoding processes are performed on stereo signals (or multi-channel signals) based on spatial perception characteristics. Specifically, the encoding and decoding of multi-channel signals is converted into the encoding and decoding of mono audio signals and spatial perception parameters. The spatial perception parameters of PS coding include inter-channel coherence (IC), inter-channel level difference (ILD), inter-channel time difference (ITD), and inter-channel phase difference (IPD). The ITD and IPD parameters are spatial perception parameters that indicate the horizontal direction of the sound source. The ILD, ITD, and IPD parameters determine the human ear's perception of the sound source's position and can effectively determine the location of the sound field, making them important for stereo signal restoration. Therefore, determining parameters such as the IPD parameter is important for stereo signal restoration.

[0005] In prior art 1, when calculating the IPD parameters for each frame of a stereo signal, specifically, the time domain signal is transformed into a frequency domain signal, the frequency domain signal is divided into multiple subbands, the IPD parameters for the subbands are calculated one by one, and then the IPD parameters for all the subbands are quantized and used to encode the stereo signal. It can be seen that the IPD parameter calculation in prior art 1 needs to be performed on each subband one by one. As a result, multiple resources are occupied and the encoding efficiency is low.

[0006] In prior art 2, when calculating the IPD parameters of each frame of a stereo signal, specifically, the time domain signal is transformed into a frequency domain signal, and the IPD parameters of one frame of the stereo signal are calculated based on the frequency domain signal. The IPD parameters of the stereo signal including the frame are group inter-channel phase difference (Group IPD) parameters, which are then quantized and used to encode the stereo signal. It can be seen that in the prior art, only one IPD parameter (i.e., Group IPD parameter) is calculated, and then only one IPD parameter can be quantized. Although fewer resources are occupied, the accuracy of the encoding phase information is low, resulting in poor encoding quality. Summary of the Invention [Means for solving the problem]

[0007] The present application provides an IPD parameter encoding method and apparatus to increase the diversity of IPD parameter encoding scheme selection, better preserve phase information, and improve audio encoding quality.

[0008] According to a first aspect of the present invention, there is provided an IPD encoding method, the method comprising: obtaining reference parameters used to determine an IPD parameter coding scheme for a current frame of the multi-channel signal; determining an IPD parameter coding scheme for a current frame based on the reference parameters, wherein the determined IPD parameter coding scheme for the current frame is one of at least two predefined IPD parameter coding schemes; and processing the IPD parameters of the current frame based on the determined IPD parameter encoding scheme of the current frame.

[0009] When the IPD parameters are encoded, the reference parameters are obtained, and an IPD parameter encoding scheme for the current frame corresponding to the current frame is determined based on the reference parameters. The IPD parameters for the current frame are processed using the determined IPD parameter encoding scheme. As a result, it can be seen that not only can the IPD parameters for the current frame be adaptively processed to improve the encoding quality of the multi-channel signal, but also the processing of the IPD parameters for the current frame is consistent with the current frame.

[0010] Regarding the first aspect, in a first implementation of the first aspect, the reference parameters include at least one of signal characteristic parameters of the current frame and signal characteristic parameters of A frames prior to the current frame, where A is an integer greater than or equal to 1.

[0011] The signal characteristic parameters of the current frame include at least one of a parameter indicating a correlation between the left channel and the right channel of the current frame, a variance of subband ITD parameters of the current frame, a signal type of the current frame, and an ITD parameter of the current frame.

[0012] The signal characteristic parameters of the A frames previous to the current frame include at least one of a parameter indicating a correlation between the left channel and the right channel of each of the A previous frames, a variance of subband IPD parameters of each of the A previous frames, an ITD parameter of each of the A previous frames, an IPD parameter encoding scheme of each of the A previous frames, and a signal type of each of the A previous frames.

[0013] The signal type includes a voice type or a music type.

[0014] The value of A can be 1, 2, 3, 4, 5, etc.

[0015] In some cases, when determining the IPD parameter coding scheme for the current frame, not only the signal characteristic parameters of the current frame but also the signal characteristic parameters of the A frames preceding the current frame are used, so that the determined IPD parameter coding scheme for the current frame not only matches the current frame but also matches the A frames preceding the current frame, thereby ensuring continuous continuity of the coding scheme and further improving the coding quality.

[0016] Regarding the first implementation of the first aspect, in a second implementation of the first aspect, the reference parameters include parameters indicating a correlation between the left channel and the right channel of the current frame.

[0017] If the value of the parameter indicating the correlation between the left channel and the right channel of the current frame is greater than or equal to a first threshold, the IPD parameter coding scheme of the current frame is a first coding scheme of the at least two IPD parameter coding schemes.

[0018] As with the second implementation of the first aspect, in a third implementation of the first aspect, the first threshold is 0.75.

[0019] With respect to any one of the first to third implementations of the first aspect, in a fourth implementation of the first aspect, the reference parameters include an IPD parameter encoding scheme for each of the previous A frames and a signal type for each of the previous A frames.

[0020] If the IPD parameter coding scheme of each of the previous A frames is the first coding scheme of at least two IPD parameter coding schemes, and the signal type of each of the previous A frames is a music type, the IPD parameter coding scheme of the current frame is the first coding scheme, and the value of A may be 1.

[0021] Regarding the first implementation of the first aspect, in a fifth implementation of the first aspect, the reference parameters include ITD parameters of the current frame, variances of subband IPD parameters of the current frame, and signal types of each of the previous A frames.

[0022] If the value of the IPD parameter of the current frame is greater than a third threshold, the variance of the subband IPD parameter of the current frame is less than a fourth threshold, and the signal type of each of the A frames before the current frame is a speech type, the IPD parameter coding scheme of the current frame is a first coding scheme of the at least two IPD parameter coding schemes.

[0023] In a sixth implementation of the first aspect, with respect to any one of the second to fifth implementations of the first aspect, the first encoding scheme is Group IPD parameter coding scheme, Skip encoding of IPD parameters, or setting the value of the IPD parameter to 0.

[0024] In some cases, transmitting the IPD parameters of the current frame to the decoder does not improve the decoding performance. Therefore, the first coding scheme can skip encoding the IPD parameters, set the value of the IPD parameters to 0, or be a Group ID parameter coding scheme. If the first coding scheme skips encoding the IPD parameters, all the coding bits can be used to encode parameters that can improve the decoding performance. If the first coding scheme sets the value of the IPD parameters to 0 or is a Group ID parameter coding scheme, since the IPD parameters or Group ID parameters with a value of 0 occupy very few bits, to improve the coding performance, as many coding bits as possible can be used to encode parameters that can improve the decoding performance.

[0025] Regarding the sixth implementation of the first aspect, in a seventh implementation of the first aspect, when the first encoding scheme is a Group IPD parameter encoding scheme, the step of processing the IPD parameters of the current frame based on the determined IPD parameter encoding scheme of the current frame includes: extracting subband IPD parameters of a left channel frequency domain signal and a right channel frequency domain signal of a current frame; determining Group IPD parameters for the current frame based on the extracted subband IPD parameters; and encoding the Group IPD parameters of the current frame.

[0026] In relation to any one of the second to seventh implementations of the first aspect, in an eighth implementation of the first aspect, if the IPD parameter coding scheme of the current frame is not the first coding scheme, The IPD parameter coding scheme of the current frame is the second coding scheme.

[0027] The second encoding scheme includes a subband set IPD parameter encoding scheme or a subband IPD parameter encoding scheme, which encodes subband IPD parameters of some or all of the subbands of the current frame.

[0028] As with the eighth implementation of the first aspect, in a ninth implementation of the first aspect, the second encoding scheme is a subband IPD parameter encoding scheme.

[0029] The step of processing the IPD parameters of the current frame based on the determined IPD parameter coding scheme of the current frame includes: calculating IPD parameters for all or a portion of the subbands of the left channel frequency domain signal and the right channel frequency domain signal of the current frame; and encoding the IPD parameters obtained by the calculation for all or some of the subbands.

[0030] If the second coding scheme encodes IPD parameters for some subbands of the left and right channel frequency domain signals of the current frame, only subband IPD parameters for some subbands that are relatively low in frequency may be coded. In one implementation, IPD parameters for the remaining subbands other than the highest-frequency subband and the second-highest-frequency subband may be coded. Because the subband IPD parameters other than the highest-frequency subband and the second-highest-frequency subband do not significantly improve the coding effect, skipping the coding of the subband IPD parameters for two subbands can ensure that coding bits can be used for parameters that can improve the coding effect, in order to further improve the coding quality.

[0031] In relation to the first aspect or any one of the first to ninth implementations of the first aspect, in a tenth implementation of the first aspect, the method The method further includes performing encoding based on the determined IPD parameter encoding scheme of the current frame.

[0032] For example, a coding scheme flag bit may be set to indicate whether the IPD parameter coding scheme of the current frame is the first coding scheme or the second coding scheme, and the flag bit occupies 1 bit. In this way, the decoder can determine the IPD parameter coding scheme of the current frame based on the coding scheme flag bit to perform decoding using the corresponding decoding method.

[0033] Regarding the first aspect or any one of the first to tenth implementations of the first aspect, in an eleventh implementation of the first aspect, before the step of processing the IPD parameters of the current frame based on the determined IPD parameter encoding scheme of the current frame, the method determining whether the determined IPD parameter coding scheme of the current frame needs to be adjusted; If it is determined that the determined IPD parameter coding scheme of the current frame needs to be adjusted, adjusting the determined IPD parameter coding scheme of the current frame.

[0034] The step of processing the IPD parameters of the current frame based on the determined IPD parameter coding scheme of the current frame includes: Processing the IPD parameters of the current frame based on the adjusted IPD parameter encoding scheme of the current frame is included.

[0035] Regarding the eleventh implementation of the first aspect, in a twelfth implementation of the first aspect, the step of determining whether the determined IPD parameter encoding scheme of the current frame needs to be adjusted is performed based on the IPD parameter encoding schemes of A frames preceding the current frame.

[0036] If the IPD parameter coding scheme of the current frame is determined based on the IPD parameter coding schemes of the A frames preceding the current frame, a smooth transition between the IPD parameter coding scheme of the current frame and the IPD parameter coding schemes of the A frames preceding the current frame is ensured to avoid a sudden change in coding effect.

[0037] Regarding any one of the first to twelfth implementations of the first aspect, in a thirteenth implementation of the first aspect, a parameter indicating the correlation between the left channel and the right channel of the current frame is obtained using the following calculation formula:

[0038]

number

number

[0039] E l (b) shows the total energy of the left audio channel, E r (b) shows the total energy of the right audio channel, L r (k) denotes the real part of the kth frequency value of the audio left channel frequency domain signal, and R r (k) denotes the real part of the kth frequency value of the audio right channel frequency domain signal, and L i (k) denotes the imaginary part of the kth frequency value of the audio left channel frequency domain signal, and R i (k) denotes the imaginary part of the k-th frequency value of the audio right channel frequency domain signal, L denotes the number of subband spectral coefficients, N denotes the number of subbands, n denotes the index value of the time domain signal, k denotes the index value of the frequency domain signal, Length denotes the frame length, and x L (n) denotes the audio left channel time domain signal, and x R (n) denotes the audio right channel time domain signal, L(k) denotes the kth frequency value of the audio left channel frequency domain signal and used to calculate the IPD parameters, and R(k) denotes the kth frequency value of the audio right channel frequency domain signal and used to calculate the IPD parameters, where x L (n) and x R (n) denotes a sequence of real numbers.

[0040] Regarding any one of the first to twelfth implementations of the first aspect, in a fourteenth implementation of the first aspect, a parameter indicating the correlation between the left channel and the right channel of the current frame is obtained using the following calculation formula:

[0041]

number

number

[0042] L denotes the number of subband spectral coefficients, n denotes the index value of the time domain signal, k denotes the index value of the frequency domain signal, Length denotes the frame length, and x L (n) denotes the audio left channel time domain signal, and x R (n) denotes the audio right channel time domain signal, where x L (n) and x R (n) denotes a sequence of real numbers.

[0043] Regarding any one of the first to twelfth implementations of the first aspect, in the fifteenth implementation of the first aspect, a parameter indicating the correlation between the left channel and the right channel of the current frame is obtained using the following calculation formula:

[0044]

number

number

[0045] L denotes the number of subband spectral coefficients, n denotes the index value of the time domain signal, k denotes the index value of the frequency domain signal, Length denotes the frame length, and x L (n) denotes the audio left channel time domain signal, and x R (n) denotes the audio right channel time domain signal, where x L (n) and x R (n) denotes the sequence of real numbers. R * (k) denotes the conjugate of R(k). Specifically, R * (k) denotes the conjugate of the kth frequency value of the audio right channel frequency domain signal.

[0046] According to a second aspect of the present invention, there is provided an IPD parameter encoding apparatus, the apparatus comprising: an acquisition unit configured to acquire reference parameters, the reference parameters being used to determine an IPD parameter coding scheme for a current frame of the multi-channel signal; a determining unit configured to determine an IPD parameter coding scheme of a current frame based on a reference parameter, wherein the determined IPD parameter coding scheme of the current frame is one of at least two predefined IPD parameter coding schemes; and a processing unit configured to process the IPD parameters of the current frame based on the determined IPD parameter encoding scheme of the current frame.

[0047] When the IPD parameters are encoded, the reference parameters are obtained, and an IPD parameter encoding scheme for the current frame corresponding to the current frame is determined based on the reference parameters. The IPD parameters for the current frame are processed using the determined IPD parameter encoding scheme. As a result, it can be seen that not only can the IPD parameters for the current frame be adaptively processed to improve the encoding quality of the multi-channel signal, but also the processing of the IPD parameters for the current frame is consistent with the current frame.

[0048] Regarding the second aspect, in a first implementation of the second aspect, the reference parameters include at least one of signal characteristic parameters of the current frame and signal characteristic parameters of A frames prior to the current frame, where A is an integer greater than or equal to 1.

[0049] The signal characteristic parameters of the current frame include at least one of a parameter indicating a correlation between the left channel and the right channel of the current frame, a variance of subband ITD parameters of the current frame, a signal type of the current frame, and an ITD parameter of the current frame.

[0050] The signal characteristic parameters of the A frames previous to the current frame include at least one of a parameter indicating a correlation between the left channel and the right channel of each of the A previous frames, a variance of subband IPD parameters of each of the A previous frames, an ITD parameter of each of the A previous frames, an IPD parameter encoding scheme of each of the A previous frames, and a signal type of each of the A previous frames.

[0051] The signal type includes a voice type or a music type.

[0052] In some cases, when determining the IPD parameter coding scheme for the current frame, not only the signal characteristic parameters of the current frame but also the signal characteristic parameters of the A frames preceding the current frame are used, so that the determined IPD parameter coding scheme for the current frame not only matches the current frame but also matches the A frames preceding the current frame, thereby ensuring continuous continuity of the coding scheme and further improving the coding quality.

[0053] Regarding the first implementation of the second aspect, in a second implementation of the second aspect, the reference parameters include parameters indicating a correlation between the left channel and the right channel of the current frame.

[0054] If the value of the parameter indicating the correlation between the left channel and the right channel of the current frame is greater than or equal to a first threshold, the IPD parameter coding scheme of the current frame is a first coding scheme of the at least two IPD parameter coding schemes.

[0055] As with the second implementation of the second aspect, in a third implementation of the second aspect, the first threshold is 0.75.

[0056] With respect to the first implementation of the second aspect, in a fourth implementation of the second aspect, the reference parameters include an IPD parameter encoding scheme for each of the previous A frames and a signal type for each of the previous A frames.

[0057] If the IPD parameter coding scheme of each of the previous A frames is the first coding scheme of at least two IPD parameter coding schemes, and the signal type of each of the previous A frames is a music type, the IPD parameter coding scheme of the current frame is the first coding scheme, and the value of A may be 1.

[0058] Regarding any one of the second to fourth implementations of the second aspect, in a fifth implementation of the second aspect, the reference parameters include ITD parameters of the current frame, variances of subband IPD parameters of the current frame, and signal types of each of the previous A frames.

[0059] If the value of the IPD parameter of the current frame is greater than a third threshold, the variance of the subband IPD parameter of the current frame is less than a fourth threshold, and the signal type of each of the A frames before the current frame is a speech type, the IPD parameter coding scheme of the current frame is a first coding scheme of the at least two IPD parameter coding schemes.

[0060] In a sixth implementation of the second aspect, with respect to any one of the second to fifth implementations of the second aspect, the first encoding scheme is Group IPD parameter coding scheme, Skip encoding of IPD parameters, or setting the value of the IPD parameter to 0.

[0061] In some cases, transmitting the IPD parameters of the current frame to the decoder does not improve the decoding performance. Therefore, the first coding scheme can skip encoding the IPD parameters, set the value of the IPD parameters to 0, or be a Group ID parameter coding scheme. If the first coding scheme skips encoding the IPD parameters, all the coding bits can be used to encode parameters that can improve the decoding performance. If the first coding scheme sets the value of the IPD parameters to 0 or is a Group ID parameter coding scheme, since the IPD parameters or Group ID parameters with a value of 0 occupy very few bits, to improve the coding performance, as many coding bits as possible can be used to encode parameters that can improve the decoding performance.

[0062] In relation to any one of the second to fifth implementations of the second aspect, in a seventh implementation of the second aspect, if the IPD parameter coding scheme of the current frame is not the first coding scheme, The IPD parameter coding scheme of the current frame is the second coding scheme.

[0063] The second encoding scheme includes a subband set IPD parameter encoding scheme or a subband IPD parameter encoding scheme, which encodes subband IPD parameters of some or all of the subbands of the current frame.

[0064] With respect to the seventh implementation of the second aspect, in an eighth implementation of the second aspect, the second encoding scheme is a sub-band IPD parameter encoding scheme.

[0065] The step of processing the IPD parameters of the current frame based on the determined IPD parameter coding scheme of the current frame includes: calculating IPD parameters for all or a portion of the subbands of the left channel frequency domain signal and the right channel frequency domain signal of the current frame; and encoding the IPD parameters obtained by the calculation for all or some of the subbands.

[0066] If the second coding scheme encodes IPD parameters for some subbands of the left and right channel frequency domain signals of the current frame, only subband IPD parameters for some subbands that are relatively low in frequency may be coded. In one implementation, IPD parameters for the remaining subbands other than the highest-frequency subband and the second-highest-frequency subband may be coded. Because the subband IPD parameters other than the highest-frequency subband and the second-highest-frequency subband do not significantly improve the coding effect, skipping the coding of the subband IPD parameters for two subbands can ensure that coding bits can be used for parameters that can improve the coding effect, in order to further improve the coding quality.

[0067] In a ninth implementation of the second aspect, with respect to the second aspect or any one of the first to eighth implementations of the second aspect, the device The apparatus further includes an encoding unit configured to perform encoding based on the determined IPD parameter encoding scheme of the current frame.

[0068] For example, a coding scheme flag bit may be set to indicate whether the IPD parameter coding scheme of the current frame is the first coding scheme or the second coding scheme, and the flag bit occupies 1 bit. In this way, the decoder can determine the IPD parameter coding scheme of the current frame based on the coding scheme flag bit to perform decoding using the corresponding decoding method.

[0069] With respect to the second aspect or any one of the first to ninth implementations of the second aspect, in a tenth implementation of the second aspect, the determination unit is further configured to determine whether the IPD parameter encoding scheme of the current frame and determined by the determination unit needs to be adjusted.

[0070] The device is an adjusting unit configured to adjust the determined IPD parameter coding scheme of the current frame when the determining unit determines that the determined IPD parameter coding scheme of the current frame needs to be adjusted; and a processing unit further configured to process the IPD parameters of the current frame based on the adjusted IPD parameter coding scheme of the current frame.

[0071] Regarding the tenth implementation of the second aspect, in an eleventh implementation of the second aspect, the step of determining whether the determined IPD parameter encoding scheme of the current frame needs to be adjusted is performed based on the IPD parameter encoding schemes of A frames preceding the current frame.

[0072] If the IPD parameter coding scheme of the current frame is determined based on the IPD parameter coding schemes of the A frames preceding the current frame, a smooth transition between the IPD parameter coding scheme of the current frame and the IPD parameter coding schemes of the A frames preceding the current frame is ensured to avoid a sudden change in coding effect.

[0073] With respect to the second aspect or any one of the first to eleventh implementations of the second aspect, in a twelfth implementation of the second aspect, the acquisition unit is specifically configured to acquire a parameter indicating the correlation between the left channel and the right channel of the current frame using the following calculation formula:

[0074]

number

number

[0075] E l (b) shows the total energy of the left audio channel, E r (b) shows the total energy of the right audio channel, L r (k) denotes the real part of the kth frequency value of the audio left channel frequency domain signal, and R r (k) denotes the real part of the kth frequency value of the audio right channel frequency domain signal, and L i (k) denotes the imaginary part of the kth frequency value of the audio left channel frequency domain signal, and R i (k) denotes the imaginary part of the k-th frequency value of the audio right channel frequency domain signal, L denotes the number of subband spectral coefficients, N denotes the number of subbands, n denotes the index value of the time domain signal, k denotes the index value of the frequency domain signal, Length denotes the frame length, and x L (n) denotes the audio left channel time domain signal, and x R (n) denotes the audio right channel time domain signal, L(k) denotes the kth frequency value of the audio left channel frequency domain signal and used to calculate the IPD parameters, and R(k) denotes the kth frequency value of the audio right channel frequency domain signal and used to calculate the IPD parameters, where x L(n) and x R (n) denotes a sequence of real numbers.

[0076] Regarding any one of the first to eleventh implementations of the first aspect, in a thirteenth implementation of the first aspect, a parameter indicating the correlation between the left channel and the right channel of the current frame is obtained using the following calculation formula:

[0077]

number

number

[0078] L denotes the number of subband spectral coefficients, n denotes the index value of the time domain signal, k denotes the index value of the frequency domain signal, Length denotes the frame length, and x L (n) denotes the audio left channel time domain signal, and x R (n) denotes the audio right channel time domain signal, where x L (n) and x R (n) denotes a sequence of real numbers.

[0079] Regarding any one of the first to eleventh implementations of the first aspect, in a fourteenth implementation of the first aspect, a parameter indicating the correlation between the left channel and the right channel of the current frame is obtained using the following calculation formula:

[0080]

number

number

[0081] L denotes the number of subband spectral coefficients, n denotes the index value of the time domain signal, k denotes the index value of the frequency domain signal, Length denotes the frame length, and x L (n) denotes the audio left channel time domain signal, and x R (n) denotes the audio right channel time domain signal, where x L (n) and x R (n) denotes the sequence of real numbers. R * (k) denotes the conjugate of R(k). Specifically, R * (k) denotes the conjugate of the kth frequency value of the audio right channel frequency domain signal.

[0082] According to a third aspect of the present invention, there is provided a terminal, the terminal including a memory and a processor.

[0083] The memory is configured to store groups of executable code.

[0084] The processor is configured to execute executable code stored in the memory to perform the first aspect or any one of the first to thirteenth implementations of the first aspect.

[0085] A fourth aspect of the present invention provides a storage medium. The storage medium stores executable code. When the executable code is executed, the first aspect or any one of the first to thirteenth implementations of the first aspect can be performed.

[0086] According to a fifth aspect of the present invention, there is provided a computer program, which is capable of performing any one of the first aspect or the first to thirteenth implementations of the first aspect.

[0087] In an embodiment of the present invention, when an IPD parameter is encoded, a reference parameter is obtained, an IPD parameter encoding scheme of the current frame corresponding to the current frame is determined based on the reference parameter, and the IPD parameter of the current frame is processed by using the determined IPD parameter encoding scheme, so that the IPD parameter of the current frame can not only be adaptively processed to improve the encoding quality of the multi-channel signal, but the processing of the IPD parameter of the current frame is also consistent with the current frame.

[0088] In order to more clearly describe the technical solutions in the embodiments of the present invention, the following briefly describes the accompanying drawings necessary for describing the embodiments. Obviously, the accompanying drawings in the following description only show some embodiments of the present invention, and those skilled in the art can obtain other drawings from these accompanying drawings without expending creative efforts. [Brief explanation of the drawings]

[0089] [Figure 1] 1 is a schematic diagram illustrating the principle of PS encoding. [Figure 2] 1 is a schematic diagram illustrating the principle of PS decoding. [Figure 3] 1 is a schematic diagram of an application scenario of the inventive solution according to an embodiment of the present invention; [Figure 4] FIG. 2 is a schematic diagram of another application scenario of the inventive solution according to an embodiment of the present invention; [Figure 5] 1 is a schematic flowchart of an IPD parameter encoding method according to an embodiment of the present invention; [Figure 6] 4 is another schematic flowchart of an IPD parameter encoding method according to an embodiment of the present invention; [Figure 7] 4 is another schematic flowchart of an IPD parameter encoding method according to an embodiment of the present invention; [Figure 8] 1 is a schematic structural diagram of an IPD parameter encoding device according to an embodiment of the present invention; [Figure 9]FIG. 10 is a schematic structural diagram of an IPD parameter encoding device according to another embodiment of the present invention; DETAILED DESCRIPTION OF THE INVENTION

[0090] The following provides a clear description of the technical solutions in the embodiments of the present invention, with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but are not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without expending creative efforts shall fall within the protection scope of the present invention.

[0091] FIG. 1 is a schematic diagram illustrating the principle of PS encoding.

[0092] In PS coding, an encoder downmixes a stereo signal input from multiple channels (e.g., x1 channel and x2 channel) to a mono audio signal, extracts the spatial perceptual parameters of the stereo signal through spatial perceptual parameter analysis, encodes the mono audio signal to obtain a mono audio bitstream, and encodes the spatial perceptual parameters to obtain a spatial perceptual parameter bitstream. Furthermore, the encoder performs bitstream multiplexing on the mono audio bitstream and the spatial perceptual parameter bitstream to obtain a bitstream for stereo signal coding.

[0093] FIG. 2 is a schematic diagram illustrating the principle of PS decoding.

[0094] The decoder performs bitstream demultiplexing on the bitstream for encoding the stereo signal to obtain a mono audio bitstream and a spatial perceptual parameter bitstream, performs decoding of the mono audio signal with the mono audio bitstream, and performs decoding of the spatial perceptual parameters with the spatial perceptual parameter bitstream, and after decoding the mono audio signal, synthesizes a reconstructed stereo signal using the spatial perceptual parameters.

[0095] In a specific implementation, the spatial perception parameters for the aforementioned PS encoding and PS decoding include parameters such as IC, ILD, ITD, and IPD. IC describes inter-channel correlation or correlation. This parameter determines the perception of the range of the sound field and can improve the spatial sense and sound stability of the audio signal. The ILD parameter is used to distinguish the horizontal angle of the stereo source and represents the intensity difference between channels. This parameter affects the frequency content of the entire spectrum. The ITD and IPD parameters are spatial perception parameters that indicate the horizontal direction of the sound source. The ILD, ITD, and IPD parameters determine the human ear's perception of the sound source's location and can effectively determine the location of the sound field, making them important for stereo signal restoration. Therefore, determining parameters such as the IPD parameter is important for stereo signal restoration.

[0096] An application scenario of the solution of the present invention is shown in Figure 3. After encoding the collected multi-channel signals (including encoding IPD parameters), the terminal 301 transmits the code stream obtained by encoding to a radio access network (RAN) 302. For example, the terminal 301 may directly transmit the code stream to a base station 3021 in the RAN 302. After passing through the base station 3021, the code stream is transmitted to a packet data network gateway (PGW) 3022. After passing through the PGW 3022, the code stream is transmitted to a core network 303. Specifically, the code stream may pass through a session border controller (SBC) 3031 in the core network 303. The code stream passing through the core network 303 enters the RAN 304. The RAN 304 includes a PGW 3042 and a base station 3041. After the codestream passes through PGW 3042 and arrives at base station 3041, base station 3041 transmits the codestream to terminal 305, which decodes the codestream and reproduces the multi-channel signal obtained by decoding.

[0097] It should be noted that in the above description, the RAN only includes two examples of network elements (base station and PGW). In actual implementation, the RAN will further include multiple other network elements. For simplicity of description, other network elements are omitted in the embodiments of the present invention. Similarly, the core network only includes an example of an SBC. For simplicity of description, other network elements are omitted in the embodiments of the present invention. It can be understood that the network elements in the above networks are merely examples, and the names of the network elements may be different in different networks. For example, the PGW is called an Evolved Packet Data Gateway (ePDG) in an LTE network. Similarly, the connection schemes between the above network elements may also change with the evolution of the network. Therefore, in the embodiments of the present invention, the application scenarios of the present invention are not limited to the above examples.

[0098] Terminal 301 and terminal 305 are terminals having cellular network access capabilities, and may be wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, mobile phones, tablet computers (Pads), notebook computers (NBs), personal computers (PCs), etc.

[0099] Another application scenario of the solution of the present invention is shown in Fig. 4. After encoding the collected multi-channel signals (including encoding the IPD parameters), terminal 401 transmits the codestream obtained by encoding to terminal 403 via Internet 402. Terminal 403 decodes the codestream and reproduces the multi-channel signals obtained by decoding.

[0100] The terminal 401 and the terminal 403 are terminals that have an internet access function, and may be a wearable device, a VR device, an AR device, a mobile phone, a Pad, a NB, a PC, or the like.

[0101] 5 is a schematic flowchart of an IPD parameter encoding method according to an embodiment of the present invention. The method includes the following steps:

[0102] S501. Obtain reference parameters used to determine an IPD parameter coding scheme for a current frame of a multi-channel signal.

[0103] In a specific implementation, the IPD parameter encoding method provided in this embodiment of the present invention may be performed by an encoder capable of encoding a multi-channel signal. After encoding the IPD parameters of the current frame using the IPD parameter encoding method provided in this embodiment of the present invention, the encoder transmits the encoded IPD parameters. The decoder uses the IPD parameters obtained by decoding for stereo synthesis processing. The IPD parameter encoding method provided in this embodiment of the present invention will be described in detail below. It should be noted that the encoder and decoder in this embodiment of the present invention are only described in terms of their functions, and the actual form of the encoder and decoder may be the aforementioned terminal. It can be understood that in call processing, a terminal may have the functions of both an encoder and a decoder. For simplicity of explanation, when the current frame of a multi-channel signal is described later, the current frame will be directly used. The multi-channel signal in this embodiment of the present invention may specifically be a dual-channel signal, a three-channel signal, a four-channel signal, etc. The specific number of channels corresponding to the multi-channel signal is not limited in this embodiment of the present invention.

[0104] In some possible implementations, when encoding the IPD parameters of a current frame, the encoder first obtains reference parameters used to determine the IPD parameter coding scheme of the current frame, and then determines the IPD parameter coding scheme of the current frame based on the reference parameters. In other words, the reference parameters are used to determine the IPD parameter coding scheme of the current frame. Alternatively, it can be understood that the reference parameters may be used to determine another parameter coding scheme of the current frame. In this embodiment of the present invention, the reference parameters are not limited to being used to determine the IPD parameter coding scheme. In a specific implementation, the reference parameters may include at least one of the signal characteristic parameters of the current frame and the signal characteristic parameters of A frames preceding the current frame. Specifically, the reference parameters may include the signal characteristic parameters of the current frame, the signal characteristic parameters of A frames preceding the current frame, the signal characteristic parameters of the current frame and the signal characteristic parameters of A frames preceding the current frame, etc., and can be specifically determined based on the actual application scenario. This is not limited herein. Here, A is an integer greater than or equal to 1. Specifically, the A frames preceding the current frame may be one frame, two frames, three frames, etc., preceding the current frame. This is not a limitation herein. The frame before the current frame and the current frame are consecutive in time order. The two frames before the current frame are consecutive in time order, including the frame before the current frame. The three frames before the current frame are consecutive in time order, including the two frames before the current frame.

[0105] In a specific implementation, the signal characteristic parameters of the current frame may include one or more of the following parameters: a parameter indicating the correlation between the left channel and the right channel of the current frame, the variance of the subband IPD parameters of the current frame, the signal type of the current frame, and the ITD parameters of the current frame. The parameter indicating the correlation between the left channel and the right channel of the current frame and the variance of the subband IPD parameters of the current frame may be obtained by calculation based on the left channel frequency domain signal and the right channel frequency domain signal of the multi-channel signal. The ITD parameters of the current frame may be determined based on a method for extracting the ITD parameters of the multi-channel signal of the current frame. The method for extracting the ITD parameters of the current frame may include an extraction method provided in a standard protocol or an extraction method known to those skilled in the art. This is not limited herein.

[0106] The signal characteristic parameters of the A frames before the current frame include one or more of the following parameters: a parameter indicating the correlation between the left channel and the right channel of each of the A frames before the current frame; a variance of the subband IPD parameters of each of the A frames before the current frame; an ITD parameter of each of the A frames before the current frame; an IPD parameter coding scheme of each of the A frames before the current frame; and a signal type of each of the A frames before the current frame. The selection of specific parameters may be determined based on an actual application scenario, which is not limited herein. The IPD parameter coding scheme of each of the A frames before the current frame may be stored in a cache or memory. The signal type may include a speech type or a music type. The signal characteristic parameters of the A frames before the current frame may be stored in a cache. It may be understood that after the signal characteristic parameters of the current frame are obtained, the signal characteristic parameters of the current frame are also stored in a cache to determine the IPD parameter coding scheme of a subsequent frame.

[0107] In some possible implementations, the encoder may perform a time-frequency transform on the left-channel and right-channel time-domain signals of the multi-channel signal of the current frame to obtain a left-channel frequency-domain signal and a right-channel frequency-domain signal of the current frame. Specifically, the time-frequency transform may be performed using an implementation such as a Fast Fourier Transform (FFT) or a Modified Discrete Cosine Transform (MDCT). This is not limited herein. The time-frequency transform performed on the left-channel and right-channel time-domain signals of the multi-channel signal of the current frame may be performed in the form of a frame or in the form of a subframe. Typically, one frame includes four subframes, two subframes, or eight subframes. A specific number of subframes may be determined based on a specific situation.

[0108] For example, in implementation, if the encoder transforms the left channel and right channel time domain signals of the multi-channel signal of the current frame into left channel frequency domain signals and right channel frequency domain signals through FFT, the following transform equations may be specifically used:

[0109]

number

[0110] where n denotes the index value of the time domain signal, k denotes the index value of the frequency domain signal, Length denotes the frame length, M denotes the time-frequency transform length for transforming the time domain signal into the frequency domain signal, and x L (n) denotes the audio left channel time domain signal, and x R(n) denotes the audio right channel time domain signal, L(k) denotes the kth frequency value of the audio left channel frequency domain signal and used to calculate the IPD parameters, and R(k) denotes the kth frequency value of the audio right channel frequency domain signal and used to calculate the IPD parameters, where x L (n) and x R (n) denotes a sequence of real numbers.

[0111] Real number sequence x(n)(x L (n) and x R The Fourier transform coefficients X(k) of a sequence of real numbers x(n) are complex numbers, and the real part of the sequence x(n) has even symmetry, while the imaginary part has odd symmetry. Specifically, X(k) has conjugate symmetry. X(0) and X(N / 2) are both real numbers and satisfy the following relationship: x(k)=X * (Nk), where 1≦k≦L / 2−1.

[0112] When using this conjugate symmetry to perform the discrete Fourier transform, the encoder does not need to calculate and store X(k), L / 2+1≦k≦L−1, and the imaginary parts of X(0) and X(L / 2), but only needs to calculate X(L / 2) from X(0), which reduces the occupation of the encoder's computing and storage resources.

[0113] After converting the left channel and right channel time domain signals of the current frame into left channel frequency domain signals and right channel frequency domain signals in the form of a frame or subframe, the encoder can calculate a parameter indicating the correlation between the left channel and the right channel of the current frame based on the left channel frequency domain signal and the right channel frequency domain signal.

[0114] In implementation, the parameter indicating the correlation between the left and right channels of the current frame can be obtained by calculation using the following formula:

[0115]

number

number

number

[0116] E l (b) shows the total energy of the left audio channel, E r (b) shows the total energy of the right audio channel, L r (k) denotes the real part of the kth frequency value of the audio left channel frequency domain signal, and R r (k) denotes the real part of the kth frequency value of the audio right channel frequency domain signal, and L i (k) denotes the imaginary part of the kth frequency value of the audio left channel frequency domain signal, and R i (k) denotes the imaginary part of the k-th frequency value of the audio right channel frequency domain signal, L denotes the number of subband spectral coefficients, and N denotes the number of subbands.

[0117] In another implementation, the parameter indicative of the correlation between the left and right channels of the current frame can be obtained by calculation using the following formula:

[0118]

number

[0119] In another implementation, the parameter indicative of the correlation between the left and right channels of the current frame can be obtained by calculation using the following formula:

[0120]

number

[0121] where R * (k) denotes the conjugate of R(k). Specifically, R * (k) denotes the conjugate of the kth frequency value of the audio right channel frequency domain signal.

[0122] In some possible implementations, after transforming the left and right channel time-domain signals of the current frame into left and right channel frequency-domain signals, the encoder may further calculate the variance of subband IPD parameters of the current frame based on the left and right channel frequency-domain signals. Specifically, the encoder may first divide the left and right channel frequency-domain signals of the current frame into at least two subbands (in other words, multiple subbands). It is assumed that the left and right channel frequency-domain signals are divided into N subbands, where N is an integer greater than 2. Next, the encoder calculates IPD parameters of all subbands based on the frequency-domain signals of the N subbands obtained by the division, and calculates the variance of the subband IPD parameters of the current frame based on the IPD parameters of the N subbands obtained by the calculation.

[0123] In implementation, the encoder can specifically calculate the subband IPD parameters using the following formula:

[0124]

number

[0125] where b is the index value of the subband, and the frequencies included in subband b are A b-1 ≦k≦A b-1 is.

[0126] In implementation, the encoder can use the following formula to calculate the variance of the subband IPD parameters:

[0127]

number

number

[0128] In another implementation of the present invention, the subband IPD parameters can be obtained by calculation using the following formula:

number

[0129] Here, atan2 denotes the inverse tangent function.

[0130] It can be understood that in practical application, the sub-band IPD parameters can alternatively be obtained by calculation in another manner, and the specific calculation manner of the sub-band IPD parameters is not limited in this embodiment of the present invention.

[0131] S502. Determine the IPD parameter encoding scheme of the current frame based on the obtained reference parameters.

[0132] In a particular implementation, the encoder may adaptively select one of a plurality of predefined IPD parameter coding schemes as the IPD parameter coding scheme for the current frame based on the obtained reference parameters.

[0133] The plurality of predefined IPD parameter coding schemes may include a first coding scheme and a second coding scheme. The first coding scheme may include a Group IPD parameter coding scheme, skipping coding of an IPD parameter, setting the value of an IPD parameter to 0, etc. The second coding scheme may include a subband set IPD parameter coding scheme, a subband IPD parameter coding scheme, etc. The subband IPD parameter coding scheme may encode IPD parameters of all or some of the subbands of the left channel frequency domain signal and the right channel frequency domain signal of the current frame.

[0134] It may be understood that in some implementations, the first encoding scheme may be specifically predetermined to be one of a Group IPD parameter coding scheme, skipping coding of the IPD parameter, and setting the value of the IPD parameter to 0. Thus, the encoder can directly determine that the encoding scheme is a Group IPD parameter coding scheme, skipping coding of the IPD parameter, or setting the value of the IPD parameter to 0, and does not need to select from the three encoding schemes. Similarly, the second encoding scheme may be further specifically predetermined to be one of a subband set IPD parameter coding scheme and a subband IPD parameter coding scheme. Thus, the encoder can directly determine that the encoding scheme is a subband set IPD parameter coding scheme or a subband IPD parameter coding scheme, and does not need to select from the two encoding schemes.

[0135] In some other embodiments, the encoder may first determine the first encoding scheme or the second encoding scheme. When determining the first encoding scheme, the encoder selects one of the three encoding schemes described above. Similarly, when determining the second encoding scheme, the encoder selects one of the two second encoding schemes described above.

[0136] In some embodiments, after the IPD parameter coding scheme for the current frame is determined, the determined IPD parameter coding scheme for the current frame may be coded. A specific coding scheme may set predefined parameters as predefined values ​​and use different values ​​to indicate different coding schemes. For example, in implementation, the IPD parameter coding scheme for the current frame may be indicated by using a coding scheme flag bit. The flag bit may occupy 1 bit. If the value of this bit is 0, this indicates that the IPD parameter coding scheme for the current frame is the first coding scheme. If the value of this bit is 1, this indicates that the IPD parameter coding scheme for the current frame is the second coding scheme. Of course, if the value of this bit is 1, this may alternatively indicate that the IPD parameter coding scheme for the current frame is the first coding scheme, and if the value of this bit is 0, this may alternatively indicate that the IPD parameter coding scheme for the current frame is the second coding scheme. A decoder may determine the IPD parameter coding scheme based on the value of the flag bit to determine a corresponding decoding method.

[0137] S503. Process the IPD parameters of the current frame based on the determined IPD parameter encoding scheme of the current frame.

[0138] In some possible implementations, the reference parameter includes a parameter indicating the correlation between the left channel and the right channel of the current frame. In this case, when the IPD parameter coding scheme of the current frame is determined, the parameter indicating the correlation between the left channel and the right channel of the current frame may be compared with a predefined first threshold. If the value of the parameter indicating the correlation between the left channel and the right channel of the current frame is equal to or greater than the first threshold, the IPD parameter coding scheme of the current frame is the first coding scheme. Conversely, if the value of the parameter indicating the correlation between the left channel and the right channel of the current frame is less than the first threshold, the IPD parameter coding scheme of the current frame is the second coding scheme. The value of the predefined first threshold ranges from 0.6 to 0.95. For example, the value may be specifically 0.89, 0.8, 0.75, etc.

[0139] In some possible implementations, the reference parameter includes the variance of the subband IPD parameters of the current frame. In this case, when the IPD parameter coding scheme of the current frame is determined, the variance of the subband IPD parameters of the current frame can be compared with a predefined second threshold. If the value of the parameter indicating the correlation between the left channel and the right channel of the current frame is smaller than the second threshold, this indicates that the IPD parameter coding scheme of the current frame is the first coding scheme. Conversely, if the value of the parameter indicating the correlation between the left channel and the right channel of the current frame is equal to or greater than the second threshold, this indicates that the IPD parameter coding scheme of the current frame is the second coding scheme. The value of the predefined second threshold ranges from 0.05 to 0.5. For example, the value may be 0.45, 0.25, 0.3, etc.

[0140] In some possible implementations, the reference parameters include the signal type of the current frame. For example, in implementations, if the signal type of the current frame is a speech type, the IPD parameter coding scheme of the current frame may be determined to be the second coding scheme. If the signal type of the current frame is a music type, the IPD parameter coding scheme of the current frame may be determined to be the first IPD parameter coding scheme. In some other embodiments, it may be understood that the signal type of the current frame is not the only reference parameter for determining the IPD parameter coding scheme of the current frame. The IPD parameter coding scheme may be further determined by referring to another reference parameter.

[0141] In some possible implementations, the reference parameters include ITD parameters of the current frame. If the value of the ITD parameters of the current frame is greater than a predefined threshold, the IPD parameter coding scheme of the current frame is determined to be the first coding scheme. Otherwise, the IPD parameter coding scheme of the current frame is determined to be the second coding scheme. In one embodiment, the predefined threshold may be 1, 2, 3, 4, or 5.

[0142] It may be understood that the signal characteristic parameters of the current frame may include only one of the aforementioned parameters. In this case, the IPD parameter coding scheme of the current frame can be determined if the parameter satisfies the corresponding parameter condition. Of course, the signal characteristic parameters of the current frame may alternatively include at least two of the aforementioned parameters. In this case, the IPD parameter coding scheme of the current frame can be determined only if at least two parameters respectively satisfy the corresponding parameter condition.

[0143] In some possible implementations, the reference parameters include an IPD parameter coding scheme for each of the A frames before the current frame and a signal type for each of the A frames before the current frame. In this case, it may be determined whether the IPD parameter coding scheme for each of the A frames before the current frame is a predefined IPD parameter coding scheme and whether the signal type for each of the A frames before the current frame is a predefined signal type. If the IPD parameter coding scheme for each of the A frames before the current frame is a first coding scheme and the signal type for each of the A frames of the current frame is a music type, the IPD parameter coding scheme of the current frame may be determined as the first coding scheme.

[0144] For example, if A=1, the A frames before the current frame are one frame before the current frame. If the IPD parameter coding scheme of the frame before the current frame is the first coding scheme and the signal type of the frame before the current frame is music type, the IPD parameter coding scheme of the current frame can be determined as the first coding scheme. Otherwise, the IPD parameter coding scheme of the current frame is determined to be not the first coding scheme, for example, the second coding scheme.

[0145] If A=2, the A frames before the current frame are two frames before the current frame. If the IPD parameter coding schemes of the frames two frames before the current frame are both the first coding scheme and the signal type of the frame two frames before the current frame is a music type, the IPD parameter coding scheme of the current frame may be determined as the first coding scheme. Otherwise, the IPD parameter coding scheme of the current frame is determined to be not the first coding scheme, for example, the second coding scheme.

[0146] In some possible implementations, the reference parameters include the ITD parameters of the current frame, the variance of the subband IPD parameters of the current frame, and the signal type of each of the A frames preceding the current frame. In this case, the absolute value of the ITD parameters of the current frame is compared with a predefined third threshold, and the variance of the subband IPD parameters of the current frame is compared with a predefined fourth threshold, and the signal type of each of the A frames preceding the current frame is determined to be speech type. The value of the predefined third threshold may range from 0 to 4. For example, the value of the third threshold may be 4, 2, 0, etc. The value of the predefined fourth threshold may range from 0.05 to 0.4. The value of the fourth threshold may be 0.4, 0.35, 0.25, 0.05, etc. If the absolute value of the IPD parameters of the current frame is greater than the third threshold, the variance of the subband IPD parameters of the current frame is less than the fourth threshold, and the signal type of each of the A frames before the current frame is the speech type, the IPD parameter coding scheme of the current frame may be determined as the first coding scheme. Otherwise, the IPD parameter coding scheme of the current frame is determined to be not the first coding scheme, for example, the second coding scheme.

[0147] If the A frames before the current frame are the frames before the current frame, the absolute value of the ITD parameters of the current frame is greater than the third threshold, the variance of the subband IPD parameters of the current frame is less than the fourth threshold, and the signal type of the frame before the current frame is a speech type, the IPD parameter coding scheme of the current frame may be determined as the first coding scheme. If the A frames before the current frame are the two frames before the current frame, the absolute value of the ITD parameters of the current frame is greater than the third threshold, the variance of the subband IPD parameters of the current frame is less than the fourth threshold, and the signal type of each of the two frames before the current frame is a speech type, the IPD parameter coding scheme of the current frame may be determined as the first coding scheme.

[0148] In some possible implementations, after determining that the IPD parameter coding scheme of the current frame is the first coding scheme, the encoder may process the IPD parameters of the current frame based on the first coding scheme. For example, if the first coding scheme skips encoding the IPD parameters, no operation is performed, and the process corresponding to encoding the IPD parameters of the current frame is terminated. If the first coding scheme is a Group IPD parameter coding scheme, the Group IPD parameters of the current frame may be coded. The Group IPD parameters of the current frame are used as the IPD parameters of the current frame. If the first coding scheme sets the value of an IPD parameter to 0, the value of the IPD parameter of the current frame may be set to 0, and then the IPD parameter with a value of 0 is processed. For example, if the value of an IPD parameter is required as an input during processing, the value of the IPD parameter of the current frame may be set to 0, and then 0 may be used as an input for processing.

[0149] In some embodiments, the reference parameters include a parameter indicating the correlation between the left channel and the right channel of the current frame and may further include the IPD parameter coding scheme of the frame preceding the current frame and the signal type of the previous frame. If the value of the parameter indicating the correlation between the left channel and the right channel of the current frame is equal to or greater than a first threshold, the IPD parameter coding scheme of the current frame may be determined to be the first coding scheme. If the value of the parameter indicating the correlation between the left channel and the right channel of the current frame is less than the first threshold, the IPD parameter coding scheme of the frame preceding the current frame is the first coding scheme, and the signal type of the previous frame is a music signal type, the IPD parameter coding scheme of the current frame may be determined to be the first coding scheme. Alternatively, if the value of the parameter indicating the correlation between the left channel and the right channel of the current frame is less than the first threshold, the IPD parameter coding scheme of the frame preceding the current frame is the second coding scheme or the signal type of the frame preceding the current frame is a voice type, the IPD parameter coding scheme of the current frame may be determined to be the second coding scheme.

[0150] Furthermore, in an optional implementation, after the IPD parameter coding scheme of the current frame is determined using the above implementation, whether to adjust the IPD parameter coding scheme of the current frame may be further determined based on the IPD parameter coding scheme of the frame preceding the current frame. For example, whether to adjust the IPD parameter coding scheme of the current frame may be determined based on the IPD parameter coding scheme of the frame, two frames, three frames, four frames, or five frames preceding the current frame. In a possible implementation, if the IPD parameter coding scheme of the current frame is the same as the IPD parameter coding scheme of the current frame, there is no need to adjust the IPD parameter coding scheme of the current frame. If the IPD parameter coding scheme of the current frame is different from the IPD parameter coding scheme of the current frame, adjustment of the IPD parameter coding scheme of the current frame may be considered. For example, two, three, four, or five frames preceding the current frame, including the frame preceding the current frame, use the same IPD parameter coding scheme. Furthermore, if the IPD parameter coding schemes used in the two, three, four, or five frames preceding the current frame are different from the IPD parameter coding scheme of the current frame, the IPD parameter coding scheme of the current frame may be adjusted. Specifically, the IPD parameter coding scheme of the current frame is adjusted to be the same as the IPD parameter coding scheme of the current frame. Adjusting the IPD parameter coding scheme of the current frame can ensure that the coding scheme of the current frame matches the coding scheme of the previous frame to some extent, thereby ensuring a smooth transition between the previous and current frames during decoding of the encoded codestream and improving perceptual quality.

[0151] Specifically, in some embodiments, when the encoding scheme is the second encoding scheme, the encoder may extract IPD parameters of at least some subbands of the left channel frequency domain signal and the right channel frequency domain signal of the current frame. Specifically, the at least some subbands of the left channel frequency domain signal and the right channel frequency domain signal of the current frame may include all or some of the Nsubband subbands obtained by dividing the left channel frequency domain signal and the right channel frequency domain signal of the current frame. This is not limited in this specification. In a specific implementation, based on coding requirements such as the coding rate and coding quality of the multi-channel signal coding, the user may determine that the frequency domain range of the left channel frequency domain signal and the right channel frequency domain signal of the current frame and used to encode the Group IPD parameters of the current frame includes the entire frequency domain range of the left channel frequency domain signal and the right channel frequency domain signal of the current frame, specifically the frequency domain signals of all subbands of the left channel frequency domain signal and the right channel frequency domain signal of the current frame, or a specific frequency domain range of the left channel frequency domain signal and the right channel frequency domain signal of the current frame, specifically the frequency domain signals of some frames of the left channel frequency domain signal and the right channel frequency domain signal of the current frame. The frequency domain signals of some frames of the left channel frequency domain signal and the right channel frequency domain signal of the current frame are included in the frequency domain signals of some subbands of the left channel frequency domain signal and the right channel frequency domain signal.

[0152] In some possible implementations, the encoder may first extract IPD parameters for all or some of the subbands of the left and right channel frequency domain signals of the current frame and then determine the IPD parameter coding scheme for the current frame. If the first coding scheme skips encoding the IPD parameters for the current frame, the IPD parameters for all or some of the subbands of the left and right channel frequency domain signals of the current frame may not be extracted directly. In some other implementations, instead, the IPD parameters for all or some of the subbands of the left and right channel frequency domain signals of the current frame are first extracted, and then the IPD parameter coding scheme for the current frame is determined.

[0153] In some possible implementations, when the encoder determines that the frequency domain range of the left channel frequency domain signal and the right channel frequency domain signal used to encode the Group IPD parameters of the left channel frequency domain signal and the right channel frequency domain signal of the current frame is the entire frequency domain range of the left channel frequency domain signal and the right channel frequency domain signal of the current frame, the encoder may extract the IPD parameters of each of all subbands of the left channel frequency domain signal and the right channel frequency domain signal of the current frame (specifically, the N subband subbands of the current frame), calculate the average value of the IPD parameters of all the extracted subbands, and then use the obtained average value of all the IPD parameters of the subbands as the Group IPD parameters of the current frame. In implementations, the formula for calculating the Group IPD parameters of the current frame is as follows:

[0154]

number

[0155] G_IPD denotes the Group IPD parameters of the current frame, and IPD(b) denotes the IPD parameters of the b-th subband.

[0156] Optionally, in some possible implementations, when the encoder determines that the frequency domain range of the left channel frequency domain signal and the right channel frequency domain signal used to encode the Group IPD parameters of the left channel frequency domain signal and the right channel frequency domain signal of the current frame is a specific frequency domain range of the left channel frequency domain signal and the right channel frequency domain signal of the current frame, specifically, for example, [k1, k2], IPD parameters of the frequency domain signal between the (k1)th frequency and the (k2)th frequency, and some subbands of the left channel frequency domain signal and the right channel frequency domain signal of the current frame (specifically, subbands of the frequency domain signal between the (k1)th frequency and the (k2)th frequency), may be extracted, and an average value of the IPD parameters of all the extracted subbands may be calculated, and then the obtained average value of all the IPD parameters of the subbands may be used as the Group IPD parameters of the current frame.

[0157] In a specific implementation, the IPD parameters of the subbands of the frequency domain signal between the (k1)th frequency and the (k2)th frequency can be predefined as the IPD parameters of each frequency. Specifically, in this case, the calculation of the IPD parameters of the subbands can be replaced with the calculation of the IPD parameters of each frequency. The Group IPD parameters of the current frame are calculated using the IPD parameters of each frequency as the IPD parameters of each subband. The method for calculating the IPD parameters of each frequency one by one in the predefined frequency domain range [k1, k2] is as follows: IPD(k)=∠L(k)R * (k), k1 ≤ k ≤ k2.

[0158] where ∠ denotes the angle of a complex number to be calculated, L(k) denotes the k-th frequency value of the audio left channel frequency domain signal, and R* (k) denotes the conjugate of the kth frequency value of the audio right channel frequency domain signal.

[0159] Furthermore, statistical processing can be performed on the IPD(k) of a predefined range (a multi-frame signal of a multi-channel frequency domain signal including the current frame and A frames before the current frame) to obtain a Group IPD parameter.

[0160] For example, if a specific frequency domain range [k1, k2] is a selection range of six frames each of the left channel frequency domain signal and the right channel frequency domain signal, the average value of the IPD parameter of the (k2-k1+1)th frequency of each frame of the left channel frequency domain signal and the right channel frequency domain signal having six frames can be calculated, and the calculation formula is as follows:

[0161]

number

[0162] Additionally, the average value of the IPD parameters of six consecutive frames including the current frame is calculated and used as the Group IPD parameter for the current frame.

[0163]

number

[0164]

number

number

number

[0165] In some possible implementations, the second encoding scheme may be a subband set IPD parameter encoding scheme or a subband IPD parameter encoding scheme. For example, if the IPD parameter encoding scheme of the current frame is a subband IPD parameter extraction scheme, the IPD parameters of all or some of the subbands of the left channel frequency domain signal and the right channel frequency domain signal of the current frame are extracted, and then the IPD parameters of the subbands are quantized using any quantization scheme. This is not particularly limited.

[0166] 6 illustrates a procedure of an IPD parameter encoding method according to another embodiment of the present invention. This embodiment is described using an example in which the reference parameters include a parameter indicating the correlation between the left channel and the right channel of the current frame, the IPD parameter encoding scheme of the frame preceding the current frame, and the signal type of the frame preceding the current frame, the value of the first threshold is 0.75, and the value of A is 1. As shown in FIG. 6, this embodiment includes the following steps:

[0167] S601. Obtain a parameter indicating the correlation between the left and right channels of the current frame.

[0168] For the specific manner of obtaining the parameter indicating the correlation between the left and right channels of the current frame, please refer to the above description, and the details will not be repeated here.

[0169] S602: Determine whether the value of the parameter indicating the correlation between the left channel and the right channel of the current frame is greater than or equal to 0.75. If the value of the parameter indicating the correlation between the left channel and the right channel is less than 0.75, proceed to step S603; if the value of the parameter indicating the correlation between the left channel and the right channel is greater than or equal to 0.75, proceed to step S607.

[0170] S603. The IPD parameter coding scheme of the frame preceding the current frame is obtained.

[0171] The IPD parameter coding scheme of the previous frame of the current frame may be stored in a cache, and the IPD parameter coding scheme of the previous frame may skip coding of the IPD parameters or may code all or some of the subband IPD parameters of the subbands of the left channel frequency domain signal and the right channel frequency domain signal.

[0172] S604. Determine whether the IPD parameter encoding scheme of the frame preceding the current frame skips encoding of IPD parameters. If the IPD parameter encoding scheme of the frame preceding the current frame skips encoding of IPD parameters, proceed to step S605. If the IPD parameter encoding scheme of the frame preceding the current frame does not skip encoding of IPD parameters, proceed to step S608.

[0173] S605: The signal type of the frame preceding the current frame is obtained.

[0174] The signal type of the frame previous to the current frame may be stored in the cache, which may be a music signal type or a speech signal type.

[0175] S606: Determine whether the signal type of the frame before the current frame is a music signal type. If the signal type of the frame before the current frame is a music signal type, proceed to step S607; if the signal type of the frame before the current frame is not a music signal type, proceed to step S608.

[0176] S607: Specifically, it is confirmed that the IPD parameter encoding scheme of the current frame skips encoding of the IPD parameters, and then the IPD parameter encoding of the current frame is skipped. The processing procedure for the current frame is ended.

[0177] S608. Encode subband IPD parameters for all or some of the subbands of the left-channel frequency-domain signal and the right-channel frequency-domain signal of the current frame. The subbands have a one-to-one correspondence with the subband IPD parameters. In other words, each subband has a corresponding subband IPD parameter.

[0178] The specific process of obtaining the subband IPD parameters has been described above and the details will not be described again here.

[0179] When subband IPD parameters of some subbands of the left channel frequency domain signal and the right channel frequency domain signal of the current frame are coded, the coded subband IPD parameters of a specific portion of the subbands are set based on requirements. For example, assume that there are a total of a subbands, and the frequency values ​​of the a subbands gradually increase from the 0th subband to the (a-1)th subband. In one embodiment, only the subband IPD parameters from the 0th subband to the (a-3)th subband may be coded. In other words, the subband IPD parameters of the two subbands with the highest and second highest frequencies, respectively, are not coded. In another embodiment, only the subband IPD parameters from the second subband to the (a-1)th subband may be coded. In other words, the subband IPD parameters of the two subbands with the lowest and second lowest frequencies, respectively, are not coded. Of course, alternatively, any two subband IPD parameters of a subband may not be coded. It can be understood that in some embodiments, the number of subbands corresponding to coded subband IPD parameters may be set based on specific requirements. For example, the subband IPD parameter of the (a-1) subband of the a subband may be coded, the subband IPD parameter of the (a-2) subband of the a subband may be coded, the subband IPD parameter of the (a-3) subband of the a subband may be coded, or the subband IPD parameter of the (a-4) subband of the a subband may be coded.

[0180] It may be understood that the execution sequence of the acquisition steps S601, S603, and S605 in Fig. 6 is not limited. Any one of the acquisition steps S601, S603, and S605 may be executed first, or the acquisition steps S601, S603, and S605 may be executed simultaneously. Similarly, the execution sequence of the determination steps S602, S604, and S606 is not limited. Any one of the determination steps S602, S604, and S606 may be executed first, or the determination steps S602, S604, and S606 may be executed simultaneously.

[0181] 7 illustrates the procedure of an IPD parameter encoding method according to another embodiment of the present invention, which includes the following steps:

[0182] S701. Obtain reference parameters used to determine an IPD parameter coding scheme for a current frame of a multi-channel signal.

[0183] For specific reference parameters and specific manners for obtaining the reference parameters, please refer to the description of the previous embodiment, and the details will not be described again here.

[0184] S702. Determine the IPD parameter coding scheme of the current frame based on the obtained parameters.

[0185] For the IPD parameter encoding scheme of the current frame, please refer to the description of the previous embodiment, and the details will not be described again here.

[0186] S703. Determine whether the IPD parameter coding scheme of the current frame is the same as the IPD parameter coding scheme of the frame preceding the current frame. If the IPD parameter coding scheme of the current frame is the same as the IPD parameter coding scheme of the frame preceding the current frame, proceed to step S704. If the IPD parameter coding scheme of the current frame is different from the IPD parameter coding scheme of the frame preceding the current frame, proceed to step S705.

[0187] S704: Set the predefined value of the counter to 0, and proceed to step S707.

[0188] In other words, there is no need to adjust the IPD parameter coding scheme of the current frame.

[0189] S705. Determine whether the predefined value of the counter is less than 5. If the predefined value of the counter is less than 5, proceed to step S706. If the predefined value of the counter is 5 or greater, proceed to step S707.

[0190] S706. Adjust the IPD parameter encoding scheme of the current frame, increase the predefined value of the counter by 1, and go to step S708.

[0191] If the IPD parameter coding scheme of the current frame is the first coding scheme, the IPD parameter coding scheme of the current frame is adjusted to the second coding scheme. For example, if the IPD parameter coding scheme of the current frame skips coding of IPD parameters, the IPD parameter coding scheme of the current frame is adjusted to code all or some of the subband IPD parameters of the subbands of the left channel frequency domain signal and the right channel frequency domain signal of the current frame. Alternatively, if the IPD parameter coding scheme of the current frame is the second coding scheme, the IPD parameter coding scheme of the current frame is adjusted to the first coding scheme. For example, if the IPD parameter coding scheme of the current frame skips coding of IPD parameters, the IPD parameter coding scheme of the current frame is adjusted to skip coding of IPD parameters.

[0192] S707. Process the IPD parameters of the current frame using the determined IPD parameter encoding scheme of the current frame. End the procedure.

[0193] S708. Process the IPD parameters of the current frame using the adjusted IPD parameter encoding scheme of the current frame.

[0194] In another implementation of the present invention, two counters can be used when determining whether to adjust the IPD parameter encoding scheme of the current frame. The specific processing method is as follows:

[0195] If both the IPD parameter coding scheme of the current frame and the IPD parameter coding scheme of the frame preceding the current frame are the first coding scheme, the value of the first counter is set to 0. If the IPD parameter coding scheme of the frame preceding the current frame is the first coding scheme, the IPD parameter coding scheme of the current frame is the second coding scheme, and the value of the first counter is less than 5, the IPD parameter coding scheme of the current frame is adjusted to the first coding scheme, and the value of the first counter is incremented by 1. The first coding scheme may be skipping the coding of IPD parameters, and the second coding scheme may be coding of all or some of the subband IPD parameters of the subbands of the left channel frequency domain signal and the right channel frequency domain signal.

[0196] If both the IPD parameter coding scheme of the current frame and the IPD parameter coding scheme of the frame preceding the current frame are the second coding scheme, the value of the second counter is set to 0. If the IPD parameter coding scheme of the frame preceding the current frame is the second coding scheme, the IPD parameter coding scheme of the current frame is the first coding scheme, and the value of the second counter is less than 5, the IPD parameter coding scheme of the current frame is adjusted to the second coding scheme, and the value of the second counter is incremented by 1. The first coding scheme may be skipping the coding of IPD parameters, and the second coding scheme may be coding of all or some of the subband IPD parameters of the subbands of the left channel frequency domain signal and the right channel frequency domain signal.

[0197] It can be understood that when the IPD parameter coding scheme of the current frame is adjusted, the adjusted IPD parameter coding scheme of the current frame is cached. In other words, when the IPD parameter coding scheme of a frame after the current frame is determined, the adjusted IPD parameter coding scheme of the current frame is referenced.

[0198] 8 is a schematic structural diagram of an embodiment of an IPD parameter encoding device 800 according to an embodiment of the present invention. The IPD parameter encoding device 800 includes: An obtaining unit 801 configured to obtain reference parameters, the reference parameters being used to determine an IPD parameter coding scheme of a current frame of a multi-channel signal; and For the specific reference parameters and the specific acquisition parameters of the reference parameters, reference can be made to the description of the preceding embodiment, and the details will not be described again in this specification, and the device a determining unit 802 configured to determine an IPD parameter coding scheme of a current frame based on the reference parameters acquired by the acquiring unit 801, where the determined IPD parameter coding scheme of the current frame is one of at least two predefined IPD parameter coding schemes; and For determining the IPD parameter coding scheme of the current frame, reference may be made specifically to the description in the embodiment section of the method, and for the specific coding scheme of the at least two pre-defined IPD parameter coding schemes, reference may also be made to the description in the embodiment section of the method, and the details will not be described again in this specification, and the apparatus: The processing unit 803 is for the current frame and is configured to process the IPD parameters of the current frame based on the IPD parameter encoding scheme determined by the determining unit 802.

[0199] For the specific processing steps, please refer to the description in the method embodiment section, and the details will not be described again here.

[0200] In another embodiment of the present invention, the determining unit 802 may be further configured to determine whether the determined IPD parameter coding scheme of the current frame needs to be adjusted. In this case, as shown in FIG. 8 , the IPD parameter coding device 800 may further include an adjusting unit 804 configured to adjust the determined IPD parameter coding scheme of the current frame when the determining unit 802 determines that the determined IPD parameter coding scheme of the current frame needs to be adjusted. Correspondingly, the processing unit 803 is specifically configured to process the IPD parameters of the current frame based on the adjusted IPD parameter coding scheme of the current frame. For methods of determining whether the determined IPD parameter coding scheme of the current frame needs to be adjusted and methods of adjusting the IPD parameter coding scheme of the current frame, please refer to the description of the method embodiments. The details will not be described again here.

[0201] As shown in FIG. 8 , in another embodiment of the present invention, the IPD parameter encoding device 800 may further include an encoding unit 805 configured to encode the IPD parameter encoding scheme of the current frame determined by the determining unit 802. For example, a coding scheme flag bit may be set to indicate whether the IPD parameter encoding scheme of the current frame is the first encoding scheme or the second encoding scheme, and the flag bit occupies one bit. In this manner, the decoder can determine the IPD parameter encoding scheme of the current frame based on the coding scheme flag bit to perform decoding using a corresponding decoding method. It may be understood that in some embodiments, the encoding unit 805 and the processing unit 803 may be one logical unit.

[0202] FIG. 9 illustrates the structure of a terminal according to another embodiment of the present invention. The terminal may be a wearable device, a VR device, an AR device, a mobile phone, a PAD, a notebook, a PC, etc. As shown in FIG. 9, the terminal provided in this embodiment of the present invention includes a network interface 910 (as shown in the dotted box in FIG. 9). The network interface 910 is configured to transmit and receive data. For example, when the terminal functions as an encoder, the transmitted data includes a multi-channel signal encoded by the terminal (transmitted in a codestream). If IPD parameters are encoded, the transmitted data further includes the IPD parameters (the IPD parameters may also be transmitted in the codestream and used as part of the multi-channel signal). When the terminal functions as a decoder, the received data includes a codestream transmitting the multi-channel signal. If the encoder encodes IPD parameters, the received data may further include the IPD parameters. The specific form of the network interface 910 may vary and may be specifically different based on the specific form of the terminal and different application scenarios. FIG. 9 shows three examples. The first example is a cellular network access module including a radio frequency transceiver (RF Transceiver) 901 and a modem (Modem) 902. The cellular network access module is a 2G (2 nd Generation), 3G(3 rd Generation), 4G(4 th Generation), specifically Long Term Evolution (LTE) networks, and future 5G (5G) networks. th Generation) or 6G (6 thThe terminal 902 is configured to access a mobile communication network provided by a mobile operator, such as a Mobile Communications Network (MCH) provided by a mobile operator. A second example is a Wireless Fidelity (WiFi) module 903 configured to access a network by accessing an Access Point (AP). A third example is an Ethernet network adapter 904 configured to access a network using a twisted pair cable or an optical fiber. It should be noted that the terminal does not need to include all of the three network interfaces described above, and may include only at least one of the three network interfaces described above in order for the terminal to access a network. Furthermore, the network interface included in the terminal need not be one of the three types described above, and may be, for example, a Bluetooth interface or a modem. Therefore, the specific form of the network interface 910 is not limited in this embodiment of the present invention, and implementation of this embodiment of the present invention is not affected as long as the terminal can access a network via the network interface 910.

[0203] As shown in FIG. 9 , the terminal may further include a microphone 905 configured to collect multi-channel signals. The microphone 905 may incorporate an analog-to-digital converter. Thus, the microphone may convert the collected multi-channel signals in analog signal format into multi-channel signals in digital signal format. Of course, alternatively, the microphone 905 may not incorporate an analog-to-digital converter. In this case, the terminal needs to further include an analog-to-digital converter to perform analog-to-digital conversion of the multi-channel signals in analog signal format collected by the microphone 905 and obtain the multi-channel signals in digital signal format. There may be one, two, three, or more microphones 905. In this embodiment of the present invention, the specific number of microphones 905 is not limited. It may be understood that the terminal may alternatively collect multi-channel signals using an external microphone. In this case, the terminal needs to include an external microphone adaptation interface to facilitate insertion of the external microphone and implement data exchange between the terminal and the external microphone.

[0204] 9, the terminal may further include a loudspeaker 906 configured to play back the multi-channel signal obtained by decoding by the terminal. If the bitstream including the multi-channel signal and received by the terminal includes an IPD parameter, the decoding process may be performed based on the IPD parameter. A digital-to-analog converter may be incorporated in the loudspeaker 906. In other words, the terminal may transmit the multi-channel signal in a digital signal format to the loudspeaker 906, The loudspeaker 906 performs analog-to-digital conversion on the multi-channel signals in digital signal format to convert them into multi-channel signals in analog signal format for playback. Of course, alternatively, the loudspeaker 906 may not incorporate a digital-to-analog converter. In this case, the terminal needs to include an analog-to-digital converter for converting the multi-channel signals in digital signal format into multi-channel signals in analog signal format, and transmit the multi-channel signals in analog format to the loudspeaker 906 for playback. There may be one, two, three, or more loudspeakers 906. In this embodiment of the present invention, the number of loudspeakers 906 is not limited. It may be understood that the terminal may alternatively use an external speaker to play the multi-channel signals. In this case, the terminal needs to include an external loudspeaker adaptation interface to facilitate the insertion of the external loudspeaker and to perform data exchange with the external loudspeaker.

[0205] 9, the terminal further includes a processor 908 and a memory 909. The memory 909 is configured to store code executable by the processor, and the processor 908 is configured to execute the code stored in the memory 909 to implement the methods described in the foregoing method embodiments.

[0206] As shown in Figure 9, the terminal further includes a bus 907. Data exchange between the aforementioned components, such as the network interface 910, the microphone 905, the loudspeaker 906, the processor 908, and the memory 909, may be performed by using the bus 907. It may be understood that Figure 9 only describes one example of the structure of the terminal. Some connections within the structure are simplified. In actual application, components such as the network interface 910, the microphone 905, or the loudspeaker 906 may not be directly connected to the bus 907. In other words, data exchange between components such as the network interface 910, the microphone 905, or the loudspeaker 906 may need to pass through another component.

[0207] In some embodiments, the processor 908 and the memory 909 may further have a data exchange interface. Data exchange between the processor 908 and the memory 909 may be performed directly through the data exchange interface, without passing through the bus 907, to improve the efficiency of data exchange between the processor 908 and the memory 909.

[0208] In some embodiments, the processor 908 and the memory 909 may be the processor and memory of a digital signal processor (DSP). In other words, both the processor 908 and the memory 909 are encapsulated in the DSP. In this case, data exchange between the processor 908 and the memory 909 may be performed through a data exchange interface within the DSP. Furthermore, because both the processor 908 and the memory 909 are encapsulated in the DSP, the processor 908 and the memory 909 can exchange data with other components through a single data exchange interface between the DSP and the bus 907.

[0209] An embodiment of the present invention further provides a computer program, which, when executed, can perform the steps of any one of the above-described method embodiments.

[0210] An embodiment of the present invention further provides a storage medium, the storage medium storing executable code, which, when executed, can perform the steps of any one of the aforementioned method embodiments.

[0211] Those skilled in the art may understand that all or part of the steps of the method of the embodiment may be implemented by a computer program that instructs relevant hardware. The program may be stored in a computer-readable storage medium. When the program is executed, the steps of the method of the embodiment are included. The storage medium may include a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), etc.

[0212] In the present specification, claims, and accompanying drawings, the terms "first," "second," "third," "fourth," etc. are intended to distinguish between different entities, but not to indicate a particular order. Furthermore, the terms "comprise," "have," and other variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally further include unlisted steps or units, or may optionally further include other specific steps or units of the process, method, system, product, or device.

[0213] The above disclosure is merely an exemplary embodiment of the present invention, and of course does not limit the protection scope of the present invention. Therefore, equivalent variations made based on the claims of the present invention shall be included in the scope of the present invention. [Explanation of symbols]

[0214] 800 IPD parameter encoder 801 Acquisition Units 802 Decision Unit 803 Processing Unit 804 Adjustment Unit 805 coding unit 901 Radio Frequency Transceiver 902 modem 903 Wi-Fi module 904 Ethernet Network Adapter 905 Microphone 906 Loudspeaker 907 Bus 908 processor 909 Memory 910 Network Interface

Claims

1. obtaining reference parameters used to determine an inter-channel phase difference IPD parameter coding scheme for a current frame of the multi-channel signal; determining the IPD parameter coding scheme of the current frame based on the reference parameters, wherein the determined IPD parameter coding scheme of the current frame is one of at least two predefined IPD parameter coding schemes; processing IPD parameters of the current frame based on the determined IPD parameter coding scheme of the current frame; An inter-channel phase difference parameter encoding method, comprising:

2. the reference parameters include at least one of signal characteristic parameters of the current frame and signal characteristic parameters of A frames preceding the current frame, where A is an integer greater than or equal to 1; the signal characteristic parameters of the current frame include at least one of a parameter indicating a correlation between a left channel and a right channel of the current frame, a variance of subband ITD parameters of the current frame, a signal type of the current frame, and the inter-channel time difference ITD parameters of the current frame; the signal characteristic parameters of the A frames previous to the current frame include at least one of a parameter indicating a correlation between a left channel and a right channel of each of the A previous frames, a variance of a subband IPD parameter of each of the A previous frames, an ITD parameter of each of the A previous frames, an IPD parameter coding scheme of each of the A previous frames, and a signal type of each of the A previous frames; The method of claim 1 , wherein the signal type comprises a voice type or a music type.

3. the reference parameters include the parameters indicative of the correlation between the left and right channels of the current frame; 3. The method of claim 2, wherein if a value of the parameter indicating the correlation between the left channel and the right channel of the current frame is greater than or equal to a first threshold, the IPD parameter coding scheme of the current frame is a first coding scheme of the at least two IPD parameter coding schemes.

4. The method of claim 3 , wherein the first threshold is 0.

75.

5. the reference parameters include the IPD parameter coding scheme for each of the A previous frames and the signal type for each of the A previous frames; 5. The method of claim 2, wherein if the IPD parameter coding scheme of each of the previous A frames is the first coding scheme of the at least two IPD parameter coding schemes and the signal type of each of the previous A frames is a music type, then the IPD parameter coding scheme of the current frame is the first coding scheme.

6. The method of claim 5, wherein the value of A is 1.

7. The first encoding scheme comprises: Group inter-channel phase difference Group IPD parameter coding scheme, Skip encoding of IPD parameters, or 7. The method according to claim 3, wherein the value of the IPD parameter is set to 0.

8. if the IPD parameter coding scheme of the current frame is not the first coding scheme, the IPD parameter coding scheme of the current frame is a second coding scheme; 8. The method of claim 3, wherein the second encoding scheme comprises a subband set IPD parameter encoding scheme or a subband IPD parameter encoding scheme, and the subband IPD parameter encoding scheme encodes subband IPD parameters of some or all of the subbands of the current frame.

9. the second coding scheme is the subband IPD parameter coding scheme; The step of processing the IPD parameters of the current frame based on the determined IPD parameter coding scheme of the current frame includes: calculating IPD parameters for all or a portion of subbands of a left channel frequency domain signal and a right channel frequency domain signal of the current frame; and encoding the IPD parameters for all or some of the subbands obtained by calculation.

10. The method comprises: The method according to claim 1 , further comprising the step of performing encoding based on the determined IPD parameter encoding scheme of the current frame.

11. Prior to the step of processing the IPD parameters of the current frame based on the determined IPD parameter coding scheme of the current frame, the method further comprises: determining whether the determined IPD parameter coding scheme of the current frame needs to be adjusted; and if it is determined that the determined IPD parameter coding scheme of the current frame needs to be adjusted, adjusting the determined IPD parameter coding scheme of the current frame; The step of processing the IPD parameters of the current frame based on the determined IPD parameter coding scheme of the current frame includes: The method of claim 1 , comprising processing the IPD parameters of the current frame based on the adjusted IPD parameter encoding scheme of the current frame.

12. 12. The method of claim 11 , wherein the step of determining whether the determined IPD parameter coding scheme of the current frame needs to be adjusted is performed based on IPD parameter coding schemes of the A frames prior to the current frame.

13. The parameter indicative of the correlation between the left and right channels of the current frame is calculated using the following formula: [Equation 1] where: [Equation 2] where E l (b) shows the total energy of the left audio channel, E r (b) shows the total energy of the right audio channel, L r (k) denotes the real part of the kth frequency value of the audio left channel frequency domain signal, and R r (k) denotes the real part of the kth frequency value of the audio right channel frequency domain signal, and L i (k) denotes the imaginary part of the k-th frequency value of the audio left channel frequency domain signal, and R i (k) denotes the imaginary part of the k-th frequency value of the audio right channel frequency domain signal, L denotes the number of subband spectral coefficients, N denotes the number of subbands, n denotes the index value of the time domain signal, k denotes the index value of the frequency domain signal, Length denotes the frame length, and x L (n) denotes the audio left channel time domain signal, and x R (n) denotes an audio right channel time domain signal, L(k) denotes the kth frequency value of the audio left channel frequency domain signal and used to calculate the IPD parameters, and R(k) denotes the kth frequency value of the audio right channel frequency domain signal and used to calculate the IPD parameters, where x L (n) and x R 13. The method of claim 2, wherein (n) denotes a sequence of real numbers.

14. an acquisition unit configured to acquire reference parameters, the reference parameters being used to determine an inter-channel phase difference IPD parameter coding scheme for a current frame of a multi-channel signal; a determining unit configured to determine the IPD parameter coding scheme of the current frame based on the reference parameters, wherein the determined IPD parameter coding scheme of the current frame is one of at least two predefined IPD parameter coding schemes; a processing unit configured to process IPD parameters of the current frame based on the determined IPD parameter coding scheme of the current frame; An inter-channel phase difference parameter encoding device, comprising:

15. the reference parameters include at least one of signal characteristic parameters of the current frame and signal characteristic parameters of A frames preceding the current frame, where A is an integer greater than or equal to 1; the signal characteristic parameters of the current frame include at least one of a parameter indicating a correlation between a left channel and a right channel of the current frame, a variance of subband ITD parameters of the current frame, a signal type of the current frame, and the inter-channel time difference ITD parameters of the current frame; the signal characteristic parameters of the A frames previous to the current frame include at least one of a parameter indicating a correlation between a left channel and a right channel of each of the A previous frames, a variance of a subband IPD parameter of each of the A previous frames, an ITD parameter of each of the A previous frames, an IPD parameter coding scheme of each of the A previous frames, and a signal type of each of the A previous frames; The apparatus of claim 14 , wherein the signal type comprises a voice type or a music type.

16. the reference parameters include the parameters indicative of the correlation between the left and right channels of the current frame; 16. The apparatus of claim 15, wherein if a value of the parameter indicating the correlation between the left channel and the right channel of the current frame is greater than or equal to a first threshold, the IPD parameter coding scheme of the current frame is a first coding scheme of the at least two IPD parameter coding schemes.

17. 17. The apparatus of claim 16, wherein the first threshold is 0.

75.

18. the reference parameters include the IPD parameter coding scheme for each of the A previous frames and the signal type for each of the A previous frames; 18. The apparatus of claim 15, wherein if the IPD parameter coding scheme of each of the previous A frames is the first coding scheme of the at least two IPD parameter coding schemes and the signal type of each of the previous A frames is a music type, the IPD parameter coding scheme of the current frame is the first coding scheme.

19. 20. The apparatus of claim 18, wherein the value of A is 1.

20. The first encoding scheme comprises: Group inter-channel phase difference Group IPD parameter coding scheme, Skip encoding of IPD parameters, or 20. The device according to claim 16, wherein the method further comprises: setting the value of the IPD parameter to 0.

21. If the IPD parameter coding scheme of the current frame is not the first coding scheme, the IPD parameter coding scheme of the current frame is a second coding scheme; 21. The apparatus of claim 16, wherein the second encoding scheme comprises a subband set IPD parameter encoding scheme or a subband IPD parameter encoding scheme, the subband IPD parameter encoding scheme encoding subband IPD parameters of some or all of the subbands of the current frame.

22. the second coding scheme is the subband IPD parameter coding scheme; The processing of the IPD parameters of the current frame based on the determined IPD parameter coding scheme of the current frame includes: calculating IPD parameters for all or a portion of subbands of a left channel frequency domain signal and a right channel frequency domain signal of the current frame; and encoding the IPD parameters for all or some of the subbands obtained by calculation.

23. The method comprises:

23. The apparatus of claim 14, further comprising: performing encoding based on the determined IPD parameter encoding scheme for the current frame.

24. the determining unit is further configured to determine whether the IPD parameter coding scheme of the current frame and determined by the determining unit needs to be adjusted; The device comprises: an adjusting unit configured to adjust the determined IPD parameter coding scheme of the current frame when the determining unit determines that the determined IPD parameter coding scheme of the current frame needs to be adjusted; and the processing unit further configured to process the IPD parameters of the current frame based on the adjusted IPD parameter encoding scheme of the current frame.

25. 25. The apparatus of claim 24, wherein the determination of whether the determined IPD parameter coding scheme of the current frame needs to be adjusted is performed based on IPD parameter coding schemes of the A frames prior to the current frame.

26. The acquisition unit is calculated by the following formula: [Equation 3] where [Equation 4] the left channel and the right channel of the current frame, E l (b) shows the total energy of the left audio channel, E r (b) shows the total energy of the right audio channel, L r (k) denotes the real part of the kth frequency value of the audio left channel frequency domain signal, and R r (k) denotes the real part of the kth frequency value of the audio right channel frequency domain signal, and L i (k) denotes the imaginary part of the k-th frequency value of the audio left channel frequency domain signal, and R i (k) denotes the imaginary part of the k-th frequency value of the audio right channel frequency domain signal, L denotes the number of subband spectral coefficients, N denotes the number of subbands, n denotes the index value of the time domain signal, k denotes the index value of the frequency domain signal, Length denotes the frame length, and x L (n) denotes the audio left channel time domain signal, and x R (n) denotes an audio right channel time domain signal, L(k) denotes the kth frequency value of the audio left channel frequency domain signal and used to calculate the IPD parameters, and R(k) denotes the kth frequency value of the audio right channel frequency domain signal and used to calculate the IPD parameters, where x L (n) and x R 26. The apparatus of any one of claims 14 to 25, wherein (n) denotes a sequence of real numbers.