Search

CN-122027799-A - Soft and hard decoding mode switching acceleration control method and system

CN122027799ACN 122027799 ACN122027799 ACN 122027799ACN-122027799-A

Abstract

The invention discloses a method and a system for controlling the switching acceleration of a soft decoding mode and a hard decoding mode, which are used for acquiring a working log of a terminal during video playing, extracting a task execution plan of the terminal from the working log, estimating a CPU load state of the terminal according to the task execution plan, monitoring a playing change request during video playing so as to determine a plurality of decoding tasks for video data, determining a decoding mode for executing the decoding tasks according to the decoding tasks and the CPU load state, wherein the decoding mode comprises soft decoding or hard decoding, and controlling a decoder to release decoding context delay according to a decoding process during the switching of the decoding mode for executing the decoding tasks. The decoding requirement during video playing and the CPU load state of the terminal are monitored, the corresponding decoding mode is determined, the decoding context is adopted for delayed release, a large amount of memory application release time is prevented from being occupied, and decoding waiting time delay and video playing blocking are prevented.

Inventors

  • YU DAN
  • LAN YUQING
  • ZHENG HAN
  • Xing Zhihuan

Assignees

  • 慧之安信息技术股份有限公司

Dates

Publication Date
20260512
Application Date
20251228

Claims (8)

  1. 1. The soft/hard decoding mode switching acceleration control method is characterized by comprising the following steps: acquiring a work log of a terminal during video playing, and extracting a task execution plan of the terminal from the work log; monitoring a play change request during video play so as to determine a plurality of decoding tasks for video data, and determining a decoding mode for executing the decoding tasks according to the decoding tasks and the CPU load state, wherein the decoding mode comprises soft decoding or hard decoding; And during the decoding mode switching period of executing the decoding tasks, controlling the decoder to release the decoding context delay according to the decoding process.
  2. 2. The soft/hard decoding mode switching acceleration control method according to claim 1, wherein: the method comprises the steps of obtaining a work log of a terminal during video playing, extracting a task execution plan of the terminal from the work log, estimating a CPU load state of the terminal according to the task execution plan, and comprises the following steps: analyzing a trigger instruction received by a video playing program in a terminal, and judging whether the video playing program starts video playing work or not; acquiring a working log of the terminal of the video playing program during video playing, and planning according to respective task execution of all program parties in an active state in the terminal, wherein the task execution plan comprises the number of subordinate processes of the task being executed by each program and the process content; and estimating the CPU load state of the terminal according to the required computing power resources and the real-time resource allocation strategy of the terminal.
  3. 3. The soft/hard decoding mode switching acceleration control method according to claim 1, wherein: Monitoring a play change request during video play so as to determine a plurality of decoding tasks for video data; determining a decoding mode for executing the decoding tasks according to the decoding tasks and the CPU load state, wherein the decoding mode comprises the following steps: monitoring a play change request during video playing according to a port where a video playing program in the terminal is located, wherein the play change request comprises a play resolution change; Determining a plurality of decoding tasks for the video data according to the resolution change execution time partition corresponding to the play change request and the resolution change target value thereof, wherein each decoding task corresponds to one resolution change execution time partition; Judging whether overload occurs in the execution time partition range of each decoding task of the terminal according to the execution time partition range and the resolution ratio change target value of the decoding tasks and the CPU load state, if so, determining to perform hard decoding mode processing on the decoding tasks, and if not, determining to perform soft decoding mode processing on the decoding tasks.
  4. 4. The soft/hard decoding mode switching acceleration control method according to claim 1, wherein: During the decoding mode switching period of executing the decoding tasks, controlling the decoder to release the decoding context delay according to the decoding process, including: Determining the occurrence time node for switching soft decoding to hard decoding and switching the hard decoding to soft decoding in the whole process of executing the decoding tasks according to the execution time sequence and decoding modes of the decoding tasks; And determining the occurrence process of switching soft decoding to hard decoding or switching hard decoding to soft decoding according to the occurrence time node, so as to control the decoder to release the decoding context delay with preset waiting time length.
  5. 5. The soft/hard decoding mode switching acceleration control system is characterized by comprising: The task plan extraction module is used for obtaining a work log of the terminal during video playing and extracting a task execution plan of the terminal from the work log; the CPU load estimation module is used for estimating the CPU load state of the terminal according to the task execution plan; the decoding task determining module is used for monitoring a play change request during video play so as to determine a plurality of decoding tasks for video data; The decoding mode determining module is used for determining a decoding mode for executing the decoding tasks according to the decoding tasks and the CPU load state, wherein the decoding mode comprises soft decoding or hard decoding; and the decoding delay control module is used for controlling the decoder to release the decoding context delay according to the decoding process during the decoding mode switching period of executing the decoding tasks.
  6. 6. The soft and hard decoding mode switching acceleration control system of claim 5, wherein: the task plan extracting module is used for obtaining a work log of a terminal during video playing, extracting a task execution plan of the terminal from the work log, and comprises the following steps: analyzing a trigger instruction received by a video playing program in a terminal, and judging whether the video playing program starts video playing work or not; acquiring a working log of the terminal of the video playing program during video playing, and planning according to respective task execution of all program parties in an active state in the terminal, wherein the task execution plan comprises the number of subordinate processes of the task being executed by each program and the process content; the CPU load estimation module is used for estimating the CPU load state of the terminal according to the task execution plan, and comprises the following steps: and estimating the CPU load state of the terminal according to the required computing power resources and the real-time resource allocation strategy of the terminal.
  7. 7. The soft and hard decoding mode switching acceleration control system of claim 5, wherein: The decoding task determining module is configured to monitor a play change request during video playing, so as to determine a plurality of decoding tasks for video data, including: monitoring a play change request during video playing according to a port where a video playing program in the terminal is located, wherein the play change request comprises a play resolution change; Determining a plurality of decoding tasks for the video data according to the resolution change execution time partition corresponding to the play change request and the resolution change target value thereof, wherein each decoding task corresponds to one resolution change execution time partition; the decoding mode determining module is configured to determine, according to the plurality of decoding tasks and the CPU load status, a decoding mode for executing the plurality of decoding tasks, including: Judging whether overload occurs in the execution time partition range of each decoding task of the terminal according to the execution time partition range and the resolution ratio change target value of the decoding tasks and the CPU load state, if so, determining to perform hard decoding mode processing on the decoding tasks, and if not, determining to perform soft decoding mode processing on the decoding tasks.
  8. 8. The soft and hard decoding mode switching acceleration control system of claim 5, wherein: The decoding delay control module is configured to control a decoder to perform decoding context delay release according to a decoding process during a decoding mode switching period when the plurality of decoding tasks are executed, and includes: Determining the occurrence time node for switching soft decoding to hard decoding and switching the hard decoding to soft decoding in the whole process of executing the decoding tasks according to the execution time sequence and decoding modes of the decoding tasks; And determining the occurrence process of switching soft decoding to hard decoding or switching hard decoding to soft decoding according to the occurrence time node, so as to control the decoder to release the decoding context delay with preset waiting time length.

Description

Soft and hard decoding mode switching acceleration control method and system Technical Field The invention relates to the technical field of video data processing, in particular to a soft and hard decoding mode switching acceleration control method and system. Background The soft decoding and the hard decoding are common decoding modes for video playing, wherein the soft decoding is realized by depending on a CPU through a software algorithm, the load on the CPU is larger, and the hard decoding is realized by utilizing special hardware such as a GPU or a decoding chip, and the like, so that the load on the CPU is smaller. In the actual decoding process, the switching from soft decoding to hard decoding or vice versa is required for different decoding requirements, each time the decoding mode is switched, the currently used decoder is closed and the other decoder is opened again, the memory is released when the decoder is closed, and then the memory is applied again when the other decoder is opened again. Particularly, the continuous switching of the soft and hard decoding modes in a short time can occupy a large amount of memory application release time, so that waiting time delay is formed to a certain extent, the continuity and stability of video playing are affected, and the video playing is blocked. Disclosure of Invention The method is characterized in that the fact that the existing soft and hard decoding mode is continuously switched and memory application is required to be repeated is considered, so that a large amount of memory application release time is occupied, decoding waiting time delay and video playing clamping and stopping are caused. In view of the above problems, the present invention has been made to provide a soft/hard decoding mode switching acceleration control method that overcomes or at least partially solves the above problems, including: acquiring a work log of a terminal during video playing, and extracting a task execution plan of the terminal from the work log; monitoring a play change request during video play so as to determine a plurality of decoding tasks for video data, and determining a decoding mode for executing the decoding tasks according to the decoding tasks and the CPU load state, wherein the decoding mode comprises soft decoding or hard decoding; And during the decoding mode switching period of executing the decoding tasks, controlling the decoder to release the decoding context delay according to the decoding process. Optionally, acquiring a work log of a terminal during video playing, extracting a task execution plan of the terminal from the work log, and estimating a CPU load state of the terminal according to the task execution plan, wherein the method comprises the following steps: analyzing a trigger instruction received by a video playing program in a terminal, and judging whether the video playing program starts video playing work or not; acquiring a working log of the terminal of the video playing program during video playing, and planning according to respective task execution of all program parties in an active state in the terminal, wherein the task execution plan comprises the number of subordinate processes of the task being executed by each program and the process content; and estimating the CPU load state of the terminal according to the required computing power resources and the real-time resource allocation strategy of the terminal. Optionally, monitoring a play change request during video play to determine a plurality of decoding tasks for video data, and determining a decoding mode for executing the plurality of decoding tasks according to the plurality of decoding tasks and the CPU load state, wherein the method comprises the following steps: monitoring a play change request during video playing according to a port where a video playing program in the terminal is located, wherein the play change request comprises a play resolution change; Determining a plurality of decoding tasks for the video data according to the resolution change execution time partition corresponding to the play change request and the resolution change target value thereof, wherein each decoding task corresponds to one resolution change execution time partition; Judging whether overload occurs in the execution time partition range of each decoding task of the terminal according to the execution time partition range and the resolution ratio change target value of the decoding tasks and the CPU load state, if so, determining to perform hard decoding mode processing on the decoding tasks, and if not, determining to perform soft decoding mode processing on the decoding tasks. Optionally, during the execution of the decoding tasks to switch the decoding modes, controlling the decoder to release the decoding context delay according to the decoding process, including: Determining the occurrence time node for switching soft decoding to hard decoding and switching the hard decodin