# US 2021/0344938 A1 · Video decoding method and apparatus, computer device, and storage medium

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

- Number: US 2021/0344938 A1
- Document ID: US20210344938A1
- Status: Published application
- Kind: A1
- Application number: 17/377,370
- Filed: 2021-07-15
- Published: 2021-11-04
- Earliest claimed: 2019-06-12
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Cunai HAN
- Web page: https://patentgrep.com/patent/US20210344938A1

## CPC

- H04N 19/159: Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
- H04N 19/42: characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation (H04N19/635 takes precedence)
- 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/136: Incoming video signal characteristics or properties
- H04N 19/172: the region being a picture, frame or field
- H04N 19/44: Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
- H04N 19/65: using error resilience
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A video decoding method includes: obtaining target type information of a target video upon receiving a play instruction of the target video, the target type information indicating a type of the target video; obtaining specified type information of a plurality of decoders configured in a terminal, the specified type information of the decoders indicating types of videos of which decoding is supported by the decoders; and determining, from the plurality of decoders by comparing the specified type information of the plurality of decoders with the target type information, a target decoder that supports decoding of the target video. The target video is decoded by using the target decoder to play a decoded video.

## Claims

### Claim 1

A video decoding method, applied to a computer device, the method comprising:
obtaining target type information of a target video upon receiving a play instruction of the target video, the target type information indicating a type of the target video;
obtaining specified type information of a plurality of decoders configured in a terminal, the specified type information of the decoders indicating types of videos of which decoding is supported by the decoders;
determining, from the plurality of decoders by comparing the specified type information of the plurality of decoders with the target type information, a target decoder that supports decoding of the target video; and
decoding the target video by using the target decoder to play a decoded video.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the target video comprises a plurality of original video frames, and the decoding the target video by using the target decoder to play a decoded video comprises:
decoding, when at least one target decoder that supports decoding of the target video is determined, a first original video frame by using a first target decoder in the at least one target decoder to obtain a first decoded video frame corresponding to the first original video frame, the first original video frame being any original video frame in the target video; and
playing the first decoded video frame, and storing the first original video frame in a first buffer region.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the target video comprises a plurality of original video frames, and the decoding the target video by using the target decoder to play a decoded video comprises:
decoding, when a plurality of target decoders that support decoding of the target video are determined, a second original video frame by using a first target decoder in the plurality of target decoders, the second original video frame being any original video frame in the target video;
when the decoding of the second original video frame fails,
determining a moment of the second original video frame;
storing the second original video frame in a first buffer region; and
decoding, by using a second target decoder in the plurality of target decoders, an original video frame that is in the first buffer region and has a moment the same as the moment of the second original video frame, to obtain a second decoded video frame, and playing the second decoded video frame.

### Claim 4 (depends on 2)

The method according to claim 2, wherein the target video comprises at least one video frame sequence, each video frame sequence comprises a start video frame; and the method further comprises:
when decoding of any start video frame in the target video by using the first target decoder succeeds or fails, deleting a stored original video frame in the first buffer region, and storing the start video frame in the first buffer region.

### Claim 5 (depends on 3)

The method according to claim 3, wherein the target video comprises at least one video frame sequence, each video frame sequence comprises a start video frame; and the decoding, by using a second target decoder in the plurality of target decoders, an original video frame that is in the first buffer region and has a moment the same as the moment of the second original video frame, to obtain a second decoded video frame, and playing the second decoded video frame comprises:
decoding any start video frame in the first buffer region by using the second target decoder to obtain a decoded video frame corresponding to the start video frame;
discarding the decoded video frame when a moment of the start video frame is different from the moment of the second original video frame; and
continuing to decode a next original video frame to obtain a corresponding decoded video frame, and playing, when a moment of a currently decoded original video frame is the same as the moment of the second original video frame, a second decoded video frame corresponding to the original video frame.

### Claim 6 (depends on 3)

The method according to claim 3, wherein after the decoding, by using a second target decoder in the plurality of target decoders, an original video frame that is in the first buffer region and has a moment the same as the moment of the second original video frame, to obtain a second decoded video frame, and playing the second decoded video frame, the method further comprises:
decoding a third original video frame in a second buffer region by using the second target decoder to obtain a third decoded video frame, and playing the third decoded video frame, the second buffer region being used for storing the target video, the third original video frame being an original video frame at a next moment of the moment of the second original video frame.

### Claim 7 (depends on 1)

The method according to claim 1, wherein before the obtaining specified type information of a plurality of decoders configured in a terminal, the method further comprises:
obtaining a historical decoding record, the historical decoding record comprising at least one decoding record entry, each decoding record entry comprising type information of a decoded video and a correspondence between a decoder that decodes the video and a decoding result, the decoding result comprising decoding success or decoding failure;
obtaining, for each decoder from the historical decoding record, a decoding record entry that comprises the decoder and in which a comprised decoding result is decoding success; and
obtaining the specified type information of the decoder according to type information in the obtained decoding record entry.

### Claim 8 (depends on 1)

The method according to claim 1, wherein before the obtaining specified type information of a plurality of decoders configured in a terminal, the method further comprises:
obtaining a historical playing record, the historical playing record comprising at least one playing record entry, each playing record entry comprising type information of a played video and a correspondence between a decoder that decodes the video before playing and a playing result, the playing result being one of playing success and playing failure;
obtaining, for each decoder from the historical playing record, a playing record entry indicating a decoder and a playing result corresponding to the decoder being playing success; and
obtaining the specified type information of the decoder according to type information in the obtained playing record entry.

### Claim 9 (depends on 1)

The method according to claim 1, wherein the determining, from the plurality of decoders by comparing the specified type information of the plurality of decoders with the target type information, a target decoder that supports decoding of the target video comprises:
determining, from the plurality of decoders by comparing the specified type information of the plurality of decoders with the target type information, a plurality of target decoders that support decoding of the target video; and
selecting a target decoder with the highest priority from the plurality of target decoders according to priorities of the plurality of target decoders.

### Claim 10 (depends on 1)

The method according to claim 1, wherein the determining, from the plurality of decoders by comparing the specified type information of the plurality of decoders with the target type information, a target decoder that supports decoding of the target video comprises:
obtaining a level of a user identifier currently logged in;
selecting, from the plurality of decoders, a plurality of decoders matching the level; and
determining the target decoder by comparing the specified type information of the plurality of decoders matching the level with the target type information.

### Claim 11

A computer device, comprising a processor and a memory, the memory storing computer instructions, the computer instructions, when loaded by the processor, implement operations comprising:
obtaining target type information of a target video upon receiving a play instruction of the target video, the target type information indicating a type of the target video;
obtaining specified type information of a plurality of decoders configured in a terminal, the specified type information of the decoders indicating types of videos of which decoding is supported by the decoders;
determining, from the plurality of decoders by comparing the specified type information of the plurality of decoders with the target type information, a target decoder that supports decoding of the target video; and
decoding the target video by using the target decoder to play a decoded video.

### Claim 12 (depends on 11)

The computer device according to claim 11, wherein the target video comprises a plurality of original video frames, and the instruction, the program, the code set, or the instruction set is loaded by the processor to implement:
decoding, when at least one target decoder that supports decoding of the target video is determined, a first original video frame by using a first target decoder in the at least one target decoder to obtain a first decoded video frame corresponding to the first original video frame, the first original video frame being any original video frame in the target video; and
playing the first decoded video frame, and storing the first original video frame in a first buffer region.

### Claim 13 (depends on 11)

The computer device according to claim 11, wherein the target video comprises a plurality of original video frames, and the instruction, the program, the code set, or the instruction set is loaded by the processor to implement:
decoding, when a plurality of target decoders that support decoding of the target video are determined, a second original video frame by using a first target decoder in the plurality of target decoders, the second original video frame being any original video frame in the target video, and determining, when the decoding of the second original video frame fails, a moment of the second original video frame; storing the second original video frame in a first buffer region; and
decoding, by using a second target decoder in the plurality of target decoders, an original video frame that is in the first buffer region and has a moment the same as the moment of the second original video frame, to obtain a second decoded video frame, and playing the second decoded video frame.

### Claim 14 (depends on 13)

The computer device according to claim 13, wherein the target video comprises at least one video frame sequence, each video frame sequence comprises a start video frame; and the instruction, the program, the code set, or the instruction set is loaded by the processor to implement:
when decoding of any start video frame in the target video by using the first target decoder succeeds or fails, deleting a stored original video frame in the first buffer region, and storing the start video frame in the first buffer region.

### Claim 15 (depends on 13)

The computer device according to claim 13, wherein the target video comprises at least one video frame sequence, each video frame sequence comprises a start video frame; and the instruction, the program, the code set, or the instruction set is loaded by the processor to implement:
decoding any start video frame in the first buffer region by using the second target decoder to obtain a decoded video frame corresponding to the start video frame;
discarding the decoded video frame when a moment of the start video frame is different from the moment of the second original video frame; and
continuing to decode a next original video frame to obtain a corresponding decoded video frame, and playing, when a moment of a currently decoded original video frame is the same as the moment of the second original video frame, a second decoded video frame corresponding to the original video frame.

### Claim 16 (depends on 13)

The computer device according to claim 13, wherein the instruction, the program, the code set, or the instruction set is loaded by the processor to implement:
decoding a third original video frame in a second buffer region by using the second target decoder to obtain a third decoded video frame, and playing the third decoded video frame, the second buffer region being used for storing the target video, the third original video frame being an original video frame at a next moment of the moment of the second original video frame.

### Claim 17 (depends on 11)

The computer device according to claim 11, wherein the instruction, the program, the code set, or the instruction set is loaded by the processor to implement:
obtaining a historical decoding record, the historical decoding record comprising at least one decoding record entry, each decoding record entry comprising type information of a decoded video and a correspondence between a decoder that decodes the video and a decoding result, the decoding result comprising decoding success or decoding failure;
obtaining, for each decoder from the historical decoding record, a decoding record entry that comprises the decoder and in which a comprised decoding result is decoding success; and obtaining the specified type information of the decoder according to type information in the obtained decoding record entry.

### Claim 18 (depends on 11)

The computer device according to claim 11, wherein the instruction, the program, the code set, or the instruction set is loaded by the processor to implement:
obtaining a historical playing record, the historical playing record comprising at least one playing record entry, each playing record entry comprising type information of a played video and a correspondence between a decoder that decodes the video before playing and a playing result, the playing result being one of playing success and playing failure;
obtaining, for each decoder from the historical playing record, a playing record entry indicating a decoder and a playing result corresponding to the decoder being playing success; and
obtaining the specified type information of the decoder according to type information in the obtained playing record entry.

### Claim 19 (depends on 11)

The computer device according to claim 11, wherein the instruction, the program, the code set, or the instruction set is loaded by the processor to implement:
determining, from the plurality of decoders by comparing the specified type information of the plurality of decoders with the target type information, a plurality of target decoders that support decoding of the target video; and
selecting a target decoder with the highest priority from the plurality of target decoders according to priorities of the plurality of target decoders.

### Claim 20

A non-transitory computer-readable storage medium, storing computer instructions, the computer instructions, when executed by a processor, implement operations comprising:
obtaining target type information of a target video upon receiving a play instruction of the target video, the target type information indicating a type of the target video;
obtaining specified type information of a plurality of decoders configured in a terminal, the specified type information of the decoders indicating types of videos of which decoding is supported by the decoders;
determining, from the plurality of decoders by comparing the specified type information of the plurality of decoders with the target type information, a target decoder that supports decoding of the target video; and
decoding the target video by using the target decoder to play a decoded video.
