# US 2023/0421779 A1 · Decoding processing 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 2023/0421779 A1
- Document ID: US20230421779A1
- Status: Published application
- Kind: A1
- Application number: 18/243,621
- Filed: 2023-09-07
- Published: 2023-12-28
- Earliest claimed: 2021-08-20
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Zhenxiang WANG; Hongbin CAO; Sijia CHEN; Jia ZHANG; Yongcheng HUANG
- Web page: https://patentgrep.com/patent/US20230421779A1

## CPC

- H04N 19/172: the region being a picture, frame or field
- H04N 19/127: Prioritisation of hardware or computational resources
- H04N 19/156: Availability of hardware or computational resources, e.g. encoding based on power-saving criteria
- H04N 19/436: using parallelised computational arrangements
- H04N 19/44: Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
- H04N 21/434: Disassembling of a multiplex stream, e.g. demultiplexing audio and video streams, extraction of additional data from a video stream; Remultiplexing of multiplex streams; Extraction or processing of SI; Disassembling of packetised elementary stream {(demultiplexing of data packets for data networks, e.g. RTP/UDP H04L65/00)}
- H04N 21/4405: involving video stream decryption
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

In a method for decoding, a running state of a decoder that is performing hardware decoding on a plurality of first content data is acquired. When the running state of the decoder is determined to be in an idle state between the decoding of the plurality of first content data, second content data is acquired, the second content data being a copy of one of the plurality of first content data. Further, decoding is performed on the second content data by processing circuitry of the decoder.

## Claims

### Claim 1

A method for decoding, the method comprising:
acquiring a running state of a decoder that is performing hardware decoding on a plurality of first content data; and
when the running state of the decoder is determined to be in an idle state between the decoding of the plurality of first content data,
acquiring second content data, the second content data being a copy of one of the plurality of first content data, and
performing, by processing circuitry of the decoder, decoding on the second content data.

### Claim 2 (depends on 1)

The method according to claim 1, further comprising:
pausing the decoding of the second content data when the running state of the decoder switches from the idle state to a working state.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the first content data includes a multimedia data stream, the multimedia data stream including N data packets, M media frames are encapsulated in each of the N data packets, and N and M are both positive integers, and the method further comprises:
copying an i-th data packet of the multimedia data stream when the decoder receives the i-th data packet to obtain a cloned packet of the i-th data packet, the second content data including the cloned packet of the i-th data packet, i being a positive integer, and i being less than or equal to N;
performing decoding on media frames in the i-th data packet when the decoder is in a working state; and
outputting the media frames subjected to the decoding in the i-th data packet.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the cloned packet of the i-th data packet includes M cloned frames, and the M cloned frames have a one-to-one correspondence to the M media frames in the i-th data packet; and
the performing the decoding on the second content data in the idle state includes performing, by the decoder, the decoding processing on the cloned frames in the cloned packet of the i-th data packet in the idle state.

### Claim 5 (depends on 3)

The method according to claim 3, further comprising:
copying an (i+1)-th data packet of the multimedia data stream when the decoder receives the (i+1)-th data packet to obtain a cloned packet of the (i+1)-th data packet; and
deleting the cloned packet of the i-th data packet.

### Claim 6 (depends on 1)

The method according to claim 1, further comprising:
acquiring a performance parameter of the decoder that is performing the hardware decoding on the first plurality of content data; and
acquiring the running state of the decoder when the performance parameter of the decoder does not meet a performance indicator requirement.

### Claim 7 (depends on 6)

The method according to claim 6, wherein the performance parameter of the decoder includes an actual decoding duration of one of the first plurality of content data, and the performance indicator requirement includes a reference decoding frame rate; and the method further comprises:
determining an actual decoding frame rate of the decoder according to the actual decoding duration; and
determining that the performance parameter of the decoder does not meet the performance indicator requirement when the actual decoding frame rate of the decoder is less than the reference decoding frame rate.

### Claim 8 (depends on 6)

The method according to claim 6, wherein the first plurality of content data includes a plurality of media frames, the performance parameter of the decoder includes an actual decoding duration of each media frame in the first plurality of content data, the performance indicator requirement includes a reference decoding time series range; and the method further comprises:
calculating a decoding speed time series of the decoder according to the actual decoding duration of each media frame; and
determining that the performance parameter of the decoder does not meet the performance indicator requirement when the decoding speed time series of the decoder exceeds the reference decoding time series range.

### Claim 9 (depends on 8)

The method according to claim 8, wherein the reference decoding time series range includes reference decoding duration ranges respectively corresponding to the media frames, and the method further comprises:
determining, according to an actual decoding duration and a reference decoding duration range corresponding to a same media frame of the media frame, a target proportion of the media frames of which the actual decoding durations do not fall within the reference decoding duration ranges; and
determining that the decoding speed time series of the decoder exceeds the reference decoding time series range when the target proportion is greater than or equal to a proportion threshold.

### Claim 10 (depends on 9)

The method according to claim 9, further comprising:
determining, according to the actual decoding duration of a first media frame in the first plurality of content data, the reference decoding duration ranges respectively corresponding to the media frames.

### Claim 11 (depends on 1)

The method according to claim 1, wherein a first thread, a second thread, a third thread, and a fourth thread are configured to run in parallel in the decoder;
the first thread is configured to perform the hardware decoding on the first plurality of content data;
the second thread is configured to sequentially output the first plurality of content data subjected to the decoding processing;
the third thread is configured to copy the first plurality of content data to obtain the second content data; and
the fourth thread is configured to acquire the running state of the decoder, and acquire and decode the second content data when the decoder is in the idle state.

### Claim 12 (depends on 1)

The method according to claim 1, wherein the first content data includes a cloud gaming video stream, and the method further comprises:
acquiring a scenario requirement that indicates a decoding mode of the cloud gaming video stream; and
acquiring the running state of the decoder that is performing the hardware decoding on the cloud gaming video stream when the scenario requirement indicates that an accelerated decoding mode is required for the cloud gaming video stream.

### Claim 13

A decoding apparatus, comprising:
processing circuitry configured to:
acquire a running state of a decoder that is performing hardware decoding on a plurality of first content data; and
when the running state of the decoder is determined to be in an idle state between the decoding of the plurality of first content data,
acquire second content data, the second content data being a copy of one of the plurality of first content data, and
perform decoding on the second content data.

### Claim 14 (depends on 13)

The decoding apparatus according to claim 13, wherein the processing circuitry is configured to:
pause the decoding of the second content data when the running state of the decoder switches from the idle state to a working state.

### Claim 15 (depends on 13)

The decoding apparatus according to claim 13, wherein the first content data includes a multimedia data stream, the multimedia data stream including N data packets, M media frames are encapsulated in each of the N data packets, and N and M are both positive integers, and the processing circuitry is configured to:
copy an i-th data packet of the multimedia data stream when the decoder receives the i-th data packet to obtain a cloned packet of the i-th data packet, the second content data including the cloned packet of the i-th data packet, i being a positive integer, and i being less than or equal to N;
perform decoding on media frames in the i-th data packet when the decoder is in a working state; and
output the media frames subjected to the decoding in the i-th data packet.

### Claim 16 (depends on 15)

The decoding apparatus according to claim 15, wherein the cloned packet of the i-th data packet includes M cloned frames, and the M cloned frames have a one-to-one correspondence to the M media frames in the i-th data packet; and
the processing circuitry is configured to perform the decoding on the cloned frames in the cloned packet of the i-th data packet in the idle state.

### Claim 17 (depends on 15)

The decoding apparatus according to claim 15, wherein the processing circuitry is configured to:
copy an (i+1)-th data packet of the multimedia data stream when the decoder receives the (i+1)-th data packet to obtain a cloned packet of the (i+1)-th data packet; and
delete the cloned packet of the i-th data packet.

### Claim 18 (depends on 13)

The decoding apparatus according to claim 13, wherein the processing circuitry is configured to:
acquire a performance parameter of the decoder that is performing the hardware decoding on the first plurality of content data; and
acquire a running state of the decoder when the performance parameter of the decoder does not meet a performance indicator requirement.

### Claim 19 (depends on 18)

The decoding apparatus according to claim 18, wherein
the performance parameter of the decoder includes an actual decoding duration of one of the first plurality of content data, and the performance indicator requirement includes a reference decoding frame rate; and
the processing circuitry is configured to:
determine an actual decoding frame rate of the decoder according to the actual decoding duration; and
determine that the performance parameter of the decoder does not meet the performance indicator requirement when the actual decoding frame rate of the decoder is less than the reference decoding frame rate.

### Claim 20

A non-transitory computer-readable storage medium, storing instructions which when executed by a processor cause the processor to perform:
acquiring a running state of a decoder that is performing hardware decoding on a plurality of first content data; and
when the running state of the decoder is determined to be in an idle state between the decoding of the plurality of first content data,
acquiring second content data, the second content data being a copy of one of the plurality of first content data, and
performing decoding on the second content data.
