# US 2021/0082445 A1 · Stereo Signal Encoding Method and Apparatus

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0082445 A1
- Document ID: US20210082445A1
- Status: Published application
- Kind: A1
- Application number: 17/104,852
- Filed: 2020-11-25
- Published: 2021-03-18
- Earliest claimed: 2018-05-31
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Bin Wang; Zexin Liu; Haiting Li
- Web page: https://patentgrep.com/patent/US20210082445A1

## CPC

- G10L 19/0204: {using subband decomposition}
- G10L 19/008: Multichannel audio signal coding or decoding using interchannel correlation to reduce redundancy, e.g. joint-stereo, intensity-coding or matrixing
- G10L 19/06: Determination or coding of the spectral characteristics, e.g. of the short-term prediction coefficients
- G10L 25/51: for comparison or discrimination
- H04L 65/70: Media network packetisation
- H04L 65/75: Media network packet handling
- H04L 65/756: adapting media to device capabilities
- H04S 1/007: {in which the audio signals are in digital form (data reduction aspects thereof based on psychoacoustics G10L19/02)}
- H04S 2400/03: Aspects of down-mixing multi-channel audio to configurations with lower numbers of playback channels, e.g. 7.1 -> 5.1 (H04S2400/01 takes precedence)
- G10L: SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- H04S: STEREOPHONIC SYSTEMS

## Abstract

A stereo signal encoding method includes obtaining a residual signal encoding parameter of a current frame of a stereo signal based on downmixed signal energy and residual signal energy of each of M sub-bands of the current frame, where the residual signal encoding parameter indicates whether to encode residual signals of the M sub-bands, determining whether to encode the residual signals based on the residual signal encoding parameter, and encoding the residual signals when it is determined that the residual signals need to be encoded.

## Claims

### Claim 1

A method comprising:
obtaining a residual signal encoding parameter of a current frame of a stereo signal based on downmixed signal energy and residual signal energy of each of M sub-bands of the current frame, wherein the residual signal encoding parameter indicates whether to encode residual signals of the M sub-bands, wherein spectral coefficients of the current frame are divided to obtain N sub-bands, wherein the M sub-bands are a part of the N sub-bands, wherein N is a positive integer greater than 1, wherein M≤N, and wherein M is a positive integer;
determining, based on the residual signal encoding parameter, whether to encode the residual signals;
encoding the residual signals when determining to encode the residual signals; and
avoiding encoding the residual signals when determining not to encode the residual signals.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
comparing the residual signal encoding parameter with a preset first threshold, wherein the preset first threshold is greater than zero and less than 1;
determining not to encode the residual signals when the residual signal encoding parameter is less than or equal to the preset first threshold; and
determining to encode the residual signals when the residual signal encoding parameter is greater than the preset first threshold.

### Claim 3 (depends on 1)

The method of claim 1, further comprising obtaining the residual signal encoding parameter based on the downmixed signal energy, the residual signal energy, and a side gain of each of the M sub-bands.

### Claim 4 (depends on 3)

The method of claim 3, further comprising:
obtaining a first parameter based on the downmixed signal energy, the residual signal energy, and the side gain of each of the M sub-bands, wherein the first parameter indicates a first relationship between the downmixed signal energy and the residual signal energy of each of the M sub-bands;
obtaining a second parameter based on the downmixed signal energy and the residual signal energy of each of the M sub-bands, wherein the second parameter indicates a second relationship between a first energy sum and a second energy sum, wherein the first energy sum is a sum of residual signal energy and downmixed signal energy of the M sub-bands, wherein the second energy sum is a sum of second residual signal energy and second downmixed signal energy of second M sub-bands in a frequency-domain signal of a previous frame of the current frame, and wherein the M sub-bands have same sub-band index numbers as the second M sub-bands; and
obtaining the residual signal encoding parameter based on the first parameter, the second parameter, and a first long-term smoothing parameter of the previous frame.

### Claim 5 (depends on 4)

The method of claim 4, wherein the residual signal encoding parameter is a second long-term smoothing parameter of the current frame, wherein the method further comprises obtaining the second long-term smoothing parameter using a first formula, and wherein the first formula is:
res_dmx_ratio_lt=res_dmx_ratio.a +res_dmx_ratio_ltprev.(1−α),
wherein res_dmx_ratio_lt represents the second long-term smoothing parameter, wherein res_dmx_ratio represents the first parameter, wherein res_dmx_ratio_ltprev represents the first long-term smoothing parameter, and wherein 0<α<1.

### Claim 6 (depends on 4)

The method of claim 4, further comprising:
obtaining M energy parameters based on the downmixed signal energy, the residual signal energy, and the side gain of each of the M sub-bands, wherein each of the M energy parameters indicates the first relationship, and wherein the M energy parameters and the M sub-bands comprise a one-to-one correspond; and
setting an energy parameter with a largest value in the M energy parameters as the first parameter.

### Claim 7 (depends on 6)

The method of claim 6, wherein a sub-band index number of a bth sub-band is b, wherein the method further comprises obtaining a bth energy parameter of the bth sub-band in the M energy parameters using a second formula, and wherein the second formula is:
res_dmx_ratio[b]=res_cod_NRG_S[b]/(res_cod_NRG_S[b]+(1−g(b))·(1−g(b)) res_cod_NRG_M[b]+1),
wherein res_dmx_ratio[b] represents the bth energy parameter, wherein b is greater than or equal to zero and is less than or equal to a preset maximum sub-band index number, wherein res_cod_NRG_S[b] represents residual signal energy of the bth sub-band, wherein res_cod_NRG_M[b] represents downmixed signal energy of the bth sub-band, and wherein g(b) represents a function of a side gain of the bth sub-band.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
obtaining a first parameter based on the downmixed signal energy and the residual signal energy of each of the M sub-bands, wherein the first parameter indicates a first relationship between the downmixed signal energy and the residual signal energy of each of the M sub-bands;
obtaining a second parameter based on the downmixed signal energy and the residual signal energy of each of the M sub-bands, wherein the second parameter indicates a second relationship between a first energy sum and a second energy sum, wherein the first energy sum is a sum of residual signal energy and downmixed signal energy of the M sub-bands, wherein the second energy sum is a sum of second residual signal energy and second downmixed signal energy of second M sub-bands in a frequency-domain signal of a previous frame of the current frame, and wherein the M sub-bands have same sub-band index numbers as the second M sub-bands; and
obtaining the residual signal encoding parameter based on the first parameter, the second parameter, and a long-term smoothing parameter of the previous frame.

### Claim 9 (depends on 8)

The method of claim 8, further comprising:
obtaining M energy parameters based on the downmixed signal energy and the residual signal energy of each of the M sub-bands, wherein each of the M energy parameters indicates the first relationship, and wherein the M energy parameters and the M sub-bands comprise a one-to-one correspond; and
setting an energy parameter with a largest value in the M energy parameters as the first parameter.

### Claim 10 (depends on 9)

The method of claim 9, wherein a sub-band index number of a bth sub-band is b, wherein the method further comprises obtaining a bth energy parameter of the bth sub-band in the M energy parameters using a third formula, and wherein the third formula is:
res_dmx_ratio[b]=res_cod_NRG_S[b]/res_cod_NRG_M[b],
wherein res_dmx_ratio[b] represents the bth energy parameter, wherein b is greater than or equal to zero and is less than or equal to a preset maximum sub-band index number, wherein res_cod_NRG_S[b] represents residual signal energy of the bth sub-band, and wherein res_cod_NRG_M[b] represents downmixed signal energy of the bth sub-band.

### Claim 11

An apparatus comprising:
a memory configured to store computer executable instructions; and
a processor coupled to the memory, wherein the computer-executable instructions cause the processor to be configured to:
obtain a residual signal encoding parameter of a current frame of a stereo signal based on downmixed signal energy and residual signal energy of each of M sub-bands of the current frame, wherein the residual signal encoding parameter indicates whether to encode residual signals of the M sub-bands, wherein the M sub-bands are a part of N sub-bands, wherein N is a positive integer greater than 1, wherein M≤N, and wherein M is a positive integer;
determine, based on the residual signal encoding parameter, whether to encode the residual signals;
encode the residual signals when determining to encode the residual signals; and
avoid encoding the residual signals when determining not to encode the residual signals.

### Claim 12 (depends on 11)

The apparatus of claim 11, wherein the computer-executable instructions further cause the processor to be configured to:
compare the residual signal encoding parameter with a preset first threshold, wherein the preset first threshold is greater than zero and less than 1.0;
determine not to encode the residual signals when the residual signal encoding parameter is less than or equal to the preset first threshold; and
determine to encode the residual signals when the residual signal encoding parameter is greater than the preset first threshold.

### Claim 13 (depends on 11)

The apparatus of claim 11, wherein the computer-executable instructions further cause the processor to be configured to obtain the residual signal encoding parameter based on the downmixed signal energy, the residual signal energy, and a side gain of each of the M sub-bands.

### Claim 14 (depends on 13)

The apparatus of claim 13, wherein the computer-executable instructions further cause the processor to be configured to:
obtain a first parameter based on the downmixed signal energy, the residual signal energy, and the side gain of each of the M sub-bands, wherein the first parameter indicates a first relationship between the downmixed signal energy and the residual signal energy of each of the M sub-bands;
obtain a second parameter based on the downmixed signal energy and the residual signal energy of each of the M sub-bands, wherein the second parameter indicates a second relationship between a first energy sum and a second energy sum, wherein the first energy sum is a sum of residual signal energy and downmixed signal energy of the M sub-bands, wherein the second energy sum is a sum of second residual signal energy and second downmixed signal energy of second M sub-bands in a frequency-domain signal of a previous frame of the current frame, and wherein the M sub-bands have same sub-band index numbers as the second M sub-bands; and
obtain the residual signal encoding parameter based on the first parameter, the second parameter, and a first long-term smoothing parameter of the previous frame.

### Claim 15 (depends on 14)

The apparatus of claim 14, wherein the residual signal encoding parameter is a second long-term smoothing parameter of the current frame, wherein the computer-executable instructions further cause the processor to be configured to obtain the second long-term smoothing parameter using a first formula, and wherein the first formula is:
res_dmx_ratio_lt=res_dmx_ratio·α+res_dmx_ratio_ltprev·(1−α),
wherein res_dmx_ratio_lt represents the second long-term smoothing parameter, wherein res_dmx_ratio represents the first parameter, wherein res_dmx_ratio_ltprev represents the first long-term smoothing parameter, wherein 0<α<1.

### Claim 16 (depends on 14)

The apparatus of claim 14, wherein the computer-executable instructions further cause the processor to be configured to:
obtain M energy parameters based on the downmixed signal energy, the residual signal energy, and the side gain of each of the M sub-bands, wherein each of the M energy parameters indicates the first relationship, and wherein the M energy parameters and the M sub-bands comprise a one-to-one correspond; and
set an energy parameter with a largest value in the M energy parameters as the first parameter.

### Claim 17 (depends on 16)

The apparatus of claim 16, wherein a sub-band index number of a bth sub-band is b, wherein the computer-executable instructions further cause the processor to be configured to obtain a bth energy parameter of the bth sub-band in the M energy parameters using a second formula, and wherein the second formula is:
res_dmx_ratio[b]=res_cod_NRG_S[b]/(res_cod_NRG_S[b]+(1−g(b))·(1−g(b)) res_cod_NRG_M[b] +1),
wherein res_dmx_ratio[b] represents the bth energy parameter, wherein b is greater than or equal to zero and is less than or equal to a preset maximum sub-band index number, wherein res_cod_NRG_S[b] represents residual signal energy of the bth sub-band, wherein res_cod_NRG_M[b] represents downmixed signal energy of the bth sub-band, and wherein g(b) represents a function of a side gain of the bth sub-band.

### Claim 18 (depends on 11)

The apparatus of claim 11, wherein the computer-executable instructions further cause the processor to be configured to:
obtain a first parameter based on the downmixed signal energy and the residual signal energy of each of the M sub-bands, wherein the first parameter indicates a first relationship between the downmixed signal energy and the residual signal energy of each of the M sub-bands;
obtain a second parameter based on the downmixed signal energy and the residual signal energy of each of the M sub-bands, wherein the second parameter indicates a second relationship between a first energy sum and a second energy sum, wherein the first energy sum is a sum of residual signal energy and downmixed signal energy of the M sub-bands, wherein the second energy sum is a sum of second residual signal energy and second downmixed signal energy of second M sub-bands in a frequency-domain signal of a previous frame of the current frame, and wherein the M sub-bands have same sub-band index numbers as the second M sub-bands; and
obtain the residual signal encoding parameter based on the first parameter, the second parameter, and a long-term smoothing parameter of the previous frame.

### Claim 19 (depends on 18)

The apparatus of claim 18, wherein the computer-executable instructions further cause the processor to be configured to:
obtain M energy parameters based on the downmixed signal energy and the residual signal energy of each of the M sub-bands, wherein each of the M energy parameters indicates the first relationship, and wherein the M energy parameters and the M sub-bands comprise a one-to-one correspond; and
set an energy parameter with a largest value in the M energy parameters as the first parameter.

### Claim 20 (depends on 19)

The apparatus of claim 19, wherein a sub-band index number of a bth sub-band is b, wherein the computer-executable instructions further cause the processor to be configured to obtain a bth energy parameter of the bth sub-band in the M energy parameters using a third formula, and wherein the third formula is:
res_dmx_ratio [b]=res_cod_NRG_S[b]/res_cod_NRG_M[b],
wherein res_dmx_ratio[b] represents the bth energy parameter, wherein b is greater than or equal to zero and is less than or equal to a preset maximum sub-band index number, wherein res_cod_NRG_S[b] represents residual signal energy of the bth sub-band, and wherein res_cod_NRG_M[b] represents downmixed signal energy of the bth sub-band.
