# US 11,908,485 B2 · Apparatus and method for selecting one of a first encoding algorithm and a second encoding algorithm

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

- Number: US 11,908,485 B2
- Document ID: US11908485B2
- Status: Granted
- Kind: B2
- Application number: 18/058,389
- Filed: 2022-11-23
- Published: 2023-03-16
- Granted: 2024-02-20
- Earliest claimed: 2013-01-29
- Assignees: Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V.
- Applicants: Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V.
- Inventors: Emmanuel Ravelli; Stefan Doehla; Guillaume Fuchs; Eleni Fotopoulou; Christian Helmrich
- Web page: https://patentgrep.com/patent/US11908485B2

## CPC

- G10L 19/125: Pitch excitation, e.g. pitch synchronous innovation CELP [PSI-CELP]
- G10L 19/22: Mode decision, i.e. based on audio signal content versus external parameters
- G10L 19/0212: {using orthogonal transformation}
- G10L 19/08: Determination or coding of the excitation function; Determination or coding of the long-term prediction parameters
- G10L: SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING

## Abstract

An apparatus for selecting one of a first encoding algorithm having a first characteristic and a second encoding algorithm having a second characteristic for encoding a portion of an audio signal to obtain an encoded version of the portion of the audio signal has a first estimator for estimating a first quality measure for the portion of the audio signal, which is associated with the first encoding algorithm, without actually encoding and decoding the portion of the audio signal using the first encoding algorithm. A second estimator is provided for estimating a second quality measure for the portion of the audio signal, which is associated with the second encoding algorithm, without actually encoding and decoding the portion of the audio signal using the second encoding algorithm. The apparatus has a controller for selecting the first or second encoding algorithms based on a comparison between the first and second quality measures.

## Claims

### Claim 1

An apparatus for selecting one of a first encoding algorithm comprising a first characteristic and a second encoding algorithm comprising a second characteristic for encoding a portion of an audio signal to acquire an encoded version of the portion of the audio signal, comprising:
a first estimator for estimating a first quality measure for the portion of the audio signal, which is associated with the first encoding algorithm, without actually encoding and decoding the portion of the audio signal using the first encoding algorithm;
a second estimator for estimating a second quality measure for the portion of the audio signal, which is associated with the second encoding algorithm, without actually encoding and decoding the portion of the audio signal using the second encoding algorithm; and
a controller for selecting the first encoding algorithm or the second encoding algorithm based on a comparison between the first quality measure and the second quality measure,
wherein the second estimator is configured to determine an estimated adaptive codebook distortion for each sub-portion of a plurality of sub-portions of the portion of the audio signal, and wherein the second estimator is further configured to take an innovative codebook into consideration by reducing the estimated adaptive codebook distortion determined for each sub-portion of the portion of the audio signal using a constant factor.

### Claim 2 (depends on 1)

The apparatus of claim 1, wherein the first encoding algorithm is an encoding algorithm better suited for music-like and noise-like signals and the second algorithm is an encoding algorithm better suited for speech-like and transient-like signals.

### Claim 3 (depends on 2)

The apparatus of claim 2, wherein the first encoding algorithm is a transform coding algorithm, a MDCT (modified discrete cosine transform) based coding algorithm or a TCX (transform coding excitation) coding algorithm and wherein the second encoding algorithm is a CELP (code excited linear prediction) coding algorithm or an ACELP (algebraic code excited linear prediction) coding algorithm.

### Claim 4 (depends on 1)

The apparatus of claim 1, wherein the first and second estimators are configured to estimate the respective quality measure based on a portion of a weighted version of the audio signal.

### Claim 5 (depends on 1)

The apparatus of claim 1, wherein the first and second quality measures are SNRs (signal to noise ratio) or segmental SNRs of a portion of a weighted version of the audio signal.

### Claim 6 (depends on 1)

The apparatus of claim 1, wherein the first and second estimators are configured to estimate the respective quality measure based on the energy of a portion of a weighted version of the audio signal and based on an estimated distortion introduced when encoding the signal portion by the respective algorithm, wherein the first and second estimators are configured to determine the estimated distortions dependent on the energy of a portion of a weighted version of the audio signal.

### Claim 7 (depends on 1)

The apparatus of claim 1, wherein the first estimator is configured to determine an estimated quantizer distortion which a quantizer used in the first encoding algorithm would introduce when quantizing the portion of the audio signal and to estimate the first quality measure based on an energy of a portion of a weighted version of the audio signal and the estimated quantizer distortion.

### Claim 8 (depends on 7)

The apparatus of claim 7, wherein the first estimator is configured to estimate a global gain for the portion of the audio signal such that the portion of the audio signal would produce a given target bitrate when encoded with a quantizer and an entropy coder used in the first encoding algorithm, wherein the first estimator is further configured to determine the estimated quantizer distortion based on the estimated global gain.

### Claim 9 (depends on 7)

The apparatus of claim 7, wherein the first quality measure is a segmental SNR of a portion of the weighted audio signal and wherein the first estimator is configured to estimate the segmental SNR by calculating an estimated SNR associated with each of a plurality of sub-portions of the portion of the weighted audio signal based on an energy of the corresponding sub-portions of the weighted audio signal and the estimated quantizer distortion and by calculating an average of the SNRs associated with the sub-portions of the portion of the weighted audio signal to acquire the estimated segmental SNR for the portion of the weighted audio signal.

### Claim 10 (depends on 1)

The apparatus of claim 1, wherein the second estimator is configured to determine an estimated adaptive codebook distortion which an adaptive codebook used in the second encoding algorithm would introduce when using the adaptive codebook to encode the portion of the audio signal, and wherein the second estimator is configured to estimate the second quality measure based on an energy of a portion of a weighted version of the audio signal and the estimated adaptive codebook distortion.

### Claim 11 (depends on 10)

The apparatus of claim 10, wherein, for each of the plurality of sub-portions of the portion of the audio signal, the second estimator is configured to approximate the adaptive codebook based on a version of the sub-portion of the weighted audio signal shifted to the past by a pitch-lag determined in a pre-processing stage, to estimate an adaptive codebook gain such that an error between the sub-portion of the portion of the weighted audio signal and the approximated adaptive codebook is minimized, and to determine the estimated adaptive codebook distortion based on the energy of an error between the sub-portion of the portion of the weighted audio signal and the approximated adaptive codebook scaled by the adaptive codebook gain.

### Claim 12 (depends on 11)

The apparatus of claim 11, wherein the second quality measure is a segmental SNR of the portion of the weighted audio signal, and wherein the second estimator is configured to estimate the segmental SNR by calculating an estimated SNR associated with each sub-portion based on the energy of the corresponding sub-portion of the weighted audio signal and the estimated adaptive codebook distortion and by calculating an average of the SNRs associated with the sub-portions to acquire the estimated segmental SNR for the portion of the weighted audio signal.

### Claim 13 (depends on 10)

The apparatus of claim 10, wherein the second estimator is configured to approximate the adaptive codebook based on a version of the portion of the weighted audio signal shifted to the past by a pitch-lag determined in a pre-processing stage, to estimate an adaptive codebook gain such that an error between the portion of the weighted audio signal and the approximated adaptive codebook is minimized, and to determine the estimated adaptive codebook distortion based on the energy of an error between the portion of the weighted audio signal and the approximated adaptive codebook scaled by the adaptive codebook gain.

### Claim 14 (depends on 1)

The apparatus of claim 1, wherein the controller is configured to utilize a hysteresis in comparing the estimated quality measures.

### Claim 15 (depends on 1)

An apparatus for encoding a portion of an audio signal, comprising the apparatus according to claim 1, a first encoder stage for performing the first encoding algorithm and a second encoder stage for performing the second encoding algorithm, wherein the apparatus for encoding is configured to encode the portion of the audio signal using the first encoding algorithm or the second encoding algorithm depending on the selection by the controller.

### Claim 16 (depends on 15)

A system for encoding and decoding comprising an apparatus for encoding according to claim 15 and a decoder configured to receive the encoded version of the portion of the audio signal and an indication of the algorithm used to encode the portion of the audio signal and to decode the encoded version of the portion of the audio signal using the indicated algorithm.

### Claim 17

A method for selecting one of a first encoding algorithm comprising a first characteristic and a second encoding algorithm comprising a second characteristic for encoding a portion of an audio signal to acquire an encoded version of the portion of the audio signal, comprising:
estimating a first quality measure for the portion of the audio signal, which is associated with the first encoding algorithm, without actually encoding and decoding the portion of the audio signal using the first encoding algorithm;
estimating a second quality measure for the portion of the audio signal, which is associated with the second encoding algorithm, without actually encoding and decoding the portion of the audio signal using the second coding algorithm; and
selecting the first encoding algorithm or the second encoding algorithm based on a comparison between the first quality measure and the second quality measure,
wherein estimating the second quality measure comprises determining an estimated adaptive codebook distortion for each sub-portion of a plurality of sub-portions of the portion of the audio signal, and taking an innovative codebook into consideration by reducing the estimated adaptive codebook distortion determined for each sub-portion of the portion of the audio signal using a constant factor.

### Claim 18

A non-transitory digital storage medium having a computer program stored thereon to perform, when said computer program is run by a computer, a method for selecting one of a first encoding algorithm comprising a first characteristic and a second encoding algorithm comprising a second characteristic for encoding a portion of an audio signal to acquire an encoded version of the portion of the audio signal, comprising:
estimating a first quality measure for the portion of the audio signal, which is associated with the first encoding algorithm, without actually encoding and decoding the portion of the audio signal using the first encoding algorithm;
estimating a second quality measure for the portion of the audio signal, which is associated with the second encoding algorithm, without actually encoding and decoding the portion of the audio signal using the second coding algorithm; and
selecting the first encoding algorithm or the second encoding algorithm based on a comparison between the first quality measure and the second quality measure,
wherein estimating the second quality measure comprises determining an estimated adaptive codebook distortion for each sub-portion of a plurality of sub-portions of the portion of the audio signal, and taking an innovative codebook into consideration by reducing the estimated adaptive codebook distortion determined for each sub-portion of the portion of the audio signal using a constant factor.
