Time-domain stereo encoding and decoding method and related product
AssigneeHuawei Technologies Co., Ltd.
InventorsBin Wang, Haiting Li, Lei Miao
Life of this patent
Estimating the term…
Abstract
An audio encoding and decoding method and a related apparatus are provided. The audio encoding method includes: determining a channel combination scheme for a current frame; when the channel combination scheme for the current frame is different from a channel combination scheme for a previous frame, performing segmented time-domain downmix processing on left and right channel signals in the current frame based on the channel combination scheme for the current frame and the channel combination scheme for the previous frame, to obtain a primary channel signal and a secondary channel signal in the current frame; and encoding the obtained primary channel signal and secondary channel signal in the current frame.
Claims21
An audio signal decoding method, comprising:
- receiving a bitstream;
- obtaining a third channel signal and a fourth channel signal of a current frame of an audio signal from the bitstream;
- when a first signal type of the current frame is different from a second signal type of a previous frame of the audio signal, performing a segmented mix processing on the third channel signal and the fourth channel signal to obtain a first channel signal and a second channel signal;
- wherein the first signal type is either a near out of phase signal type or a near in phase signal type, wherein the current frame includes the first channel signal and the second channel signal;
- wherein each of the first channel signal, the second channel signal, the third channel signal, and the fourth channel signal comprises a start segment signal, a middle segment signal and an end segment signal;
- when the first signal type is the near out of phase signal type and the second signal type is the near in phase signal type, performing, by using a second ratio factor corresponding to the previous frame and a second mix processing manner corresponding to the previous frame, a start segment mix processing on the start segment signal of the third channel signal and the start segment signal of the fourth channel signal, to obtain the start segment signal of the first channel signal and the start segment signal of the second channel signal;
- performing, by using a first ratio factor corresponding to the current frame and a first mix processing manner corresponding to the current frame, an end segment mix processing on the end segment signal of the third channel signal and the end segment signal of the fourth channel signal, to obtain the end segment signal of the first channel signal and the end segment signal of the second channel signal;
- performing, by using the first ratio factor and the first mix processing manner, a middle segment mix processing on the middle segment signal of the third channel signal and the middle segment signal of the fourth channel signal, to obtain a first temporary middle segment signal and a second temporary middle segment signal;
- performing, by using the second ratio factor and the second mix processing manner, a middle segment mix processing on the middle segment signal of the third channel signal and the middle segment signal of the fourth channel signal, to obtain a third temporary middle segment signal and a fourth temporary middle segment signal;
- and
- performing a weighted summation processing on the first temporary middle segment signal, the second temporary middle segment signal, the third temporary middle segment signal and the fourth temporary middle segment signal to obtain the middle segment signal of the first channel signal and the middle segment signal of the second channel signal.
An audio signal decoding apparatus, comprising:
- at least one processor;
- and
- one or more memories coupled to the at least one processor and storing program instructions for execution by the at least one processor to cause the audio signal decoding apparatus to:
- receive a bitstream;
- obtain a third channel signal and a fourth channel signal of a current frame of an audio signal from the bitstream;
- when a first signal type of the current frame is different from a second signal type of a previous frame of the audio signal, perform a segmented mix processing on the third channel signal and the fourth channel signal to obtain a first channel signal and a second channel signal;
- wherein the first signal type is either a near out of phase signal type or a near in phase signal type, wherein the current frame includes the first channel signal and the second channel signal;
- wherein each of the first channel signal, the second channel signal, the third channel signal and, the fourth channel signal comprises a start segment signal, a middle segment signal and an end segment signal;
- when the first signal type is the near out of phase signal type and the second signal type is the near in phase signal type, perform, by using a second ratio factor corresponding to the previous frame and a second mix processing manner corresponding to the previous frame, a start segment mix processing on the start segment signal of the third channel signal and the start segment signal of the fourth channel signal, to obtain the start segment signal of the first channel signal and the start segment signal of the second channel signal;
- perform, by using a first ratio factor corresponding to the current frame and a first mix processing manner corresponding to the current frame, an end segment mix processing on the end segment signal of the third channel signal and the end segment signal of the fourth channel signal, to obtain the end segment signal of the first channel signal and the end segment signal of the second channel signal;
- perform, by using the first ratio factor and the first mix processing manner, a middle segment mix processing on the middle segment signal of the third channel signal and the middle segment signal of the fourth channel signal, to obtain a first temporary middle segment signal and a second temporary middle segment signal;
- perform, by using the second ratio factor and the second mix processing manner, a middle segment mix processing on the middle segment signal of the third channel signal and the middle segment signal of the fourth channel signal, to obtain a third temporary middle segment signal and a fourth temporary middle segment signal;
- and
- perform a weighted summation processing on the first temporary middle segment signal, the second temporary middle segment signal, the third temporary middle segment signal and the fourth temporary middle segment signal to obtain the middle segment signal of the first channel signal and the middle segment signal of the second channel signal.
A non-transitory computer-readable storage medium storing computer instructions, that when executed by at least one processor of an audio signal decoding apparatus, cause the audio signal decoding apparatus to:
- receive a bitstream;
- obtain a third channel signal and a fourth channel signal of a current frame of an audio signal from the bitstream;
- when a first signal type of the current frame is different from a second signal type of a previous frame of the audio signal, perform a segmented mix processing on the third channel signal and the fourth channel signal to obtain a first channel signal and a second channel signal;
- wherein the first signal type is either a near out of phase signal type or a near in phase signal type, wherein the current frame includes the first channel signal and the second channel signal;
- wherein each of the first channel signal, the second channel signal, the third channel signal, and the fourth channel signal comprises a start segment signal, a middle segment signal and an end segment signal;
- when the first signal type is the near out of phase signal type and the second signal type is the near in phase signal type, perform, by using a second ratio factor corresponding to the previous frame and a second mix processing manner corresponding to the previous frame, a start segment mix processing on the start segment signal of the third channel signal and the start segment signal of the fourth channel signal, to obtain the start segment signal of the first channel signal and the start segment signal of the second channel signal;
- perform, by using a first ratio factor corresponding to the current frame and a first mix processing manner corresponding to the current frame, an end segment mix processing on the end segment signal of the third channel signal and the end segment signal of the fourth channel signal, to obtain the end segment signal of the first channel signal and the end segment signal of the second channel signal;
- perform, by using the first ratio factor and the first mix processing manner, a middle segment mix processing on the middle segment signal of the third channel signal and the middle segment signal of the fourth channel signal, to obtain a first temporary middle segment signal and a second temporary middle segment signal;
- perform, by using the second ratio factor and the second mix processing manner, a middle segment mix processing on the middle segment signal of the third channel signal and the middle segment signal of the fourth channel signal, to obtain a third temporary middle segment signal and a fourth temporary middle segment signal;
- and
- perform a weighted summation processing on the first temporary middle segment signal, the second temporary middle segment signal, the third temporary middle segment signal and the fourth temporary middle segment signal to obtain the middle segment signal of the first channel signal and the middle segment signal of the second channel signal.
Dependencies are inferred from the claim text.