Video processing method, device and related equipment

By parsing the video encoded data stream and generating parallel CABAC entropy decoding tasks, the problem of the decoder's inability to process data in parallel is solved, and efficient video decoding is achieved.

CN119629349BActive Publication Date: 2026-06-12BEIJING DAJIA INTERNET INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
Filing Date
2024-11-29
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

In existing technologies, decoders cannot achieve parallel processing of CABAC, resulting in slow decoder speeds in multi-threaded environments, which cannot meet the requirements for efficient video decoding.

Method used

By parsing the video encoded data stream, parallel CABAC entropy decoding tasks are generated and placed into a task queue. These tasks are then processed using a multi-threaded approach to achieve parallel processing of CABAC entropy decoding.

🎯Benefits of technology

It improves the decoding speed of the decoder and enhances decoding efficiency in a multi-threaded environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119629349B_ABST
    Figure CN119629349B_ABST
Patent Text Reader

Abstract

The present disclosure provides a video processing method and device and related equipment, and relates to the technical field of video processing. The method comprises: obtaining an encoded data stream of a video, the video comprising a plurality of video frames, each video frame comprising a plurality of slices; for each slice, parsing the encoded data stream of the video to obtain slice data stream of the slice and header information of the slice data stream, triggering generation of an entropy decoding task of the slice, and putting the entropy decoding task of the slice into a task queue, the entropy decoding task being an entropy decoding task using CABAC; selecting a to-be-processed task from the task queue in a multi-thread parallel manner; and performing parallel processing on the to-be-processed task according to the slice data stream corresponding to the to-be-processed task and the header information of the slice data stream corresponding to the to-be-processed task. The method realizes parallel processing of CABAC entropy decoding, and improves the decoding speed of a decoder.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of video processing technology, and in particular to a video processing method, video processing apparatus, electronic device, computer-readable storage medium, and computer program product. Background Technology

[0002] In a video codec framework, the entropy coding module encodes video residuals and encoded information into a binary bitstream that can be stored and transmitted. At the decoding end, the entropy decoding module performs the opposite operation, restoring the stored and transmitted binary bitstream back into the video residuals and encoded information.

[0003] CABAC (Context-Adaptive Binary Arithmetic Coding) is an entropy coding technique in video coding standards. If CABAC is used for entropy coding at the encoding end, the corresponding entropy decoding process is used at the decoding end. However, in related technologies, the decoder cannot implement parallel processing of CABAC, affecting the decoder speed in a multi-threaded environment.

[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] This disclosure provides a video processing method, video processing apparatus, electronic device, computer-readable storage medium, and computer program product to overcome or at least partially solve the above-mentioned problems.

[0006] This disclosure provides a video processing method, the method comprising: acquiring an encoded data stream of a video; the video comprising multiple video frames, each video frame comprising multiple segments; for each segment, parsing the encoded data stream of the video to obtain a segment data stream and header information of the segment data stream; triggering the generation of an entropy decoding task for the segment, and placing the entropy decoding task for the segment into a task queue; the entropy decoding task being an entropy decoding task performed using CABAC; selecting a task to be processed from the task queue using a multi-threaded parallel approach; and performing parallel processing on the task to be processed according to the segment data stream corresponding to the task to be processed and the header information of the segment data stream corresponding to the task to be processed; the segment data stream corresponding to the task to be processed being the segment data stream corresponding to the segment to which the task to be processed belongs.

[0007] In some embodiments of this disclosure, the segment includes at least one coding tree unit; wherein, triggering the generation of the entropy decoding task of the segment and placing the entropy decoding task of the segment into a task queue includes: triggering the generation of the entropy decoding task of the at least one coding tree unit based on a preset triggering and generation rule for the entropy decoding task, and placing the generated entropy decoding task into the task queue.

[0008] In some embodiments of this disclosure, the step of triggering the generation of entropy decoding tasks for the at least one coding tree unit based on a preset entropy decoding task triggering generation rule, and placing the generated entropy decoding tasks into the task queue, includes: triggering the generation of an entropy decoding task for a first coding tree unit among the at least one coding tree unit, and placing the entropy decoding task of the first coding tree unit into the task queue; the first coding tree unit is the first coding tree unit to be decoded in the segment; taking the first coding tree unit as the current coding tree unit, triggering the generation of one or more entropy decoding tasks for a second coding tree unit based on the preset entropy decoding task triggering generation rule, and placing the entropy decoding tasks of the one or more second coding tree units into the task queue; taking the second coding tree unit as the new current coding tree unit, continuing to trigger the generation of entropy decoding tasks for coding tree units among the at least one coding tree unit based on the preset entropy decoding task triggering generation rule, and placing the generated entropy decoding tasks into the task queue, until the entropy decoding tasks of all coding tree units in the at least one coding tree unit are triggered and placed into the task queue.

[0009] In some embodiments of this disclosure, the preset entropy decoding task triggering generation rules include at least one of the following options: in response to completing the entropy decoding task of the current coding tree unit, triggering the generation of an entropy decoding task for the right coding tree unit of the current coding tree unit; in response to completing the entropy decoding task of the current coding tree unit, triggering the generation of an entropy decoding task for the lower coding tree unit of the current coding tree unit; in response to completing the entropy decoding task of the current coding tree unit, triggering the generation of an entropy decoding task for the next coding tree unit of the current coding tree unit; the next coding tree unit of the current coding tree unit is determined according to a specific scanning or processing order.

[0010] In some embodiments of this disclosure, the method further includes: storing the fragmented data stream of the fragment into a bitstream memory.

[0011] In some embodiments of this disclosure, the method further includes: dividing the fragmented data stream into at least one sub-fragmented data stream; for each sub-fragmented data stream, allocating a memory pointer for the sub-fragmented data stream; the memory pointer is used to locate the position in the bitstream memory where the sub-fragmented data stream is stored.

[0012] In some embodiments of this disclosure, the method further includes: updating the current decoding position index of the sub-segment data stream during the decoding process; the current decoding position index of the sub-segment data stream is used to indicate the position where the sub-segment data stream is currently parsed.

[0013] In some embodiments of this disclosure, the method further includes: allocating multiple entropy decoders according to the number of threads, so that each entropy decoder corresponds to one thread; selecting a sub-segment data stream to be processed from different sub-segment data streams in a multi-threaded parallel manner, and performing entropy decoding on the sub-segment data stream to be processed using the allocated entropy decoders.

[0014] This disclosure provides a video processing apparatus, comprising: a data stream acquisition module configured to acquire an encoded data stream of a video; the video includes multiple video frames, each video frame including multiple segments; a data stream parsing module configured to parse the encoded data stream of the video for each segment to obtain a segment data stream and header information of the segment data stream; trigger the generation of an entropy decoding task for the segment, and place the entropy decoding task for the segment into a task queue; the entropy decoding task is an entropy decoding task performed using CABAC; and a processing module configured to select a task to be processed from the task queue in a multi-threaded parallel manner; and to perform parallel processing on the task to be processed according to the segment data stream corresponding to the task to be processed and the header information of the segment data stream corresponding to the task to be processed; the segment data stream corresponding to the task to be processed is the segment data stream corresponding to the segment to which the task to be processed belongs.

[0015] This disclosure provides an electronic device, including: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the executable instructions to implement the video processing method described above.

[0016] This disclosure provides a computer-readable storage medium that, when the instructions in the computer-readable storage medium are executed by the processor of an electronic device, enables the electronic device to perform the video processing method described above.

[0017] This disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the video processing method described above.

[0018] The video processing method provided in this disclosure parses the encoded video data stream to obtain the segment data stream and header information of each segment, providing a foundation for subsequent decoding processing. After parsing the header information of each segment's segment data stream, it triggers the generation of a CABAC entropy decoding task for that segment and places the CABAC entropy decoding task for that segment into a task queue. Then, it uses a multi-threaded approach to select multiple CABAC entropy decoding tasks from the task queue for parallel processing, thereby realizing parallel processing of CABAC entropy decoding and improving the decoding speed of the decoder.

[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0021] Figure 1 A schematic diagram of the decoder's memory and data structures in related technologies is shown;

[0022] Figure 2 A schematic diagram of an exemplary system architecture to which the video processing method of the present disclosure embodiments can be applied is shown;

[0023] Figure 3 A flowchart of a video processing method according to an embodiment of the present disclosure is shown;

[0024] Figure 4 A flowchart illustrating the CABAC entropy decoding task that triggers the generation of each CTU in an embodiment of this disclosure is shown.

[0025] Figure 5 A decoder architecture diagram is shown that can implement the video processing method of the embodiments of this disclosure;

[0026] Figure 6 A schematic diagram of the decoder's memory and data structures in an embodiment of this disclosure is shown;

[0027] Figure 7 A block diagram of a video processing apparatus according to an embodiment of the present disclosure is shown;

[0028] Figure 8 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation

[0029] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, they are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted.

[0030] The features, structures, or characteristics described in this disclosure can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more specific details omitted, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this disclosure.

[0031] The collection, updating, analysis, processing, use, transmission, and storage of user personal information disclosed herein comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken to prevent unauthorized access to user personal information data and to safeguard user personal information security, network security, and national security.

[0032] The accompanying drawings are merely illustrative of this disclosure, and the same reference numerals in the drawings denote the same or similar parts, thus omitting repeated descriptions of them. Some block diagrams shown in the drawings do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in at least one hardware module or integrated circuit, or in different network and / or processor devices and / or microcontroller devices.

[0033] The flowchart shown in the accompanying drawings is merely illustrative and does not necessarily include all content and steps, nor does it require execution in the described order. For example, some steps may be broken down, while others may be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0034] In this specification, the terms “a,” “one,” “the,” “the,” and “at least one” are used to indicate the presence of at least one element / component / etc.; the term “multiple” refers to two or more; the terms “comprising,” “including,” and “having” are used to indicate an open-ended inclusion meaning and that other elements / components / etc. may exist in addition to the listed elements / components / etc.; the terms “first,” “second,” and “third,” etc., are used only as markings and are not a limitation on the number of objects.

[0035] In video encoding and decoding frameworks, if CABAC is used for entropy encoding at the encoding end, the corresponding entropy decoding process is used at the decoding end. Current mainstream video coding standards provide algorithm specifications such as WPP (Wavefront Parallel Processing) for parallel processing of CABAC, but they do not specify how to implement parallel processing of CABAC. Due to limitations in data structures, bitstream memory structures, and other design aspects, decoders cannot implement parallel processing of CABAC, affecting decoder speed in multi-threaded environments.

[0036] Figure 1 A schematic diagram of the decoder's memory and data structures in related technologies is shown. Figure 1 In this process, for an input video stream file, the decoder sequentially reads the bitstream of each NALU (Network Abstraction Layer Unit) within the AU (Access Unit) and stores the bitstream in a single bitstream memory, then decodes each NALU serially. In video coding standards, the AU is the basic unit of data that can be randomly accessed and decoded. An AU typically corresponds to a complete frame of an image or a group of images that can be decoded independently. An AU can contain one or more NALUs, and the NALU is the actual container holding the encoded video data.

[0037] For the entropy decoder, decoding begins with the first bit of each NALU bitstream stored in memory and continues until all bits have been decoded. From the video's perspective, this means the decoder starts decoding from the first CTU (Coding Tree Unit) of each frame, sequentially decoding each CTU in raster scan order until all CTUs in that frame have been decoded.

[0038] In related technologies, decoders employ a single bitstream memory and a single entropy decoder state management, which presents the following problems: the decoder can only decode each segment of the video frame serially, and cannot achieve parallel decoding between NALUs; the decoder can only perform serial entropy decoding, and cannot perform parallel entropy decoding. This means that in practical applications, the speed of multi-threaded decoders is slowed down by the serial entropy decoding process. Therefore, decoders in related technologies suffer from low parallel processing capability and slow decoding speed.

[0039] To address the aforementioned issues, this disclosure provides a video processing method, apparatus, and related devices. The method parses the encoded video data stream to obtain the segment data stream and header information of each segment, providing a foundation for subsequent decoding. After parsing the header information of each segment's data stream, it triggers the generation of a CABAC entropy decoding task for that segment and places the task into a task queue. Then, it employs a multi-threaded approach to select multiple CABAC entropy decoding tasks from the task queue for parallel processing, achieving parallel processing of CABAC entropy decoding and improving the decoder's decoding speed.

[0040] Figure 2 A schematic diagram of an exemplary system architecture to which the video processing method of the present disclosure can be applied is shown.

[0041] like Figure 2 As shown, the system architecture may include a server 201, a network 202, and a client 203. The network 202 serves as the medium for providing a communication link between the client 203 and the server 201. The network 202 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0042] In an exemplary embodiment, the client 203 that transmits data with the server 201 may include, but is not limited to, smartphones, tablets, laptops, smart speakers, digital assistants, AR (Augmented Reality) devices, VR (Virtual Reality) devices, smart wearable devices, etc. Alternatively, the client 203 may also be a personal computer, such as a laptop computer or a desktop computer. Optionally, the operating system running on the electronic device may include, but is not limited to, Android, iOS, Linux, Windows, etc.

[0043] Server 201 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In some practical applications, server 201 can also be a server for a network platform, such as a trading platform, live streaming platform, social platform, or audio platform, etc., which is not limited in this embodiment. The server can be a single server or a cluster of multiple servers, and the specific architecture of the server is not limited in this disclosure.

[0044] In some embodiments of this disclosure, the server 201 may perform the following video processing steps: acquire the encoded data stream of a video, wherein the video includes multiple video frames, and each video frame includes multiple segments; for each segment, parse the encoded data stream of the video to obtain the segment data stream and the header information of the segment data stream; trigger the entropy decoding task for generating the segment, and place the entropy decoding task for the segment into a task queue; select a task to be processed from the task queue in a multi-threaded parallel manner; and perform parallel processing on the task to be processed according to the segment data stream corresponding to the task to be processed and the header information of the segment data stream corresponding to the task to be processed, wherein the segment data stream corresponding to the task to be processed is the segment data stream corresponding to the segment to which the task to be processed belongs.

[0045] In addition, it should be noted that, Figure 2 The example shown is merely one application environment of the video encoding parameter processing method provided in this disclosure. Figure 2 The number of clients 203, networks 202, and servers 201 shown is merely illustrative; any number of clients, networks, and servers can be used as needed.

[0046] Figure 3 A flowchart of a video processing method according to an embodiment of this disclosure is shown. Figure 3 The execution subject of the method provided in the embodiments can be any electronic device, such as... Figure 2 Server 201 in the embodiment, for example Figure 2 The client's 203 error, for example... Figure 2 In this embodiment, server 201 and client 203 jointly implement the video processing method, but this disclosure is not limited thereto. See also... Figure 3 The video processing method provided in this disclosure includes the following steps.

[0047] Step S310: Obtain the encoded data stream of the video; wherein the video includes multiple video frames, and each video frame includes multiple segments.

[0048] In this embodiment of the disclosure, the encoded data stream of the video refers to the bitstream obtained by encoding the video. The video includes multiple video frames, and each video frame is divided into multiple segments.

[0049] Step S320: For each segment, parse the encoded video data stream to obtain the segment data stream and the header information of the segment data stream; trigger the entropy decoding task to generate the segment and put the segment entropy decoding task into the task queue; wherein, the entropy decoding task is an entropy decoding task performed using CABAC.

[0050] In this embodiment of the disclosure, the encoded video data stream is parsed to obtain the segment data stream of each segment and the header information of that segment data stream. In one possible implementation, one segment corresponds to one NALU, that is, one NALU contains the segment data stream of one segment.

[0051] In this embodiment of the disclosure, for a single data segment, after parsing and obtaining the header information of the segment's data stream, an entropy decoding task for that segment is triggered, and the entropy decoding task for that segment is placed in a task queue. The task queue is used to store tasks waiting to be processed, and it may be, but is not limited to, a first-in, first-out (FIFO) data structure.

[0052] In this embodiment, the entropy decoding task is an entropy decoding task performed using CABAC. CABAC is a commonly used, efficient entropy coding method in video coding standards. CABAC optimizes coding efficiency by utilizing the statistical characteristics of the encoded data, and corresponding CABAC entropy decoding is also required at the decoding end to recover the original data.

[0053] In one possible implementation, the decoder includes a header parser and a triggered parallel decoder. The encoded video data stream is input into the header parser, which sequentially reads the segmented data streams of each video frame from the input encoded video data stream and parses the header information of each segmented data stream. After parsing the header information of a segmented data stream, a CABAC entropy decoding task for that segment is triggered and placed into the task queue of the triggered parallel decoder. Here, the CABAC entropy decoding task refers to an entropy decoding task performed using CABAC.

[0054] Step S330: Using a multi-threaded parallel approach, select tasks to be processed from the task queue; perform parallel processing on the tasks to be processed based on the data stream segments corresponding to the tasks and their header information; wherein, the data stream segments corresponding to the tasks to be processed are the data stream segments corresponding to the segments to which the tasks to be processed belong.

[0055] In this embodiment, the task queue stores sliced ​​CABAC entropy decoding tasks. In a multi-threaded environment, a corresponding number of CABAC entropy decoding tasks are selected from the task queue based on the number of idle threads. Then, the CABAC entropy decoding tasks are processed in parallel according to the sliced ​​data stream corresponding to the slice to which the selected CABAC entropy decoding tasks belong and the header information of the sliced ​​data stream, thus realizing parallel processing of CABAC.

[0056] In the video processing method provided in this embodiment, the encoded video data stream is parsed to obtain the segment data stream and header information of each segment, providing a foundation for subsequent decoding processing. After parsing the header information of each segment's segment data stream, a CABAC entropy decoding task for that segment is triggered and placed into a task queue. Then, multiple CABAC entropy decoding tasks are selected from the task queue in a multi-threaded manner for parallel processing, thereby realizing parallel processing of CABAC entropy decoding and improving the decoding speed of the decoder.

[0057] In some embodiments of this disclosure, the fragment includes at least one CTU. Triggering the entropy decoding task to generate the fragment and placing the entropy decoding task into a task queue may include: triggering the entropy decoding task to generate at least one CTU based on a preset triggering rule for the entropy decoding task, and placing the generated entropy decoding task into the task queue.

[0058] In this embodiment of the disclosure, the analysis of the encoded data stream of the video is further refined to the CTU level, where CTU is the basic processing unit in video encoding and decoding, and each segment is divided into segments containing at least one CTU.

[0059] In this embodiment of the disclosure, for each segment, after parsing the segment data stream and the header information of the segment data stream, a CABAC entropy decoding task for that segment (i.e., an entropy decoding task performed using CABAC) is triggered. Specifically, based on a preset triggering and generation rule for entropy decoding tasks, a CABAC entropy decoding task for each CTU can be triggered sequentially, and the CABAC entropy decoding task for each CTU can be placed in a task queue.

[0060] In some embodiments of this disclosure, the preset rules for triggering and generating entropy decoding tasks include at least one of the following options:

[0061] (1) In response to the completion of the entropy decoding task of the current CTU, trigger the generation of the entropy decoding task of the right CTU of the current CTU.

[0062] In this embodiment of the disclosure, after the current CTU completes the CABAC entropy decoding task, the CABAC entropy decoding task of the right CTU of the current CTU can be triggered.

[0063] (2) In response to the completion of the entropy decoding task of the current CTU, trigger the generation of the entropy decoding task of the lower CTU of the current CTU.

[0064] In this embodiment of the disclosure, when WPP is enabled, after the current CTU completes the CABAC entropy decoding task, the CABAC entropy decoding task of the lower CTU of the current CTU can be triggered.

[0065] (3) In response to the completion of the entropy decoding task of the current CTU, the entropy decoding task of the next CTU of the current CTU is triggered; the next CTU of the current CTU is determined according to a specific scanning or processing order.

[0066] In this embodiment of the disclosure, CTUs can be processed according to a specific scanning or processing order, such as zigzag scanning, progressive scanning, etc. In this case, after the current CTU completes the CABAC entropy decoding task, a CABAC entropy decoding task for the subsequent CTU can be triggered.

[0067] In this embodiment of the disclosure, dependency rules between CTUs can also be pre-configured, including at least one of the following options:

[0068] (1) The generation of the entropy decoding task of the current CTU depends on the completion of the entropy decoding task of the CTU to the left of the current CTU.

[0069] In this embodiment of the disclosure, before performing entropy decoding on the current CTU, it is ensured that the CTU to the left of the current CTU has already completed the CABAC entropy decoding task. That is, for the current CTU, after the CTU to its left has completed the CABAC entropy decoding task, the generation of the CABAC entropy decoding task for the current CTU can be triggered.

[0070] (2) The generation of the current CTU's entropy decoding task depends on the completion of the entropy decoding task of the upper CTU of the current CTU.

[0071] In this embodiment of the disclosure, before performing entropy decoding on the current CTU, it is ensured that the CTU above the current CTU has completed the CABAC entropy decoding task. That is, for the current CTU, after the CTU above it has completed the CABAC entropy decoding task, the generation of the CABAC entropy decoding task for the current CTU can be triggered.

[0072] (3) In a specific scanning or processing sequence, the triggering of the entropy decoding task of the current CTU depends on the completion of the entropy decoding task of the previous CTU.

[0073] In this embodiment of the disclosure, CTUs can be processed according to a specific scanning or processing order, such as zigzag scanning, progressive scanning, etc. In this case, before performing entropy decoding processing on the current CTU, it is ensured that the CTU preceding the current CTU has completed the CABAC entropy decoding task. That is, for the current CTU, after the preceding CTU has completed the CABAC entropy decoding task, the generation of the current CTU's CABAC entropy decoding task can be triggered.

[0074] (4) The triggering of the CABAC entropy decoding task of the current CTU depends on the initialization of the segment where the current CTU is located.

[0075] In this embodiment of the disclosure, for each CTU in a slice, the CABAC entropy decoding task for generating the CTU in that slice can only be triggered after the slice is initialized. Specifically, the CABAC context variables of the slice are initialized. Through slice-level initialization, the latest context information can be utilized when decoding the CTU in the slice, thereby improving decoding efficiency.

[0076] In the video processing method provided in this disclosure, a triggering and generation rule for entropy decoding tasks is pre-set. For example, after the current CTU completes its CABAC entropy decoding task, it can trigger the generation of CABAC entropy decoding tasks for the adjacent right, bottom, or next CTU according to a specific scanning order. This effectively manages and schedules CABAC decoding tasks, ensuring that each CTU only triggers the generation of CABAC entropy decoding tasks after the CABAC entropy decoding tasks of its dependent CTUs are completed.

[0077] In some embodiments of this disclosure, based on preset entropy decoding task triggering and generation rules, triggering the generation of entropy decoding tasks for at least one CTU, and placing the generated entropy decoding tasks into a task queue, includes: triggering the generation of entropy decoding tasks for a first CTU among at least one CTU, and placing the entropy decoding tasks for the first CTU into the task queue; the first CTU is the first CTU to be decoded in the segment; taking the first CTU as the current CTU, triggering the generation of entropy decoding tasks for one or more second CTUs based on the preset entropy decoding task triggering and generation rules, and placing the entropy decoding tasks for one or more second CTUs into the task queue; taking the second CTU as the new current CTU, continuing to trigger the generation of entropy decoding tasks for CTUs among at least one CTU based on the preset entropy decoding task triggering and generation rules, and placing the generated entropy decoding tasks into the task queue, until the entropy decoding tasks for all CTUs in at least one CTU are triggered and generated and placed into the task queue.

[0078] In this embodiment of the disclosure, the fragment includes at least one CTU, and the first CTU to be decoded among the at least one CTU is designated as the first CTU. For example, the CTU located in the upper left corner of the fragment is the first CTU of the fragment.

[0079] In this embodiment of the disclosure, the CABAC entropy decoding tasks for all CTUs in the slice can be generated in the following manner:

[0080] (1) Trigger the CABAC entropy decoding task for generating the first CTU and put the CABAC entropy decoding task for the first CTU into the task queue.

[0081] (2) Take the first CTU as the current CTU, and trigger the generation of one or more CABAC entropy decoding tasks for the second CTU based on the preset entropy decoding task triggering generation rules, and put the generated CABAC entropy decoding tasks into the task queue.

[0082] Here, one or more second CTUs refer to CTUs associated with the first CTU. For example, one or more second CTUs may include the following options.

[0083] (3) Determine whether to generate CABAC entropy decoding tasks for all CTUs in the fragment.

[0084] In this embodiment of the disclosure, determining whether to generate CABAC entropy decoding tasks for all CTUs in a slice means whether there are other CTUs in the slice whose CABAC entropy decoding tasks have not been generated.

[0085] (4) If no CABAC entropy decoding task is generated for all CTUs in the shard, then for each second CTU, the second CTU is taken as the new current CTU, and based on the preset entropy decoding task triggering generation rule, the entropy decoding task of the CTU related to the second CTU is triggered and the generated entropy decoding task is put into the task queue.

[0086] For each second CTU, the number of CTUs associated with that second CTU is one or more. For example, the CTUs associated with that second CTU may include one or more of the following options: the CTU to the right of the second CTU, the CTU below the second CTU, and a CTU that follows the second CTU based on the scan order.

[0087] (5) Perform the above step (3) to determine whether the CABAC entropy decoding task for all CTUs in the slice has been generated. If the CABAC entropy decoding task for all CTUs in the slice has not been generated, the CTU related to the second CTU will be determined as the new current CTU. Continue to generate the CABAC entropy decoding task for other CTUs in the slice (i.e., CTUs for which the CABAC entropy decoding task has not yet been generated) based on the preset entropy decoding task triggering generation rules and put them into the task queue until the CABAC entropy decoding task for all CTUs in the slice has been generated and put into the task queue.

[0088] Figure 4 A flowchart illustrating the CABAC entropy decoding task that triggers the generation of each CTU in an embodiment of this disclosure is shown. (Refer to...) Figure 4 You can trigger the CABAC entropy decoding task for each CTU by following these steps.

[0089] Step S401: After parsing the fragmented data stream and the header information of the fragmented data stream, confirm that the first CTU to be decoded in the fragment is the current CTU.

[0090] Step S402: Trigger the generation of the CABAC entropy decoding task for the current CTU and put the CABAC entropy decoding task for the current CTU into the task queue.

[0091] Step S403: Determine whether CABAC entropy decoding tasks for all CTUs in the fragment have been generated.

[0092] Step S404: If not, that is, the CABAC entropy decoding tasks for all CTUs in the slice have not yet been generated, then after completing the CABAC entropy decoding task for the current CTU, based on the preset triggering and generation rules for entropy decoding tasks, determine the CTU related to the current CTU as the new current CTU, and return to step S402.

[0093] Among them, the CTU associated with the current CTU can be determined based on the preset entropy decoding task triggering generation rules, and can include one or more of the following options: the CTU to the right of the current CTU, the CTU below the current CTU, and a CTU that is ranked after the current CTU based on the scanning order.

[0094] Step S405: If yes, then confirm that CABAC entropy decoding tasks for all CTUs in the fragment have been generated.

[0095] In the video processing method provided in this embodiment, based on a preset entropy decoding task trigger generation rule, the CABAC entropy decoding task of each CTU in the segment is triggered sequentially and placed in the task queue. This ensures that the CABAC entropy decoding tasks are performed sequentially, and that the CABAC entropy decoding task of each CTU only starts processing after its preceding task (i.e., the CABAC entropy decoding task of the CTU that the CTU depends on) is completed. This avoids delays caused by relying on undecoded data, improves the parallel processing capability of the decoder, and speeds up the decoding process.

[0096] In some embodiments of this disclosure, the video processing method further includes: after completing the entropy decoding task of each CTU in the segment, triggering other decoding operation tasks that generate the CTU based on the task triggering rules, and placing them in the task queue.

[0097] The decoding process includes various operations such as entropy decoding, predictive decoding, inverse transform and inverse quantization, deblocking filtering, adaptive sample compensation, and adaptive loop filtering. Other decoding operations refer to those other than entropy decoding in the decoding process. In this embodiment, the entropy decoding, predictive decoding, inverse transform and inverse quantization, deblocking filtering, adaptive sample compensation, and adaptive loop filtering operations in the decoding process are abstracted into tasks on a CTU basis. For each CTU in the slice, after completing the CABAC entropy decoding task of that CTU, other decoding operation tasks for that CTU can be generated based on task triggering rules, and the generated tasks are placed in a task queue. The task triggering rules are generated based on information such as the dependencies between CTUs, triggering logic rules, and the execution order of different operations in the decoding process.

[0098] It should be noted that, in addition to operations such as entropy decoding, predictive decoding, inverse transform and inverse quantization, deblocking filtering, sample adaptive compensation, and adaptive loop filtering, the decoding process may also include other operations and the execution order of different operations may be set according to actual needs. This disclosure does not limit these operations.

[0099] In the video processing method provided in this embodiment, for each CTU in a segment, after completing the CABAC entropy decoding task of that CTU, other decoding operation tasks of that CTU are generated based on task triggering rules and placed in a task queue. The task triggering rules are set based on information such as the dependency relationship between CTUs, triggering logic rules, and the execution order of different operations in the decoding process, which ensures the orderly generation of task triggers, avoids conflicts and dependency problems between tasks, and the introduction of task queues makes the decoding process clear and controllable. Each task can be triggered and generated based on task triggering rules, realizing efficient management and scheduling of the decoding process, thereby improving the decoding speed in a multi-threaded environment.

[0100] Figure 5 A decoder architecture diagram is shown that can implement the video processing method of embodiments of this disclosure. Figure 5 As shown, the decoder in this embodiment includes a header information parser 510 and a triggered parallel decoder 520. The header information parser 510 is single-threaded, while the triggered parallel decoder 520 is multi-threaded.

[0101] like Figure 5As shown, the header information parser 510 sequentially reads the slice data stream of each video frame from the input video encoded data stream, storing each slice in the bitstream memory. For each slice data stream, the header information is parsed, and the slice information is initialized. For each slice, after parsing the slice data stream and its header information, a CABAC entropy decoding task for generating the first CTU of that slice is triggered, and the CABAC entropy decoding task is placed in the task queue.

[0102] In each slice, the CABAC entropy decoding task of the first CTU in that slice is generated and placed in the task queue by the header information parser 510. The CABAC entropy decoding tasks of the other CTUs in that slice are generated and placed in the task queue by the triggered parallel decoder 520 based on a preset entropy decoding task triggering rule. The preset entropy decoding task triggering rule and the process of triggering the generation of CABAC entropy decoding tasks for the CTUs in the slice based on the preset entropy decoding task triggering rule have already been described in the above embodiments, and will not be repeated here.

[0103] like Figure 5 As shown, the various operations in the decoding process, such as CABAC entropy decoding, predictive decoding, inverse transform and inverse quantization, deblocking filtering, sample adaptive compensation, and adaptive loop filtering, are abstracted into different operation tasks. The trigger-based parallel decoder 520 generates different operation tasks of the CTU based on task triggering rules and places them into the task queue.

[0104] from Figure 5 As can be seen, the trigger-based parallel decoder 520 employs a multi-threaded parallel approach, selecting tasks to be processed from the task queue and performing parallel processing on these selected tasks. Specifically, it selects a number of tasks from the task queue corresponding to the number of idle threads and processes these selected tasks in parallel, thereby achieving trigger-based parallel decoding.

[0105] In this embodiment of the disclosure, in order to enable the entropy decoding module to achieve triggered parallel processing, the memory and data structure of the decoder are redesigned. Figure 6 A schematic diagram of the decoder's memory and data structures in an embodiment of this disclosure is shown. For example... Figure 6 As shown, a hierarchical management design is adopted, which manages the bitstream memory and entropy decoder state in a unified manner through different layers.

[0106] In some embodiments of this disclosure, the video processing method further includes storing the segmented data stream into a bitstream memory.

[0107] In this embodiment of the disclosure, one slice corresponds to one NALU, that is, one NALU contains the slice data stream of one slice. For each slice, after obtaining the slice data stream of the slice using the header information parser, the slice data stream is stored in the bitstream memory, and bitstream memory is allocated for the NALU corresponding to the slice data stream.

[0108] In this embodiment of the disclosure, each NALU read by the header information parser is allocated bitstream memory to store the corresponding fragmented data stream, thus enabling parallelism between NALUs. For example... Figure 6 As shown, in the NALU layer, NALU1 is allocated memory for Slice1 bitstream, NALU2 is allocated memory for Slice2 bitstream, and NALU3 is allocated memory for Slice3 bitstream.

[0109] In some embodiments of this disclosure, the video processing method further includes: dividing the segmented data stream into at least one sub-segment data stream; for each sub-segment data stream, allocating a memory pointer for the sub-segment data stream; the memory pointer is used to locate the position in the bitstream memory where the sub-segment data stream is stored.

[0110] In this embodiment of the disclosure, each data stream is divided into at least one sub-data stream. The specific division method and number of divisions are determined by the degree of parallelism, thus enabling flexible parallel processing. Furthermore, for each sub-data stream, a memory pointer is allocated to locate its position within the bitstream, ensuring that the divided sub-data streams do not occupy new memory and do not incur additional memory overhead.

[0111] Continue to refer to Figure 6 For the sliced ​​data stream in the Slice1 bitstream memory (i.e., NALU1), it is divided into n sub-sliced ​​data streams, and corresponding pointers substream0 to substream(n-1) are maintained respectively; for the sliced ​​data stream in the Slice2 bitstream memory (i.e., NALU2), it is divided into n sub-sliced ​​data streams, and corresponding pointers substream0 to substream(n-1) are maintained respectively; for the sliced ​​data stream in the Slice3 bitstream memory (i.e., NALU3), it is divided into n sub-sliced ​​data streams, and corresponding pointers substream0 to substream(n-1) are maintained respectively.

[0112] In the video processing method provided in this disclosure, by storing the segmented data stream to the bitstream memory and allocating a memory pointer to each sub-segmented data stream, multiple sub-segmented data streams can be processed in parallel, further improving the decoding speed; and the division of sub-segmented data streams does not occupy new memory space, avoiding additional memory overhead and optimizing memory usage efficiency.

[0113] In some embodiments of this disclosure, the video processing method further includes: updating the current decoding position index of the sub-segment data stream during the decoding process; the current decoding position index of the sub-segment data stream is used to indicate the position where the sub-segment data stream is currently parsed.

[0114] In this embodiment of the disclosure, for each sub-segment data stream, its current decoding position index is maintained, which is used to record the position where the sub-segment data stream has been parsed.

[0115] Continue to refer to Figure 6 At the Slice layer, memory pointers and current decoding position indices of sub-slice data streams are managed separately.

[0116] In the video processing method provided in this embodiment, for each sub-segment data stream, the current decoding position index of the sub-segment data stream is maintained to facilitate tracking the decoding progress.

[0117] In some embodiments of this disclosure, the video processing method further includes: allocating multiple entropy decoders according to the number of threads, so that each entropy decoder corresponds to one thread; selecting the sub-segment data stream to be processed from different sub-segment data streams in a multi-threaded parallel manner, and using the allocated entropy decoders to perform entropy decoding on the sub-segment data stream to be processed.

[0118] In this embodiment of the disclosure, an entropy decoder with the same number of threads is allocated, and each entropy decoder corresponds to one thread. The selection and entropy decoding between different sub-segment data streams are performed dynamically in the form of pointers, which can realize the triggered parallel processing of CABAC entropy decoding tasks.

[0119] Continue to refer to Figure 6 In the CabacReader layer, CabacReader0 to CabacReader3 are allocated to threads Thread0 to Thread3 respectively. Through multiple threads, the sub-slice data stream to be processed is selected from different sub-slice data streams by means of pointers. The entropy decoder allocated on the thread performs entropy decoding on the sub-slice data stream to be processed, which can realize the triggered parallel processing of CABAC entropy decoding tasks.

[0120] In the video processing method provided in this disclosure, by allocating an entropy decoder with the same number of threads, and with each entropy decoder corresponding to one thread, multi-threaded parallel processing can be achieved, further improving the decoding speed.

[0121] It is understood that the same / similar parts between the various embodiments of the methods described above in this specification can be referred to each other. Each embodiment focuses on the differences from other embodiments, and relevant parts can be referred to the description of other method embodiments.

[0122] Figure 7 A block diagram of a video processing apparatus according to an embodiment of the present disclosure is shown. Figure 7 As shown, the device 700 includes a data stream acquisition module 710, a data stream parsing module 720, and a processing module 730.

[0123] The data stream acquisition module 710 is configured to acquire the encoded data stream of the video; the video includes multiple video frames, and each video frame includes multiple segments. The data stream parsing module 720 is configured to parse the encoded data stream of the video for each segment to obtain the segment's segment data stream and its header information; trigger the generation of the segment's entropy decoding task and place the segment's entropy decoding task into a task queue; wherein the entropy decoding task is an entropy decoding task performed using CABAC. The processing module 730 is configured to select tasks to be processed from the task queue in a multi-threaded parallel manner; perform parallel processing on the tasks to be processed based on the segment data stream and its header information corresponding to the task to be processed; the segment data stream corresponding to the task to be processed is the segment data stream corresponding to the segment to which the task to be processed belongs.

[0124] In some embodiments of this disclosure, the sharding includes at least one CTU. The data stream parsing module 720 is further configured to: trigger an entropy decoding task to generate at least one CTU based on a preset entropy decoding task triggering generation rule, and place the generated entropy decoding task into a task queue.

[0125] In some embodiments of this disclosure, the data stream parsing module 720 is further configured to: trigger the generation of an entropy decoding task for a first CTU in at least one CTU, and place the entropy decoding task of the first CTU into a task queue; the first CTU is the first CTU to be decoded in the segment. Figure 7As shown, the device 700 also includes a task triggering generation module 740, configured to: take the first CTU as the current CTU, trigger the generation of one or more entropy decoding tasks for the second CTU based on a preset entropy decoding task triggering generation rule, and put the one or more entropy decoding tasks for the second CTU into a task queue; take the second CTU as the new current CTU, continue to trigger the generation of entropy decoding tasks for the CTUs in at least one CTU based on the preset entropy decoding task triggering generation rule, and put the generated entropy decoding tasks into a task queue, until the entropy decoding tasks for all CTUs in at least one CTU are triggered and generated and put into the task queue.

[0126] In some embodiments of this disclosure, the preset entropy decoding task triggering generation rules include at least one of the following options: in response to the completion of the entropy decoding task of the current CTU, triggering the generation of the entropy decoding task of the CTU to the right of the current CTU; in response to the completion of the entropy decoding task of the current CTU, triggering the generation of the entropy decoding task of the CTU below the current CTU; in response to the completion of the entropy decoding task of the current CTU, triggering the generation of the entropy decoding task of the next CTU of the current CTU; the next CTU of the current CTU is determined according to a specific scanning or processing order.

[0127] In some embodiments of this disclosure, the data stream parsing module 720 is further configured to store the fragmented data stream into the bitstream memory.

[0128] In some embodiments of this disclosure, the data stream parsing module 720 is further configured to: divide the fragmented data stream into at least one sub-fragmented data stream; for each sub-fragmented data stream, allocate a memory pointer for the sub-fragmented data stream; the memory pointer is used to locate the position in the bit stream memory where the sub-fragmented data stream is stored.

[0129] In some embodiments of this disclosure, the processing module 730 is further configured to: update the current decoding position index of the sub-fragment data stream during the decoding process of the sub-fragment data stream; the current decoding position index of the sub-fragment data stream is used to indicate the position where the sub-fragment data stream is currently parsed.

[0130] In some embodiments of this disclosure, the processing module 730 is further configured to: allocate multiple entropy decoders according to the number of threads, so that each entropy decoder corresponds to one thread; select the sub-segment data stream to be processed from different sub-segment data streams in a multi-threaded parallel manner, and use the allocated entropy decoders to perform entropy decoding on the sub-segment data stream to be processed.

[0131] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0132] Figure 8 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown. It should be noted that... Figure 8 The illustrated electronic device 800 is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.

[0133] like Figure 8 As shown, the electronic device 800 is manifested in the form of a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, and a bus 830 connecting different system components (including storage unit 820 and processing unit 810).

[0134] The storage unit stores program code that can be executed by the processing unit 810, causing the processing unit 810 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit 810 can perform, as follows: Figure 3 The steps are shown in the figure.

[0135] Storage unit 820 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 8201 and / or cache memory 8202, and may further include a read-only memory (ROM) 8203.

[0136] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0137] Bus 830 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0138] Electronic device 800 can also communicate with one or more external devices 900 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 800, and / or with any device that enables electronic device 800 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 850. Furthermore, electronic device 800 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 840. As shown, network adapter 840 communicates with other modules of electronic device 800 via bus 830. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0139] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible embodiments, various aspects of the invention may also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of the invention described in the "Exemplary Methods" section of this specification.

[0140] According to embodiments of the present invention, a program product for implementing the above-described method may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0141] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0142] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0143] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0144] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0145] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0146] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.

[0147] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0148] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered illustrative only, and the true scope and spirit of this disclosure are indicated by the appended claims.

[0149] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A video processing method, characterized in that, The method includes: Acquire the encoded data stream of the video; the video includes multiple video frames, and each video frame includes multiple segments; For each segment, the encoded data stream of the video is parsed to obtain the segment data stream and the header information of the segment data stream; an entropy decoding task for the segment is triggered, and the entropy decoding task for the segment is placed in a task queue; the entropy decoding task is an entropy decoding task performed using a context-based adaptive binary arithmetic coding algorithm. A multi-threaded parallel approach is adopted to select tasks to be processed from the task queue; the tasks to be processed are processed in parallel according to the data streams corresponding to the tasks to be processed and the header information of the data streams corresponding to the tasks to be processed; the data streams corresponding to the tasks to be processed are the data streams corresponding to the data streams to which the tasks to be processed belong. The segment includes at least one coding tree unit. The step of triggering the generation of entropy decoding tasks for the segment and placing the entropy decoding tasks for the segment into a task queue includes: based on a preset triggering and generation rule for entropy decoding tasks, sequentially triggering the generation of entropy decoding tasks for each coding tree unit in the at least one coding tree unit, and placing the generated entropy decoding tasks for each coding tree unit into the task queue.

2. The method according to claim 1, characterized in that, The predetermined entropy decoding task triggering and generation rules, based on preset rules, sequentially trigger the generation of entropy decoding tasks for each of the at least one encoding tree unit, and place the generated entropy decoding tasks for each encoding tree unit into the task queue, including: Trigger the generation of the entropy decoding task of the first coding tree unit in the at least one coding tree unit, and put the entropy decoding task of the first coding tree unit into the task queue; the first coding tree unit is the first coding tree unit to be decoded in the segment; Using the first coding tree unit as the current coding tree unit, based on the preset entropy decoding task triggering and generation rules, trigger the generation of one or more entropy decoding tasks for the second coding tree unit, and put the one or more entropy decoding tasks for the second coding tree unit into the task queue; The second coding tree unit is used as the new current coding tree unit. Based on the preset entropy decoding task triggering and generation rules, the entropy decoding tasks of the coding tree units in the at least one coding tree unit are triggered and generated and placed in the task queue. This process continues until the entropy decoding tasks of all coding tree units in the at least one coding tree unit are triggered and generated and placed in the task queue.

3. The method according to claim 2, characterized in that, The preset entropy decoding task triggering generation rules include at least one of the following options: In response to the completion of the entropy decoding task of the current coding tree unit, an entropy decoding task for the right coding tree unit of the current coding tree unit is triggered. In response to the completion of the entropy decoding task of the current coding tree unit, an entropy decoding task for the next coding tree unit of the current coding tree unit is triggered. In response to the completion of the entropy decoding task of the current coding tree unit, an entropy decoding task for the next coding tree unit of the current coding tree unit is triggered; the next coding tree unit of the current coding tree unit is determined according to a specific scanning or processing order.

4. The method according to claim 1, characterized in that, The method further includes: The fragmented data streams are stored in the bitstream memory.

5. The method according to claim 4, characterized in that, The method further includes: The fragmented data stream is divided into at least one sub-fragmented data stream; For each of the sub-segment data streams, a memory pointer is allocated for the sub-segment data stream; the memory pointer is used to locate the position in the bitstream memory where the sub-segment data stream is stored.

6. The method according to claim 5, characterized in that, The method further includes: During the decoding of the sub-fragment data stream, the current decoding position index of the sub-fragment data stream is updated; the current decoding position index of the sub-fragment data stream is used to indicate the current parsed position of the sub-fragment data stream.

7. The method according to claim 5, characterized in that, The method further includes: Multiple entropy decoders are allocated according to the number of threads, so that each entropy decoder corresponds to one thread; A multi-threaded parallel approach is adopted to select the sub-segment data stream to be processed from different sub-segment data streams, and the allocated entropy decoder is used to perform entropy decoding on the sub-segment data stream to be processed.

8. A video processing apparatus, characterized in that, The device includes: The data stream acquisition module is configured to acquire the encoded data stream of a video; the video includes multiple video frames, and each video frame includes multiple segments. The data stream parsing module is configured to parse the encoded data stream of the video for each segment to obtain the segment data stream and the header information of the segment data stream; trigger the generation of the entropy decoding task for the segment, and put the entropy decoding task for the segment into the task queue; the entropy decoding task is an entropy decoding task performed using a context-based adaptive binary arithmetic coding algorithm. The processing module is configured to select tasks to be processed from the task queue in a multi-threaded parallel manner; and to process the tasks to be processed in parallel according to the data stream segment corresponding to the task to be processed and the header information of the data stream segment corresponding to the task to be processed; the data stream segment corresponding to the task to be processed is the data stream segment corresponding to the segment to which the task to be processed belongs. The segmentation includes at least one coding tree unit, and the data stream parsing module is further configured to: based on a preset triggering and generation rule for entropy decoding tasks, sequentially trigger the generation of entropy decoding tasks for each coding tree unit in the at least one coding tree unit, and place the generated entropy decoding tasks for each coding tree unit into the task queue.

9. An electronic device, characterized in that, include: processor; A memory for storing processor-executable instructions; wherein the processor is configured to execute the executable instructions to implement the video processing method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the video processing method as described in any one of claims 1 to 7.

11. A computer program product, comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the video processing method as described in any one of claims 1 to 7.