# US 12,604,017 B2 · Encoding method, encapsulation method, display method, apparatus, and electronic device

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

- Number: US 12,604,017 B2
- Document ID: US12604017B2
- Status: Granted
- Kind: B2
- Application number: 18/589,756
- Filed: 2024-02-28
- Published: 2024-06-20
- Granted: 2026-04-14
- Earliest claimed: 2021-08-30
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Peiyun Di; Xin Liu; Yi Song; Xiaoyu Yang; Xuejian Gong
- Web page: https://patentgrep.com/patent/US12604017B2

## CPC

- H04N 19/30: using hierarchical techniques, e.g. scalability (H04N19/63 takes precedence)
- H04N 19/65: using error resilience
- H04N 19/105: Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
- H04N 19/115: Selection of the code volume for a coding unit prior to coding
- H04N 19/136: Incoming video signal characteristics or properties
- H04N 19/142: Detection of scene cut or scene change
- H04N 19/164: Feedback from the receiver or from the transmission channel
- H04N 19/172: the region being a picture, frame or field
- H04N 19/192: the adaptation method, adaptation tool or adaptation type being iterative or recursive
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

The technology of this application relates to an encoding method, an encapsulation method, a display method, an apparatus, and an electronic device. The encoding method includes obtaining a to-be-encoded image, determining N encoding scales (N is an integer greater than 1) for the image, determining an encoding parameter corresponding to each of the N encoding scales, to obtain N groups of encoding parameters, and encoding the image N times by using a preset single-scale encoder based on the N groups of encoding parameters to obtain N groups of bitstream data. In this way, the image is encoded to obtain the bitstream data with a small data amount (namely, the bitstream data with a low encoding scale), so that when a network fluctuates, the bitstream data corresponding to the image can arrive at a decoder side with a higher probability, thereby ensuring smoothness of video playing.

## Claims

### Claim 1

An encoding method, comprising:
obtaining an image for encoding;
determining N encoding scales for the image, wherein N is an integer greater than 1;
determining N groups of encoding parameters corresponding to the N encoding scales, wherein each encoding scale, from the N encoding scales, corresponds to one group of encoding parameters from the N groups of encoding parameters; and
obtaining N groups of bitstream data by encoding the image N times by repeatedly using a single-scale encoder based on the N groups of encoding parameters, wherein the single-scale encoder is an encoder that can perform encoding on an image at only one encoding scale and output bitstream data at only one encoding scale, and
wherein the method further comprises:
determining whether to perform multi-scale encoding on the image in association with at least one of: an importance of the image to encoding and decoding of another image in video data to which the image belongs satisfies a first condition, an impact degree of bitstream data corresponding to the image on a network satisfies a second condition, or a predicted image quality of the image satisfies a third condition.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the first condition comprises at least one of:
the image is an I frame or an IDR frame;
the image is a scene switching frame;
the image is a reference frame; or
the image is a key frame.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the second condition comprises at least one of:
a data amount of bitstream data corresponding to the image is greater than a data amount threshold; and
the data amount of the bitstream data corresponding to the image is greater than a network transmission capability.

### Claim 4 (depends on 1)

The method according to claim 1, wherein
the predicted image quality of the image includes a first predicted image quality and a second predicted image quality, the first predicted image quality is of the image that is encoded based on a source resolution of the image, and the second predicted image quality is of the image that is encoded based on a resolution lower than the source resolution; and
the third condition comprises:
the first predicted image quality is lower than or equal to the second predicted image quality.

### Claim 5 (depends on 1)

The method according to claim 1, wherein an encoding parameter, from the N groups of encoding parameters, includes at least one of: a resolution, a quantization parameter, reference frame information, or a target bit rate.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the N groups of encoding parameters are determined based on the N encoding scales and a parameter value range of the encoder.

### Claim 7 (depends on 1)

The method according to claim 1, wherein
an encoding parameter, from the N groups of encoding parameters, includes reference frame information,
when first feedback information is received, the reference frame information is determined based on the first feedback information,
the first feedback information indicates that an encoded frame corresponding to sent bitstream data is successfully received,
the encoded frame is acknowledged as a reference frame, and
the reference frame information indicates the reference frame.

### Claim 8

A data encapsulation method, comprising:
obtaining bitstream data by encoding an image using an encoder, wherein the encoder is a single-scale encoder that can perform encoding on an image at only one encoding scale and output bitstream data at only one encoding scale, and wherein the method further comprises determining whether to perform multi-scale encoding on the image in association with at least one of: an importance of the image to encoding and decoding of another image in video data to which the image belongs satisfies a first condition, an impact degree of bitstream data corresponding to the image on a network satisfies a second condition, or a predicted image quality of the image satisfies a third condition;
obtaining description information of the bitstream data;
obtaining encapsulated data by encapsulating the bitstream data and the description information of the bitstream data; and
storing or transmitting the encapsulated data.

### Claim 9 (depends on 8)

The method according to claim 8, wherein
the description information includes scale identification information, and
the method further comprises:
when, based on the scale identification information, an encoding scale corresponding to the bitstream data is a lowest encoding scale, determining that a transmission policy of the bitstream data is a first transmission policy; or
when, based on the scale identification information, the encoding scale corresponding to the bitstream data is another encoding scale, determining that the transmission policy of the bitstream data is a second transmission policy, wherein
the first transmission policy is superior to the second transmission policy.

### Claim 10

A display method, comprising:
obtaining a plurality of reconstructed images by decoding bitstream data using a decoder, wherein the bitstream data is generated by encoding an image using a single-scale encoder that can perform encoding of an image at only one encoding scale and output bitstream data corresponding to only one encoding scale, and wherein the encoding of the image is performed in association with determining whether to perform multi-scale encoding on the image based on at least one of: an importance of the image to encoding and decoding of another image in video data to which the image belongs satisfies a first condition, an impact degree of bitstream data corresponding to the image on a network satisfies a second condition, or a predicted image quality of the image satisfies a third condition;
obtaining a plurality of groups of description information corresponding to the plurality of reconstructed images, wherein at least one group of description information, in the plurality of groups of description information, includes first frame identification information; and
in association with only one of the plurality of groups of description information includes the first frame identification information, selecting and displaying a reconstructed image corresponding to the first frame identification information, or
in association with at least two groups of description information, in the plurality of groups of description information, include the first frame identification information, selecting a reconstructed image from at least two reconstructed images corresponding to the first frame identification information, and displaying the selected reconstructed image.

### Claim 11 (depends on 10)

The method according to claim 10, wherein the description information, from the plurality of groups of description information, further comprises scale identification information, and selecting the reconstructed image from the at least two reconstructed images corresponding to the first frame identification information comprises:
selecting, based on the scale identification information of the at least two reconstructed images corresponding to the first frame identification information, a reconstructed image with a highest encoding scale.

### Claim 12 (depends on 10)

The method according to claim 10, wherein the description information, from the plurality of groups of description information, further comprises scale identification information, and selecting the reconstructed image from the at least two reconstructed images corresponding to the first frame identification information comprises:
selecting, based on the scale identification information of the at least two reconstructed images corresponding to the first frame identification information, a reconstructed image whose scale identification information is closest to scale identification information of a previously displayed reconstructed image.

### Claim 13

An electronic device, comprising:
a processor; and
a memory configured to store program instructions which, when executed by the processor, cause the electronic device to:
obtain an image for encoding;
determine N encoding scales for the image, wherein Nis an integer greater than 1;
determine N groups of encoding parameters corresponding to the N encoding scales, wherein each encoding scale, from the N encoding scales, corresponds to one group of encoding parameters from the N groups of encoding parameters; and
obtain N groups of bitstream data by encoding the image N times by repeatedly using a single-scale encoder based on the N groups of encoding parameters, wherein the single-scale encoder is an encoder that can perform encoding on an image at only one encoding scale and output bitstream data at only one encoding scale, and
wherein the program instructions further cause the electronic device to determine whether to perform multi-scale encoding on the image in association with at least one of: an importance of the image to encoding and decoding of another image in video data to which the image belongs satisfies a first condition, an impact degree of bitstream data corresponding to the image on a network satisfies a second condition, or a predicted image quality of the image satisfies a third condition.

### Claim 14 (depends on 13)

The electronic device according to claim 13, wherein the N groups of encoding parameters are determined based on the N encoding scales and a parameter value range of the encoder.

### Claim 15 (depends on 13)

The electronic device according to claim 13, wherein
an encoding parameter, from the N groups of encoding parameters, includes reference frame information,
when first feedback information is received, the reference frame information is determined based on the first feedback information,
the first feedback information indicates that an encoded frame corresponding to sent bitstream data is successfully received,
the encoded frame is acknowledged as a reference frame, and
the reference frame information indicates the reference frame.

### Claim 16 (depends on 1)

A chip, comprising:
one or more interface circuits; and
one or more processors, wherein the one or more interface circuits are configured to:
receive a signal from a memory of an electronic device, and
send the signal to the one or more processors, wherein the signal comprises computer instructions stored in the memory, and when the one or more processors execute the computer instructions, the electronic device is caused to perform the method according to claim 1.

### Claim 17 (depends on 1)

A computer-readable storage medium comprising a computer program, and when the computer program is executed on a computer or a processor, the computer or the processor is caused to perform the method according to claim 1.

### Claim 18 (depends on 1)

A computer program product comprising a software program, and when the software program is executed by a computer or a processor, the method according to claim 1 is performed.
