Sound encoding method and sound decoding method, related apparatus, and system
AssigneeHonor Device Co., Ltd.
InventorJianfeng Xu
Life of this patent
Estimating the term…
Abstract
Embodiments of this application provide a sound encoding method and a sound decoding method, a related apparatus, and a system. First, a linear estimated value of an algebraic codebook gain in a linear domain may be obtained through table lookup according to an index CTindex of a classification parameter CT of a current frame. Then, the linear estimated value of the algebraic codebook gain in the linear domain is divided by energy (which is represented as √{square root over (Ec)}) of an algebraic codebook vector from an algebraic codebook in the linear domain, to obtain an estimated gain gc0[0] of the algebraic codebook in the first subframe.
Claims15
1-27. (canceled)
A method for encoding a sound signal, applied to a first subframe in a current frame, wherein the method comprises:
- receiving a frame classification parameter index of the current frame;
- searching a table for a linear estimated value of an algebraic codebook gain in a linear domain according to the frame classification parameter index of the current frame, wherein each entry in a first mapping table comprises a linear estimated value of an algebraic codebook gain in the linear domain;
- calculating energy of an algebraic codebook vector from an algebraic codebook;
- dividing the linear estimated value of the algebraic codebook gain in the linear domain by a square root of the energy of the algebraic codebook vector, to obtain an estimated gain of the algebraic codebook;
- and
- multiplying the estimated gain of the algebraic codebook by a correction factor, to obtain a quantized gain of the algebraic codebook, wherein the correction factor is from a winning codebook vector, and the winning codebook vector is selected from a gain codebook.
A method for decoding a sound signal, applied to a first subframe in a current frame, wherein the method comprises:
- receiving an encoding parameter, wherein the encoding parameter comprises:
- a frame classification parameter index of the current frame and an index of a winning codebook vector;
- searching a table for a linear estimated value of an algebraic codebook gain in the linear domain based on the frame classification parameter index of the current frame, wherein each entry in a first mapping table comprises a linear estimated value of an algebraic codebook gain in the linear domain;
- calculating energy of an algebraic codebook vector from an algebraic codebook;
- dividing the linear estimated value of the algebraic codebook gain in the linear domain by a square root of the energy of the algebraic codebook vector, to obtain an estimated gain of the algebraic codebook;
- and
- multiplying the estimated gain of the algebraic codebook by a correction factor, to obtain a quantized gain of the algebraic codebook, wherein the correction factor is from the winning codebook vector, and the winning codebook vector is selected from a gain codebook based on the index of the winning codebook vector.
An electronic device, comprising:
- one or more processors and a memory, wherein the memory is coupled to the one or more processors, the memory is configured to store computer program code, the computer program code comprises computer instructions, and the one or more processors invoke the computer instructions to enable the apparatus to perform:
- receiving a frame classification parameter index of the current frame;
- searching a table for a linear estimated value of an algebraic codebook gain in a linear domain according to the frame classification parameter index of the current frame, wherein each entry in a first mapping table comprises a linear estimated value of an algebraic codebook gain in the linear domain;
- calculating energy of an algebraic codebook vector from an algebraic codebook;
- dividing the linear estimated value of the algebraic codebook gain in the linear domain by a square root of the energy of the algebraic codebook vector, to obtain an estimated gain of the algebraic codebook;
- and
- multiplying the estimated gain of the algebraic codebook by a correction factor, to obtain a quantized gain of the algebraic codebook, wherein the correction factor is from a winning codebook vector, and the winning codebook vector is selected from a gain codebook.
Dependencies are inferred from the claim text.