Methods and equipment for generating audio signal codes, and computer-readable recording media.
Patent Information
- Application Number
- VN1202306620
- Authority / Receiving Office
- VN · VN
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2017-08-10
- Filing Date
- 2018-08-10
- Publication Date
- 2026-09-23
- Estimated Expiration
- 2038-08-10
AI Technical Summary
Traditional time-domain stereo coding techniques suffer from low or missing energy in the main signal when processing stereo signals, leading to a decrease in coding quality.
By determining the channel combination scheme and coding mode of the current frame, different temporal downmixing or upmixing processing methods are adopted, including switching between correlated signal to uncorrelated signal coding mode and uncorrelated signal to correlated signal coding mode, to process stereo signals and improve coding quality.
By matching various possible channel combination schemes and coding modes, the coding quality is improved, especially when the stereo signal is an inverted signal, thus avoiding the loss of the main signal energy and improving the coding effect.
Smart Images

Figure VN1202306620_0
Abstract
Description
Audio codec mode determination methods and related products Technical Field This application relates to the field of audio codec technology, and in particular to methods for determining audio codec modes and related products. Background Technology As living standards improve, people's demand for high-quality audio continues to grow. Compared to mono audio, stereo audio provides a sense of location and distribution of each sound source, which can improve the clarity, intelligibility, and immersive experience of information, and is therefore highly favored by people. Parametric stereo encoding / decoding is a common stereo encoding / decoding technique that converts stereo signals into mono signals and spatially sensed parameters, then compresses the multi-channel signals. However, because parametric stereo encoding / decoding typically requires extracting spatially sensed parameters in the frequency domain and performing time-frequency transformations, the overall codec latency is relatively large. Therefore, when latency requirements are stringent, time-domain stereo coding is a better choice. Traditional time-domain stereo coding techniques downmix the signal into two mono signals in the time domain. For example, MS coding first downmixes the left and right channel signals into a mid-channel signal and a side-channel signal. For instance, if L represents the left channel signal and R represents the right channel signal, then the mid-channel signal is 0.5*(L+R), representing the relevant information between the left and right channels; the side-channel signal is 0.5*(LR), representing the difference information between the left and right channels. Then, the mid-channel and side-channel signals are encoded using mono coding methods respectively. The mid-channel signal is typically encoded with a relatively large number of bits, while the side-channel signal is typically encoded with a relatively small number of bits. The inventors of this application have discovered through research and practice that traditional time-domain stereo coding technology sometimes results in very low or even missing energy in the main signal, which in turn leads to a decrease in the final coding quality. Summary of the Invention This application provides an audio codec mode determination method and related products. In a first aspect, embodiments of this application provide an audio encoding mode determination method, comprising: determining the channel combination scheme of the current frame; and determining the encoding mode of the current frame based on the channel combination scheme of the previous frame and the channel combination scheme of the current frame. The stereo signal of the current frame is composed of, for example, the left and right channel signals of the current frame. The current frame's channel combination scheme is one of several channel combination schemes. For example, these schemes include a non-correlated signal channel combination scheme and a correlated signal channel combination scheme. The correlated signal channel combination scheme corresponds to a channel combination scheme similar to a positive-phase signal. The non-correlated signal channel combination scheme corresponds to a channel combination scheme similar to an out-of-phase signal. It is understandable that the channel combination scheme corresponding to the positive phase signal is suitable for the positive phase signal, and the channel combination scheme corresponding to the negative phase signal is suitable for the negative phase signal. The encoding mode of the current frame is one of several encoding modes. For example, the multiple encoding modes may include: a correlated signal to an uncorrelated signal encoding mode, an uncorrelated signal to a correlated signal encoding mode, a correlated signal encoding mode, and an uncorrelated signal encoding mode, etc. In some possible implementations, determining the encoding mode of the current frame based on the channel combination scheme of the previous frame and the channel combination scheme of the current frame may include: If the channel combination scheme of the previous frame is a correlated signal channel combination scheme and the channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, the encoding mode of the current frame is determined to be a correlated signal to uncorrelated signal encoding mode. The correlated signal to uncorrelated signal encoding mode uses the downmixing processing method corresponding to the transition from the correlated signal channel combination scheme to the uncorrelated signal channel combination scheme for temporal downmixing processing. Alternatively, if the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the current frame is also an uncorrelated signal channel combination scheme, then the encoding mode of the current frame is determined to be an uncorrelated signal encoding mode, and the uncorrelated signal encoding mode is used to perform temporal downmixing processing using the downmixing processing method corresponding to the uncorrelated signal channel combination scheme. Alternatively, if the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme and the channel combination scheme of the current frame is a correlated signal channel combination scheme, the encoding mode of the current frame is determined to be an uncorrelated signal to correlated signal encoding mode. The uncorrelated signal to correlated signal encoding mode uses the downmixing processing method corresponding to the transition from the uncorrelated signal channel combination scheme to the correlated signal channel combination scheme for temporal downmixing processing. Alternatively, if the channel combination scheme of the current frame is a correlation signal channel combination scheme, and the channel combination scheme of the current frame is a correlation signal channel combination scheme, then the encoding mode of the current frame is determined to be a correlation signal encoding mode, and the correlation signal encoding mode uses the downmixing processing method corresponding to the correlation signal channel combination scheme for temporal downmixing processing. In some possible implementations, the method may further include: when the encoding mode of the current frame is determined to be a correlation signal encoding mode, performing temporal downmixing on the left and right channel signals of the current frame to obtain the primary and secondary channel signals of the current frame using the temporal downmixing processing method corresponding to the correlation signal encoding mode, wherein the temporal downmixing processing method corresponding to the correlation signal encoding mode is the temporal downmixing processing method corresponding to the correlation signal channel combination scheme. In some possible implementations, the method may further include: if the encoding mode of the current frame is determined to be an uncorrelated signal encoding mode, performing temporal downmixing on the left and right channel signals of the current frame using a temporal downmixing method corresponding to the uncorrelated signal encoding mode to obtain the primary and secondary channel signals of the current frame. Wherein, the temporal downmixing method corresponding to the uncorrelated signal encoding mode is the temporal downmixing method corresponding to an uncorrelated signal channel combination scheme. In some possible implementations, the method may further include: when the encoding mode of the current frame is determined to be a correlated-to-uncorrelated signal encoding mode, performing temporal downmixing on the left and right channel signals of the current frame to obtain the primary and secondary channel signals of the current frame using the temporal downmixing processing method corresponding to the correlated-to-uncorrelated signal encoding mode, wherein the temporal downmixing processing method corresponding to the correlated-to-uncorrelated signal encoding mode is a temporal downmixing processing method that transitions from a correlated signal channel combination scheme to an uncorrelated signal channel combination scheme. In some possible implementations, the method may further include: when it is determined that the encoding mode of the current frame is a non-correlated to correlated signal encoding mode, using the temporal downmixing processing method corresponding to the non-correlated to correlated signal encoding mode to perform temporal downmixing processing on the left and right channel signals of the current frame to obtain the primary and secondary channel signals of the current frame, wherein the temporal downmixing processing method corresponding to the non-correlated to correlated signal encoding mode is a transition from the non-correlated signal channel combination scheme to the temporal downmixing processing method corresponding to the correlated signal channel combination scheme. It is understandable that different coding modes typically require different temporal downmixing methods. Furthermore, each coding mode may correspond to one or more temporal downmixing methods. For example, in some possible implementations, the temporal downmixing processing method corresponding to the non-correlated signal coding mode is used to perform temporal downmixing processing on the left and right channel signals of the current frame to obtain the primary and secondary channel signals of the current frame. This may include: performing temporal downmixing processing on the left and right channel signals of the current frame according to the channel combination ratio factor of the non-correlated signal channel combination scheme of the current frame to obtain the primary and secondary channel signals of the current frame; or performing temporal downmixing processing on the left and right channel signals of the current frame according to the channel combination ratio factor of the non-correlated signal channel combination scheme of the current frame and the previous frame to obtain the primary and secondary channel signals of the current frame. It is understandable that the above scheme requires determining the channel combination scheme for the current frame. This means that there are multiple possibilities for the channel combination scheme of the current frame. Compared to the traditional scheme with only one channel combination scheme, multiple possible channel combination schemes and multiple possible scenarios are beneficial for achieving better compatibility and matching, thus improving the encoding and decoding quality. The above scheme requires determining the encoding mode of the current frame based on the channel combination scheme of the previous frame and the current frame. Since there are multiple possibilities for the encoding mode of the current frame, compared to the traditional scheme with only one encoding mode, multiple possible encoding modes and multiple possible scenarios are beneficial for achieving better compatibility and matching, thereby improving the encoding and decoding quality. For example, if the channel combination schemes of the current frame and the previous frame are different, the encoding mode of the current frame can be determined to be, for example, a correlated signal to uncorrelated signal encoding mode or an uncorrelated signal to correlated signal encoding mode. Then, the left and right channel signals of the current frame can be segmented and downmixed in the time domain according to the channel combination schemes of the current frame and the previous frame. Since a segmented temporal downmixing mechanism is introduced for the left and right channel signals of the current frame when the channel combination schemes of the current frame and the previous frame are different, the segmented temporal downmixing mechanism is conducive to achieving a smooth transition of the channel combination scheme, thereby improving the coding quality. In some possible implementations, determining the channel combination scheme of the current frame may include: determining the channel combination scheme of the current frame by performing at least one channel combination scheme decision on the current frame. Specifically, for example, determining the channel combination scheme of the current frame includes: making an initial decision on the channel combination scheme of the current frame to determine the initial channel combination scheme of the current frame; and making a corrected decision on the channel combination scheme of the current frame based on the initial channel combination scheme of the current frame to determine the channel combination scheme of the current frame. For example, the initial decision on the channel combination scheme for the current frame may include: determining the signal phase type of the stereo signal of the current frame using the left and right channel signals of the current frame; and determining the initial channel combination scheme of the current frame using the signal phase type of the stereo signal of the current frame and the channel combination scheme of the previous frame. The signal phase type of the stereo signal of the current frame can be a near-positive signal or a near-out-of-phase signal. The signal phase type of the stereo signal of the current frame can be indicated by a signal phase type identifier. Specifically, for example, when the signal phase type identifier of the current frame is "1", it indicates that the signal phase type of the stereo signal of the current frame is a near-positive signal; when the signal phase type identifier of the current frame is "0", it indicates that the signal phase type of the stereo signal of the current frame is a near-out-of-phase signal, and vice versa. The channel combination scheme of an audio frame (e.g., the previous frame or the current frame) can be indicated by the channel combination scheme identifier of the audio frame. For example, when the channel combination scheme identifier of the audio frame is "0", it indicates that the channel combination scheme of the audio frame is a correlated signal channel combination scheme. When the channel combination scheme identifier of the audio frame is "1", it indicates that the channel combination scheme of the audio frame is an uncorrelated signal channel combination scheme, and vice versa. Similarly, the initial channel combination scheme of an audio frame (e.g., the previous frame or the current frame) can be indicated by the initial channel combination scheme identifier of the audio frame. For example, when the initial channel combination scheme identifier of an audio frame is set to "0", it indicates that the initial channel combination scheme of the audio frame is a correlated signal channel combination scheme. As another example, when the initial channel combination scheme identifier of an audio frame is set to "1", it indicates that the initial channel combination scheme of the audio frame is an uncorrelated signal channel combination scheme, and vice versa. Determining the phase type of the stereo signal of the current frame using the left and right channel signals of the current frame may include: calculating the correlation value xorr between the left and right channel signals of the current frame; determining the phase type of the stereo signal of the current frame as a near-positive signal if xorr is less than or equal to a first threshold; and determining the phase type of the stereo signal of the current frame as a near-out-of-phase signal if xorr is greater than the first threshold. Further, if the phase type identifier of the current frame is used to indicate the phase type of the stereo signal of the current frame, then if the phase type of the stereo signal of the current frame is determined to be a near-positive signal, the value of the phase type identifier of the current frame can be set to indicate that the phase type of the stereo signal of the current frame is a near-positive signal; conversely, if the phase type of the current frame is determined to be a near-positive signal, the value of the phase type identifier of the current frame can be set to indicate that the phase type of the stereo signal of the current frame is a near-out-of-phase signal. For example, when the signal phase type flag of an audio frame (e.g., the previous frame or the current frame) is set to "0", it indicates that the signal phase type of the stereo signal of that audio frame is a kind of positive signal; when the signal phase type flag of an audio frame (e.g., the previous frame or the current frame) is set to "1", it indicates that the signal phase type of the stereo signal of that audio frame is a kind of negative signal, and so on. The initial channel combination scheme for the current frame is determined by using the phase type of the stereo signal in the current frame and the channel combination scheme of the previous frame. This may include, for example, the following: If the phase type of the stereo signal in the current frame is a quasi-phase signal and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, then the initial channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme; if the phase type of the stereo signal in the current frame is a quasi-phase signal and the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme, then the initial channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme. or, If the phase type of the stereo signal in the current frame is a quasi-phase signal, and the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme, then if the signal-to-noise ratio of both the left and right channel signals of the current frame is less than the second threshold, the initial channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme; if the signal-to-noise ratio of the left channel signal and / or the right channel signal of the current frame is greater than or equal to the second threshold, the initial channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme. or, If the phase type of the stereo signal in the current frame is a phase-inverting signal and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, then if the signal-to-noise ratio of both the left and right channel signals of the current frame is less than the second threshold, the initial channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme; if the signal-to-noise ratio of the left channel signal and / or the right channel signal of the current frame is greater than or equal to the second threshold, the initial channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme. The step of making a channel combination scheme correction decision for the current frame based on the initial channel combination scheme of the current frame may include: determining the channel combination scheme of the current frame according to the channel combination scaling factor correction identifier of the previous frame, the signal phase type of the stereo signal of the current frame, and the initial channel combination scheme of the current frame. Specifically, for example, the step of making a channel combination scheme correction decision for the current frame based on the initial decision result of the channel combination scheme for the current frame may include: If the channel combination scaling factor correction flag of the previous frame indicates that the channel combination scaling factor needs to be corrected, the uncorrelated signal channel combination scheme is used as the channel combination scheme of the current frame; if the channel combination scaling factor correction flag of the previous frame indicates that the channel combination scaling factor does not need to be corrected, it is determined whether the current frame meets the switching conditions, and the channel combination scheme of the current frame is determined based on the determination result of whether the current frame meets the switching conditions. The determination of the channel combination scheme for the current frame based on the decision result of whether the current frame meets the switching conditions may include: If the channel combination scheme of the previous frame is different from the initial channel combination scheme of the current frame, and the current frame meets the switching conditions, and the initial channel combination scheme of the current frame is a correlated signal channel combination scheme, and the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme, then the channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme. or, If the channel combination scheme of the previous frame is different from the initial channel combination scheme of the current frame, and the current frame meets the switching conditions, and the initial channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, and the channel combination scaling factor of the previous frame is less than the first scaling factor threshold, then the channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme. or, If the channel combination scheme of the previous frame is different from the initial channel combination scheme of the current frame, and the current frame meets the switching conditions, and the initial channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, and the channel combination scaling factor of the previous frame is greater than or equal to the first scaling factor threshold, then the channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme. or, The channel combination scheme of the previous P-1 frame is different from the initial channel combination scheme of the previous P frame, and the previous P frame does not meet the switching conditions, while the current frame meets the switching conditions, and the stereo signal of the current frame is a quasi-positive phase signal, and the initial channel combination scheme of the current frame is a correlated signal channel combination scheme, while the previous frame was an uncorrelated signal channel combination scheme, thus determining that the channel combination scheme of the current frame is a correlated signal channel combination scheme. or, If the channel combination scheme of the previous P-1 frame and the initial channel combination scheme of the previous P frame do not meet the switching conditions, and the current frame meets the switching conditions, and the phase type of the stereo signal of the current frame is a phase-inverting signal, and the initial channel combination scheme of the current frame is a non-correlated signal channel combination scheme, and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, and the channel combination scaling factor of the previous frame is less than the second scaling factor threshold, then the channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme. or, If the channel combination scheme of the previous P-1 frame is different from the initial channel combination scheme of the previous P frame, and the previous P frame does not meet the switching conditions, and the current frame meets the switching conditions, and the phase type of the stereo signal in the current frame is a phase-inverted signal, and the initial channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, and the channel combination scaling factor of the previous frame is greater than or equal to the second scaling factor threshold, then the channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme. In some possible implementations, determining whether the current frame meets the switching conditions may include: determining whether the current frame meets the switching conditions based on the primary channel signal frame type and / or secondary channel signal frame type of the previous frame. In some possible implementations, determining whether the current frame meets the switching conditions may include: If the first, second, and third conditions are all met, the current frame is determined to meet the switching condition; or if the second, third, fourth, and fifth conditions are all met, the current frame is determined to meet the switching condition; or if the sixth condition is met, the current frame is determined to meet the switching condition. in, First condition: The primary channel signal frame type of the previous frame is any one of the following: VOICED_CLAS frame, ONSET frame, SIN_ONSET frame, INACTIVE_CLAS frame, AUDIO_CLAS frame, and the primary channel signal frame type of the previous frame is UNVOICED_CLAS frame or VOICED_TRANSITION frame; or, the secondary channel signal frame type of the previous frame is any one of the following: VOICED_CLAS frame, ONSET frame, SIN_ONSET frame, INACTIVE_CLAS frame, and AUDIO_CLAS frame, and the secondary channel signal frame type of the previous frame is UNVOICED_CLAS frame or VOICED_TRANSITION frame. Second condition: The initial encoding type of the primary channel signal and the secondary channel signal in the previous frame is not the encoding type corresponding to VOICED; Third condition: The number of frames in which the channel combination scheme used in the previous frame has been continuously used up to the previous frame is greater than the preset frame number threshold. Fourth condition: The primary channel signal frame type of the previous frame is UNVOICED_CLAS frame, or the secondary channel signal frame type of the previous frame is UNVOICED_CLAS frame. Fifth condition: The long-time root mean square energy values of the left and right channel signals in the current frame are less than the energy threshold; Sixth condition: The primary channel signal of the previous frame is an audio signal, and the energy ratio of the low-frequency band to the high-frequency band of the primary channel signal of the previous frame is greater than the first energy ratio threshold, and the energy ratio of the low-frequency band to the high-frequency band of the secondary channel signal of the previous frame is greater than the second energy ratio threshold. It is understood that there are many ways to determine whether the current frame meets the switching conditions, and it is not limited to the methods exemplified above. Secondly, embodiments of this application also provide an audio decoding mode determination method, including: determining the channel combination scheme of the current frame based on the channel combination scheme identifier of the current frame in the bitstream; and determining the decoding mode of the current frame according to the channel combination scheme of the previous frame and the channel combination scheme of the current frame. The channel combination scheme of the current frame is one of several channel combination schemes. For example, the multiple channel combination schemes include a non-correlated signal channel combination scheme and a correlated signal channel combination scheme. The correlated signal channel combination scheme corresponds to a channel combination scheme for near-positive phase signals. The non-correlated signal channel combination scheme corresponds to a channel combination scheme for near-inverted phase signals. It can be understood that the channel combination scheme for near-positive phase signals is suitable for near-positive phase signals, and the channel combination scheme for near-inverted phase signals is suitable for near-inverted phase signals. The decoding mode of the current frame is one of several decoding modes. For example, the multiple decoding modes may include: a correlated signal to an uncorrelated signal decoding mode, an uncorrelated signal to a correlated signal decoding mode, a correlated signal decoding mode, and an uncorrelated signal decoding mode, etc. In some possible implementations, determining the decoding mode of the current frame based on the channel combination scheme of the previous frame and the channel combination scheme of the current frame includes: If the channel combination scheme of the previous frame is a correlated signal channel combination scheme and the channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, the decoding mode of the current frame is determined to be a correlated signal to uncorrelated signal decoding mode. The correlated signal to uncorrelated signal decoding mode uses the upmixing processing method corresponding to the transition from the correlated signal channel combination scheme to the uncorrelated signal channel combination scheme for temporal upmixing processing. or, If the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the current frame is also an uncorrelated signal channel combination scheme, then the decoding mode of the current frame is determined to be an uncorrelated signal decoding mode. The uncorrelated signal decoding mode uses the upmixing processing method corresponding to the uncorrelated signal channel combination scheme for temporal upmixing processing. or, If the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme and the channel combination scheme of the current frame is a correlated signal channel combination scheme, the decoding mode of the current frame is determined to be an uncorrelated signal to correlated signal decoding mode. The uncorrelated signal to correlated signal decoding mode uses the upmixing processing method corresponding to the transition from the uncorrelated signal channel combination scheme to the correlated signal channel combination scheme for temporal upmixing processing. or, The current frame's channel combination scheme is a correlation signal channel combination scheme. The current frame's channel combination scheme is a correlation signal channel combination scheme. The current frame's decoding mode is determined to be a correlation signal decoding mode. The correlation signal decoding mode uses the upmixing processing method corresponding to the correlation signal channel combination scheme for temporal upmixing processing. It is understandable that the above scheme requires determining the channel combination scheme for the current frame. This means that there are multiple possibilities for the channel combination scheme of the current frame. Compared to the traditional scheme with only one channel combination scheme, multiple possible channel combination schemes and multiple possible scenarios are beneficial for achieving better compatibility and matching. The above scheme requires determining the decoding mode of the current frame based on the channel combination scheme of the previous frame and the channel combination scheme of the current frame. The decoding mode of the current frame has multiple possibilities, which, compared to the traditional scheme with only one decoding mode, is beneficial for achieving better compatibility and matching between multiple possible decoding modes and multiple possible scenarios. Thirdly, embodiments of this application also provide an audio encoding mode determination apparatus, which may include a processor and a memory coupled together. The processor may be used to execute some or all of the steps of any stereo encoding method described in the first aspect. Embodiments of this application also provide an audio encoding apparatus, which may include the aforementioned audio encoding mode determination apparatus. Fourthly, embodiments of this application also provide an audio decoding mode determination apparatus, which may include a processor and a memory coupled together. The processor may be used to execute some or all of the steps of any stereo encoding method in the second aspect. Embodiments of this application also provide an audio decoding apparatus, which may include the above-described audio decoding mode determination apparatus. Fifthly, embodiments of this application provide an audio encoding mode determination apparatus, including several functional units for implementing any of the methods in the first aspect. In a sixth aspect, embodiments of this application provide an audio decoding mode determination apparatus, including several functional units for implementing any of the methods in the second aspect. In a seventh aspect, embodiments of this application provide a computer-readable storage medium storing program code, wherein the program code includes instructions for performing some or all of the steps of any of the methods of the first aspect. Eighthly, embodiments of this application provide a computer-readable storage medium storing program code, wherein the program code includes instructions for performing some or all of the steps of any of the methods of the second aspect. Ninthly, embodiments of this application provide a computer program product that, when run on a computer, causes the computer to perform some or all of the steps of any of the methods of the first aspect. In a tenth aspect, embodiments of this application provide a computer program product that, when run on a computer, causes the computer to perform some or all of the steps of any of the methods of the second aspect. Attached Figure Description The accompanying drawings, which are used in the embodiments or background art of this application, will be described below. Figure 1 is a schematic diagram of a type of inverted signal provided in an embodiment of this application; Figure 2 is a flowchart illustrating an audio encoding method provided in an embodiment of this application; Figure 3 is a flowchart illustrating an audio decoding mode determination method provided in an embodiment of this application; Figure 4 is a flowchart illustrating another audio encoding method provided in an embodiment of this application; Figure 5 is a flowchart illustrating an audio decoding method provided in an embodiment of this application; Figure 6 is a flowchart illustrating another audio encoding method provided in an embodiment of this application; Figure 7 is a flowchart illustrating another audio decoding method provided in an embodiment of this application; Figure 8 is a flowchart illustrating a method for determining time-domain stereo parameters provided in an embodiment of this application; Figure 9-A is a flowchart illustrating another audio encoding method provided in an embodiment of this application; Figure 9-B is a flowchart illustrating a method for calculating and encoding the channel combination scaling factor corresponding to the channel combination scheme of the current frame's uncorrelated signal, provided in an embodiment of this application. Figure 9-C is a flowchart illustrating a method for calculating the amplitude correlation difference parameter between the left and right channels of the current frame, provided in an embodiment of this application. Figure 9-D is a flowchart illustrating a method for converting the amplitude correlation difference parameter between the left and right channels of the current frame into a channel combination scaling factor, according to an embodiment of this application. Figure 10 is a flowchart illustrating another audio decoding method provided in an embodiment of this application; Figure 11-A is a schematic diagram of an apparatus provided in an embodiment of this application; Figure 11-B is a schematic diagram of another device provided in an embodiment of this application; Figure 11-C is a schematic diagram of another device provided in an embodiment of this application; Figure 12-A is a schematic diagram of another device provided in an embodiment of this application; Figure 12-B is a schematic diagram of another device provided in an embodiment of this application; Figure 12-C is a schematic diagram of another device provided in an embodiment of this application. Detailed Implementation The embodiments of this application are described below with reference to the accompanying drawings. The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or apparatus that comprises a series of steps or units is not limited to the steps or units listed, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or apparatus. Furthermore, the terms "first," "second," "third," and "fourth," etc., are used to distinguish different objects, not to describe a specific order. It should be noted that, since the embodiments of this application target time-domain scenarios, for the sake of simplicity, the time-domain signal can be abbreviated as "signal". For example, the left channel time-domain signal can be abbreviated as "left channel signal". Similarly, the right channel time-domain signal can be abbreviated as "right channel signal". A mono time-domain signal can be abbreviated as "mono signal". A reference channel time-domain signal can be abbreviated as "reference channel signal". A primary channel time-domain signal can be abbreviated as "primary channel signal". A secondary channel time-domain signal can be abbreviated as "secondary channel signal". A mid-channel time-domain signal can be abbreviated as "mid-channel signal". A side-channel time-domain signal can be abbreviated as "side-channel signal". Other cases can be deduced similarly. It should be noted that in the various embodiments of this application, the left channel time-domain signal and the right channel time-domain signal can be collectively referred to as "left and right channel time-domain signals" or simply "left and right channel signals." That is, the left and right channel time-domain signals include the left channel time-domain signal and the right channel time-domain signal. For example, the left and right channel time-domain signals of the current frame after time-delay alignment processing include the left channel time-domain signal and the right channel time-domain signal of the current frame after time-delay alignment processing. Similarly, the primary channel signal and the secondary channel signal can be collectively referred to as "primary and secondary channel signals." That is, the primary and secondary channel signals include the primary channel signal and the secondary channel signal. For example, the primary and secondary channel decoding signals include the primary channel decoding signal and the secondary channel decoding signal. For example, the left and right channel reconstruction signals include the left channel reconstruction signal and the right channel reconstruction signal. And so on. For example, traditional MS encoding technology first downmixes the left and right channel signals into a mid-channel signal and a side-channel signal. For instance, if L represents the left channel signal and R represents the right channel signal, then the mid-channel signal is 0.5*(L+R), representing the relevant information between the left and right channels. The side-channel signal is 0.5*(LR), representing the difference information between the left and right channels. Then, the mid-channel and side-channel signals are encoded using a mono encoding method. Typically, a relatively large number of bits are used to encode the mid-channel signal, while a relatively small number of bits are used to encode the side-channel signal. Furthermore, to improve coding quality, some schemes analyze the time-domain signals of the left and right channels to extract time-domain stereo parameters that indicate the proportion of the left and right channels in the time-domain downmixing process. The purpose of this method is that when the energy difference between the left and right stereo channel signals is relatively large, it is beneficial to increase the energy of the primary channel and decrease the energy of the secondary channel in the time-domain downmixing signal. For example, if L represents the left channel signal and R represents the right channel signal, then the primary channel signal is denoted as Y, where Y = alpha * L + beta * R, and Y represents the relevant information between the two channels. The secondary channel is denoted as X, where X = alpha * L - beta * R, and X represents the difference information between the two channels. alpha and beta are real numbers from 0 to 1. Referring to Figure 1, which illustrates the amplitude variations of the left and right channel signals, at a certain moment in the time domain, the absolute values of the amplitudes of corresponding samples of the left and right channel signals are essentially the same, but their signs are opposite. This is a typical example of a phase-inverting signal. Figure 1 only provides a typical example of a phase-inverting signal. In reality, a phase-inverting signal refers to a stereo signal where the phase difference between the left and right channel signals is close to 180 degrees. For example, a stereo signal with a phase difference between the left and right channel signals belonging to [180-θ, 180+θ] can be called a phase-inverting signal, where θ can take any angle between 0° and 90°, such as 0°, 5°, 15°, 17°, 20°, 30°, 40°, etc. Similarly, a near-phase signal refers to a stereo signal where the phase difference between the left and right channel signals is close to 0 degrees. For example, a stereo signal with a phase difference between the left and right channel signals belonging to [-θ, θ] can be called a near-phase signal. θ can take any angle between 0° and 90°, such as θ being equal to 0°, 5°, 15°, 17°, 20°, 30°, 40°, etc. When the left and right channel signals are quasi-in-phase signals, the energy of the primary channel signal generated by time-domain downmixing is often significantly greater than that of the secondary channel signal. Encoding the primary channel signal with more bits and the secondary channel signal with fewer bits can lead to better coding results. However, when the left and right channel signals are quasi-out-of-phase signals, using the same time-domain downmixing method can result in a very low or even absent energy in the generated primary channel signal, leading to a decrease in the final coding quality. The following section will explore some technical solutions that can improve the quality of stereo encoding and decoding. The encoding and decoding devices mentioned in the embodiments of this application can be devices with functions such as acquiring, storing, and transmitting voice signals. Specifically, the encoding and decoding devices can be, for example, mobile phones, servers, tablet computers, personal computers, or laptops. It is understood that in this application, the left and right channel signals refer to the left and right channel signals of the stereo signal. The stereo signal can be the original stereo signal, a stereo signal composed of two signals contained in a multi-channel signal, or a stereo signal composed of two signals generated by combining multiple signals contained in a multi-channel signal. The stereo encoding method can also be a stereo encoding method used in multi-channel encoding. The stereo encoding device can also be a stereo encoding device used in a multi-channel encoding device. The stereo decoding method can also be a stereo decoding method used in multi-channel decoding. The stereo decoding device can also be a stereo decoding device used in a multi-channel decoding device. The audio encoding method in this application embodiment is, for example, for a stereo encoding scenario, and the audio decoding method in this application embodiment is, for example, for a stereo decoding scenario. The following provides a method for determining an audio encoding mode, which may include: determining the channel combination scheme of the current frame, and determining the encoding mode of the current frame based on the channel combination scheme of the previous frame and the current frame. Referring to Figure 2, which is a flowchart illustrating an audio encoding method according to an embodiment of this application, the relevant steps of an audio encoding method can be implemented by an encoding device, and may include, for example, the following steps: 201. Determine the channel combination scheme for the current frame. The channel combination scheme of the current frame is one of several channel combination schemes. For example, these schemes include an anticorrelated signal channel combination scheme and a correlated signal channel combination scheme. The correlated signal channel combination scheme corresponds to a channel combination scheme for near-positive phase signals. The anticorrelated signal channel combination scheme corresponds to a channel combination scheme for near-inverted phase signals. It can be understood that the channel combination scheme for near-positive phase signals is suitable for near-positive phase signals, and the channel combination scheme for near-inverted phase signals is suitable for near-inverted phase signals. 202. Determine the encoding mode of the current frame based on the channel combination scheme of the previous frame and the current frame. Furthermore, if the current frame is the first frame (i.e., there is no previous frame), the encoding mode of the current frame can be determined based on the channel combination scheme of the current frame. Alternatively, a default encoding mode can be used as the encoding mode of the current frame. The encoding mode of the current frame is one of several encoding modes. For example, the various encoding modes may include: correlated-to-anticorrelated signal coding switching mode, anticorrelated-to-correlated signal coding switching mode, correlated signal coding mode, and anticorrelated signal coding mode, etc. The time-domain downmixing mode corresponding to the correlated-to-anticorrelated signal encoding mode can be referred to as a "correlated-to-anticorrelated signal downmixing switching mode". The time-domain downmixing mode corresponding to the uncorrelated-to-correlated signal encoding mode can be referred to as an "anticorrelated-to-correlated signal downmixing switching mode". The time-domain downmixing mode corresponding to the correlated signal encoding mode can be referred to as a "correlated signal downmixing mode". The time-domain downmixing mode corresponding to the uncorrelated signal encoding mode can be referred to as an "anticorrelated signal downmixing mode". It is understood that the naming of objects such as encoding mode, decoding mode and channel combination scheme in the embodiments of this application is illustrative and other names may be used in actual applications. 203. Based on the encoding mode of the current frame, perform temporal downmixing on the left and right channel signals of the current frame to obtain the main and secondary channel signals of the current frame. Specifically, the left and right channel signals of the current frame are downmixed in the time domain to obtain the primary and secondary channel signals of the current frame. These signals are then further encoded to obtain the bitstream. The channel combination scheme identifier of the current frame (used to indicate the channel combination scheme of the current frame) can be further written into the bitstream so that the decoding device can determine the channel combination scheme of the current frame based on the channel combination scheme identifier contained in the bitstream. The specific implementation of determining the encoding mode of the current frame based on the channel combination scheme of the previous frame and the channel combination scheme of the current frame can be varied. Specifically, for example, in some possible implementations, determining the encoding mode of the current frame based on the channel combination scheme of the previous frame and the channel combination scheme of the current frame may include: If the channel combination scheme of the previous frame is a correlated signal channel combination scheme and the channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, the encoding mode of the current frame is determined to be a correlated signal to uncorrelated signal encoding mode. The correlated signal to uncorrelated signal encoding mode uses the downmixing processing method corresponding to the transition from the correlated signal channel combination scheme to the uncorrelated signal channel combination scheme for temporal downmixing processing. Alternatively, if the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the current frame is also an uncorrelated signal channel combination scheme, then the encoding mode of the current frame is determined to be an uncorrelated signal encoding mode, and the uncorrelated signal encoding mode is used to perform temporal downmixing processing using the downmixing processing method corresponding to the uncorrelated signal channel combination scheme. Alternatively, if the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the current frame is a correlated signal channel combination scheme, then the encoding mode of the current frame is determined to be an uncorrelated signal to correlated signal encoding mode. The uncorrelated signal to correlated signal encoding mode employs a downmixing process corresponding to the transition from the uncorrelated signal channel combination scheme to the correlated signal channel combination scheme for temporal downmixing. Specifically, the temporal downmixing process corresponding to the uncorrelated signal to correlated signal encoding mode can be a segmented temporal downmixing process, which can be performed on the left and right channel signals of the current frame according to the channel combination schemes of the current frame and the previous frame. Alternatively, if the channel combination scheme of the current frame is a correlation signal channel combination scheme, and the channel combination scheme of the current frame is a correlation signal channel combination scheme, then the encoding mode of the current frame is determined to be a correlation signal encoding mode, and the correlation signal encoding mode uses the downmixing processing method corresponding to the correlation signal channel combination scheme for temporal downmixing processing. It is understandable that different coding modes typically require different temporal downmixing methods. Furthermore, each coding mode may correspond to one or more temporal downmixing methods. For example, in some possible implementations, when the encoding mode of the current frame is determined to be a correlation signal encoding mode, the temporal downmixing processing method corresponding to the correlation signal encoding mode is used to perform temporal downmixing processing on the left and right channel signals of the current frame to obtain the primary and secondary channel signals of the current frame. The temporal downmixing processing method corresponding to the correlation signal encoding mode is the temporal downmixing processing method corresponding to the correlation signal channel combination scheme. For example, in some possible implementations, if the encoding mode of the current frame is determined to be an uncorrelated signal encoding mode, a temporal downmixing processing method corresponding to the uncorrelated signal encoding mode is used to perform temporal downmixing processing on the left and right channel signals of the current frame to obtain the primary and secondary channel signals of the current frame. The temporal downmixing processing method corresponding to the uncorrelated signal encoding mode is the temporal downmixing processing method corresponding to the uncorrelated signal channel combination scheme. For example, in some possible implementations, when the encoding mode of the current frame is determined to be a correlated-to-uncorrelated signal encoding mode, a temporal downmixing processing method corresponding to the correlated-to-uncorrelated signal encoding mode is used to perform temporal downmixing processing on the left and right channel signals of the current frame to obtain the primary and secondary channel signals of the current frame. This temporal downmixing processing method corresponding to the correlated-to-uncorrelated signal encoding mode transitions from a correlated signal channel combination scheme to a temporal downmixing processing method corresponding to an uncorrelated signal channel combination scheme. Specifically, the temporal downmixing processing method corresponding to the correlated-to-uncorrelated signal encoding mode can be a segmented temporal downmixing method, which can be performed on the left and right channel signals of the current frame segmented according to the channel combination scheme of the current frame and the previous frame. For example, in some possible implementations, when the encoding mode of the current frame is determined to be a non-correlated to correlated signal encoding mode, the temporal downmixing processing method corresponding to the non-correlated to correlated signal encoding mode is used to perform temporal downmixing processing on the left and right channel signals of the current frame to obtain the primary and secondary channel signals of the current frame. The temporal downmixing processing method corresponding to the non-correlated to correlated signal encoding mode is a transition from the non-correlated signal channel combination scheme to the temporal downmixing processing method corresponding to the correlated signal channel combination scheme. It is understandable that different coding modes typically require different temporal downmixing methods. Furthermore, each coding mode may correspond to one or more temporal downmixing methods. For example, in some possible implementations, the temporal downmixing processing method corresponding to the non-correlated signal coding mode is used to perform temporal downmixing processing on the left and right channel signals of the current frame to obtain the primary and secondary channel signals of the current frame. This may include: performing temporal downmixing processing on the left and right channel signals of the current frame according to the channel combination ratio factor of the non-correlated signal channel combination scheme of the current frame to obtain the primary and secondary channel signals of the current frame; or performing temporal downmixing processing on the left and right channel signals of the current frame according to the channel combination ratio factor of the non-correlated signal channel combination scheme of the current frame and the previous frame to obtain the primary and secondary channel signals of the current frame. It is understandable that the above scheme requires determining the channel combination scheme for the current frame. This means that there are multiple possibilities for the channel combination scheme of the current frame. Compared to the traditional scheme with only one channel combination scheme, multiple possible channel combination schemes and multiple possible scenarios are beneficial for achieving better compatibility and matching. The above scheme requires determining the encoding mode of the current frame based on the channel combination scheme of the previous frame and the current frame. The encoding mode of the current frame has multiple possibilities, which, compared to the traditional scheme with only one encoding mode, is beneficial for achieving better compatibility and matching between multiple possible encoding modes and multiple possible scenarios. For example, if the channel combination schemes of the current frame and the previous frame are different, the encoding mode of the current frame can be determined to be, for example, a correlated signal to uncorrelated signal encoding mode or an uncorrelated signal to correlated signal encoding mode. Then, the left and right channel signals of the current frame can be segmented and downmixed in the time domain according to the channel combination schemes of the current frame and the previous frame. Since a segmented temporal downmixing mechanism is introduced for the left and right channel signals of the current frame when the channel combination schemes of the current frame and the previous frame are different, the segmented temporal downmixing mechanism is conducive to achieving a smooth transition of the channel combination scheme, thereby improving the coding quality. Accordingly, examples are given below for decoding time-domain stereo. Referring to Figure 3, an audio decoding mode determination method is also provided below. The relevant steps of the audio decoding mode determination method can be implemented by the decoding device, and the method may specifically include: 301. Determine the channel combination scheme of the current frame based on the channel combination scheme identifier of the current frame in the bitstream. 302. Determine the decoding mode of the current frame based on the channel combination scheme of the previous frame and the channel combination scheme of the current frame. The decoding mode of the current frame is one of several decoding modes. For example, the various decoding modes may include: correlated-to-anticorrelated signal decoding switching mode, anticorrelated-to-correlated signal decoding switching mode, correlated signal decoding mode, and anticorrelated signal decoding mode, etc. The time-domain upmixing mode corresponding to the correlated-to-anticorrelated signal decoding mode can be referred to as, for example, a "correlated-to-anticorrelated signal upmix switching mode". The time-domain upmixing mode corresponding to the uncorrelated-to-correlated signal decoding mode can be referred to as, for example, an "anticorrelated-to-correlated signal upmix switching mode". The time-domain upmixing mode corresponding to the correlated signal decoding mode can be referred to as, for example, a "correlated signal upmix mode". The time-domain upmixing mode corresponding to the uncorrelated signal decoding mode can be referred to as, for example, an "anticorrelated signal upmix mode". It is understood that the naming of objects such as encoding mode, decoding mode and channel combination scheme in the embodiments of this application is illustrative and other names may be used in actual applications. In some possible implementations, determining the decoding mode of the current frame based on the channel combination scheme of the previous frame and the channel combination scheme of the current frame includes: If the channel combination scheme of the previous frame is a correlated signal channel combination scheme and the channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, the decoding mode of the current frame is determined to be a correlated signal to uncorrelated signal decoding mode. The correlated signal to uncorrelated signal decoding mode uses the upmixing processing method corresponding to the transition from the correlated signal channel combination scheme to the uncorrelated signal channel combination scheme for temporal upmixing processing. or, If the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the current frame is also an uncorrelated signal channel combination scheme, then the decoding mode of the current frame is determined to be an uncorrelated signal decoding mode. The uncorrelated signal decoding mode uses the upmixing processing method corresponding to the uncorrelated signal channel combination scheme for temporal upmixing processing. or, If the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme and the channel combination scheme of the current frame is a correlated signal channel combination scheme, the decoding mode of the current frame is determined to be an uncorrelated signal to correlated signal decoding mode. The uncorrelated signal to correlated signal decoding mode uses the upmixing processing method corresponding to the transition from the uncorrelated signal channel combination scheme to the correlated signal channel combination scheme for temporal upmixing processing. or, The current frame's channel combination scheme is a correlation signal channel combination scheme. The current frame's channel combination scheme is a correlation signal channel combination scheme. The current frame's decoding mode is determined to be a correlation signal decoding mode. The correlation signal decoding mode uses the upmixing processing method corresponding to the correlation signal channel combination scheme for temporal upmixing processing. For example, if the decoding device determines that the decoding mode of the current frame is an uncorrelated signal decoding mode, it uses the temporal upmixing processing method corresponding to the uncorrelated signal decoding mode to perform temporal upmixing processing on the primary and secondary channel decoding signals of the current frame to obtain the left and right channel reconstruction signals of the current frame. The reconstructed signals for the left and right channels can be the decoded signals for the left and right channels, or the decoded signals for the left and right channels can be obtained by performing time delay adjustment processing and / or time domain post-processing on the reconstructed signals for the left and right channels. The temporal upmixing processing method corresponding to the uncorrelated signal decoding mode is the temporal upmixing processing method corresponding to the uncorrelated signal channel combination scheme, and the uncorrelated signal channel combination scheme is the channel combination scheme corresponding to the phase-inverting signal. The decoding mode of the current frame can be one of several decoding modes. For example, the decoding mode of the current frame may be one of the following decoding modes: correlated signal decoding mode, uncorrelated signal decoding mode, correlated to uncorrelated signal decoding mode, and uncorrelated to correlated signal decoding mode. It is understandable that the above scheme requires determining the decoding mode of the current frame, which means that there are multiple possible decoding modes for the current frame. Compared to the traditional scheme with only one decoding mode, multiple possible decoding modes and multiple possible scenarios are conducive to achieving better compatibility and matching. Furthermore, since a channel combination scheme corresponding to inverted-phase signals is introduced, a more targeted channel combination scheme and decoding mode are available when the stereo signal of the current frame is an inverted-phase signal, which in turn helps to improve decoding quality. For example, when the decoding device determines that the decoding mode of the current frame is the correlation signal decoding mode, it uses the temporal upmixing processing method corresponding to the correlation signal decoding mode to perform temporal upmixing processing on the primary and secondary channel decoding signals of the current frame to obtain the left and right channel reconstruction signals of the current frame. The temporal upmixing processing method corresponding to the correlation signal decoding mode is the temporal upmixing processing method corresponding to the correlation signal channel combination scheme, and the correlation signal channel combination scheme is the channel combination scheme corresponding to the positive phase signal. For example, when the decoding device determines that the decoding mode of the current frame is a correlated to uncorrelated signal decoding mode, it uses the temporal upmixing processing method corresponding to the correlated to uncorrelated signal decoding mode to perform temporal upmixing processing on the primary and secondary channel decoding signals of the current frame to obtain the left and right channel reconstruction signals of the current frame. The temporal upmixing processing method corresponding to the correlated to uncorrelated signal decoding mode is a temporal upmixing processing method that transitions from a correlated signal channel combination scheme to an uncorrelated signal channel combination scheme. For example, when the decoding device determines that the decoding mode of the current frame is a non-correlated to correlated signal decoding mode, it uses the temporal upmixing processing method corresponding to the non-correlated to correlated signal decoding mode to perform temporal upmixing processing on the primary and secondary channel decoding signals of the current frame to obtain the left and right channel reconstruction signals of the current frame. The temporal upmixing processing method corresponding to the non-correlated to correlated signal decoding mode is a transition from the non-correlated signal channel combination scheme to the temporal upmixing processing method corresponding to the correlated signal channel combination scheme. It is understandable that different decoding modes typically employ different temporal upmixing methods. Furthermore, each decoding mode may correspond to one or more temporal upmixing methods. It is understandable that the above scheme requires determining the channel combination scheme for the current frame. This means that there are multiple possibilities for the channel combination scheme of the current frame. Compared to the traditional scheme with only one channel combination scheme, multiple possible channel combination schemes and multiple possible scenarios are beneficial for achieving better compatibility and matching. The above scheme requires determining the decoding mode of the current frame based on the channel combination scheme of the previous frame and the channel combination scheme of the current frame. The decoding mode of the current frame has multiple possibilities, which, compared to the traditional scheme with only one decoding mode, is beneficial for achieving better compatibility and matching between multiple possible decoding modes and multiple possible scenarios. Furthermore, the decoding device performs time-domain upmixing on the primary and secondary channel decoding signals of the current frame based on the time-domain upmixing processing corresponding to the decoding mode of the current frame, so as to obtain the left and right channel reconstructed signals of the current frame. The following examples illustrate some specific implementations of how the encoding device determines the channel combination scheme for the current frame. There are various ways the encoding device can determine the channel combination scheme for the current frame. For example, in some possible implementations, determining the channel combination scheme of the current frame may include: determining the channel combination scheme of the current frame by performing at least one channel combination scheme decision on the current frame. Specifically, for example, determining the channel combination scheme of the current frame includes: performing an initial channel combination scheme decision on the current frame to determine an initial channel combination scheme for the current frame; and performing a channel combination scheme correction decision on the current frame based on the initial channel combination scheme to determine the channel combination scheme for the current frame. Alternatively, the initial channel combination scheme of the current frame can be directly used as the channel combination scheme for the current frame; that is, the channel combination scheme of the current frame can be: the initial channel combination scheme of the current frame determined by performing an initial channel combination scheme decision on the current frame. For example, the initial decision on the channel combination scheme for the current frame may include: determining the signal phase type of the stereo signal of the current frame using the left and right channel signals of the current frame; and determining the initial channel combination scheme of the current frame using the signal phase type of the stereo signal of the current frame and the channel combination scheme of the previous frame. The signal phase type of the stereo signal of the current frame can be a near-positive signal or a near-out-of-phase signal. The signal phase type of the stereo signal of the current frame can be indicated by a signal phase type flag (e.g., tmp_SM_flag). Specifically, for example, when the signal phase type flag of the current frame is "1", it indicates that the signal phase type of the stereo signal of the current frame is a near-positive signal; when the signal phase type flag of the current frame is "0", it indicates that the signal phase type of the stereo signal of the current frame is a near-out-of-phase signal, and vice versa. The channel combination scheme of an audio frame (e.g., the previous frame or the current frame) can be indicated by the channel combination scheme identifier of the audio frame. For example, when the channel combination scheme identifier of the audio frame is "0", it indicates that the channel combination scheme of the audio frame is a correlated signal channel combination scheme. When the channel combination scheme identifier of the audio frame is "1", it indicates that the channel combination scheme of the audio frame is an uncorrelated signal channel combination scheme, and vice versa. Similarly, the initial channel combination scheme of an audio frame (e.g., the previous frame or the current frame) can be indicated by the initial channel combination scheme identifier of the audio frame (the initial channel combination scheme identifier is, for example, represented by tdm_SM_flag_loc). For example, when the initial channel combination scheme identifier of an audio frame is "0", it indicates that the initial channel combination scheme of the audio frame is a correlated signal channel combination scheme. As another example, when the initial channel combination scheme identifier of an audio frame is "1", it indicates that the initial channel combination scheme of the audio frame is an uncorrelated signal channel combination scheme, and vice versa. Determining the phase type of the stereo signal of the current frame using the left and right channel signals of the current frame may include: calculating the correlation value xorr between the left and right channel signals of the current frame; determining the phase type of the stereo signal of the current frame as a near-positive signal if xorr is less than or equal to a first threshold; and determining the phase type of the stereo signal of the current frame as a near-out-of-phase signal if xorr is greater than the first threshold. Further, if the phase type identifier of the current frame is used to indicate the phase type of the stereo signal of the current frame, then if the phase type of the stereo signal of the current frame is determined to be a near-positive signal, the value of the phase type identifier of the current frame can be set to indicate that the phase type of the stereo signal of the current frame is a near-positive signal; conversely, if the phase type of the current frame is determined to be a near-positive signal, the value of the phase type identifier of the current frame can be set to indicate that the phase type of the stereo signal of the current frame is a near-out-of-phase signal. The first threshold can be in the range of (0.5, 1.0), for example, it can be equal to 0.5, 0.85, 0.75, 0.65 or 0.81, etc. For example, when the signal phase type flag of an audio frame (e.g., the previous frame or the current frame) is set to "0", it indicates that the signal phase type of the stereo signal of that audio frame is a kind of positive signal; when the signal phase type flag of an audio frame (e.g., the previous frame or the current frame) is set to "1", it indicates that the signal phase type of the stereo signal of that audio frame is a kind of negative signal, and so on. The initial channel combination scheme for the current frame is determined by using the phase type of the stereo signal in the current frame and the channel combination scheme of the previous frame. This may include, for example, the following: If the phase type of the stereo signal in the current frame is a quasi-phase signal and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, then the initial channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme; if the phase type of the stereo signal in the current frame is a quasi-phase signal and the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme, then the initial channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme. or, If the phase type of the stereo signal in the current frame is a quasi-phase signal, and the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme, then if the signal-to-noise ratio of both the left and right channel signals of the current frame is less than the second threshold, the initial channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme; if the signal-to-noise ratio of the left channel signal and / or the right channel signal of the current frame is greater than or equal to the second threshold, the initial channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme. or, If the phase type of the stereo signal in the current frame is a phase-inverting signal and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, then if the signal-to-noise ratio of both the left and right channel signals of the current frame is less than the second threshold, the initial channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme; if the signal-to-noise ratio of the left channel signal and / or the right channel signal of the current frame is greater than or equal to the second threshold, the initial channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme. The value range of the second threshold can be, for example, [0.8, 1.2], such as 0.8, 0.85, 0.9, 1, 1.1 or 1.18. The process of making a channel combination scheme correction decision for the current frame based on the initial channel combination scheme of the current frame may include: determining the channel combination scheme of the current frame according to the channel combination scaling factor correction identifier of the previous frame, the signal phase type of the stereo signal of the current frame, and the initial channel combination scheme of the current frame. The channel combination scheme flag for the current frame can be denoted as `tdm_SM_flag`, and the channel combination scaling factor correction flag for the current frame can be denoted as `tdm_SM_modi_flag`. For example, a value of 0 for the channel combination scaling factor correction flag indicates that no channel combination scaling factor correction is needed, while a value of 1 indicates that channel combination scaling factor correction is needed. Of course, other different values can also be used for the channel combination scaling factor correction flag to indicate whether channel combination scaling factor correction is needed. Specifically, for example, performing a channel combination scheme correction decision on the current frame based on the initial decision result of the current frame's channel combination scheme may include: If the channel combination scaling factor correction flag of the previous frame indicates that the channel combination scaling factor needs to be corrected, the uncorrelated signal channel combination scheme is used as the channel combination scheme of the current frame; if the channel combination scaling factor correction flag of the previous frame indicates that the channel combination scaling factor does not need to be corrected, it is determined whether the current frame meets the switching conditions, and the channel combination scheme of the current frame is determined based on the determination result of whether the current frame meets the switching conditions. The determination of the channel combination scheme for the current frame based on the decision result of whether the current frame meets the switching conditions may include: If the channel combination scheme of the previous frame is different from the initial channel combination scheme of the current frame, and the current frame meets the switching conditions, and the initial channel combination scheme of the current frame is a correlated signal channel combination scheme, and the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme, then the channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme. or, If the channel combination scheme of the previous frame is different from the initial channel combination scheme of the current frame, and the current frame meets the switching conditions, and the initial channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, and the channel combination scaling factor of the previous frame is less than the first scaling factor threshold, then the channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme. or, If the channel combination scheme of the previous frame is different from the initial channel combination scheme of the current frame, and the current frame meets the switching conditions, and the initial channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, and the channel combination scaling factor of the previous frame is greater than or equal to the first scaling factor threshold, then the channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme. or, The channel combination scheme of the P-1th frame is different from the initial channel combination scheme of the Pth frame, and the Pth frame does not meet the switching conditions, while the current frame meets the switching conditions, and the stereo signal of the current frame is a quasi-positive phase signal, and the initial channel combination scheme of the current frame is a correlated signal channel combination scheme, while the previous frame was an uncorrelated signal channel combination scheme, thus determining that the channel combination scheme of the current frame is a correlated signal channel combination scheme. or, If the channel combination scheme of the previous P-1 frame and the initial channel combination scheme of the previous P frame do not meet the switching conditions, and the current frame meets the switching conditions, and the phase type of the stereo signal of the current frame is a phase-inverting signal, and the initial channel combination scheme of the current frame is a non-correlated signal channel combination scheme, and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, and the channel combination scaling factor of the previous frame is less than the second scaling factor threshold, then the channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme. or, If the channel combination scheme of the previous P-1 frame is different from the initial channel combination scheme of the previous P frame, and the previous P frame does not meet the switching conditions, and the current frame meets the switching conditions, and the phase type of the stereo signal in the current frame is a phase-inverted signal, and the initial channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, and the channel combination scaling factor of the previous frame is greater than or equal to the second scaling factor threshold, then the channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme. Where P can be an integer greater than 1, for example, P can be equal to 2, 3, 4, 5, 6 or other values. The value range of the first proportional factor threshold can be, for example, [0.4, 0.6], such as 0.4, 0.45, 0.5, 0.55 or 0.6. The value range of the second proportional factor threshold can be, for example, [0.4, 0.6], such as 0.4, 0.46, 0.5, 0.56 or 0.6. In some possible implementations, determining whether the current frame meets the switching conditions may include: determining whether the current frame meets the switching conditions based on the primary channel signal frame type and / or secondary channel signal frame type of the previous frame. In some possible implementations, determining whether the current frame meets the switching conditions may include: If the first, second, and third conditions are all met, the current frame is determined to meet the switching condition; or if the second, third, fourth, and fifth conditions are all met, the current frame is determined to meet the switching condition; or if the sixth condition is met, the current frame is determined to meet the switching condition. in, First condition: The primary channel signal frame type of the previous frame is any one of the following: VOICED_CLAS frame (voiced characteristic frame, the preceding frame is a voiced frame or a voiced start frame), ONSET frame (voiced start frame), SIN_ONSET frame (start frame of mixed harmonics and noise), INACTIVE_CLAS frame (inactive characteristic frame), AUDIO_CLAS (audio frame), and the primary channel signal frame type of the previous frame is UNVOICED_CLAS frame (frame with one of the characteristics of unvoiced, silent, noise, or voiced end) or VOICED_TRANSITION frame (transition after voiced, frame where the voiced characteristic is very weak); or, the secondary channel signal frame type of the previous frame is any one of the following: VOICED_CLAS frame, ONSET frame, SIN_ONSET frame, INACTIVE_CLAS frame, and AUDIO_CLAS frame, and the secondary channel signal frame type of the previous frame is UNVOICED_CLAS. frame or VOICED_TRANSITION frame. The second condition is that the initial raw coding mode of the primary and secondary channel signals in the previous frame is not VOICED (the coding mode corresponding to voiced frames). The third condition is that, up to the previous frame, the number of frames in which the channel combination scheme used in the previous frame has been continuously used is greater than a preset frame number threshold. The frame number threshold can be in the range of [3, 10], for example, the frame number threshold can be equal to 3, 4, 5, 6, 7, 8, 9 or other values. Fourth condition: The primary channel signal frame type of the previous frame is UNVOICED_CLAS, or the secondary channel signal frame type of the previous frame is UNVOICED_CLAS. Fifth condition: The root mean square energy value of the left and right channel signals in the current frame is less than the energy threshold. The value range of this energy threshold can be, for example, [300, 500]. For example, the frame number threshold can be equal to 300, 400, 410, 451, 482, 500, 415 or other values. Sixth condition: The primary channel signal of the previous frame is an audio signal, and the energy ratio of the low-frequency band to the high-frequency band of the primary channel signal of the previous frame is greater than the first energy ratio threshold, and the energy ratio of the low-frequency band to the high-frequency band of the secondary channel signal of the previous frame is greater than the second energy ratio threshold. The first energy ratio threshold range can be, for example, [4000, 6000], and the frame number threshold can be equal to 4000, 4500, 5000, 5105, 5200, 6000, 5800 or other values. The second energy ratio threshold range can be, for example, [4000, 6000], such as the frame number threshold being equal to 4000, 4501, 5000, 5105, 5200, 6000, 5800 or other values. It is understood that there are many ways to determine whether the current frame meets the switching conditions, and it is not limited to the methods exemplified above. It is understood that the above examples provide some implementation methods for determining the channel combination scheme of the current frame, but in actual applications, the methods may not be limited to those given above. The following examples illustrate the coding scheme for uncorrelated signals. Referring to Figure 4, this application embodiment provides an audio encoding method. The relevant steps of the audio encoding method can be implemented by an encoding device, and the method specifically may include: 401. Determine the encoding mode of the current frame. 402. If the encoding mode of the current frame is determined to be an uncorrelated signal encoding mode, the left and right channel signals of the current frame are subjected to time-domain downmixing processing using the time-domain downmixing processing method corresponding to the uncorrelated signal encoding mode to obtain the primary and secondary channel signals of the current frame. 403. Encode the primary and secondary channel signals of the obtained current frame. Wherein, the time-domain downmixing processing method corresponding to the non-correlated signal encoding mode is the time-domain downmixing processing method corresponding to the non-correlated signal channel combination scheme, and the non-correlated signal channel combination scheme is the channel combination scheme corresponding to the inverted signal. For example, in some possible implementations, the temporal downmixing processing method corresponding to the non-correlated signal coding mode is used to perform temporal downmixing processing on the left and right channel signals of the current frame to obtain the primary and secondary channel signals of the current frame. This may include: performing temporal downmixing processing on the left and right channel signals of the current frame according to the channel combination ratio factor of the non-correlated signal channel combination scheme of the current frame to obtain the primary and secondary channel signals of the current frame; or performing temporal downmixing processing on the left and right channel signals of the current frame according to the channel combination ratio factor of the non-correlated signal channel combination scheme of the current frame and the previous frame to obtain the primary and secondary channel signals of the current frame. It is understandable that the channel combination scaling factor of an audio frame (e.g., the current frame or the previous frame) can be a preset fixed value. Of course, the channel combination scaling factor of an audio frame can also be determined based on the channel combination scheme of the audio frame. In some possible implementations, a corresponding downmixing matrix can be constructed based on the channel combination scaling factor of the audio frame, and the left and right channel signals of the current frame can be downmixed in the time domain using the downmixing matrix corresponding to the channel combination scheme to obtain the primary and secondary channel signals of the current frame. For example, when the left and right channel signals of the current frame are down-mixed in the time domain according to the channel combination scaling factor of the uncorrelated signal channel combination scheme of the current frame to obtain the primary and secondary channel signals of the current frame, For example, when the left and right channel signals of the current frame are down-mixed in the temporal domain according to the channel combination scaling factor of the uncorrelated signal channel combination scheme of the current frame and the previous frame to obtain the primary and secondary channel signals of the current frame, Here, delay_com represents encoding delay compensation. For example, when the left and right channel signals of the current frame are down-mixed in the temporal domain according to the channel combination scaling factor of the uncorrelated signal channel combination scheme of the current frame and the previous frame to obtain the primary and secondary channel signals of the current frame, Here, fade_in(n) represents the fade-in factor. For example... Of course, fade_in(n) can also be a fade-in factor based on other functional relationships of n. `fade_out(n)` represents the fade-out factor. For example... Of course, fade_out(n) can also be a fade-out factor based on other functional relationships of n. Here, NOVA_1 represents the transition processing length. The value of NOVA_1 can be set according to the specific needs of the scenario. For example, NOVA_1 can be equal to 3 / N or other values less than N. For example, when using the temporal downmixing processing method corresponding to the aforementioned correlation signal coding mode to perform temporal downmixing processing on the left and right channel signals of the current frame to obtain the primary and secondary channel signals of the current frame, In the above example, X L (n) represents the left channel signal of the current frame. The XR Y(n) represents the right channel signal of the current frame. Y(n) represents the main channel signal of the current frame obtained by temporal downmixing; X(n) represents the secondary channel signal of the current frame obtained by temporal downmixing. In the examples above, n represents the sample point number. For example, n = 0, 1, ..., N-1. In the example above, delay_com represents encoding delay compensation. M 11 M represents the downmixing matrix corresponding to the channel combination scheme of the correlation signal in the previous frame. 11 The channel combination scaling factor is constructed based on the channel combination scheme corresponding to the correlation signal of the previous frame. The M 12 M represents the downmixing matrix corresponding to the uncorrelated signal channel combination scheme of the previous frame. 12 The channel combination scaling factor is constructed based on the channel combination scheme of the uncorrelated signal in the previous frame. The M 22 M represents the downmixing matrix corresponding to the uncorrelated signal channel combination scheme of the current frame. 22 The channel combination scaling factor is constructed based on the channel combination scheme of the uncorrelated signal in the current frame. The M 21 M represents the downmixing matrix corresponding to the correlation signal channel combination scheme of the current frame. 21 The channel combination scaling factor is constructed based on the channel combination scheme corresponding to the correlation signal of the current frame. Wherein, the M 21 It may exist in multiple forms, for example: or Wherein, the ratio represents the channel combination ratio factor corresponding to the channel combination scheme of the correlation signal in the current frame. Wherein, the M 22 It may exist in multiple forms, for example: or or or or or Where α1 = ratio_SM; α2 = 1 - ratio_SM. The ratio_SM represents the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the current frame. Wherein, the M 12 It may exist in multiple forms, for example: or or or or or Where, α 1_pre =tdm_last_ratio_SM; α 2_pre = 1 - tdm_last_ratio_SM. tdm_last_ratio_SM represents the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the previous frame. Specifically, the left and right channel signals of the current frame can be the original left and right channel signals of the current frame (the original left and right channel signals are left and right channel signals without time domain preprocessing, such as sampled left and right channel signals), or the left and right channel signals of the current frame after time domain preprocessing; or the left and right channel signals of the current frame after time delay alignment processing. For example, or or Among them, the This represents the original left and right channel signals of the current frame. This represents the left and right channel signals of the current frame after time-domain preprocessing. This represents the left and right channel signals of the current frame after time-delay alignment. Accordingly, examples are given below for decoding scenarios of uncorrelated signals. Referring to Figure 5, this application embodiment also provides an audio decoding method. The relevant steps of the audio decoding method can be implemented by a decoding device, and the method specifically may include: 501. Decode the bitstream to obtain the primary and secondary channel decoded signals of the current frame. 502. Determine the decoding mode of the current frame. It is understandable that there is no necessary order in which steps 501 and 502 are executed. 503. If the decoding mode of the current frame is determined to be the uncorrelated signal decoding mode, the temporal upmixing processing method corresponding to the uncorrelated signal decoding mode is used to perform temporal upmixing processing on the primary and secondary channel decoding signals of the current frame to obtain the left and right channel reconstruction signals of the current frame. The reconstructed signals for the left and right channels can be the decoded signals for the left and right channels, or the decoded signals for the left and right channels can be obtained by performing time delay adjustment processing and / or time domain post-processing on the reconstructed signals for the left and right channels. The temporal upmixing processing method corresponding to the uncorrelated signal decoding mode is the temporal upmixing processing method corresponding to the uncorrelated signal channel combination scheme, and the uncorrelated signal channel combination scheme is the channel combination scheme corresponding to the phase-inverting signal. The decoding mode of the current frame can be one of several decoding modes. For example, the decoding mode of the current frame may be one of the following decoding modes: correlated signal decoding mode, uncorrelated signal decoding mode, correlated to uncorrelated signal decoding mode, and uncorrelated to correlated signal decoding mode. It is understandable that the above scheme requires determining the decoding mode of the current frame, which means that there are multiple possible decoding modes for the current frame. Compared to the traditional scheme with only one decoding mode, multiple possible decoding modes and multiple possible scenarios are conducive to achieving better compatibility and matching. Furthermore, since a channel combination scheme corresponding to inverted-phase signals is introduced, a more targeted channel combination scheme and decoding mode are available when the stereo signal of the current frame is an inverted-phase signal, which in turn helps to improve decoding quality. In some possible implementations, the method may further include: When the decoding mode of the current frame is determined to be the correlation signal decoding mode, the temporal upmixing processing method corresponding to the correlation signal decoding mode is used to perform temporal upmixing processing on the primary and secondary channel decoding signals of the current frame to obtain the left and right channel reconstruction signals of the current frame. The temporal upmixing processing method corresponding to the correlation signal decoding mode is the temporal upmixing processing method corresponding to the correlation signal channel combination scheme, and the correlation signal channel combination scheme is the channel combination scheme corresponding to the positive phase signal. In some possible implementations, the method may further include: when the decoding mode of the current frame is determined to be a correlated-to-uncorrelated signal decoding mode, performing temporal upmixing on the primary and secondary channel decoding signals of the current frame to obtain the left and right channel reconstructed signals of the current frame using the temporal upmixing processing method corresponding to the correlated-to-uncorrelated signal decoding mode. The temporal upmixing processing method corresponding to the correlated-to-uncorrelated signal decoding mode is a temporal upmixing processing method that transitions from a correlated signal channel combination scheme to an uncorrelated signal channel combination scheme. In some possible implementations, the method may further include: when it is determined that the decoding mode of the current frame is a non-correlated to correlated signal decoding mode, using the temporal upmixing processing method corresponding to the non-correlated to correlated signal decoding mode to perform temporal upmixing processing on the primary and secondary channel decoding signals of the current frame to obtain the left and right channel reconstruction signals of the current frame, wherein the temporal upmixing processing method corresponding to the non-correlated to correlated signal decoding mode is a transition from the non-correlated signal channel combination scheme to the temporal upmixing processing method corresponding to the correlated signal channel combination scheme. It is understandable that different decoding modes typically employ different temporal upmixing methods. Furthermore, each decoding mode may correspond to one or more temporal upmixing methods. For example, in some possible implementations, the step of using the temporal upmixing processing method corresponding to the uncorrelated signal decoding mode to perform temporal upmixing processing on the primary and secondary channel decoded signals of the current frame to obtain the left and right channel reconstructed signals of the current frame includes: Based on the channel combination scaling factor of the uncorrelated signal channel combination scheme of the current frame, the primary and secondary channel decoded signals of the current frame are temporally upmixed to obtain the left and right channel reconstructed signals of the current frame; or based on the channel combination scaling factor of the uncorrelated signal channel combination scheme of the current frame and the previous frame, the primary and secondary channel decoded signals of the current frame are temporally upmixed to obtain the left and right channel reconstructed signals of the current frame. In some possible implementations, a corresponding upmixing matrix can be constructed based on the channel combination scaling factor of the audio frame. The upmixing matrix corresponding to the channel combination scheme can be used to perform temporal upmixing processing on the primary and secondary channel decoding signals of the current frame to obtain the left and right channel reconstruction signals of the current frame. For example, when the primary and secondary channel decoded signals of the current frame are temporally upmixed according to the channel combination scaling factor of the uncorrelated signal channel combination scheme of the current frame to obtain the left and right channel reconstructed signals of the current frame, For example, when the primary and secondary channel decoded signals of the current frame are temporally upmixed based on the channel combination scaling factor of the uncorrelated signal channel combination scheme of the current frame and the previous frame to obtain the left and right channel reconstructed signals of the current frame, Here, delay_com represents encoding delay compensation. For example, when the primary and secondary channel decoded signals of the current frame are temporally upmixed based on the channel combination scaling factor of the uncorrelated signal channel combination scheme of the current frame and the previous frame to obtain the left and right channel reconstructed signals of the current frame, Among them, the This represents the left channel decoded signal of the current frame. This represents the right channel reconstruction signal of the current frame. This represents the main channel decoding signal of the current frame. This represents the secondary channel decoding signal of the current frame; Wherein, NOVA_1 represents the transition processing length. Here, fade_in(n) represents the fade-in factor. For example... Of course, fade_in(n) can also be a fade-in factor based on other functional relationships of n. Here, fade_out(n) represents the fade-out factor. For example... Of course, fade_out(n) can also be a fade-out factor based on other functional relationships of n. Here, NOVA_1 represents the transition processing length. The value of NOVA_1 can be set according to the specific needs of the scenario. For example, NOVA_1 can be equal to 3 / N or other values less than N. For example, when the primary and secondary channel decoded signals of the current frame are temporally upmixed based on the channel combination scaling factor of the correlation signal channel combination scheme of the current frame to obtain the left and right channel reconstructed signals of the current frame, In the above example, the This represents the left channel decoding signal of the current frame. This represents the right channel reconstruction signal of the current frame. This represents the main channel decoding signal of the current frame. This indicates the secondary channel decoding signal of the current frame. In the examples above, n represents the sample point number. For example, n = 0, 1, ..., N-1. In the example above, upmixing_delay represents decoding delay compensation; This represents the upmixing matrix corresponding to the correlation signal channel combination scheme of the previous frame. The channel combination scaling factor is constructed based on the channel combination scheme corresponding to the correlation signal of the previous frame. The This represents the upmixing matrix corresponding to the uncorrelated signal channel combination scheme of the current frame. The channel combination scaling factor is constructed based on the channel combination scheme of the uncorrelated signal in the current frame. The This represents the upmixing matrix corresponding to the uncorrelated signal channel combination scheme of the previous frame. The channel combination scaling factor is constructed based on the channel combination scheme of the uncorrelated signal in the previous frame. The This represents the upmixing matrix corresponding to the correlation signal channel combination scheme of the current frame. The channel combination scaling factor is constructed based on the channel combination scheme corresponding to the correlation signal of the current frame. Among them, the It may exist in multiple forms, for example: or or or or or Wherein, α1 = ratio_SM; α2 = 1 - ratio_SM; and ratio_SM represents the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the current frame. Among them, the It may exist in multiple forms, for example: or or or or or Where, α 1_pre =tdm_last_ratio_SM; α 2_pre =1-tdm_last_ratio_SM. Wherein, tdm_last_ratio_SM represents the channel combination ratio factor corresponding to the channel combination scheme of the uncorrelated signal in the previous frame. Among them, the It may exist in multiple forms, for example: or Wherein, the ratio represents the channel combination ratio factor corresponding to the channel combination scheme of the correlation signal in the current frame. The following examples illustrate the scenarios of encoding modes from correlated signals to uncorrelated signals and encoding modes from correlated signals to uncorrelated signals. The corresponding time-domain downmixing methods for these encoding modes are, for example, segmented time-domain downmixing. Referring to Figure 6, this application embodiment provides an audio encoding method. The relevant steps of the audio encoding method can be implemented by an encoding device, and the method specifically may include: 601. Determine the channel combination scheme for the current frame. 602. When the channel combination schemes of the current frame and the previous frame are different, the left and right channel signals of the current frame are subjected to segmented time-domain downmixing processing according to the channel combination schemes of the current frame and the previous frame to obtain the main channel signal and the secondary channel signal of the current frame. 603. Encode the primary and secondary channel signals of the obtained current frame. In cases where the channel combination schemes of the current frame and the previous frame are different, the encoding mode of the current frame can be determined to be either a correlated signal to uncorrelated signal encoding mode or an uncorrelated signal to uncorrelated signal encoding mode. If the encoding mode of the current frame is either a correlated signal to uncorrelated signal encoding mode or an uncorrelated signal to uncorrelated signal encoding mode, then, for example, the left and right channel signals of the current frame can be segmented and downmixed in the time domain according to the channel combination schemes of the current frame and the previous frame. For example, if the channel combination scheme of the current frame is a correlated signal channel combination scheme, and the channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, then the encoding mode of the current frame can be determined to be a correlated signal to uncorrelated signal encoding mode. As another example, if the channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the current frame is a correlated signal channel combination scheme, then the encoding mode of the current frame can be determined to be an uncorrelated signal to correlated signal encoding mode. And so on. Segmented temporal downmixing can be understood as dividing the left and right channel signals of the current frame into at least two segments, and applying a different temporal downmixing method to each segment. It can be understood that, compared to non-segmented temporal downmixing, segmented temporal downmixing makes it more likely to achieve a smoother transition when the channel combination scheme changes between adjacent frames. It is understandable that the above scheme requires determining the channel combination scheme for the current frame, which means that there are multiple possibilities for the channel combination scheme for the current frame. Compared with the traditional scheme that has only one channel combination scheme, multiple possible channel combination schemes and multiple possible scenarios are conducive to achieving better compatibility and matching effects. Furthermore, since a mechanism for segmented temporal downmixing of the left and right channel signals of the current frame is introduced when the channel combination schemes of the current frame and the previous frame are different, the segmented temporal downmixing mechanism helps to achieve a smooth transition of the channel combination scheme, thereby improving the coding quality. Furthermore, the introduction of a channel combination scheme for inverted-sound signals provides a more targeted channel combination scheme and coding mode for stereo signals in the current frame that are inverted-sound signals, thereby improving coding quality. For example, the channel combination scheme of the previous frame might be a correlated signal channel combination scheme or an uncorrelated signal channel combination scheme. The channel combination scheme of the current frame might also be a correlated signal channel combination scheme or an uncorrelated signal channel combination scheme. Therefore, there are several possible situations where the channel combination schemes of the current frame and the previous frame are different. For example, when the channel combination scheme of the previous frame is a correlated signal channel combination scheme and the channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, the left and right channel signals of the current frame include the start segment, the middle segment, and the end segment of the left and right channel signals; the primary and secondary channel signals of the current frame include the start segment, the middle segment, and the end segment of the primary and secondary channel signals. Then, performing segmented temporal downmixing on the left and right channel signals of the current frame according to the channel combination schemes of the current frame and the previous frame to obtain the primary and secondary channel signals of the current frame can include: Using the channel combination scaling factor corresponding to the correlation signal channel combination scheme of the previous frame and the temporal downmixing processing method corresponding to the correlation signal channel combination scheme, temporal downmixing processing is performed on the starting segments of the left and right channel signals of the current frame to obtain the starting segments of the primary and secondary channel signals of the current frame. Using the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame and the temporal downmixing processing method corresponding to the uncorrelated signal channel combination scheme, temporal downmixing processing is performed on the end segments of the left and right channel signals of the current frame to obtain the end segments of the primary and secondary channel signals of the current frame. Using the channel combination scaling factor and temporal downmixing method corresponding to the channel combination scheme of the previous frame, temporal downmixing is performed on the middle segments of the left and right channel signals of the current frame to obtain the first primary and secondary channel signal middle segments; using the channel combination scaling factor and temporal downmixing method corresponding to the channel combination scheme of the current frame, temporal downmixing is performed on the middle segments of the left and right channel signals of the current frame to obtain the second primary and secondary channel signal middle segments; the first primary and secondary channel signal middle segments and the second primary and secondary channel signal middle segments are weighted and summed to obtain the primary and secondary channel signal middle segments of the current frame. The lengths of the start, middle, and end segments of the left and right channel signals in the current frame can be set as needed. The lengths of the start, middle, and end segments of the left and right channel signals in the current frame can be equal, partially equal, or unequal. The lengths of the beginning, middle, and ending segments of the primary and secondary channel signals in the current frame can be set as needed. The lengths of the beginning, middle, and ending segments of the primary and secondary channel signals in the current frame can be equal, partially equal, or unequal. When performing a weighted summation of the middle segments of the first primary and secondary channel signals and the middle segments of the second primary and secondary channel signals, the weighting coefficient corresponding to the middle segment of the first primary and secondary channel signals may or may not be equal to the weighting coefficient corresponding to the middle segment of the second primary and secondary channel signals. For example, when performing a weighted summation of the middle segments of the first primary and secondary channel signals and the middle segments of the second primary and secondary channel signals, the weighting coefficient corresponding to the middle segment of the first primary and secondary channel signals is the fade-out factor, and the weighting coefficient corresponding to the middle segment of the second primary and secondary channel signals is the fade-in factor. In some possible implementations... Among them, X 11 (n) represents the starting segment of the main audio channel signal in the current frame. 11 (n) represents the start segment of the secondary channel signal in the current frame. X 31 (n) represents the end segment of the main channel signal of the current frame. 31 (n) represents the end segment of the secondary channel signal of the current frame. X 21 (n) represents the middle segment of the main channel signal of the current frame. 21 (n) represents the middle segment of the secondary channel signal of the current frame; Where X(n) represents the main channel signal of the current frame. Where Y(n) represents the secondary channel signal of the current frame. For example, For example, fade_in(n) represents the fade-in factor, and fade_out(n) represents the fade-out factor. For example, the sum of fade_in(n) and fade_out(n) is 1. For example, Of course, fade_in(n) can also be a fade-in factor based on other functional relationships of n. Similarly, fade_out(n) can also be a fade-in factor based on other functional relationships of n. Where n represents the sample point number, n = 0, 1, ..., N-1. <N1<N2<N-1。 For example, N1 can be 100, 107, 120, 150 or other values. For example, N2 can be 180, 187, 200, 203 or other values. Wherein, X 211 (n) represents the middle segment of the first major channel signal of the current frame, and the Y 211 (n) represents the first segment of the audio signal in the current frame. Wherein, X... 212 (n) represents the middle segment of the second primary channel signal of the current frame, and the Y 212 (n) represents the middle segment of the second main channel signal of the current frame. In some possible implementations... Wherein, X L (n) represents the left channel signal of the current frame. The X R (n) represents the right channel signal of the current frame. The M 11 M represents the downmixing matrix corresponding to the channel combination scheme of the correlation signal in the previous frame. 11 The channel combination scaling factor is constructed based on the channel combination scheme corresponding to the correlation signal of the previous frame. The M... 22 M represents the downmixing matrix corresponding to the uncorrelated signal channel combination scheme of the current frame. 22 The channel combination scaling factor is constructed based on the channel combination scheme of the uncorrelated signal in the current frame. The M 22 There can be many possible forms, for example: or or or or or Wherein, α1 = ratio_SM, α2 = 1 - ratio_SM, and ratio_SM represents the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the current frame. The M 11There can be many possible forms, for example: or Wherein, tdm_last_ratio represents the channel combination ratio factor corresponding to the channel combination scheme of the correlation signal of the previous frame. For example, when the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme and the channel combination scheme of the current frame is a correlated signal channel combination scheme, wherein the left and right channel signals of the current frame include the start segment, the middle segment, and the end segment of the left and right channel signals; and the primary and secondary channel signals of the current frame include the start segment, the middle segment, and the end segment of the primary and secondary channel signals. Then, the step of performing segmented temporal downmixing on the left and right channel signals of the current frame according to the channel combination schemes of the current frame and the previous frame to obtain the primary and secondary channel signals of the current frame may include: Using the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the previous frame and the temporal downmixing processing method corresponding to the uncorrelated signal channel combination scheme, the starting segments of the left and right channel signals of the current frame are temporally downmixed to obtain the starting segments of the primary and secondary channel signals of the current frame. Using the channel combination scaling factor corresponding to the correlation signal channel combination scheme of the current frame and the temporal downmixing processing method corresponding to the correlation signal channel combination scheme, temporal downmixing processing is performed on the end segments of the left and right channel signals of the current frame to obtain the end segments of the primary and secondary channel signals of the current frame. Using the channel combination scaling factor and temporal downmixing method corresponding to the uncorrelated signal channel combination scheme of the previous frame, the middle segments of the left and right channel signals of the current frame are temporally downmixed to obtain the middle segment of the third primary and secondary channel signals; using the channel combination scaling factor and temporal downmixing method corresponding to the correlated signal channel combination scheme of the current frame, the middle segments of the left and right channel signals of the current frame are temporally downmixed to obtain the middle segment of the fourth primary and secondary channel signals; the middle segments of the third primary and secondary channel signals and the middle segments of the fourth primary and secondary channel signals are weighted and summed to obtain the middle segments of the primary and secondary channel signals of the current frame. When performing a weighted summation of the middle segments of the third and fourth primary and secondary channel signals, the weighting coefficient corresponding to the middle segment of the third primary and secondary channel signals may or may not be equal to the weighting coefficient corresponding to the middle segment of the fourth primary and secondary channel signals. For example, when performing a weighted summation of the middle segments of the third primary and secondary channel signals and the middle segments of the fourth primary and secondary channel signals, the weighting coefficient corresponding to the middle segment of the third primary and secondary channel signals is the fade-out factor, and the weighting coefficient corresponding to the middle segment of the fourth primary and secondary channel signals is the fade-in factor. In some possible implementations... Among them, X 12 (n) represents the starting segment of the main audio channel signal of the current frame, Y 12 (n) represents the start segment of the secondary channel signal in the current frame. X 32 (n) represents the end segment of the main audio channel signal in the current frame, Y 32 (n) represents the end segment of the secondary channel signal of the current frame. X 22 (n) represents the middle segment of the main audio channel signal of the current frame, Y 22 (n) represents the middle segment of the secondary channel signal of the current frame. Where X(n) represents the main channel signal of the current frame. Where Y(n) represents the secondary channel signal of the current frame. For example, Where fade_in(n) represents the fade-in factor, fade_out(n) represents the fade-out factor, and the sum of fade_in(n) and fade_out(n) is 1. For example, Of course, fade_in(n) can also be a fade-in factor based on other functional relationships of n. Similarly, fade_out(n) can also be a fade-in factor based on other functional relationships of n. Where n represents the sample point number, for example, n = 0, 1, ..., N-1. Among them, 0 <N3<N4<N-1。 For example, N3 can be 101, 107, 120, 150 or other values. For example, N4 can be 181, 187, 200, 205 or other values. Wherein, X 221 (n) represents the middle segment of the third major channel signal of the current frame, and the Y 221 (n) represents the middle segment of the third channel signal in the current frame. Wherein, X... 222 (n) represents the middle segment of the fourth major channel signal of the current frame, and the Y 222 (n) represents the middle segment of the fourth secondary channel signal of the current frame. In some possible implementations... Wherein, X L (n) represents the left channel signal of the current frame, and X R (n) represents the right channel signal of the current frame. The M 12 M represents the downmixing matrix corresponding to the uncorrelated signal channel combination scheme of the previous frame. 12 The M is constructed based on the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the previous frame. 21 M represents the downmixing matrix corresponding to the current frame correlation signal channel combination scheme. 21 The channel combination scaling factor is constructed based on the channel combination scheme corresponding to the correlation signal of the current frame. The M 12 There can be many possible forms, for example: or or or or or Where, α 1_pre =tdm_last_ratio_SM; α 2_pre =1-tdm_last_ratio_SM. Wherein, tdm_last_ratio_SM represents the channel combination ratio factor corresponding to the channel combination scheme of the uncorrelated signal in the previous frame. The M 21 There can be many possible forms, for example: or Wherein, the ratio represents the channel combination ratio factor corresponding to the channel combination scheme of the correlation signal of the current frame. In some possible implementations, the left and right channel signals of the current frame may be, for example, the original left and right channel signals of the current frame, the left and right channel signals after time-domain preprocessing, or the left and right channel signals after time-delay alignment processing. For example: or or Wherein, the x L (n) represents the original left channel signal of the current frame (the original left channel signal is the left channel signal without time-domain preprocessing), and x R (n) represents the original right channel signal of the current frame (the original right channel signal is the right channel signal without time-domain preprocessing). The x L_HP (n) represents the time-domain preprocessed left channel signal of the current frame, and x R_HP (n) represents the right channel signal of the current frame after time-domain preprocessing. x′ L (n) represents the time-delay aligned left channel signal of the current frame, where x′ R (n) represents the right channel signal of the current frame after time-delay alignment. It is understood that the segmented time-domain downmixing processing methods exemplified above are not necessarily all possible implementation methods, and other segmented time-domain downmixing processing methods may also be used in practical applications. Accordingly, examples are given below for the decoding modes of correlated signals to uncorrelated signals and the decoding modes of uncorrelated signals to uncorrelated signals. The time-domain downmixing processing methods corresponding to the decoding modes of correlated signals to uncorrelated signals and the decoding modes of uncorrelated signals to uncorrelated signals are, for example, segmented time-domain downmixing processing methods. Referring to Figure 7, this application embodiment provides an audio decoding method. The relevant steps of the audio decoding method can be implemented by a decoding device, and the method specifically may include: 701. Decode the bitstream to obtain the primary and secondary channel decoded signals of the current frame. 702. Determine the channel combination scheme for the current frame. It is understandable that there is no necessary order in which steps 701 and 702 are executed. 703. When the channel combination schemes of the current frame and the previous frame are different, the primary and secondary channel decoding signals of the current frame are subjected to segmented time-domain upmixing processing according to the channel combination schemes of the current frame and the previous frame to obtain the left and right channel reconstruction signals of the current frame. The current frame's channel combination scheme is one of several channel combination schemes. Among these, the various channel combination schemes include uncorrelated signal channel combination schemes and correlated signal channel combination schemes. The correlated signal channel combination scheme is a channel combination scheme corresponding to near-positive phase signals. The uncorrelated signal channel combination scheme is a channel combination scheme corresponding to near-out-of-phase signals. It can be understood that the channel combination scheme corresponding to near-positive phase signals is suitable for near-positive phase signals, and the channel combination scheme corresponding to near-out-of-phase signals is suitable for near-out-of-phase signals. Segmented temporal upmixing can be understood as dividing the left and right channel signals of the current frame into at least two segments, and applying a different temporal upmixing method to each segment. It can be understood that, compared to non-segmented temporal upmixing, segmented temporal upmixing makes it more likely to achieve a smoother transition when the channel combination scheme changes between adjacent frames. It is understandable that the above scheme requires determining the channel combination scheme for the current frame, which means that there are multiple possibilities for the channel combination scheme for the current frame. Compared with the traditional scheme that has only one channel combination scheme, multiple possible channel combination schemes and multiple possible scenarios are conducive to achieving better compatibility and matching effects. Furthermore, since a mechanism for segmented temporal upmixing of the left and right channel signals of the current frame is introduced when the channel combination schemes of the current frame and the previous frame are different, the segmented temporal upmixing mechanism helps to achieve a smooth transition of the channel combination scheme, thereby improving the coding quality. Furthermore, the introduction of a channel combination scheme for inverted-sound signals provides a more targeted channel combination scheme and coding mode for stereo signals in the current frame that are inverted-sound signals, thereby improving coding quality. For example, the channel combination scheme of the previous frame might be a correlated signal channel combination scheme or an uncorrelated signal channel combination scheme. The channel combination scheme of the current frame might also be a correlated signal channel combination scheme or an uncorrelated signal channel combination scheme. Therefore, there are several possible situations where the channel combination schemes of the current frame and the previous frame are different. For example, when the channel combination scheme of the previous frame is a correlated signal channel combination scheme and the channel combination scheme of the current frame is an uncorrelated signal channel combination scheme. The reconstructed left and right channel signals of the current frame include the start segment, the middle segment, and the end segment of the reconstructed left and right channel signals; the decoded primary and secondary channel signals of the current frame include the start segment, the middle segment, and the end segment. Therefore, the step of performing segmented temporal upmixing on the decoded primary and secondary channel signals of the current frame according to the channel combination schemes of the current frame and the previous frame to obtain the reconstructed left and right channel signals of the current frame includes: using the channel combination scaling factor corresponding to the correlated signal channel combination scheme of the previous frame and the temporal upmixing method corresponding to the correlated signal channel combination scheme, performing temporal upmixing on the start segment of the decoded primary and secondary channel signals of the current frame to obtain the start segment of the reconstructed left and right channel signals of the current frame; Using the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame and the temporal upmixing processing method corresponding to the uncorrelated signal channel combination scheme, temporal upmixing processing is performed on the end segment of the primary and secondary channel decoded signals of the current frame to obtain the end segment of the left and right channel reconstructed signals of the current frame. Using the channel combination scaling factor and temporal upmixing method corresponding to the channel combination scheme of the previous frame, the middle segment of the primary and secondary channel decoded signals of the current frame is temporally upmixed to obtain the middle segment of the first left and right channel reconstructed signals; using the channel combination scaling factor and temporal upmixing method corresponding to the channel combination scheme of the current frame, the middle segment of the primary and secondary channel decoded signals of the current frame is temporally upmixed to obtain the middle segment of the second left and right channel reconstructed signals; the middle segment of the first left and right channel reconstructed signals and the middle segment of the second left and right channel reconstructed signals are weighted and summed to obtain the middle segment of the left and right channel reconstructed signals of the current frame. The lengths of the start segment, middle segment, and end segment of the left and right channel reconstruction signals in the current frame can be set as needed. The lengths of the start segment, middle segment, and end segment of the left and right channel reconstruction signals in the current frame can be equal, partially equal, or unequal. The lengths of the start segment, middle segment, and end segment of the primary and secondary channel decoded signals in the current frame can be set as needed. The lengths of the start segment, middle segment, and end segment of the primary and secondary channel decoded signals in the current frame can be equal, partially equal, or unequal. The reconstructed signals for the left and right channels can be the decoded signals for the left and right channels, or the decoded signals for the left and right channels can be obtained by performing time delay adjustment processing and / or time domain post-processing on the reconstructed signals for the left and right channels. When performing weighted summation on the middle segments of the first and second left and right channel reconstructed signals, the weighting coefficients corresponding to the middle segments of the first and second left and right channel reconstructed signals may or may not be equal to the weighting coefficients corresponding to the middle segments of the second left and right channel reconstructed signals. For example, when performing a weighted summation of the middle segments of the first and second left and right channel reconstructed signals, the weighting coefficient corresponding to the middle segment of the first and second left and right channel reconstructed signals is the fade-out factor, and the weighting coefficient corresponding to the middle segment of the second left and right channel reconstructed signals is the fade-in factor. In some possible implementations... in, This indicates the start segment of the left channel reconstructed signal in the current frame. This indicates the start segment of the right channel reconstruction signal in the current frame. This indicates the end segment of the left channel reconstructed signal in the current frame. This indicates the end segment of the right channel reconstructed signal in the current frame. This indicates the middle segment of the left channel reconstructed signal in the current frame. This indicates the middle segment of the right channel reconstructed signal in the current frame. in, This represents the left channel reconstruction signal of the current frame. in, This represents the right channel reconstruction signal of the current frame. For example, For example, fade_in(n) represents the fade-in factor, and fade_out(n) represents the fade-out factor. For example, the sum of fade_in(n) and fade_out(n) is 1. For example, Of course, fade_in(n) can also be a fade-in factor based on other functional relationships of n. Similarly, fade_out(n) can also be a fade-in factor based on other functional relationships of n. Where n represents the sample point index, n = 0, 1, ..., N-1. <N1<N2<N-1。 Among them, the This represents the middle segment of the first left channel reconstructed signal of the current frame. This indicates the middle segment of the first right channel reconstructed signal in the current frame. This represents the middle segment of the second left channel reconstructed signal in the current frame. This indicates the middle segment of the second right channel reconstructed signal in the current frame. In some possible implementations... in, This represents the main channel decoding signal of the current frame; This indicates the secondary channel decoding signal of the current frame. The This represents the upmixing matrix corresponding to the correlation signal channel combination scheme of the previous frame. The channel combination scaling factor is constructed based on the channel combination scheme corresponding to the correlation signal of the previous frame. This represents the upmixing matrix corresponding to the uncorrelated signal channel combination scheme of the current frame. The channel combination scaling factor is constructed based on the channel combination scheme of the uncorrelated signal in the current frame. The There can be many possible forms, for example: or or or or or Wherein, α1 = ratio_SM; α2 = 1 - ratio_SM; and ratio_SM represents the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the current frame. The There can be many possible forms, for example: or Wherein, tdm_last_ratio represents the channel combination ratio factor corresponding to the channel combination scheme of the correlation signal of the previous frame. For example, when the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme and the channel combination scheme of the current frame is a correlated signal channel combination scheme. The reconstructed left and right channel signals of the current frame include the start segment, the middle segment, and the end segment of the reconstructed left and right channel signals; the decoded primary and secondary channel signals of the current frame include the start segment, the middle segment, and the end segment of the decoded primary and secondary channel signals. Then, the step of performing segmented temporal upmixing on the decoded primary and secondary channel signals of the current frame according to the channel combination schemes of the current frame and the previous frame to obtain the reconstructed left and right channel signals of the current frame includes: Using the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the previous frame and the temporal upmixing processing method corresponding to the uncorrelated signal channel combination scheme, temporal upmixing processing is performed on the starting segment of the primary and secondary channel decoded signals of the current frame to obtain the starting segment of the left and right channel reconstructed signals of the current frame. Using the channel combination scaling factor corresponding to the correlation signal channel combination scheme of the current frame and the temporal upmixing processing method corresponding to the correlation signal channel combination scheme, temporal upmixing processing is performed on the end segment of the primary and secondary channel decoded signals of the current frame to obtain the end segment of the left and right channel reconstructed signals of the current frame. Using the channel combination scaling factor and temporal upmixing method corresponding to the uncorrelated signal channel combination scheme of the previous frame, the middle segment of the primary and secondary channel decoded signals of the current frame is temporally upmixed to obtain the middle segment of the third left and right channel reconstructed signals; using the channel combination scaling factor and temporal upmixing method corresponding to the correlated signal channel combination scheme of the current frame, the middle segment of the primary and secondary channel decoded signals of the current frame is temporally upmixed to obtain the middle segment of the fourth left and right channel reconstructed signals; the middle segment of the third left and right channel reconstructed signals and the middle segment of the fourth left and right channel reconstructed signals are weighted and summed to obtain the middle segment of the left and right channel reconstructed signals of the current frame. When performing a weighted summation of the middle segments of the third and fourth left and right channel reconstructed signals, the weighting coefficients corresponding to the middle segments of the third and fourth left and right channel reconstructed signals may or may not be equal to the weighting coefficients corresponding to the middle segments of the fourth left and right channel reconstructed signals. For example, when performing a weighted summation of the middle segments of the third and fourth left and right channel reconstructed signals, the weighting coefficient corresponding to the middle segment of the third left and right channel reconstructed signal is a fade-out factor, and the weighting coefficient corresponding to the middle segment of the fourth left and right channel reconstructed signal is a fade-in factor. In some possible implementations... in, This indicates the start segment of the left channel reconstructed signal in the current frame. This indicates the start segment of the right channel reconstruction signal in the current frame. This indicates the end segment of the left channel reconstructed signal in the current frame. This indicates the end segment of the right channel reconstructed signal in the current frame. This indicates the middle segment of the left channel reconstructed signal in the current frame. This indicates the middle segment of the right channel reconstructed signal in the current frame; in, This represents the left channel reconstruction signal of the current frame. in, This represents the right channel reconstruction signal of the current frame. For example, Where fade_in(n) represents the fade-in factor, fade_out(n) represents the fade-out factor, and the sum of fade_in(n) and fade_out(n) is 1. For example, Of course, fade_in(n) can also be a fade-in factor based on other functional relationships of n. Similarly, fade_out(n) can also be a fade-in factor based on other functional relationships of n. Where n represents the sample point number, for example, n = 0, 1, ..., N-1. Among them, 0 <N3<N4<N-1。 For example, N3 can be 101, 107, 120, 150 or other values. For example, N4 can be 181, 187, 200, 205 or other values. Among them, the This represents the middle segment of the third left channel reconstructed signal of the current frame. This represents the middle segment of the third right channel reconstructed signal in the current frame; This represents the middle segment of the fourth left channel reconstructed signal in the current frame. This indicates the middle segment of the fourth right channel reconstructed signal in the current frame. In some possible implementations... in, This represents the main channel decoding signal of the current frame; This indicates the secondary channel decoding signal of the current frame. The This represents the upmixing matrix corresponding to the uncorrelated signal channel combination scheme of the previous frame. The channel combination scaling factor is constructed based on the channel combination scheme corresponding to the uncorrelated signal channel combination scheme of the previous frame; This represents the upmixing matrix corresponding to the correlation signal channel combination scheme of the current frame. The channel combination scaling factor is constructed based on the channel combination scheme corresponding to the correlation signal of the current frame. The There can be many possible forms, for example: or or or or or Where, α 1_pre =tdm_last_ratio_SM; α 2_pre =1 - tdm_last_ratio_SM; Wherein, tdm_last_ratio_SM represents the channel combination ratio factor corresponding to the channel combination scheme of the uncorrelated signal in the previous frame. The There can be many possible forms, for example: or Wherein, the ratio represents the channel combination ratio factor corresponding to the channel combination scheme of the correlation signal of the current frame. In this embodiment, the stereo parameters of the current frame (e.g., channel combination scaling factor and / or inter-channel delay difference) can be fixed values or determined based on the channel combination scheme of the current frame (e.g., correlated signal channel combination scheme or uncorrelated signal channel combination scheme). Referring to Figure 8, the following is an example of a method for determining time-domain stereo parameters. The relevant steps of the method for determining time-domain stereo parameters can be implemented by the encoding device. The method may specifically include: 801. Determine the channel combination scheme for the current frame. 802. Determine the temporal stereo parameters of the current frame according to the channel combination scheme of the current frame, wherein the temporal stereo parameters include at least one of the channel combination scaling factor and the inter-channel delay difference. The current frame's channel combination scheme is one of several channel combination schemes. Among them, the various channel combination schemes include uncorrelated signal channel combination schemes and correlated signal channel combination schemes. The correlation signal channel combination scheme is a channel combination scheme corresponding to a near-positive phase signal. The non-correlated signal channel combination scheme is a channel combination scheme corresponding to a near-inverted phase signal. It can be understood that the channel combination scheme corresponding to a near-positive phase signal is applicable to near-positive phase signals, and the channel combination scheme corresponding to a near-inverted phase signal is applicable to near-inverted phase signals. If the channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme, the temporal stereo parameters of the current frame are the temporal stereo parameters corresponding to the correlated signal channel combination scheme of the current frame; if the channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme, the temporal stereo parameters of the current frame are the temporal stereo parameters corresponding to the uncorrelated signal channel combination scheme of the current frame. It is understandable that the above scheme requires determining the channel combination scheme for the current frame. This means that there are multiple possibilities for the channel combination scheme for the current frame. Compared to the traditional scheme with only one channel combination scheme, multiple possible channel combination schemes and multiple possible scenarios are conducive to achieving better compatibility and matching. Since the temporal stereo parameters of the current frame are determined based on the channel combination scheme of the current frame, this facilitates better compatibility and matching between the temporal stereo parameters and multiple possible scenarios, thereby improving the encoding and decoding quality. In some possible implementations, the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame and the channel combination scaling factor corresponding to the correlated signal channel combination scheme of the current frame can be calculated first. Then, if it is determined that the channel combination scheme of the current frame is a correlated signal channel combination scheme, the temporal stereo parameters of the current frame are determined to be the temporal stereo parameters corresponding to the correlated signal channel combination scheme of the current frame; or, if it is determined that the channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, the temporal stereo parameters of the current frame are determined to be the temporal stereo parameters corresponding to the uncorrelated signal channel combination scheme of the current frame. Alternatively, the temporal stereo parameters corresponding to the correlation signal channel combination scheme of the current frame can be calculated first. If the channel combination scheme of the current frame is determined to be a correlation signal channel combination scheme, the temporal stereo parameters of the current frame are determined to be the temporal stereo parameters corresponding to the correlation signal channel combination scheme of the current frame. If the channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme, the temporal stereo parameters corresponding to the uncorrelated signal channel combination scheme of the current frame are calculated, and the calculated temporal stereo parameters corresponding to the uncorrelated signal channel combination scheme of the current frame are confirmed as the temporal stereo parameters of the current frame. Alternatively, the channel combination scheme of the current frame can be determined first. If the channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme, the temporal stereo parameters corresponding to the correlated signal channel combination scheme of the current frame are calculated. Then, the temporal stereo parameters of the current frame are the temporal stereo parameters corresponding to the correlated signal channel combination scheme of the current frame. Conversely, if the channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme, the temporal stereo parameters corresponding to the uncorrelated signal channel combination scheme of the current frame are calculated. Then, the temporal stereo parameters of the current frame are the temporal stereo parameters corresponding to the uncorrelated signal channel combination scheme of the current frame. In some possible implementations, determining the temporal stereo parameters of the current frame based on the channel combination scheme of the current frame includes: determining an initial value for the channel combination scaling factor corresponding to the channel combination scheme of the current frame. Where it is not necessary to correct the initial value of the channel combination scaling factor corresponding to the channel combination scheme of the current frame (correlated signal channel combination scheme or uncorrelated signal channel combination method), the channel combination scaling factor corresponding to the channel combination scheme of the current frame is equal to the initial value of the channel combination scaling factor corresponding to the channel combination scheme of the current frame. When it is necessary to correct the initial value of the channel combination scaling factor corresponding to the channel combination scheme (correlated signal channel combination scheme or uncorrelated signal channel combination method) of the current frame, the initial value of the channel combination scaling factor corresponding to the channel combination scheme of the current frame is corrected to obtain the corrected value of the channel combination scaling factor corresponding to the channel combination scheme of the current frame. The channel combination scaling factor corresponding to the channel combination scheme of the current frame is equal to the corrected value of the channel combination scaling factor corresponding to the channel combination scheme of the current frame. For example, determining the temporal stereo parameters of the current frame based on the channel combination scheme of the current frame may include: calculating the frame energy of the left channel signal of the current frame based on the left channel signal of the current frame; calculating the frame energy of the right channel signal of the current frame based on the right channel signal of the current frame; and calculating the initial value of the channel combination scaling factor corresponding to the correlation signal channel combination scheme of the current frame based on the frame energy of the left channel signal and the frame energy of the right channel signal of the current frame. Where there is no need to correct the initial value of the channel combination scaling factor corresponding to the channel combination scheme of the correlation signal of the current frame, the channel combination scaling factor corresponding to the channel combination scheme of the correlation signal of the current frame is equal to the initial value of the channel combination scaling factor corresponding to the channel combination scheme of the correlation signal of the current frame, and the encoding index of the channel combination scaling factor corresponding to the channel combination scheme of the correlation signal of the current frame is equal to the encoding index of the initial value of the channel combination scaling factor corresponding to the channel combination scheme of the correlation signal of the current frame. When it is necessary to correct the initial value of the channel combination scaling factor corresponding to the channel combination scheme of the correlation signal of the current frame, the initial value and its encoding index of the channel combination scaling factor corresponding to the channel combination scheme of the correlation signal of the current frame are corrected to obtain the corrected value and its encoding index of the channel combination scaling factor corresponding to the channel combination scheme of the correlation signal of the current frame. The channel combination scaling factor corresponding to the channel combination scheme of the correlation signal of the current frame is equal to the corrected value of the channel combination scaling factor corresponding to the channel combination scheme of the correlation signal of the current frame; the encoding index of the channel combination scaling factor corresponding to the channel combination scheme of the correlation signal of the current frame is equal to the encoding index of the corrected value of the channel combination scaling factor corresponding to the channel combination scheme of the correlation signal of the current frame. Specifically, for example, when the initial value of the channel combination scaling factor and its encoding index corresponding to the channel combination scheme of the correlation signal of the current frame are corrected. ratio_idx_mod=0.5*(tdm_last_ratio_idx+16); ratio_mod qua =ratio_tabl[ratio_idx_mod]; Wherein, tdm_last_ratio_idx represents the encoding index of the channel combination ratio factor corresponding to the channel combination scheme of the correlation signal in the previous frame, and ratio_idx_mod represents the encoding index of the correction value of the channel combination ratio factor corresponding to the channel combination scheme of the correlation signal in the current frame. qua This represents the correction value of the channel combination scaling factor corresponding to the channel combination scheme of the correlation signal in the current frame. For example, determining the temporal stereo parameters of the current frame based on the channel combination scheme of the current frame includes: obtaining the reference channel signal of the current frame based on the left and right channel signals of the current frame; calculating the amplitude correlation parameter between the left channel signal and the reference channel signal of the current frame; calculating the amplitude correlation parameter between the right channel signal and the reference channel signal of the current frame; calculating the amplitude correlation difference parameter between the left and right channel signals of the current frame based on the amplitude correlation parameter between the left and right channel signals and the reference channel signal of the current frame; and calculating the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame based on the amplitude correlation difference parameter between the left and right channel signals of the current frame. Specifically, based on the amplitude correlation difference parameter between the left and right channel signals of the current frame, the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame is calculated. This may include, for example, calculating an initial value of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame based on the amplitude correlation difference parameter between the left and right channel signals of the current frame; and correcting the initial value of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame to obtain the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame. It can be understood that when there is no need to correct the initial value of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame, then the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame is equal to the initial value of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame. In some possible implementations, in, Wherein, mono_i(n) represents the reference channel signal of the current frame. Wherein, the x′ L (n) represents the left channel signal of the current frame after time-delay alignment; the x′ R (n) represents the right channel signal of the current frame after time delay alignment. corr_LM represents the amplitude correlation parameter between the left channel signal and the reference channel signal of the current frame, and corr_RM represents the amplitude correlation parameter between the right channel signal and the reference channel signal of the current frame. In some possible implementations, calculating the amplitude correlation difference parameter between the left and right channel signals of the current frame based on the amplitude correlation parameter between the left and right channel signals of the current frame and the reference channel signal includes: calculating the amplitude correlation parameter between the smoothed left channel signal and the reference channel signal over the current frame length based on the amplitude correlation parameter between the left channel signal and the reference channel signal after time delay alignment processing of the current frame; calculating the amplitude correlation parameter between the smoothed right channel signal and the reference channel signal over the current frame length based on the amplitude correlation parameter between the right channel signal and the reference channel signal after time delay alignment processing of the current frame; and calculating the amplitude correlation difference parameter between the left and right channels of the current frame based on the amplitude correlation parameter between the smoothed left channel signal and the reference channel signal over the current frame length and the amplitude correlation parameter between the smoothed right channel signal and the reference channel signal over the current frame length. The smoothing process can take many forms, for example: tdm_lt_corr_LM_SM cur =α*tdm_lt_corr_LM_SM pre +(1-α)corr_LM; Among them, tdm_lt_rms_L_SM cur = (1-A)*tdm_lt_rms_L_SM pre +A*rms_L, where A represents the update factor for the long-time smoothed frame energy of the left channel signal in the current frame. The tdm_lt_rms_L_SM cur This represents the long-time smoothed frame energy of the left channel signal in the current frame; where rms_L represents the frame energy of the left channel signal in the current frame. tdm_lt_corr_LM_SM cur This parameter represents the amplitude correlation between the smoothed left channel signal and the reference channel signal over the current frame length. tdm_lt_corr_LM_SM pre This parameter represents the amplitude correlation between the smoothed left channel signal from the previous frame and the reference channel signal. α represents the left channel smoothing factor. For example, tdm_lt_corr_RM_SM cur =β*tdm_lt_corr_RM_SM pre +(1-β)corr_LM. Among them, tdm_lt_rms_R_SM cur = (1-B)*tdm_lt_rms_R_SM pre+B*rms_R; where B represents the update factor for the long-time smoothed frame energy of the right channel signal in the current frame. tdm_lt_rms_R_SM pre This represents the long-time smoothed frame energy of the right channel signal in the current frame. Specifically, `rms_R` represents the frame energy of the right channel signal in the current frame. And `tdm_lt_corr_RM_SM`... cur This parameter represents the amplitude correlation between the smoothed right channel signal and the reference channel signal over the current frame length. tdm_lt_corr_RM_SM pre This parameter represents the amplitude correlation between the right channel signal after long-time smoothing in the previous frame and the reference channel signal. β represents the right channel smoothing factor. In some possible implementations, diff_lt_corr=tdm_lt_corr_LM_SM-tdm_lt_corr_RM_SM; Wherein, tdm_lt_corr_LM_SM represents the amplitude correlation parameter between the smoothed left channel signal and the reference channel signal at the current frame length, tdm_lt_corr_RM_SM represents the amplitude correlation parameter between the smoothed right channel signal and the reference channel signal at the current frame length, and diff_lt_corr represents the amplitude correlation difference parameter between the left and right channel signals at the current frame. In some possible implementations, calculating the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame based on the amplitude correlation difference parameter between the left and right channel signals of the current frame includes: mapping the amplitude correlation difference parameter between the left and right channel signals of the current frame so that the value of the mapped amplitude correlation difference parameter between the left and right channel signals of the current frame is within the range of [MAP_MIN, MAP_MAX]; and converting the mapped amplitude correlation difference parameter between the left and right channel signals into a channel combination scaling factor. In some possible implementations, mapping the amplitude correlation difference parameter between the left and right channels of the current frame includes: limiting the amplitude correlation difference parameter between the left and right channel signals of the current frame; and mapping the amplitude correlation difference parameter between the left and right channel signals of the current frame after the limiting process. There are various ways to handle the limiting effect, for example: Where RATIO_MAX represents the maximum value of the amplitude correlation difference parameter between the left and right channel signals of the current frame after amplitude limiting, and RATIO_MIN represents the minimum value of the amplitude correlation difference parameter between the left and right channel signals of the current frame after amplitude limiting, and RATIO_MAX > RATIO_MIN. The mapping process can take many forms, for example: B1=MAP_MAX-RATIO_MAX*A1, or B1=MAP_HIGH-RATIO_HIGH*A1 B2=MAP_LOW-RATIO_LOW*A2, or B2=MAP_MIN-RATIO_MIN*A2 B3=MAP_HIGH-RATIO_HIGH*A3, or B3=MAP_LOW-RATIO_LOW*A3 Wherein, diff_lt_corr_map represents the amplitude correlation difference parameter between the left and right channel signals of the current frame after mapping processing; Wherein, MAP_MAX represents the maximum value of the amplitude correlation difference parameter between the left and right channel signals of the current frame after mapping processing; MAP_HIGH represents the high threshold of the amplitude correlation difference parameter between the left and right channel signals of the current frame after mapping processing; MAP_LOW represents the low threshold of the amplitude correlation difference parameter between the left and right channel signals of the current frame after mapping processing; and MAP_MIN represents the minimum value of the amplitude correlation difference parameter between the left and right channel signals of the current frame after mapping processing. Among them, MAP_MAX>MAP_HIGH>MAP_LOW>MAP_MIN; RATIO_MAX represents the maximum value of the amplitude correlation difference parameter between the left and right channel signals of the current frame after amplitude limiting; RATIO_HIGH represents the high threshold of the amplitude correlation difference parameter between the left and right channel signals of the current frame after mapping; RATIO_LOW represents the low threshold of the amplitude correlation difference parameter between the left and right channel signals of the current frame after mapping; and RATIO_MIN represents the minimum value of the amplitude correlation difference parameter between the left and right channel signals of the current frame after mapping. Among them, RATIO_MAX>RATIO_HIGH>RATIO_LOW>RATIO_MIN. For example, Wherein, diff_lt_corr_limit represents the amplitude correlation difference parameter between the left and right channel signals of the current frame after amplitude limiting; diff_lt_corr_map represents the amplitude correlation difference parameter between the left and right channel signals of the current frame after mapping. in, Wherein, RATIO_MAX represents the maximum amplitude of the amplitude correlation difference parameter between the left and right channel signals of the current frame, and -RATIO_MAX represents the minimum amplitude of the amplitude correlation difference parameter between the left and right channel signals of the current frame. In some possible implementations, Wherein, `diff_lt_corr_map` represents the amplitude correlation difference parameter between the left and right channel signals of the current frame after mapping processing. `ratio_SM` represents the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame, or `ratio_SM` represents the initial value of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame. In some embodiments of this application, in scenarios where channel combination scaling factor correction is required, the correction can be performed before or after encoding the channel combination scaling factor. Specifically, for example, an initial value of the channel combination scaling factor for the current frame (e.g., the channel combination scaling factor corresponding to an uncorrelated signal channel combination scheme or a correlated signal channel combination scheme) can be calculated first. Then, the initial value of the channel combination scaling factor is encoded to obtain the initial encoding index of the channel combination scaling factor for the current frame. This initial encoding index is then corrected to obtain the encoding index of the channel combination scaling factor for the current frame (obtaining the encoding index of the channel combination scaling factor for the current frame is equivalent to obtaining the channel combination scaling factor for the current frame). Alternatively, an initial value of the channel combination scaling factor for the current frame can be calculated first, then the calculated initial value is corrected to obtain the channel combination scaling factor for the current frame. This initial value is then encoded to obtain the encoding index of the channel combination scaling factor for the current frame. There are various ways to correct the initial value of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame. For example, when it is necessary to obtain the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame by correcting the initial value of the initial value of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame, the initial value of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame can be corrected based on the initial value of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the previous frame and the initial value of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame; or, the initial value of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame can be corrected based on the initial value of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame. For example, firstly, based on the long-term smoothed frame energy of the left channel signal of the current frame, the long-term smoothed frame energy of the right channel signal of the current frame, the inter-frame energy difference of the left channel signal of the current frame, the coding parameters of the previous frame cached in the history buffer (e.g., inter-frame correlation of the primary channel signal, inter-frame correlation of the secondary channel signal), the channel combination scheme identifiers of the current frame and the previous frame, the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the previous frame, and the initial value of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame, it is determined whether the initial value of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame needs to be corrected. If so, the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the previous frame is used as the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame; otherwise, the initial value of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame is used as the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame. Of course, the specific implementation of obtaining the channel combination ratio factor corresponding to the channel combination scheme of the current frame by modifying the initial value of the channel combination ratio factor corresponding to the channel combination scheme of the current frame is not limited to the example above. 803. Encode the determined temporal stereo parameters of the current frame. In some possible implementations, the channel combination scaling factor corresponding to the determined uncorrelated signal channel combination scheme of the current frame is quantized and encoded. ratio_init_SM qua =ratio_tabl_SM[ratio_idx_init_SM]. Wherein, ratio_tabl_SM represents the codebook for the scalar quantization of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame, and ratio_idx_init_SM represents the initial encoding index of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame. qua This represents the initial value of the quantization encoding of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame. In some possible implementations, ratio_idx_SM=ratio_idx_init_SM. ratio_SM=ratio_tabl[ratio_idx_SM]. Wherein, ratio_SM represents the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the current frame. ratio_idx_SM represents the encoded index of the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the current frame; or, ratio_idx_SM=φ*ratio_idx_init_SM+(1-φ)*tdm_last_ratio_idx_SM ratio_SM=ratio_tabl[ratio_idx_SM] Where, ratio_idx_init_SM represents the initial encoding index corresponding to the uncorrelated signal channel combination scheme of the current frame, and tdm_last_ratio_idx_SM represents the final encoding index of the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the previous frame. This is a correction factor for the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme. Wherein, ratio_SM represents the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the current frame. In some possible implementations, when it is necessary to obtain the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the current frame by correcting the initial value of the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the current frame, the initial value of the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the current frame can be quantized and encoded first to obtain the initial encoding index of the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the current frame. Then, based on the encoding index of the channel combination ratio factor of the previous frame and the initial encoding index of the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the current frame, the initial encoding index of the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the current frame can be corrected. Alternatively, the initial encoding index of the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the current frame can also be corrected based on the initial encoding index of the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the current frame. For example, the initial value of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame can be quantized and encoded first to obtain the initial encoding index of the uncorrelated signal channel combination scheme of the current frame. Then, when it is necessary to correct the initial value of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame, the encoding index of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the previous frame is used as the encoding index of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame; otherwise, the initial encoding index of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame is used as the encoding index of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame. Finally, the quantized encoded value corresponding to the encoding index of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame is used as the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame. Furthermore, when the temporal stereo parameters include inter-channel time differences, determining the temporal stereo parameters of the current frame based on the current frame's channel combination scheme may include: calculating the inter-channel time differences of the current frame when the current frame's channel combination scheme is a correlated signal channel combination scheme. The calculated inter-channel time differences of the current frame can then be written into the bitstream. When the current frame's channel combination scheme is an uncorrelated signal channel combination scheme, a default inter-channel time difference (e.g., 0) is used as the inter-channel time difference of the current frame. Alternatively, the default inter-channel time difference may not be written into the bitstream, and the decoding device may also use the default inter-channel time difference. The following example provides a method for encoding temporal stereo parameters, which may include: determining the channel combination scheme of the current frame; determining the temporal stereo parameters of the current frame according to the channel combination scheme of the current frame; encoding the determined temporal stereo parameters of the current frame, wherein the temporal stereo parameters include at least one of the channel combination scaling factor and the inter-channel delay difference. Correspondingly, the decoding device can obtain the temporal stereo parameters of the current frame from the bitstream, and then perform relevant decoding based on the temporal stereo parameters of the current frame obtained from the bitstream. The following example illustrates this with a more specific application scenario. Referring to Figure 9-A, Figure 9-A is a schematic flowchart of an audio encoding method provided in an embodiment of this application. The audio encoding method provided in this embodiment can be implemented by an encoding device, and the method specifically may include: 901. Perform time-domain preprocessing on the original left and right channel signals of the current frame. For example, if the sampling rate of the stereo audio signal is 16kHz, one frame is 20ms, and the frame length is denoted as N, then N = 320 means the frame length is 320 samples. The stereo signal of the current frame includes the left channel signal and the right channel signal. The original left channel signal of the current frame is denoted as x. L (n), the original right channel signal of the current frame is denoted as x. R (n), where n is the sample point number, n = 0, 1, ..., N-1. For example, temporal preprocessing of the original left and right channel signals of the current frame may include: performing high-pass filtering on the original left and right channel signals of the current frame to obtain the temporally preprocessed left and right channel signals of the current frame, denoted as x. L_HP (n), the right channel signal of the current frame after time-domain preprocessing is denoted as x. R_HP (n). Where n is the sample number. n = 0, 1, ..., N-1. The filter used for high-pass filtering can be, for example, an infinite impulse response (IIR) filter with a cutoff frequency of 20 Hz, or other types of filters. For example, the transfer function of a high-pass filter with a sampling rate of 16kHz and a corresponding cutoff frequency of 20Hz can be: Where b0 = 0.994461788958195, b1 = -1.988923577916390, b2 = 0.994461788958195, a1 = 1.988892905899653, a2 = -0.988954249933127, and z is the transformation factor of the Z-transform. The transfer function of the corresponding time-domain filter can be expressed as: x L_HP (n)=b0*x L (n)+b1*x L (n-1)+b2*x L (n-2)-a1*x L_HP (n-1)-a2*x L_HP (n-2) x R_HP (n)=b0*x R (n)+b1*x R (n-1)+b2*x R (n-2)-a1*x R_HP (n-1)-a2*x R_HP (n-2) 902. Perform time-delay alignment processing on the left and right channel signals of the current frame that have undergone time-domain preprocessing to obtain the left and right channel signals of the current frame that have undergone time-delay alignment processing. Among them, the signal that has undergone time delay alignment can be simply referred to as the "time delay aligned signal". For example, the left channel signal that has undergone time delay alignment can be simply referred to as the "time delay aligned left channel signal", the right channel signal that has undergone time delay alignment can be simply referred to as the "time delay aligned left channel signal", and so on. Specifically, the inter-channel delay parameters can be extracted and encoded from the preprocessed left and right channel signals of the current frame. Then, the left and right channel signals are time-delay aligned based on the encoded inter-channel delay parameters to obtain the time-delay aligned left and right channel signals of the current frame. The time-delay aligned left channel signal of the current frame is denoted as x′. L (n), the right channel signal of the current frame after time delay alignment is denoted as x′. R (n), where n is the sample point number, n = 0, 1, ..., N-1. Specifically, for example, the encoding device can calculate the temporal cross-correlation function between the left and right channels based on the preprocessed left and right channel signals of the current frame. It then searches for the maximum value (or other value) of the temporal cross-correlation function between the left and right channels to determine the time delay difference between the left and right channel signals. The determined time delay difference between the left and right channels is then quantized and encoded. Based on the quantized time delay difference between the left and right channels, using the signal of one selected channel as a reference, the time delay of the other channel signal is adjusted to obtain the time-delay aligned left and right channel signals of the current frame. It is worth noting that there are many specific methods for implementing delay alignment processing, and this embodiment does not limit the specific delay alignment processing method. 903. Perform time-domain analysis on the left and right channel signals of the current frame after time-delay alignment processing. Specifically, time-domain analysis can include transient detection. Transient detection can involve energy detection of the left and right channel signals of the current frame after time-delay alignment (specifically, detecting whether a sudden energy change occurs in the current frame). For example, the energy of the left channel signal of the current frame after time-delay alignment is represented as E. cur_L The energy of the left channel signal after time delay alignment of the previous frame is represented as E. pre_L Then, according to E pre_L and E cur_L The absolute value of the difference between the two values is used for transient detection to obtain the transient detection result of the left channel signal of the current frame after time delay alignment. Similarly, the same method can be used to perform transient detection on the left channel signal of the current frame after time delay alignment. Time domain analysis can also include other traditional time domain analysis methods besides transient detection, such as bandwidth spreading preprocessing. It is understood that step 903 can be performed at any position after step 902 and before the encoding of the primary channel signal and the secondary channel signal of the current frame. 904. Based on the left and right channel signals of the current frame after time delay alignment processing, determine the channel combination scheme of the current frame. This embodiment illustrates two possible channel combination schemes, referred to below as the correlated signal channel combination scheme and the uncorrelated signal channel combination scheme, respectively. In this embodiment, the correlated signal channel combination scheme corresponds to the case where the left and right channel signals of the current frame (after time delay alignment) are quasi-positive phase signals, while the uncorrelated signal channel combination scheme corresponds to the case where the left and right channel signals of the current frame (after time delay alignment) are quasi-out-of-phase signals. Of course, besides using "correlated signal channel combination scheme" and "uncorrelated signal channel combination scheme" to characterize these two possible channel combination schemes, in practical applications, it is not limited to using other names to name these two different channel combination schemes. In some embodiments of this invention, the channel combination scheme determination can be divided into initial channel combination scheme determination and channel combination scheme modification determination. It can be understood that the channel combination scheme of the current frame is determined by performing a channel combination scheme determination for the current frame. Some illustrative implementations for determining the channel combination scheme of the current frame can be found in the descriptions of the above embodiments, and will not be repeated here. 905. Based on the left and right channel signals of the current frame after time delay alignment and the channel combination scheme identifier of the current frame, calculate and encode the channel combination scaling factor corresponding to the channel combination scheme of the current frame correlation signal, and obtain the initial value and encoding index of the channel combination scaling factor corresponding to the channel combination scheme of the current frame correlation signal. For example, firstly, the frame energy of the left and right channel signals of the current frame is calculated based on the left and right channel signals of the current frame after time delay alignment. The frame energy rms_L of the left channel signal in the current frame satisfies: The frame energy rms_R of the right channel signal in the current frame satisfies: Where, x′ L (n) represents the left channel signal of the current frame after time-delay alignment. Where, x′ R (n) represents the right channel signal of the current frame after time delay alignment. Then, based on the frame energy of the left and right channels of the current frame, the channel combination ratio factor corresponding to the current frame correlation signal channel combination scheme is calculated. The calculated channel combination ratio factor `ratio_init` corresponding to the current frame correlation signal channel combination scheme satisfies: Then, the calculated channel combination ratio_init corresponding to the current frame correlation signal channel combination scheme is quantized and encoded to obtain the corresponding encoding index ratio_idx_init, and the quantized and encoded channel combination ratio_init corresponding to the current frame correlation signal channel combination scheme. qua : ratio_init qua =ratio_tabl[ratio_idx_init] Here, `ratio_tabl` is the codebook for scalar quantization. The quantization encoding can employ any traditional scalar quantization method, such as uniform scalar quantization, or non-uniform scalar quantization. The number of encoded bits is, for example, 5 bits. Specific methods for scalar quantization will not be elaborated upon here. The channel combination scaling factor ratio_init corresponding to the channel combination scheme of the current frame correlation signal after quantization encoding quaThis is the initial value of the channel combination ratio factor corresponding to the current frame correlation signal channel combination scheme. The encoding index ratio_idx_init is the encoding index corresponding to the initial value of the channel combination ratio factor corresponding to the current frame correlation signal channel combination scheme. In addition, the encoding index corresponding to the initial value of the channel combination scaling factor corresponding to the channel combination scheme of the current frame can be corrected according to the value of the channel combination scheme identifier tdm_SM_flag of the current frame. For example, if the quantization encoding is 5-bit scalar quantization, then when tdm_SM_flag = 1, the encoding index ratio_idx_init corresponding to the initial value of the channel combination ratio factor corresponding to the current frame correlation signal channel combination scheme is corrected to a certain preset value (e.g., 15 or other values); and the initial value of the channel combination ratio factor corresponding to the current frame correlation signal channel combination scheme can be corrected to ratio_init. qua =ratio_tabl
[0015] . It is worth noting that, in addition to the calculation method described above, the channel combination ratio factor corresponding to the channel combination scheme of the current frame correlation signal can also be calculated using any method in traditional time-domain stereo coding techniques for calculating the channel combination ratio factor corresponding to the channel combination scheme. Alternatively, the initial value of the channel combination ratio factor corresponding to the channel combination scheme of the current frame correlation signal can be directly set to a fixed value (e.g., 0.5 or other values). 906. The need to adjust the channel combination scaling factor can be determined based on the channel combination scaling factor correction flag. If so, then correct the channel combination scaling factor and its encoding index corresponding to the current frame correlation signal channel combination scheme to obtain the correction value of the channel combination scaling factor and its encoding index corresponding to the current frame correlation signal channel combination scheme. The channel combination scaling factor correction flag for the current frame is denoted as tdm_SM_modi_flag. For example, a value of 0 indicates that no channel combination scaling factor correction is needed, while a value of 1 indicates that channel combination scaling factor correction is needed. Of course, other different values can also be used to indicate whether channel combination scaling factor correction is required. For example, determining whether a channel combination scaling factor correction is needed based on the channel combination scaling factor correction flag can specifically include: if the channel combination scaling factor correction flag tdm_SM_modi_flag = 1, then it is determined that the channel combination scaling factor needs to be corrected. Conversely, if the channel combination scaling factor correction flag tdm_SM_modi_flag = 0, then it is determined that the channel combination scaling factor does not need to be corrected. Specifically, correcting the channel combination scaling factor and its encoding index corresponding to the current frame correlation signal channel combination scheme can include: For example, the coding index corresponding to the correction value of the channel combination ratio factor corresponding to the channel combination scheme of the current frame correlation signal satisfies: ratio_idx_mod=0.5*(tdm_last_ratio_idx+16), where tdm_last_ratio_idx is the coding index of the channel combination ratio factor corresponding to the channel combination scheme of the previous frame correlation signal. Therefore, the correction value of the channel combination scaling factor ratio_mod corresponding to the current frame correlation signal channel combination scheme is... qua Satisfies: ratio_mod qua =ratio_tabl[ratio_idx_mod]. . 907. Based on the initial value and encoding index of the channel combination ratio factor corresponding to the current frame correlation signal channel combination scheme, the correction value and encoding index of the channel combination ratio factor corresponding to the current frame correlation signal channel combination scheme, and the channel combination ratio factor correction identifier, determine the channel combination ratio factor ratio and encoding index ratio_idx corresponding to the current frame correlation signal channel combination scheme. Specifically, for example, the channel combination ratio factor (ratio) corresponding to a determined correlation signal channel combination scheme satisfies: Among them, the above ratio_init qua The `ratio_mod` represents the initial value of the channel combination scaling factor corresponding to the channel combination scheme of the correlation signal in the current frame. qua This indicates the correction value of the channel combination scaling factor corresponding to the channel combination scheme of the correlation signal in the current frame. The above tdm_SM_modi_flag represents the channel combination scaling factor correction flag for the current frame. Among them, the encoding index ratio_idx corresponding to the channel combination scaling factor of the determined correlation signal channel combination scheme satisfies: Wherein, ratio_idx_init represents the encoding index corresponding to the initial value of the channel combination ratio factor corresponding to the current frame correlation signal channel combination scheme, and ratio_idx_mod represents the encoding index corresponding to the correction value of the channel combination ratio factor corresponding to the current frame correlation signal channel combination scheme. 908. Determine whether the channel combination scheme identifier of the current frame corresponds to the uncorrelated signal channel combination scheme. If so, calculate and encode the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame to obtain the channel combination scaling factor and encoding index corresponding to the uncorrelated signal channel combination scheme. First, it can be determined whether the historical cache used to calculate the channel combination scaling factor corresponding to the channel combination scheme of the current frame's uncorrelated signal needs to be reset. For example, if the channel combination scheme identifier tdm_SM_flag of the current frame is equal to 1 (for example, tdm_SM_flag equal to 1 means that the channel combination scheme identifier of the current frame corresponds to the uncorrelated signal channel combination scheme), while the channel combination scheme identifier tdm_last_SM_flag of the previous frame is equal to 0 (for example, tdm_last_SM_flag equal to 0 means that the channel combination scheme identifier of the current frame corresponds to the correlated signal channel combination scheme), then it means that the historical cache used to calculate the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame needs to be reset. It's worth noting that determining whether the historical cache used to calculate the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme in the current frame needs to be reset can also be achieved by determining the historical cache reset flag `tdm_SM_reset_flag` during the initial and corrective decisions of the channel combination scheme, and then judging the value of the historical cache reset flag. For example, if `tdm_SM_reset_flag` is 1, it means that the channel combination scheme identifier in the current frame corresponds to the uncorrelated signal channel combination scheme, while the channel combination scheme identifier in the previous frame corresponds to the correlated signal channel combination scheme. Alternatively, if the historical cache reset flag `tdm_SM_reset_flag` is equal to 1, it means that the historical cache used to calculate the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme in the current frame needs to be reset. There are many specific reset methods. One method is to reset all parameters in the historical cache used to calculate the channel combination scaling factor corresponding to the channel combination scheme of the current frame's uncorrelated signal according to the preset initial values. Another method is to reset some parameters in the historical cache used to calculate the channel combination scaling factor corresponding to the channel combination scheme of the current frame according to the preset initial values. Yet another method is to reset some parameters in the historical cache used to calculate the channel combination scaling factor corresponding to the channel combination scheme of the current frame's uncorrelated signal according to the preset initial values, while resetting the other parameters according to the corresponding parameter values in the historical cache used to calculate the channel combination scaling factor corresponding to the channel combination scheme of the correlated signal. Next, it is further determined whether the channel combination scheme identifier tdm_SM_flag of the current frame corresponds to the uncorrelated signal channel combination scheme. The uncorrelated signal channel combination scheme is a channel combination scheme more suitable for time-domain downmixing of phase-inverting stereo signals. In this embodiment, when the channel combination scheme identifier tdm_SM_flag of the current frame = 1, it indicates that the current frame's channel combination scheme identifier corresponds to the uncorrelated signal channel combination scheme; when the channel combination scheme identifier tdm_SM_flag of the current frame = 0, it indicates that the current frame's channel combination scheme identifier corresponds to the correlated signal channel combination scheme. Determining whether the channel combination scheme identifier of the current frame corresponds to an uncorrelated signal channel combination scheme may specifically include: Determine if the channel combination scheme flag of the current frame is 1. If the channel combination scheme flag tdm_SM_flag of the current frame is 1, it means that the channel combination scheme flag of the current frame corresponds to an uncorrelated signal channel combination scheme. In this case, the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme of the current frame can be calculated and encoded. Referring to Figure 9-B, calculating and encoding the channel combination scaling factor corresponding to the current frame's uncorrelated signal channel combination scheme may include, for example, the following steps 9081-9085. 9081. Perform signal energy analysis on the left and right channel signals of the current frame after time delay alignment processing. The frame energy of the left channel signal of the current frame, the frame energy of the right channel signal of the current frame, the long-time smoothed frame energy of the left channel of the current frame, the long-time smoothed frame energy of the right channel of the current frame, the inter-frame energy difference of the left channel of the current frame, and the inter-frame energy difference of the right channel of the current frame are obtained respectively. For example, the frame energy rms_L of the left channel signal in the current frame satisfies: The frame energy rms_R of the right channel signal in the current frame satisfies: Where, x′ L (n) represents the left channel signal of the current frame after time-delay alignment. Where, x′ R (n) represents the right channel signal of the current frame after time delay alignment. For example, the long-time smoothed frame energy tdm_lt_rms_L_SM of the left channel in the current frame. cur satisfy: tdm_lt_rms_L_SM cur = (1-A)*tdm_lt_rms_L_SM pre +A*rms_L Among them, tdm_lt_rms_L_SM pre This represents the long-time smoothed frame energy of the left channel in the previous frame. A represents the update factor of the long-time smoothed frame energy of the left channel. A can be a real number between 0 and 1, for example, A can be equal to 0.4. For example, the long-time smoothed frame energy tdm_lt_rms_R_SM of the right channel in the current frame. cur satisfy: tdm_lt_rms_R_SM cur = (1-B)*tdm_lt_rms_R_SM pre +B*rms_R Among them, tdm_lt_rms_R_SM pre B represents the long-time smoothed frame energy of the right channel in the previous frame, and B represents the update factor of the long-time smoothed frame energy of the right channel. B can be a real number between 0 and 1, and B can be the same as or different from the update factor of the long-time smoothed frame energy of the left channel. B can also be equal to 0.4. For example, the inter-frame energy difference ener_L_dt of the left channel in the current frame satisfies: ener_L_dt=tdm_lt_rms_L_SM cur -tdm_lt_rms_L_SM pre For example, the inter-frame energy difference ener_R_dt of the right channel in the current frame satisfies: ener_R_dt=tdm_lt_rms_R_SM cur -tdm_lt_rms_R_SM pre 9082. Determine the reference channel signal of the current frame based on the left and right channel signals of the current frame after time delay alignment. The reference channel signal can also be called a mono signal. If the reference channel signal is called a mono signal, then all subsequent descriptions and parameter names related to the reference channel can be uniformly replaced with the mono signal. For example, the reference channel signal mono_i(n) satisfies: Where, x′ L (n) represents the left channel signal of the current frame after time-delay alignment, where x′ R (n) is the right channel signal of the current frame after time delay alignment. 9083. Calculate the amplitude correlation parameters between the left and right channel signals and the reference channel signal after time delay alignment in the current frame. For example, the amplitude correlation parameter corr_LM between the left channel signal of the current frame after time delay alignment and the reference channel signal satisfies, for example: For example, the amplitude correlation parameter corr_RM between the right channel signal and the reference channel signal in the current frame after time delay alignment may satisfy: Where, x′ L (n) represents the left channel signal of the current frame after time-delay alignment. Where x′ R (n) represents the right channel signal of the current frame after time-delay alignment. mono_i(n) represents the reference channel signal of the current frame. |·| represents taking the absolute value. 9084. Based on the amplitude correlation parameters between the left channel signal and the reference channel signal after time delay alignment in the current frame, and the amplitude correlation parameters between the right channel signal and the reference channel signal after time delay alignment in the current frame, calculate the amplitude correlation difference parameter diff_lt_corr between the left and right channels in the current frame. It is understood that step 9081 can be executed before steps 9082 and 9083, or it can be executed after steps 9082 and 9083 and before step 9084. Referring to Figure 9-C, for example, calculating the amplitude correlation difference parameter diff_lt_corr between the left and right channels of the current frame may specifically include the following steps 90841-90842. 90841. Based on the amplitude correlation parameters between the left channel signal and the reference channel signal after time delay alignment in the current frame, and the amplitude correlation parameters between the right channel signal and the reference channel signal after time delay alignment in the current frame, calculate the amplitude correlation parameters between the smoothed left channel signal and the reference channel signal over the current frame length, and the amplitude correlation parameters between the smoothed right channel signal and the reference channel signal over the current frame length. For example, a method for calculating the amplitude correlation parameters between the smoothed left channel signal and the reference channel signal at the current frame length, and the amplitude correlation parameters between the smoothed right channel signal and the reference channel signal at the current frame length, may include: the amplitude correlation parameter tdm_lt_corr_LM_SM between the smoothed left channel signal and the reference channel signal at the current frame length satisfies: tdm_lt_corr_LM_SM cur =α*tdm_lt_corr_LM_SM pre +(1-α)corr_LM. Among them, tdm_lt_corr_LM_SM cur The parameter tdm_lt_corr_LM_SM represents the amplitude correlation between the smoothed left channel signal and the reference channel signal over the current frame length. pre This parameter represents the amplitude correlation between the left channel signal after long-time smoothing of the previous frame and the reference channel signal. α represents the left channel smoothing factor, where α can be a pre-set real number between 0 and 1, such as 0.2, 0.5, or 0.8. Alternatively, the value of α can be obtained through adaptive calculation. For example, the amplitude correlation parameter tdm_lt_corr_RM_SM between the smoothed right channel signal and the reference channel signal during the current frame length satisfies: tdm_lt_corr_RM_SM cur =β*tdm_lt_corr_RM_SM pre +(1-β)corr_LM. Among them, tdm_lt_corr_RM_SM cur The parameter tdm_lt_corr_RM_SM represents the amplitude correlation between the smoothed right channel signal and the reference channel signal over the current frame length. preThis parameter represents the amplitude correlation between the right channel signal after long-time smoothing of the previous frame and the reference channel signal. β represents the right channel smoothing factor, where β can be a pre-set real number between 0 and 1. β can have the same or different values as the left channel smoothing factor α, for example, β can be equal to 0.2, 0.5, or 0.8. Alternatively, the value of β can also be obtained through adaptive calculation. Another method for calculating the amplitude correlation parameters between the smoothed left channel signal and the reference channel signal at the current frame length, and between the smoothed right channel signal and the reference channel signal at the current frame length, may include: First, the amplitude correlation parameter corr_LM between the left channel signal and the reference channel signal of the current frame after time delay alignment is corrected to obtain the corrected amplitude correlation parameter corr_LM_mod between the left channel signal and the reference channel signal of the current frame; then, the amplitude correlation parameter corr_RM between the right channel signal and the reference channel signal of the current frame after time delay alignment is corrected to obtain the corrected amplitude correlation parameter corr_RM_mod between the right channel signal and the reference channel signal of the current frame. Then, based on the amplitude correlation parameter corr_LM_mod between the corrected left channel signal and the reference channel signal in the current frame, the amplitude correlation parameter corr_RM_mod between the corrected right channel signal and the reference channel signal in the current frame, and the amplitude correlation parameter tdm_lt_corr_LM_SM between the left channel signal and the reference channel signal after long-time smoothing in the previous frame,... pre The amplitude correlation parameter tdm_lt_corr_RM_SM between the right channel signal after long-time smoothing of the previous frame and the reference channel signal. pre Determine the amplitude correlation parameter diff_lt_corr_LM_tmp between the smoothed left channel signal and the reference channel signal in the current frame and the amplitude correlation parameter diff_lt_corr_RM_tmp between the smoothed right channel signal and the reference channel signal in the previous frame. Next, based on the amplitude correlation parameter diff_lt_corr_LM_tmp between the left channel signal and the reference channel signal after long-time smoothing in the current frame and the amplitude correlation parameter diff_lt_corr_RM_tmp between the right channel signal and the reference channel signal after long-time smoothing in the previous frame, the initial value diff_lt_corr_SM of the amplitude correlation difference parameter between the left and right channels in the current frame is obtained; and based on the obtained initial value diff_lt_corr_SM of the amplitude correlation difference parameter between the left and right channels in the current frame and the amplitude correlation difference parameter tdm_last_diff_lt_corr_SM of the left and right channels in the previous frame, the inter-frame variation parameter d_lt_corr of the amplitude correlation difference between the left and right channels in the current frame is determined. Finally, based on the frame energy of the left channel signal, the frame energy of the right channel signal, the long-time smoothed frame energy of the left channel, the long-time smoothed frame energy of the right channel, the inter-frame energy difference of the left channel, the inter-frame energy difference of the right channel, and the inter-frame variation parameters of the amplitude correlation difference between the left and right channels of the current frame obtained from signal energy analysis, different left channel smoothing factors and right channel smoothing factors are adaptively selected. The amplitude correlation parameter tdm_lt_corr_LM_SM between the long-time smoothed left channel signal and the reference channel signal of the current frame and the amplitude correlation parameter tdm_lt_corr_RM_SM between the long-time smoothed right channel signal and the reference channel signal of the current frame are calculated. In addition to the two methods mentioned above, there are many other ways to calculate the amplitude correlation parameters between the smoothed left channel signal and the reference channel signal at the current frame length, and between the smoothed right channel signal and the reference channel signal at the current frame length. This application does not limit these methods. 90842. Based on the amplitude correlation parameters between the smoothed left channel signal and the reference channel signal at the current frame length, and the amplitude correlation parameters between the smoothed right channel signal and the reference channel signal at the current frame length, calculate the amplitude correlation difference parameter diff_lt_corr between the left and right channels of the current frame. For example, the amplitude correlation difference parameter diff_lt_corr between the left and right channels in the current frame satisfies: diff_lt_corr=tdm_lt_corr_LM_SM-tdm_lt_corr_RM_SM Wherein, tdm_lt_corr_LM_SM represents the amplitude correlation parameter between the smoothed left channel signal and the reference channel signal at the current frame length, and tdm_lt_corr_RM_SM represents the amplitude correlation parameter between the smoothed right channel signal and the reference channel signal at the current frame length. 9085. Convert the amplitude correlation difference parameter diff_lt_corr between the left and right channels of the current frame into a channel combination scaling factor and perform encoding quantization to determine the channel combination scaling factor and its encoding index corresponding to the channel combination scheme of the uncorrelated signal in the current frame. Referring to Figure 9-D, a possible method for converting the amplitude correlation difference parameter between the left and right channels of the current frame into a channel combination scaling factor may specifically include steps 90851-90853. 90851. Map the amplitude correlation difference parameter between the left and right channels so that the value of the amplitude correlation difference parameter between the left and right channels after mapping is between [MAP_MIN, MAP_MAX]. One method for mapping the amplitude correlation difference parameter between the left and right channels may include: First, the amplitude correlation difference parameter between the left and right channels is subjected to amplitude limiting processing. For example, the amplitude correlation difference parameter diff_lt_corr_limit between the left and right channels after amplitude limiting processing satisfies: RATIO_MAX represents the maximum value of the amplitude correlation difference parameter between the left and right channels after clipping, and RATIO_MIN represents the minimum value of the amplitude correlation difference parameter between the left and right channels after clipping. RATIO_MAX can be a preset empirical value, such as 1.5, 3.0, or other values. RATIO_MIN can be a preset empirical value, such as -1.5, -3.0, or other values. RATIO_MAX > RATIO_MIN. Then, the amplitude correlation difference parameter between the left and right channels after amplitude limiting is mapped. The mapped amplitude correlation difference parameter diff_lt_corr_map between the left and right channels satisfies: in, B1 = MAP_MAX - RATIO_MAX * A1, or B1 = MAP_HIGH - RATIO_HIGH * A1. B2=MAP_LOW-RATIO_LOW*A2, or B2=MAP_MIN-RATIO_MIN*A2. B3=MAP_HIGH-RATIO_HIGH*A3, or B3=MAP_LOW-RATIO_LOW*A3. Wherein, MAP_MAX represents the maximum value of the amplitude correlation difference parameter between the left and right channels after mapping, MAP_HIGH represents the high threshold of the amplitude correlation difference parameter between the left and right channels after mapping, MAP_LOW represents the low threshold of the amplitude correlation difference parameter between the left and right channels after mapping, and MAP_MIN represents the minimum value of the amplitude correlation difference parameter between the left and right channels after mapping. Among them, MAP_MAX>MAP_HIGH>MAP_LOW>MAP_MIN. For example, in some embodiments of this application, MAP_MAX can be 2.0, MAP_HIGH can be 1.2, MAP_LOW can be 0.8, and MAP_MIN can be 0.0. Of course, in practical applications, these values are not limited to these examples. RATIO_MAX represents the maximum value of the amplitude correlation difference parameter between the left and right channels after clipping, RATIO_HIGH represents the high threshold of the amplitude correlation difference parameter between the left and right channels after clipping, RATIO_LOW represents the low threshold of the amplitude correlation difference parameter between the left and right channels after clipping, and RATIO_MIN represents the minimum value of the amplitude correlation difference parameter between the left and right channels after clipping. Among them, RATIO_MAX>RATIO_HIGH>RATIO_LOW>RATIO_MIN. For example, in some embodiments of this application, RATIO_MAX is 1.5, RATIO_HIGH is 0.75, RATIO_LOW is -0.75, and RATIO_MIN is -1.5. Of course, in practical applications, these values are not the only examples. Another method in some embodiments of this application is that the amplitude correlation difference parameter diff_lt_corr_map between the left and right channels after mapping processing satisfies: Here, diff_lt_corr_limit represents the amplitude correlation difference parameter between the left and right channels after amplitude limiting. in, Where RATIO_MAX represents the maximum amplitude of the amplitude correlation difference parameter between the left and right channels, and -RATIO_MAX represents the minimum amplitude of the amplitude correlation difference parameter between the left and right channels. RATIO_MAX can be a preset empirical value, such as 1.5, 3.0, or other real numbers greater than 0. 90852. Convert the amplitude correlation difference parameter between the left and right channels after mapping into a channel combination scaling factor. The channel combination scaling factor ratio_SM satisfies: Here, cos(·) represents the cosine operation. In addition to the methods mentioned above, other methods can be used to convert the amplitude correlation difference parameter between the left and right channels into a channel combination scaling factor, for example: Based on the long-term smoothed frame energy of the left channel of the current frame, the long-term smoothed frame energy of the right channel of the current frame, the inter-frame energy difference of the left channel of the current frame, the encoding parameters of the previous frame in the encoder's historical buffer (e.g., inter-frame correlation parameters of the primary channel signal and inter-frame correlation parameters of the secondary channel signal), the channel combination scheme identifiers of the current frame and the previous frame, and the channel combination scaling factor corresponding to the uncorrelated signal channel combination schemes of the current frame and the previous frame, it is determined whether to update the channel combination scaling factor corresponding to the uncorrelated signal channel combination schemes. If it is necessary to update the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme, the amplitude correlation difference parameter between the left and right channels is converted into the channel combination scaling factor using the example method described above; otherwise, the channel combination scaling factor and its encoding index corresponding to the uncorrelated signal channel combination scheme of the previous frame are directly used as the channel combination scaling factor and its encoding index corresponding to the uncorrelated signal channel combination scheme of the current frame. 90853. Quantize and encode the channel combination scaling factor obtained after conversion to determine the channel combination scaling factor corresponding to the channel combination scheme of the current frame's uncorrelated signal. Specifically, for example, the converted channel combination scaling factor is quantized and encoded to obtain the initial encoding index ratio_idx_init_SM corresponding to the channel combination scheme of the current frame's uncorrelated signal, and the initial value ratio_init_SM of the channel combination scaling factor corresponding to the quantized and encoded channel combination scheme of the current frame's uncorrelated signal. qua . Among them, ratio_init_SM qua =ratio_tabl_SM[ratio_idx_init_SM]. ratio_tabl_SM represents the codebook for the scalar quantization of the channel combination scaling factor corresponding to the channel combination scheme for uncorrelated signals. Quantization encoding can employ any traditional scalar quantization method, such as uniform scalar quantization or non-uniform scalar quantization. The number of encoded bits can be 5 bits; specific methods will not be elaborated upon here. The codebook for the scalar quantization of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme can be the same as or different from the codebook for the scalar quantization of the channel combination scaling factor corresponding to the correlated signal channel combination scheme. If the codebooks are the same, only one codebook for the scalar quantization of the channel combination scaling factor needs to be stored. At this point, the initial value of the channel combination scaling factor corresponding to the current frame's uncorrelated signal channel combination scheme after quantization and encoding is ratio_init_SM. qua . Among them, ratio_init_SM qua =ratio_tabl[ratio_idx_init_SM]. For example, one approach is to directly use the initial value of the channel combination scaling factor corresponding to the current frame's uncorrelated signal channel combination scheme after quantization and encoding as the channel combination scaling factor corresponding to the current frame's uncorrelated signal channel combination scheme, and to directly use the initial encoding index of the channel combination scaling factor corresponding to the current frame's uncorrelated signal channel combination scheme as the encoding index of the channel combination scaling factor corresponding to the current frame's uncorrelated signal channel combination scheme, i.e.: Among them, the encoding index ratio_idx_SM of the channel combination ratio factor corresponding to the channel combination scheme of the current frame uncorrelated signal satisfies: ratio_idx_SM=ratio_idx_init_SM. Among them, the channel combination scaling factor corresponding to the current frame's uncorrelated signal channel combination scheme satisfies: ratio_SM=ratio_tabl[ratio_idx_SM] Another method is to modify the initial value of the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the previous frame and the initial encoding index of the uncorrelated signal channel combination scheme of the current frame, based on the encoding index of the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the previous frame or the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the previous frame. Then, use the modified encoding index of the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the current frame as the encoding index of the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the current frame, and use the modified channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the current frame as the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the current frame. Among them, the encoding index ratio_idx_SM of the channel combination ratio factor corresponding to the channel combination scheme of the current frame uncorrelated signal satisfies: ratio_idx_SM=φ*ratio_idx_init_SM+(1-φ)*tdm_last_ratio_idx_SM. Where ratio_idx_init_SM represents the initial coding index corresponding to the channel combination scheme of the uncorrelated signal in the current frame, and tdm_last_ratio_idx_SM is the coding index of the channel combination ratio factor corresponding to the channel combination scheme of the uncorrelated signal in the previous frame. This is a correction factor for the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme. The value can be an empirical value, for example... It can be equal to 0.8. Then the channel combination scaling factor corresponding to the channel combination scheme of the uncorrelated signal in the current frame satisfies: ratio_SM=ratio_tabl[ratio_idx_SM] Another method is to use the channel combination scaling factor corresponding to the unquantized uncorrelated signal channel combination scheme as the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme in the current frame. That is, the ratio_SM of the channel combination scaling factor corresponding to the uncorrelated signal channel combination scheme in the current frame satisfies: In addition, the fourth method is to correct the unquantized channel combination ratio factor of the current frame's uncorrelated signal channel combination scheme based on the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the previous frame, use the corrected channel combination ratio factor of the uncorrelated signal channel combination scheme as the channel combination ratio factor of the current frame's uncorrelated signal channel combination scheme, and quantize and encode it to obtain the encoding index of the channel combination ratio factor of the current frame's uncorrelated signal channel combination scheme. In addition to the methods described above, there are many other ways to convert the amplitude correlation difference parameter between the left and right channels into a channel combination scaling factor and encode and quantize it. Similarly, there are many different methods to determine the channel combination scaling factor and its encoding index corresponding to the channel combination scheme of the current frame's uncorrelated signal. This application does not limit these methods. 909. Determine the encoding mode of the current frame by making a judgment based on the channel combination scheme identifier of the previous frame and the channel combination scheme identifier of the current frame. In this context, the channel combination scheme identifier for the current frame is denoted as tdm_SM_flag, and the channel combination scheme identifier for the previous frame is denoted as tdm_last_SM_flag. The joint identifier of the channel combination scheme identifiers for the previous and current frames can be represented as (tdm_last_SM_flag, tdm_SM_flag). This joint identifier can be used to determine the coding mode. For example: Assuming the channel combination scheme of the correlated signal is represented by 0 and the channel combination scheme of the uncorrelated signal is represented by 1, the joint identifier of the channel combination scheme identifier of the previous frame and the current frame has the following four cases: (01), (11), (10), (00). The encoding mode of the current frame is then determined as: correlated signal encoding mode, uncorrelated signal encoding mode, correlated signal to uncorrelated signal encoding mode, and uncorrelated signal to correlated signal encoding mode. For example: if the joint identifier of the channel combination scheme identifier of the current frame is (00), it means that the encoding mode of the current frame is the correlated signal encoding mode; if the joint identifier of the channel combination scheme identifier of the current frame is (11), it means that the encoding mode of the current frame is the uncorrelated signal encoding mode; if the joint identifier of the channel combination scheme identifier of the current frame is (01), it means that the encoding mode of the current frame is the correlated signal to uncorrelated signal encoding mode; if the joint identifier of the channel combination scheme identifier of the current frame is (10), it means that the encoding mode of the current frame is the uncorrelated signal to correlated signal encoding mode. 910. After obtaining the encoding mode stereo_tdm_coder_type of the current frame, the encoding device performs temporal downmixing on the left and right channel signals of the current frame according to the corresponding temporal downmixing method based on the encoding mode of the current frame, so as to obtain the main channel signal and the secondary channel signal of the current frame. The encoding mode of the current frame is one of several encoding modes. For example, these multiple encoding modes may include: a correlated signal to an uncorrelated signal encoding mode, an uncorrelated signal to a correlated signal encoding mode, a correlated signal encoding mode, and an uncorrelated signal encoding mode, etc. The implementation methods for temporal downmixing of different encoding modes can be found in the relevant examples described in the above embodiments, and will not be repeated here. 911. The encoding device encodes the primary channel signal and the secondary channel signal respectively to obtain the primary channel encoded signal and the secondary channel encoded signal. Specifically, the primary and secondary channel signals can first be bit-allocated based on the parameter information obtained from the encoding of the primary and / or secondary channel signals in the previous frame, as well as the total number of bits in the primary and secondary channel signal encodings. Then, based on the bit allocation results, the primary and secondary channel signals are encoded separately to obtain the encoding indexes for the primary and secondary channels. The primary and secondary channel encodings can employ any mono audio coding technique, which will not be elaborated upon here. 912. The encoding device selects the corresponding channel combination scaling factor encoding index and writes it into the bitstream according to the channel combination scheme identifier, and writes the main channel encoding signal, the secondary channel encoding signal and the channel combination scheme identifier of the current frame into the bitstream. Specifically, for example, if the channel combination scheme identifier tdm_SM_flag of the current frame corresponds to a correlated signal channel combination scheme, then the encoded index ratio_idx of the channel combination ratio factor corresponding to the correlated signal channel combination scheme of the current frame is written into the bitstream; if the channel combination scheme identifier tdm_SM_flag of the current frame corresponds to an uncorrelated signal channel combination scheme, then the encoded index ratio_idx_SM of the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the current frame is written into the bitstream. For example, if tdm_SM_flag = 0, then the encoded index ratio_idx of the channel combination ratio factor corresponding to the correlated signal channel combination scheme of the current frame is written into the bitstream; if tdm_SM_flag = 1, then the encoded index ratio_idx_SM of the channel combination ratio factor corresponding to the uncorrelated signal channel combination scheme of the current frame is written into the bitstream. Furthermore, the primary channel encoded signal, the secondary channel encoded signal, and the channel combination scheme identifier of the current frame are written into the bitstream. It can be understood that the bitstream writing operations have no specific order. Accordingly, examples are given below for decoding time-domain stereo. Referring to Figure 10, an audio decoding method is also provided below. The relevant steps of the audio decoding method can be specifically implemented by a decoding device, and may include: 1001. Decode the bitstream to obtain the primary and secondary channel decoded signals of the current frame. 1002. Decode the bitstream to obtain the temporal stereo parameters of the current frame. The temporal stereo parameters of the current frame include the channel combination scaling factor of the current frame (the bitstream contains the encoding index of the channel combination scaling factor of the current frame, and the channel combination scaling factor of the current frame can be obtained by decoding based on the encoding index of the channel combination scaling factor of the current frame), and may also include the inter-channel time difference of the current frame (for example, the bitstream contains the encoding index of the inter-channel time difference of the current frame, and the inter-channel time difference of the current frame can be obtained by decoding based on the encoding index of the inter-channel time difference of the current frame; or the bitstream contains the encoding index of the absolute value of the inter-channel time difference of the current frame, and the absolute value of the inter-channel time difference of the current frame can be obtained by decoding based on the encoding index of the absolute value of the inter-channel time difference of the current frame). 1003. Obtain the channel combination scheme identifier of the current frame contained in the bitstream based on the bitstream, and determine the channel combination scheme of the current frame. 1004. Determine the decoding mode of the current frame based on the channel combination scheme of the current frame and the channel combination scheme of the previous frame. The decoding mode of the current frame is determined based on the channel combination scheme of the current frame and the channel combination scheme of the previous frame. This can be achieved by referring to the method for determining the encoding mode of the current frame in step 909, which determines the decoding mode of the current frame according to the channel combination scheme of the current frame and the channel combination scheme of the previous frame. The decoding mode of the current frame is one of several decoding modes. For example, these multiple decoding modes may include: a correlated signal to uncorrelated signal decoding mode, an uncorrelated signal to correlated signal decoding mode, a correlated signal encoding mode, and an uncorrelated signal decoding mode, etc. There is a one-to-one correspondence between the encoding mode and the decoding mode. For example, if the joint identifier of the channel combination scheme identifier of the current frame is (00), it means that the decoding mode of the current frame is also the correlated signal decoding mode; if the joint identifier of the channel combination scheme identifier of the current frame is (11), it means that the decoding mode of the current frame is the uncorrelated signal decoding mode; if the joint identifier of the channel combination scheme identifier of the current frame is (01), it means that the decoding mode of the current frame is the correlated signal to uncorrelated signal decoding mode; if the joint identifier of the channel combination scheme identifier of the current frame is (10), it means that the decoding mode of the current frame is the uncorrelated signal to correlated signal decoding mode. It is understandable that there is no necessary order in which steps 1001, 1002, and 1003-1004 are executed. 1005. Using the temporal upmixing processing method corresponding to the determined decoding mode of the current frame, perform temporal upmixing processing on the primary and secondary channel decoding signals of the current frame to obtain the left and right channel reconstruction signals of the current frame. The implementation methods for temporal upmixing in different decoding modes can be found in the examples described above, and will not be repeated here. The upmixing matrix used in the temporal upmixing process is constructed based on the channel combination scaling factor of the current frame. The reconstructed left and right channel signals of the current frame can be used as the decoded left and right channel signals of the current frame. Alternatively, the time delay of the reconstructed left and right channel signals of the current frame can be adjusted based on the inter-channel time difference to obtain time-delayed reconstructed left and right channel signals of the current frame, which can be used as the decoded left and right channel signals of the current frame. Alternatively, the time-delayed reconstructed left and right channel signals of the current frame can be post-processed in the time domain, whereby the post-processed left and right channel signals can be used as the decoded left and right channel signals of the current frame. The methods of the embodiments of this application have been described in detail above, and the apparatus of the embodiments of this application is provided below. Referring to Figure 11-A, this application embodiment also provides an apparatus 1100, which may include: A processor 1110 and a memory 1120 are coupled together. The processor 1110 can be used to perform some or all of the steps of any of the methods provided in the embodiments of this application. The memory 1120 includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or compact disc read-only memory (CD-ROM), and the memory 402 is used for related instructions and data. Of course, the device 1100 may also include a transceiver 1130 for receiving and sending data. Processor 1110 can be one or more Central Processing Units (CPUs). When processor 1110 is a CPU, the CPU can be a single-core CPU or a multi-core CPU. Specifically, processor 1110 can be a digital signal processor. In implementation, each step of the above method can be completed by the integrated logic circuits in the hardware of the processor 1110 or by instructions in software form. The processor 1110 can be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, an off-the-shelf programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. The processor 1110 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present invention can be directly manifested as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software module can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 1120. For example, processor 1110 can read information from memory 1120 and, in conjunction with its hardware, complete the steps of the above method. Furthermore, the device 1100 may also include a transceiver 1130, which may be used for transmitting and receiving related data (e.g., instructions or channel signals or bitstreams). For example, device 1100 can perform some or all of the steps of the method corresponding to any of the embodiments shown in Figures 2 to 9-D above. Specifically, for example, when device 1100 performs the above-described encoding steps, device 1100 may be referred to as an encoding device (or audio encoding device). When device 1100 performs the above-described decoding steps, device 1100 may be referred to as a decoding device (or audio decoding device). Referring to Figure 11-B, when the device 1100 is an encoding device, the device 1100 may further include, for example, a microphone 1140 and an analog-to-digital converter 1150, etc. Microphone 1140, for example, can be used to sample analog audio signals. The analog-to-digital converter 1150 can be used, for example, to convert analog audio signals into digital audio signals. Referring to Figure 11-C, when the device 1100 is an encoding device, the device 1100 may further include, for example, a speaker 1160 and a digital-to-analog converter 1170, etc. The digital-to-analog converter 1170 can be used, for example, to convert digital audio signals into analog audio signals. The speaker 1160 can be used, for example, to play analog audio signals. Furthermore, referring to Figure 12-A, this application embodiment provides an apparatus 1200, including several functional units for implementing any of the methods provided in this application embodiment. For example, when device 1200 executes the method corresponding to the embodiment shown in FIG2, device 1200 may include: The first determining unit 1210 is used to determine the channel combination scheme of the current frame and to determine the encoding mode of the current frame based on the channel combination scheme of the previous frame and the current frame. The encoding unit 1220 is used to perform temporal downmixing on the left and right channel signals of the current frame based on the temporal downmixing processing corresponding to the encoding mode of the current frame, so as to obtain the primary and secondary channel signals of the current frame. Furthermore, referring to Figure 12-B, the device 1200 may also include a second determining unit 1230 for determining the temporal stereo parameters of the current frame. The encoding unit 1220 may also be used to encode the temporal stereo parameters of the current frame. For example, referring to Figure 12-C, when device 1200 executes the method corresponding to the embodiment shown in Figure 3, device 1200 may include: The third determining unit 1240 is used to determine the channel combination scheme of the current frame based on the channel combination scheme identifier of the current frame in the bitstream; and to determine the decoding mode of the current frame according to the channel combination scheme of the previous frame and the channel combination scheme of the current frame. The decoding unit 1250 is used to obtain the primary and secondary channel decoded signals of the current frame based on the bitstream decoding; and to perform temporal upmixing processing on the primary and secondary channel decoded signals of the current frame based on the temporal upmixing processing corresponding to the decoding mode of the current frame to obtain the left and right channel reconstructed signals of the current frame. The same logic applies when this device performs other methods. This application provides a computer-readable storage medium storing program code, wherein the program code includes instructions for performing some or all of the steps of any of the methods provided in this application. This application provides a computer program product that, when run on a computer, causes the computer to perform some or all of the steps of any of the methods provided in this application. In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments. In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the indirect or direct coupling or communication connections shown or discussed may be through some interfaces; the indirect coupling or communication connections of devices or units may be electrical or other forms. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs. Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
Claims
1. A method for determining an audio encoding mode, characterized in that, include: Determine the channel combination scheme for the current frame; determine the encoding mode of the current frame based on the channel combination scheme of the previous frame and the channel combination scheme of the current frame.
2. The method according to claim 1, characterized in that, The current frame's channel combination scheme is one of a variety of channel combination schemes; the variety of channel combination schemes includes an uncorrelated signal channel combination scheme and a correlated signal channel combination scheme; the correlated signal channel combination scheme is a channel combination scheme corresponding to a positive phase signal; the uncorrelated signal channel combination scheme is a channel combination scheme corresponding to an inverted phase signal.
3. The method according to claim 2, characterized in that, The step of determining the channel combination scheme of the current frame includes: performing an initial decision on the channel combination scheme of the current frame to determine the initial channel combination scheme of the current frame; and performing a correction decision on the channel combination scheme of the current frame based on the initial channel combination scheme of the current frame to determine the channel combination scheme of the current frame.
4. The method according to claim 3, characterized in that, The initial decision on the channel combination scheme for the current frame includes: determining the phase type of the stereo signal of the current frame using the left and right channel signals of the current frame; and determining the initial channel combination scheme of the current frame using the phase type of the stereo signal of the current frame and the channel combination scheme of the previous frame.
5. The method according to claim 4, characterized in that, The step of determining the initial channel combination scheme for the current frame using the phase type of the stereo signal in the current frame and the channel combination scheme of the previous frame includes: If the phase type of the stereo signal in the current frame is a quasi-phase signal and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, then the initial channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme; if the phase type of the stereo signal in the current frame is a quasi-phase signal and the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme, then the initial channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme. or, If the phase type of the stereo signal in the current frame is a quasi-phase signal, and the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme, then if the signal-to-noise ratio of both the left and right channel signals of the current frame is less than the second threshold, the initial channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme; if the signal-to-noise ratio of the left channel signal and / or the right channel signal of the current frame is greater than or equal to the second threshold, the initial channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme. or, If the phase type of the stereo signal in the current frame is a phase-inverting signal and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, then if the signal-to-noise ratio of both the left and right channel signals of the current frame is less than the second threshold, the initial channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme; if the signal-to-noise ratio of the left channel signal and / or the right channel signal of the current frame is greater than or equal to the second threshold, the initial channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme.
6. The method according to any one of claims 3 to 5, characterized in that, The step of performing a channel combination scheme correction decision on the current frame based on the initial channel combination scheme of the current frame to determine the channel combination scheme of the current frame includes: If the channel combination scaling factor correction flag of the previous frame indicates that the channel combination scaling factor needs to be corrected, the channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme; if the channel combination scaling factor correction flag of the previous frame indicates that the channel combination scaling factor does not need to be corrected, it is determined whether the current frame meets the switching conditions, and the channel combination scheme of the current frame is determined based on the determination result of whether the current frame meets the switching conditions.
7. The method according to claim 6, characterized in that, The determination of the channel combination scheme for the current frame based on the decision result of whether the current frame meets the switching conditions includes: If the channel combination scheme of the previous frame is different from the initial channel combination scheme of the current frame, and the current frame meets the switching conditions, and the initial channel combination scheme of the current frame is a correlated signal channel combination scheme, and the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme, then the channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme. or, If the channel combination scheme of the previous frame is different from the initial channel combination scheme of the current frame, and the current frame meets the switching conditions, and the initial channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, and the channel combination scaling factor of the previous frame is less than the first scaling factor threshold, then the channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme. or, If the channel combination scheme of the previous frame is different from the initial channel combination scheme of the current frame, and the current frame meets the switching conditions, and the initial channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, and the channel combination scaling factor of the previous frame is greater than or equal to the first scaling factor threshold, then the channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme. or, The channel combination scheme of the previous P-1 frame is different from the initial channel combination scheme of the previous P frame, and the previous P frame does not meet the switching conditions, while the current frame meets the switching conditions, and the stereo signal of the current frame is a quasi-positive phase signal, and the initial channel combination scheme of the current frame is a correlated signal channel combination scheme, while the previous frame was an uncorrelated signal channel combination scheme, thus determining that the channel combination scheme of the current frame is a correlated signal channel combination scheme. or, If the channel combination scheme of the previous P-1 frame and the initial channel combination scheme of the previous P frame do not meet the switching conditions, and the current frame meets the switching conditions, and the phase type of the stereo signal of the current frame is a phase-inverting signal, and the initial channel combination scheme of the current frame is a non-correlated signal channel combination scheme, and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, and the channel combination scaling factor of the previous frame is less than the second scaling factor threshold, then the channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme. or, If the channel combination scheme of the previous P-1 frame is different from the initial channel combination scheme of the previous P frame, and the previous P frame does not meet the switching conditions, and the current frame meets the switching conditions, and the phase type of the stereo signal in the current frame is a phase-inverted signal, and the initial channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, and the channel combination scaling factor of the previous frame is greater than or equal to the second scaling factor threshold, then the channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme.
8. The method according to claim 7, characterized in that, The determination of whether the current frame meets the switching conditions includes: determining whether the current frame meets the switching conditions based on the primary channel signal frame type and / or secondary channel signal frame type of the previous frame.
9. The method according to claim 8, characterized in that, Determine whether the current frame meets the switching conditions based on the primary channel signal frame type and / or secondary channel signal frame type of the previous frame, including: determining that the current frame meets the switching conditions if the first, second, and third conditions are all met; or determining that the current frame meets the switching conditions if the second, third, fourth, and fifth conditions are all met; or determining that the current frame meets the switching conditions if the sixth condition is met. in, First condition: The primary channel signal frame type of the previous frame is any one of the following: VOICED_CLAS frame, ONSET frame, SIN_ONSET frame, INACTIVE_CLAS frame, AUDIO_CLAS frame, and the primary channel signal frame type of the previous frame is UNVOICED_CLAS frame or VOICED_TRANSITION frame; or, the secondary channel signal frame type of the previous frame is any one of the following: VOICED_CLAS frame, ONSET frame, SIN_ONSET frame, INACTIVE_CLAS frame, and AUDIO_CLAS frame, and the secondary channel signal frame type of the previous frame is UNVOICED_CLAS frame or VOICED_TRANSITION frame. Second condition: The initial encoding type of the primary channel signal and the secondary channel signal in the previous frame is not the encoding type corresponding to VOICED; Third condition: The number of frames in which the channel combination scheme used in the previous frame has been continuously used up to the previous frame is greater than the preset frame number threshold. Fourth condition: The primary channel signal frame type of the previous frame is UNVOICED_CLAS frame, or the secondary channel signal frame type of the previous frame is UNVOICED_CLAS frame. Fifth condition: The long-time root mean square energy values of the left and right channel signals in the current frame are less than the energy threshold; Sixth condition: The primary channel signal of the previous frame is an audio signal, and the energy ratio of the low-frequency band to the high-frequency band of the primary channel signal of the previous frame is greater than the first energy ratio threshold, and the energy ratio of the low-frequency band to the high-frequency band of the secondary channel signal of the previous frame is greater than the second energy ratio threshold.
10. The method according to any one of claims 1 to 9, characterized in that, Determining the encoding mode of the current frame based on the channel combination scheme of the previous frame and the channel combination scheme of the current frame includes: If the channel combination scheme of the previous frame is a correlated signal channel combination scheme and the channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, the encoding mode of the current frame is determined to be a correlated signal to uncorrelated signal encoding mode. The correlated signal to uncorrelated signal encoding mode uses the downmixing processing method corresponding to the transition from the correlated signal channel combination scheme to the uncorrelated signal channel combination scheme for temporal downmixing processing. or, If the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, the encoding mode of the current frame is determined to be an uncorrelated signal encoding mode, and the uncorrelated signal encoding mode is used to perform temporal downmixing processing using the downmixing processing method corresponding to the uncorrelated signal channel combination scheme. or, If the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme and the channel combination scheme of the current frame is a correlated signal channel combination scheme, the encoding mode of the current frame is determined to be an uncorrelated signal to correlated signal encoding mode. The uncorrelated signal to correlated signal encoding mode uses the downmixing processing method corresponding to the transition from the uncorrelated signal channel combination scheme to the correlated signal channel combination scheme for temporal downmixing processing. or, The current frame's channel combination scheme is a correlation signal channel combination scheme. The current frame's channel combination scheme is a correlation signal channel combination scheme. The current frame's encoding mode is determined to be a correlation signal encoding mode. The correlation signal encoding mode uses the downmixing processing method corresponding to the correlation signal channel combination scheme for temporal downmixing processing.
11. A method for determining an audio decoding mode, characterized in that, include: The channel combination scheme of the current frame is determined based on the channel combination scheme identifier of the current frame in the bitstream; The decoding mode of the current frame is determined based on the channel combination scheme of the previous frame and the channel combination scheme of the current frame.
12. The method according to claim 11, characterized in that, The decoding mode of the current frame is determined based on the channel combination scheme of the previous frame and the channel combination scheme of the current frame, including: If the channel combination scheme of the previous frame is a correlated signal channel combination scheme and the channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, the decoding mode of the current frame is determined to be a correlated signal to uncorrelated signal decoding mode. The correlated signal to uncorrelated signal decoding mode uses the upmixing processing method corresponding to the transition from the correlated signal channel combination scheme to the uncorrelated signal channel combination scheme for temporal upmixing processing. or, If the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, the decoding mode of the current frame is determined to be an uncorrelated signal decoding mode. The uncorrelated signal decoding mode uses the upmixing processing method corresponding to the uncorrelated signal channel combination scheme for temporal upmixing processing. or, If the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme and the channel combination scheme of the current frame is a correlated signal channel combination scheme, the decoding mode of the current frame is determined to be an uncorrelated signal to correlated signal decoding mode. The uncorrelated signal to correlated signal decoding mode uses the upmixing processing method corresponding to the transition from the uncorrelated signal channel combination scheme to the correlated signal channel combination scheme for temporal upmixing processing. or, The current frame's channel combination scheme is a correlation signal channel combination scheme. The current frame's channel combination scheme is a correlation signal channel combination scheme. The current frame's decoding mode is determined to be a correlation signal decoding mode. The correlation signal decoding mode uses the upmixing processing method corresponding to the correlation signal channel combination scheme for temporal upmixing processing.
13. An audio encoding mode determining device, characterized in that, include: Intercoupled processors and memory; The processor is configured to perform the following steps: determine the channel combination scheme of the current frame; determine the encoding mode of the current frame based on the channel combination scheme of the previous frame and the channel combination scheme of the current frame.
14. The apparatus according to claim 13, characterized in that, The current frame's channel combination scheme is one of a variety of channel combination schemes; the variety of channel combination schemes includes an uncorrelated signal channel combination scheme and a correlated signal channel combination scheme; the correlated signal channel combination scheme is a channel combination scheme corresponding to a positive phase signal; the uncorrelated signal channel combination scheme is a channel combination scheme corresponding to an inverted phase signal.
15. The apparatus according to claim 14, characterized in that, The processor determines the channel combination scheme of the current frame by: making an initial decision on the channel combination scheme of the current frame to determine the initial channel combination scheme of the current frame; and making a corrected decision on the channel combination scheme of the current frame based on the initial channel combination scheme of the current frame to determine the channel combination scheme of the current frame.
16. The apparatus according to claim 15, characterized in that, The processor performs an initial decision on the channel combination scheme for the current frame, which includes: determining the phase type of the stereo signal of the current frame using the left and right channel signals of the current frame; and determining the initial channel combination scheme of the current frame using the phase type of the stereo signal of the current frame and the channel combination scheme of the previous frame.
17. The apparatus according to claim 16, characterized in that, The processor determines the initial channel combination scheme for the current frame using the phase type of the stereo signal in the current frame and the channel combination scheme of the previous frame, including: If the phase type of the stereo signal in the current frame is a quasi-phase signal and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, then the initial channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme; if the phase type of the stereo signal in the current frame is a quasi-phase signal and the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme, then the initial channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme. or, If the phase type of the stereo signal in the current frame is a quasi-phase signal, and the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme, then if the signal-to-noise ratio of both the left and right channel signals of the current frame is less than the second threshold, the initial channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme; if the signal-to-noise ratio of the left channel signal and / or the right channel signal of the current frame is greater than or equal to the second threshold, the initial channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme. or, If the phase type of the stereo signal in the current frame is a phase-inverting signal and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, then if the signal-to-noise ratio of both the left and right channel signals of the current frame is less than the second threshold, the initial channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme; if the signal-to-noise ratio of the left channel signal and / or the right channel signal of the current frame is greater than or equal to the second threshold, the initial channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme.
18. The apparatus according to any one of claims 15 to 17, characterized in that, The processor performs a channel combination scheme correction decision on the current frame based on the initial channel combination scheme of the current frame, to determine the channel combination scheme of the current frame, which includes: If the channel combination scaling factor correction flag of the previous frame indicates that the channel combination scaling factor needs to be corrected, the channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme; if the channel combination scaling factor correction flag of the previous frame indicates that the channel combination scaling factor does not need to be corrected, it is determined whether the current frame meets the switching conditions, and the channel combination scheme of the current frame is determined based on the determination result of whether the current frame meets the switching conditions.
19. The apparatus according to claim 18, characterized in that, The processor determines the channel combination scheme for the current frame based on the decision result of whether the current frame meets the switching conditions, including: If the channel combination scheme of the previous frame is different from the initial channel combination scheme of the current frame, and the current frame meets the switching conditions, and the initial channel combination scheme of the current frame is a correlated signal channel combination scheme, and the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme, then the channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme. or, If the channel combination scheme of the previous frame is different from the initial channel combination scheme of the current frame, and the current frame meets the switching conditions, and the initial channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, and the channel combination scaling factor of the previous frame is less than the first scaling factor threshold, then the channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme. or, If the channel combination scheme of the previous frame is different from the initial channel combination scheme of the current frame, and the current frame meets the switching conditions, and the initial channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, and the channel combination scaling factor of the previous frame is greater than or equal to the first scaling factor threshold, then the channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme. or, The channel combination scheme of the previous P-1 frame is different from the initial channel combination scheme of the previous P frame, and the previous P frame does not meet the switching conditions, while the current frame meets the switching conditions, and the stereo signal of the current frame is a quasi-positive phase signal, and the initial channel combination scheme of the current frame is a correlated signal channel combination scheme, while the previous frame was an uncorrelated signal channel combination scheme, thus determining that the channel combination scheme of the current frame is a correlated signal channel combination scheme. or, If the channel combination scheme of the previous P-1 frame and the initial channel combination scheme of the previous P frame do not meet the switching conditions, and the current frame meets the switching conditions, and the phase type of the stereo signal of the current frame is a phase-inverting signal, and the initial channel combination scheme of the current frame is a non-correlated signal channel combination scheme, and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, and the channel combination scaling factor of the previous frame is less than the second scaling factor threshold, then the channel combination scheme of the current frame is determined to be a correlated signal channel combination scheme. or, If the channel combination scheme of the previous P-1 frame is different from the initial channel combination scheme of the previous P frame, and the previous P frame does not meet the switching conditions, and the current frame meets the switching conditions, and the phase type of the stereo signal in the current frame is a phase-inverted signal, and the initial channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the previous frame is a correlated signal channel combination scheme, and the channel combination scaling factor of the previous frame is greater than or equal to the second scaling factor threshold, then the channel combination scheme of the current frame is determined to be an uncorrelated signal channel combination scheme.
20. The apparatus according to claim 19, characterized in that, The processor determines whether the current frame meets the switching conditions by: determining whether the current frame meets the switching conditions based on the primary channel signal frame type and / or secondary channel signal frame type of the previous frame.
21. The apparatus according to claim 20, characterized in that, The processor determines whether the current frame meets the switching conditions based on the primary channel signal frame type and / or secondary channel signal frame type of the previous frame, including: determining that the current frame meets the switching conditions if the first, second, and third conditions are all met; or determining that the current frame meets the switching conditions if the second, third, fourth, and fifth conditions are all met; or determining that the current frame meets the switching conditions if the sixth condition is met. in, First condition: The primary channel signal frame type of the previous frame is any one of the following: VOICED_CLAS frame, ONSET frame, SIN_ONSET frame, INACTIVE_CLAS frame, AUDIO_CLAS frame, and the primary channel signal frame type of the previous frame is UNVOICED_CLAS frame or VOICED_TRANSITION frame; or, the secondary channel signal frame type of the previous frame is any one of the following: VOICED_CLAS frame, ONSET frame, SIN_ONSET frame, INACTIVE_CLAS frame, and AUDIO_CLAS frame, and the secondary channel signal frame type of the previous frame is UNVOICED_CLAS frame or VOICED_TRANSITION frame. Second condition: The initial encoding type of the primary channel signal and the secondary channel signal in the previous frame is not the encoding type corresponding to VOICED; Third condition: The number of frames in which the channel combination scheme used in the previous frame has been continuously used up to the previous frame is greater than the preset frame number threshold. Fourth condition: The primary channel signal frame type of the previous frame is UNVOICED_CLAS frame, or the secondary channel signal frame type of the previous frame is UNVOICED_CLAS frame. Fifth condition: The long-time root mean square energy values of the left and right channel signals in the current frame are less than the energy threshold; Sixth condition: The primary channel signal of the previous frame is an audio signal, and the energy ratio of the low-frequency band to the high-frequency band of the primary channel signal of the previous frame is greater than the first energy ratio threshold, and the energy ratio of the low-frequency band to the high-frequency band of the secondary channel signal of the previous frame is greater than the second energy ratio threshold.
22. The apparatus according to any one of claims 13 to 21, characterized in that, The processor determines the encoding mode of the current frame based on the channel combination scheme of the previous frame and the channel combination scheme of the current frame, including: If the channel combination scheme of the previous frame is a correlated signal channel combination scheme and the channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, the encoding mode of the current frame is determined to be a correlated signal to uncorrelated signal encoding mode. The correlated signal to uncorrelated signal encoding mode uses the downmixing processing method corresponding to the transition from the correlated signal channel combination scheme to the uncorrelated signal channel combination scheme for temporal downmixing processing. or, If the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, the encoding mode of the current frame is determined to be an uncorrelated signal encoding mode, and the uncorrelated signal encoding mode is used to perform temporal downmixing processing using the downmixing processing method corresponding to the uncorrelated signal channel combination scheme. or, If the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme and the channel combination scheme of the current frame is a correlated signal channel combination scheme, the encoding mode of the current frame is determined to be an uncorrelated signal to correlated signal encoding mode. The uncorrelated signal to correlated signal encoding mode uses the downmixing processing method corresponding to the transition from the uncorrelated signal channel combination scheme to the correlated signal channel combination scheme for temporal downmixing processing. or, The current frame's channel combination scheme is a correlation signal channel combination scheme. The current frame's channel combination scheme is a correlation signal channel combination scheme. The current frame's encoding mode is determined to be a correlation signal encoding mode. The correlation signal encoding mode uses the downmixing processing method corresponding to the correlation signal channel combination scheme for temporal downmixing processing.
23. An audio decoding mode determining device, characterized in that, include: Intercoupled processors and memory; The processor is configured to perform the following steps: determine the channel combination scheme of the current frame based on the channel combination scheme identifier of the current frame in the bitstream; and determine the decoding mode of the current frame according to the channel combination scheme of the previous frame and the channel combination scheme of the current frame.
24. The apparatus according to claim 23, characterized in that, The processor determines the decoding mode of the current frame based on the channel combination scheme of the previous frame and the channel combination scheme of the current frame, including: If the channel combination scheme of the previous frame is a correlated signal channel combination scheme and the channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, the decoding mode of the current frame is determined to be a correlated signal to uncorrelated signal decoding mode. The correlated signal to uncorrelated signal decoding mode uses the upmixing processing method corresponding to the transition from the correlated signal channel combination scheme to the uncorrelated signal channel combination scheme for temporal upmixing processing. or, If the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme, and the channel combination scheme of the current frame is an uncorrelated signal channel combination scheme, the decoding mode of the current frame is determined to be an uncorrelated signal decoding mode. The uncorrelated signal decoding mode uses the upmixing processing method corresponding to the uncorrelated signal channel combination scheme for temporal upmixing processing. or, If the channel combination scheme of the previous frame is an uncorrelated signal channel combination scheme and the channel combination scheme of the current frame is a correlated signal channel combination scheme, the decoding mode of the current frame is determined to be an uncorrelated signal to correlated signal decoding mode. The uncorrelated signal to correlated signal decoding mode uses the upmixing processing method corresponding to the transition from the uncorrelated signal channel combination scheme to the correlated signal channel combination scheme for temporal upmixing processing. or, The current frame's channel combination scheme is a correlation signal channel combination scheme. The current frame's channel combination scheme is a correlation signal channel combination scheme. The current frame's decoding mode is determined to be a correlation signal decoding mode. The correlation signal decoding mode uses the upmixing processing method corresponding to the correlation signal channel combination scheme for temporal upmixing processing.
25. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code, which includes instructions for performing the method according to any one of claims 1-10.
26. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code, which includes instructions for performing the method of any one of claims 11-12.