# US 2025/0220190 A1 · Video decoding method and apparatus, electronic device, computer-readable storage medium, and computer program product

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

- Number: US 2025/0220190 A1
- Document ID: US20250220190A1
- Status: Published application
- Kind: A1
- Application number: 19/042,088
- Filed: 2025-01-31
- Published: 2025-07-03
- Earliest claimed: 2023-01-12
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Shenming Feng; Sihong Chen
- Web page: https://patentgrep.com/patent/US20250220190A1

## CPC

- H04N 19/132: Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
- H04N 19/70: characterised by syntax aspects related to video coding, e.g. related to compression standards
- H04N 19/146: Data rate or code amount at the encoder output
- H04N 19/159: Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
- H04N 19/172: the region being a picture, frame or field
- H04N 19/177: the unit being a group of pictures [GOP]
- H04N 19/44: Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
- H04N 21/234381: {by altering the temporal resolution, e.g. decreasing the frame rate by frame skipping}
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A video decoding method includes performing video stream analysis on a to-be-decoded video to obtain a frame data packet of video frames in the to-be-decoded video; determining frame types of the video frames based on frame attribute information in the frame data packet; determining target sampling frames from the to-be-decoded video based on a quantity of key frames; obtaining rendering data from frame buffers; and performing video decoding on the to-be-decoded video based on the rendering data to obtain a decoded video corresponding to the to-be-decoded video.

## Claims

### Claim 1

A video decoding method, performed by an electronic device, comprising:
performing video stream analysis on a to-be-decoded video to obtain a frame data packet of a first plurality of video frames in the to-be-decoded video, wherein the video stream analysis comprises parsing an encapsulated data packet that encapsulates video frame information in the to-be-decoded video;
determining a plurality of frame types of the first plurality of video frames based on frame attribute information in the frame data packet, a frame type comprising a key frame and a non-key frame;
determining a first plurality of target sampling frames from the to-be-decoded video based on a first quantity of a plurality of key frames, the first plurality of target sampling frames being a second plurality of video frames configured for providing rendering data when rendering the to-be-decoded video, and the rendering data being stored in a plurality of frame buffers corresponding to the first plurality of target sampling frames;
obtaining the rendering data from the plurality of frame buffers; and
performing video decoding on the to-be-decoded video based on the rendering data to obtain a decoded video corresponding to the to-be-decoded video.

### Claim 2 (depends on 1)

The video decoding method according to claim 1, wherein the determining the first plurality of target sampling frames comprises:
setting a second quantity of the first plurality of target sampling frames; and
determining a second plurality of target sampling frames that come from the plurality of key frames based on the first quantity and the second quantity, or determining a third plurality of target sampling frames from the plurality of key frames and one or more non-key frames based on the first quantity and the second quantity.

### Claim 3 (depends on 2)

The video decoding method according to claim 2, wherein the setting the second quantity comprises:
determining an application scenario type of the decoded video; and
setting the second quantity based on the application scenario type, or setting the second quantity based on a duration of the to-be-decoded video.

### Claim 4 (depends on 2)

The video decoding method according to claim 2, wherein the determining the second plurality of target sampling frames comprises:
determining a first frame sampling step for the plurality of key frames based on the first quantity being greater than the second quantity;
determining a fourth plurality of target sampling frames having the first quantity based on the first frame sampling step; and
determining the plurality of key frames as the second plurality of target sampling frames based on the first quantity being equal to the second quantity.

### Claim 5 (depends on 4)

The video decoding method according to claim 4, wherein the determining the first frame sampling step comprises:
determining a first ratio between the first quantity and the second; and
performing rounding processing on the first ratio to obtain the first frame sampling step.

### Claim 6 (depends on 2)

The video decoding method according to claim 2, wherein the determining the second plurality of target sampling frames comprises:
determining a second frame sampling step for the one or more non-key frames based on the first quantity being less than the second quantity;
determining a difference between the second quantity and the first quantity as a non-key frame sampling quantity;
determining the plurality of key frames as the second plurality of target sampling frames; and
determining a fourth plurality of target sampling frames having the non-key frame sampling quantity from the one or more non-key frames based on the second frame sampling step.

### Claim 7 (depends on 6)

The video decoding method according to claim 6, wherein the one or more non-key frames comprise a plurality of forward difference frames and a plurality of bi-directional difference frames,
wherein the method further comprises deleting the plurality of bi-directional difference frames from a video frame sequence corresponding to the to-be-decoded video, and
wherein the determining the fourth plurality of target sampling frames comprises:
determining a fifth plurality of target sampling frames having the non-key frame sampling quantity from the plurality of forward difference frames based on the second frame sampling step.

### Claim 8 (depends on 7)

The video decoding method according to claim 7, wherein the determining the second frame sampling step comprises:
obtaining a third quantity of the plurality of forward difference frames;
determining a second ratio between the third quantity and the non-key frame sampling quantity; and
performing rounding processing on the second ratio to obtain the second frame sampling step.

### Claim 9 (depends on 1)

The video decoding method according to claim 1, wherein the determining the frame type comprises:
obtaining the frame attribute information in the frame data packet, the frame attribute information comprising a first frame type of a corresponding video frame; and
parsing the frame attribute information to obtain a second frame type of a video frame corresponding to the frame data packet.

### Claim 10 (depends on 2)

The video decoding method according to claim 2, wherein the determining the second plurality of target sampling frames comprises:
determining a video frame sequence formed by the plurality of key frames and the one or more non-key frames;
obtaining a frame index sequence corresponding to the video frame sequence;
determining the second plurality of target sampling frames from the video frame sequence based on the first quantity; and determining a plurality of frame indexes of the second plurality of target sampling frames based on the frame index sequence.

### Claim 11

A video decoding apparatus, comprising:
at least one memory configured to store computer program code; and
at least one processor configured to read the program code and operate as instructed by the program code, the program code comprising:
video stream analysis code configured to cause at least one of the at least one processor to perform video stream analysis on a to-be-decoded video to obtain a frame data packet of a first plurality of video frames in the to-be-decoded video, wherein the video stream analysis comprises parsing an encapsulated data packet that encapsulates video frame information in the to-be-decoded video;
first determining code configured to cause at least one of the at least one processor to determine a plurality of frame types of the first plurality of video frames based on frame attribute information in the frame data packet, a frame type comprising a key frame and a non-key frame;
second determining code configured to cause at least one of the at least one processor to determine a first plurality of target sampling frames from the to-be-decoded video based on a first quantity of a plurality of key frames, the first plurality of target sampling frames being a second plurality of video frames configured for providing rendering data when rendering the to-be-decoded video, and the rendering data being stored in a plurality of frame buffers corresponding to the first plurality of target sampling frames;
obtaining code configured to cause at least one of the at least one processor to obtain the rendering data from the plurality of frame buffers; and
video decoding code configured to cause at least one of the at least one processor to perform video decoding on the to-be-decoded video based on the rendering data to obtain a decoded video corresponding to the to-be-decoded video.

### Claim 12 (depends on 11)

The video decoding apparatus according to claim 11, wherein the second determining code is configured to cause at least one of the at least one processor to:
set a second quantity of the first plurality of target sampling frames; and
determine a second plurality of target sampling frames that come from the plurality of key frames based on the first quantity and the second quantity, or determine a third plurality of target sampling frames from the plurality of key frames and one or more non-key frames based on the first quantity and the second quantity.

### Claim 13 (depends on 12)

The video decoding apparatus according to claim 12, wherein the setting the second determining code is configured to cause at least one of the at least one processor to:
determine an application scenario type of the decoded video; and
setting the second quantity based on the application scenario type, or setting the second quantity based on a duration of the to-be-decoded video.

### Claim 14 (depends on 12)

The video decoding apparatus according to claim 12, wherein the second determining code is configured to cause at least one of the at least one processor to:
determine a first frame sampling step for the plurality of key frames based on the first quantity being greater than the second quantity;
determine a fourth plurality of target sampling frames having the first quantity based on the first frame sampling step; and
determine the plurality of key frames as the second plurality of target sampling frames based on the first quantity being equal to the second quantity.

### Claim 15 (depends on 14)

The video decoding apparatus according to claim 14, wherein the second determining code is configured to cause at least one of the at least one processor to:
determine a first ratio between the first quantity and the second; and
perform rounding processing on the first ratio to obtain the first frame sampling step.

### Claim 16 (depends on 12)

The video decoding apparatus according to claim 12, wherein the second determining code is configured to cause at least one of the at least one processor to:
determine a second frame sampling step for the one or more non-key frames based on the first quantity being less than the second quantity;
determine a difference between the second quantity and the first quantity as a non-key frame sampling quantity;
determine the plurality of key frames as the second plurality of target sampling frames; and
determine a fourth plurality of target sampling frames having the non-key frame sampling quantity from the one or more non-key frames based on the second frame sampling step.

### Claim 17 (depends on 16)

The video decoding apparatus according to claim 16, wherein the one or more non-key frames comprise a plurality of forward difference frames and a plurality of bi-directional difference frames,
wherein the program code further comprises deleting code configured to cause at least one of the at least one processor to delete the plurality of bi-directional difference frames from a video frame sequence corresponding to the to-be-decoded video, and
wherein the second determining code is configured to cause at least one of the at least one processor to determine a fifth plurality of target sampling frames having the non-key frame sampling quantity from the plurality of forward difference frames based on the second frame sampling step.

### Claim 18 (depends on 17)

The video decoding apparatus according to claim 17, wherein the second determining code is configured to cause at least one of the at least one processor to:
obtain a third quantity of the plurality of forward difference frames;
determine a second ratio between the third quantity and the non-key frame sampling quantity; and
perform rounding processing on the second ratio to obtain the second frame sampling step.

### Claim 19 (depends on 11)

The video decoding apparatus according to claim 11, wherein the first determining code is configured to cause at least one of the at least one processor to:
obtain the frame attribute information in the frame data packet, the frame attribute information comprising a first frame type of a corresponding video frame; and
parse the frame attribute information to obtain a second frame type of a video frame corresponding to the frame data packet.

### Claim 20

A non-transitory computer-readable storage medium, storing computer code which, when executed by at least one processor, causes the at least one processor to at least:
perform video stream analysis on a to-be-decoded video to obtain a frame data packet of a first plurality of video frames in the to-be-decoded video, wherein the video stream analysis comprises parsing an encapsulated data packet that encapsulates video frame information in the to-be-decoded video;
determine a plurality of frame types of the first plurality of video frames based on frame attribute information in the frame data packet, a frame type comprising a key frame and a non-key frame;
determine a first plurality of target sampling frames from the to-be-decoded video based on a first quantity of a plurality of key frames, the first plurality of target sampling frames being a second plurality of video frames configured for providing rendering data when rendering the to-be-decoded video, and the rendering data being stored in a plurality of frame buffers corresponding to the first plurality of target sampling frames;
obtain the rendering data from the plurality of frame buffers; and
perform video decoding on the to-be-decoded video based on the rendering data to obtain a decoded video corresponding to the to-be-decoded video.
