Patent ID: 11935547
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G  H | IPC G

Claim 4:
5. The non-transitory computer-readable medium according to claim 4, wherein determining, based on the frame type of the primary channel signal in the previous frame or the frame type of the secondary channel signal in the previous frame, whether the current frame meets the switching condition comprises:
when a first condition, a second condition, and a third condition are all met, determining that the current frame meets the switching condition; or
when the second condition, the third condition, a fourth condition, and a fifth condition are all met, determining that the current frame meets the switching condition; or
when a sixth condition is met, determining that the current frame meets the switching condition; wherein
the first condition is: a frame type of a primary channel signal in a previous frame of the previous frame is any one of the following: a VOICED_CLAS frame, an ONSET frame, a SIN_ONSET frame, an INACTIVE_CLAS frame, or an AUDIO_CLAS frame, and the frame type of the primary channel signal in the previous frame is a UNVOICED_CLAS frame or a VOICED_TRANSITION frame; or a frame type of a secondary channel signal in the previous frame of the previous frame is any one of the following: a VOICED_CLAS frame, an ONSET frame, a SIN_ONSET frame, an INACTIVE_CLAS frame, or an AUDIO_CLAS frame, and the frame type of the secondary channel signal in the previous frame is an UNVOICED_CLAS frame or a VOICED_TRANSITION frame;
the second condition is: not of raw coding modes of the primary channel signal and the secondary channel signal in the previous frame is a coding type corresponding to VOICED;
the third condition is: a quantity of consecutive frames before the previous frame that use the channel combination scheme used by the previous frame is greater than a preset frame quantity threshold;
the fourth condition is: the frame type of the primary channel signal in the previous frame is an UNVOICED_CLAS frame, or the frame type of the secondary channel signal in the previous frame is an UNVOICED_CLAS frame;
the fifth condition is: a long-term root mean square energy value of the left and right channel signals in the current frame is less than an energy threshold; and
the sixth condition is: the frame type of the primary channel signal in the previous frame is a music signal, a ratio of energy of a lower frequency band to energy of a higher frequency band of the primary channel signal in the previous frame is greater than a first energy ratio threshold, and a ratio of energy of a lower frequency band to energy of a higher frequency band of the secondary channel signal in the previous frame is greater than a second energy ratio threshold.