Tree coding unit division method and device, equipment, medium and program product

Through the division mode of first coarse selection and then fine selection in video coding, the final division method of the tree coding unit is directly determined, which solves the problems of high time complexity and large resource occupation in the existing technology, and improves the efficiency of video coding.

CN118694984APending Publication Date: 2024-09-24SHANGHAI CAMBRICON INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310295511.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-23
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

Existing video coding technology has high time complexity, low efficiency, and large resource usage when dividing tree coding units, resulting in inefficient division process.

Method used

By obtaining the tree coding unit CTU to be divided, first determine the rough selection of the best division mode for initial division, and then divide again according to the fine selection of the best division mode until the final coding unit CU is determined, avoiding traversing all division methods and reducing calculations volume and resource usage.

Benefits of technology

It effectively reduces the time complexity and resource usage, improves the efficiency of tree coding unit division, and is suitable for various video coding scenarios, especially in real-time video communication and multimedia networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118694984A
    Figure CN118694984A
Patent Text Reader

Abstract

The invention provides a tree coding unit division method and device, equipment, a medium and a program product, and belongs to the technical field of video compression. A computing device may be employed for execution. The computing device may be located in a combination processing device. The combined processing device comprises a computing device, an interface device, a processing device and a storage device. The computing device is mainly implemented as a single-core intelligent processor or a multi-core intelligent processor, and can interact with the processing device through the interface device to jointly complete the division method of the tree coding units. The interface device is used for transmitting data and control instructions between the computing device and the processing device. As a general processing device, the processing device performs basic control including but not limited to data handling, starting and / or stopping of the computing device, and the like. The storage device is used for storing data to be processed. Through the scheme of the invention, the time complexity and the resource occupation amount can be reduced, and meanwhile, the accuracy of CTU division can be effectively ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video compression technology, and in particular to a method, device, equipment, medium and program product for dividing a tree coding unit. Background Art

[0002] Video encoding refers to the method of converting a video file in a certain format into another video file in another format through a specific compression technology. When encoding a video, it is necessary to divide the coded frames in the video into multiple coding tree units (CTUs), and then divide the CTUs optimally to obtain the final coding units (CUs).

[0003] At present, when performing the best division of CTU, it is necessary to traverse all the division methods and determine the best division method according to the division results of all the division methods and the merging results of the size blocks, which results in high time complexity and low division efficiency during division, and large resource usage. Summary of the invention

[0004] The embodiments of the present application provide a tree coding unit division method, apparatus, device, medium and program product to solve the technical problems of high time complexity, low division efficiency and large resource occupation in the prior art.

[0005] In a first aspect, the present application provides a method for dividing a tree coding unit, comprising:

[0006] Obtain a tree coding unit CTU to be divided, and determine a roughly selected optimal division mode corresponding to each unit size block in the CTU;

[0007] Performing initial division on each unit size block according to each roughly selected optimal division mode to obtain a plurality of size blocks after initial division;

[0008] Determine the best partitioning mode corresponding to each size block after the initial partitioning;

[0009] Re-dividing each initially divided size block according to each finely selected optimal division mode to obtain a plurality of re-divided size blocks;

[0010] It is determined whether each re-divided size block is a finally divided coding unit CU.

[0011] In a second aspect, the present application provides a tree coding unit division device, including:

[0012] An acquisition module, used for acquiring a tree coding unit CTU to be divided;

[0013] A determination module, used to determine the roughly selected optimal partitioning mode corresponding to each unit size block in the CTU;

[0014] An initial partitioning module, used for initially partitioning each unit size block according to each roughly selected optimal partitioning mode, so as to obtain a plurality of initially partitioned size blocks;

[0015] The determination module is further used to determine the best partitioning mode corresponding to each size block after the initial partitioning;

[0016] A re-dividing module, used for re-dividing each initially divided size block according to each finely selected optimal division mode to obtain a plurality of re-divided size blocks;

[0017] The judgment module is used to determine whether each re-divided size block is a finally divided coding unit CU.

[0018] In a third aspect, an embodiment of the present application provides a tree coding unit partitioning device, including: a processor, and a memory communicatively connected to the processor;

[0019] The memory stores computer-executable instructions;

[0020] The processor executes the computer-executable instructions stored in the memory to implement the method according to the first aspect.

[0021] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by at least one processor, the method described in the first aspect is implemented.

[0022] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements the method described in the first aspect when executed by a processor.

[0023] The tree coding unit division method, device, and related products provided in the embodiment of the present application are obtained by obtaining the tree coding unit CTU to be divided, and determining the rough selection best division mode corresponding to each unit size block in the CTU; performing initial division on each unit size block according to each rough selection best division mode to obtain multiple size blocks after initial division; determining the fine selection best division mode corresponding to each size block after initial division; re-dividing each size block after initial division according to each fine selection best division mode to obtain multiple size blocks after re-division; determining whether each size block after re-division is the final divided coding unit CU. Since the CTU is directly divided into unit size blocks first, and since the number of unit size blocks is large, the rough selection best division mode with a small amount of calculation is first determined, and each unit size block is initially divided based on the rough selection best division mode to determine a smaller number of preliminary divided size blocks. Secondly, the fine selection best division mode with a large amount of calculation is determined, and each size block after initial division is re-divided based on the fine selection best division mode to determine a smaller number of size blocks after re-division. Finally, it is determined whether each size block after re-division is the final divided coding unit CU to perform the optimal division of the CTU. Therefore, the tree coding unit division method provided in this embodiment performs coarse-grained division when the number of size blocks to be processed is large, and performs fine-grained division when the number of size blocks to be processed is small. In this process, there is no need to traverse all division methods, which can effectively reduce time complexity and resource usage. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0025] Figure 1 An application scenario diagram of a method for dividing tree coding units provided in one embodiment of the present application;

[0026] Figure 2 A flowchart of a method for dividing tree coding units provided in an embodiment of the present application;

[0027] Figure 3 A flowchart of a method for dividing tree coding units provided in yet another embodiment of the present application;

[0028] Figure 4 A schematic diagram of initial merging processing in a tree coding unit division method provided in an embodiment of the present application;

[0029] Figure 5 A flowchart of a method for dividing tree coding units provided in another embodiment of the present application;

[0030] Figure 6 A flowchart of a method for dividing tree coding units provided in yet another embodiment of the present application;

[0031] Figure 7 A schematic diagram of the structure of a tree coding unit division device provided in one embodiment of the present application;

[0032] Figure 8 A schematic diagram of the structure of a tree coding unit division device provided in one embodiment of the present application;

[0033] Fig. 9 is a structural diagram showing a board according to an embodiment of the present application;

[0034] Fig.10 is a structural diagram showing a combined processing device according to an embodiment of the present application;

[0035] Fig.11 is a schematic diagram showing the internal structure of a single-core computing device according to an embodiment of the present application;

[0036] Fig.12 is a schematic diagram showing the internal structure of a multi-core computing device according to an embodiment of the present application;

[0037] Fig.13 Schematic diagram showing the internal structure of a processor core according to an embodiment of the present application.

[0038] The above drawings show clear embodiments of the present disclosure, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present disclosure to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0039] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0040] In order to clearly understand the technical solution of the present application, the solution of the prior art is first introduced in detail.

[0041] At present, video coding mainly includes block-based hybrid coding framework and VVC video compression standard video coding. Based on the block-based hybrid coding framework, VVC video compression standard video coding adds a nested multi-type tree (MTT) partition structure on the basis of the original quadtree partition in order to obtain a higher video compression rate. This partition structure can also obtain a more flexible CU partition shape that is closer to the texture of the video content.

[0042] The current video coding is introduced with the video coding of the vvc video compression standard. In the video coding process of the vvc video compression standard, the coded frame is first divided into multiple CTUs according to the quadtree, and the leaf nodes are further divided by MTT. In the process of optimally dividing the CTU and obtaining the CU, firstly, based on the restrictions of the division conditions, the CTU is divided respectively based on all possible division methods to obtain the most basic size block, and then for each possible division method, the coding cost corresponding to the most basic size block and the coding cost of each possible merger of the most basic size block are calculated based on the most basic size block to determine the best merger method. Therefore, when optimally dividing the CTU, it is necessary to traverse all division methods and determine the best division method based on the division results of all division methods and the merger results of the size blocks, which leads to high time complexity and low division efficiency during division. And the resource occupation is large.

[0043] Therefore, in the face of technical problems in the prior art, in order to reduce time complexity and resource occupancy, it is necessary not to traverse all division methods. Therefore, in the process of dividing CTU into the most basic size blocks, this solution can directly divide CTU into unit size blocks of the smallest size, wherein the size of each unit size block can be equal. Then in the process of dividing the unit size block, it can be considered whether to divide the unit size block by merging based on the optimal division mode of the unit size block. In order to further reduce time complexity and resource occupancy, when dividing the unit size block, due to the large number of unit size blocks, the rough selection of the best division mode with a small amount of calculation for each unit size block can be determined first, and each unit size block can be initially divided based on the rough selection of the best division mode. Then the number of size blocks after the preliminary division is significantly smaller than the number of unit size blocks. Then determine the fine selection of the best division mode with a large amount of calculation for the size block after the initial division, and divide each size block after the initial division again according to each fine selection of the best division mode. Finally, determine whether each size block after the second division is the final divided coding unit CU to perform the best division of CTU. The CTU division method provided in the embodiment of the present application can effectively reduce time complexity and resource usage because there is no need to traverse all division methods.

[0044] The following describes the application scenarios of the tree coding unit division method provided in the embodiment of the present application. The tree coding unit division method provided in this embodiment can be applied in various scenarios of video coding. Such as the field of real-time video communication. Such as videophone, video conferencing, multimedia network, etc. Or it can also be applied to other fields, which are not limited in this embodiment. For example, Figure 1 An application scenario diagram of a method for dividing tree coding units provided in an embodiment of the present application, such as Figure 1 As shown, the system corresponding to the tree coding unit division method provided in this embodiment may include a server device 1 and a client device 2 of a video application. Exemplarily, when the client device 2 requests real-time video data, it sends a video data acquisition request to the server device 1 of the video application, and the server device 1 of the video application can obtain the corresponding video data, and obtain the coded frame corresponding to the video data, divide the coded frame into CTU, and divide the CTU using the tree coding unit division method corresponding to the embodiment of the present application. Specifically, the unit size blocks in the CTU are preliminarily divided, and then divided again, and finally divided to obtain the final CU, and video encoding is performed based on the CU, and the encoded video data is transmitted to the client device 2.

[0045] The following specific embodiments are used to describe in detail the technical solutions of the present invention and how the technical solutions of the present application solve the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.

[0046] Figure 2 A flowchart of a method for dividing a tree coding unit provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the execution subject of the tree coding unit division method provided in this embodiment is a tree coding unit division device. Then the tree coding unit division method provided in this embodiment includes the following steps:

[0047] Step 201 : obtaining a tree coding unit CTU to be divided, and determining a roughly selected optimal division mode corresponding to each unit size block in the CTU.

[0048] Optionally, in this embodiment, when obtaining the tree coding unit CTU to be divided, the video data to be video encoded can be obtained, the coding frame in the video data is determined, the coding frame is divided, and the CTU to be divided is obtained. The method of dividing the coding frame to obtain the CTU is not limited. Or optionally, in this embodiment, when obtaining the tree coding unit CTU to be divided, the CTU after the video data coding frame is divided can be stored in a preset storage area in advance, and the CTU to be divided is obtained by accessing the preset storage area. In this embodiment, the method of obtaining the CTU to be divided is not limited.

[0049] In this embodiment, after obtaining the CTU to be divided, the CTU can be divided into multiple unit size blocks of the same size according to the preset division size. Therefore, the size of the unit size block is the preset division size. Exemplarily, the preset division size can be 8x8, 4x4, etc., which is not limited in this embodiment.

[0050] After obtaining a plurality of unit size blocks, a corresponding roughly selected optimal partitioning mode is determined based on each unit size block, wherein the roughly selected optimal partitioning mode is an optimal partitioning mode that is roughly selected.

[0051] Specifically, in this embodiment, when determining the rough selection optimal partitioning mode corresponding to each unit size block, a rough selection mode selection algorithm may be used to determine the rough selection optimal partitioning mode corresponding to the unit size block. The specific type of the rough selection mode selection algorithm is not limited.

[0052] The rough selection mode selection algorithm includes an algorithm for determining a first preset number of preset mode features and a preset rough selection index. The algorithm for determining a first preset number of preset mode features can be used to calculate the first preset number of preset mode features. Then, based on the preset rough selection index, the rough selection index value of each preset mode feature corresponding to each unit size block is calculated, and based on each rough selection index value, the best division mode corresponding to the unit size block is screened out, and the best division mode is the rough selection division mode.

[0053] It should be noted that, for different types of CTUs, the pattern features corresponding to the unit size blocks are different, and accordingly, the algorithm for determining the preset pattern features and the determined rough selection best division mode included in the rough selection mode selection algorithm are also different. Exemplarily, if the type of CTU is an intra-frame module, the pattern feature corresponding to the unit size block may be an intra-frame angle (referred to as: Dir), the algorithm for determining the preset pattern features included in the rough selection mode selection algorithm may be a preset fast angle search algorithm, and the determined rough selection best division mode is the rough selection best Dir. If the type of CTU is an inter-frame module, the pattern feature corresponding to the unit size block may be an inter-frame motion vector (referred to as: MV), the algorithm for determining the preset pattern features included in the rough selection mode selection algorithm may be a preset fast motion search algorithm, and the determined rough selection best division mode is the rough selection best MV.

[0054] Among them, the preset rough selection index can be any one or a combination of texture complexity, motion intensity, absolute error sum (abbreviated as SAD), sum of absolute values ​​of prediction residuals (abbreviated as SATD), cost value, or other rough selection indicators, which are not limited in this embodiment.

[0055] Step 202 , initially dividing each unit size block according to each roughly selected optimal division mode to obtain a plurality of initially divided size blocks.

[0056] The initial division is the first division performed, and the first division is a division performed based on a unit size block.

[0057] The size block after the first division is the size block after the initial division, so the size block after the initial division may include the size block after the first division and the unit size block that does not meet the initial division condition and is not divided.

[0058] Specifically, in this embodiment, the roughly selected optimal division mode corresponding to each unit size block is obtained, and each unit size block is divided for the first time based on the roughly selected optimal division mode corresponding to each unit size block to obtain a size block after the first division.

[0059] Among them, when each unit size block is divided for the first time based on the roughly selected optimal division mode corresponding to each unit size block, the unit size blocks that meet the initial merging conditions are first merged to form an initial merged size block. Then, based on the video coding protocol, it can be judged whether the initial merged size block is reasonable, and the unreasonable initial merged size block is split and restored to the corresponding multiple unit size blocks to obtain the initial divided size block.

[0060] Step 203, determining the best partitioning mode corresponding to each size block after initial partitioning.

[0061] Among them, the finely selected optimal division mode is the best division mode selected in detail.

[0062] Specifically, in this embodiment, when determining the optimal fine-selection partitioning mode corresponding to each size block after initial partitioning, a fine-selection mode selection algorithm may be used to determine the optimal fine-selection partitioning mode corresponding to each size block after initial partitioning. The specific type of fine-selection mode selection algorithm is not limited.

[0063] The fine selection mode selection algorithm includes an algorithm for determining a second preset number of preset mode features and a preset fine selection index. The second preset number of preset mode features can be calculated by using the algorithm for determining the second preset number of preset mode features. Then, based on the preset fine selection index, the fine selection index value of each preset mode feature corresponding to each size block after initial division is calculated, and based on each fine selection index value, the best division mode corresponding to the size block after initial division is screened out, and the best division mode is the fine selection division mode.

[0064] The preset fine selection index is an index whose calculation time complexity is greater than the calculation time complexity of the preset rough selection index. For example, the preset fine selection index is SATD, and the preset rough selection index is SAD.

[0065] In this embodiment, the fine selection optimal partitioning mode selected by the fine selection mode selection algorithm is more accurate than the coarse selection optimal partitioning mode corresponding to the unit size block determined by the coarse selection mode selection algorithm, but the time complexity of the calculation is also greater.

[0066] Step 204: re-dividing each initially divided size block according to each finely selected optimal division mode to obtain a plurality of re-divided size blocks.

[0067] The re-division is the second division, and the second division is the division based on the size blocks after the initial division.

[0068] The size blocks after the second division are the size blocks after the second division, so the size blocks after the second division may include the size blocks after the second division and the size blocks after the initial division that do not meet the second division condition and are not divided.

[0069] Specifically, in this embodiment, the finely selected optimal partitioning mode corresponding to each initially divided size block is obtained, and each initially divided size block is secondarily partitioned based on the finely selected optimal partitioning mode corresponding to each initially divided size block to obtain a secondarily divided size block.

[0070] When each initially divided size block is divided for the second time based on the selected optimal division mode corresponding to each initially divided size block, the initially divided size blocks that meet the re-merging condition are first merged to form a re-merged size block. Then, whether the re-merged size block is reasonable can be judged based on the video coding protocol, and the unreasonable re-merged size block can be split to obtain the re-divided size block.

[0071] Step 205: determine whether each re-divided size block is a finally divided coding unit CU.

[0072] Specifically, in this embodiment, based on the re-divided size blocks, in order to further improve the division accuracy and also control the time complexity and resource occupancy of the division, it can be determined whether each re-divided size block is the final divided coding unit CU.

[0073] Optionally, when a rate-distortion optimization algorithm is used to determine whether each re-divided size block is a final divided coding unit CU, all division modes can be traversed and the cost value under each division mode can be calculated to determine whether each re-divided size block is a final divided coding unit CU. If it is determined that it is not a final divided CU, the re-divided size block can be divided into another layer, and the division of the layer is determined as the final divided CU.

[0074] The tree coding unit division method provided in this embodiment obtains the tree coding unit CTU to be divided, and determines the rough selection best division mode corresponding to each unit size block in the CTU; performs initial division on each unit size block according to each rough selection best division mode to obtain multiple size blocks after initial division; determines the fine selection best division mode corresponding to each size block after initial division; re-divides each size block after initial division according to each fine selection best division mode to obtain multiple size blocks after re-division; determines whether each size block after re-division is the final divided coding unit CU. Since the CTU is directly divided into unit size blocks first, and the number of unit size blocks is large, the rough selection best division mode with a small amount of calculation is first determined, and each unit size block is initially divided based on the rough selection best division mode to determine a smaller number of preliminary divided size blocks. Secondly, the fine selection best division mode with a large amount of calculation is determined, and each size block after initial division is re-divided based on the fine selection best division mode to determine a smaller number of size blocks after re-division. Finally, it is determined whether each size block after re-division is the final divided coding unit CU to perform the optimal division of the CTU. Therefore, the tree coding unit division method provided in this embodiment performs coarse-grained division when the number of size blocks to be processed is large, and performs fine-grained division when the number of size blocks to be processed is small. In this process, there is no need to traverse all division methods, which can effectively reduce time complexity and resource usage.

[0075] Figure 3 A flowchart of a method for dividing a tree coding unit provided in another embodiment of the present application is shown in FIG. Figure 3 As shown, the method for dividing the tree coding unit provided in this embodiment further refines step 201 to step 205 on the basis of the method for dividing the tree coding unit provided in the above embodiment, and the method for dividing the tree coding unit provided in this embodiment includes the following steps:

[0076] Step 301 : obtaining a tree coding unit CTU to be divided, and determining a roughly selected optimal division mode corresponding to each unit size block in the CTU.

[0077] As an optional implementation manner, in this embodiment, in step 301, determining the roughly selected optimal partitioning mode corresponding to each unit size block in the CTU includes the following steps:

[0078] Step 301a, using a coarse pattern selection algorithm to calculate a first preset number of preset pattern features corresponding to each unit size block.

[0079] The first preset number is the number of pattern features determined in the rough selection mode selection algorithm. The specific value is not limited, such as 33, or less than the number of pattern features corresponding to the fine selection optimal division mode.

[0080] The rough selection mode selection algorithm includes an algorithm for determining a first preset number of preset mode features and a preset rough selection index.

[0081] Specifically, in this embodiment, an algorithm for determining a first preset number of preset pattern features is used to calculate a first preset number of preset pattern features corresponding to each unit size block. If the CTU is an intra-frame module, the algorithm for determining the first preset number of preset pattern features may be a first preset fast angle search algorithm. The pattern feature may be Dir. If the CTU is an inter-frame module, the algorithm for determining the first preset number of preset pattern features may be a first preset fast motion search algorithm, and the pattern feature may be MV.

[0082] Step 301b, calculating the rough selection index value corresponding to each preset mode feature based on the preset rough selection index in the rough selection mode selection algorithm.

[0083] Specifically, in this embodiment, a preset rough selection index is obtained from the rough selection mode selection algorithm. For each mode feature in each unit size block, a rough selection index value corresponding to the preset rough selection index is calculated.

[0084] In this embodiment, the method for calculating the rough selection index value corresponding to the preset rough selection index is the existing technology and will not be described in detail here.

[0085] Step 301c, selecting the corresponding rough selection best division mode according to the rough selection index value corresponding to each preset mode feature.

[0086] Specifically, in this embodiment, a preset rough selection strategy is obtained, and based on the preset rough selection strategy and according to the rough selection index value corresponding to each mode feature in each unit size block, the corresponding rough selection best partitioning mode is screened out.

[0087] Among them, the rough selection strategy is a strategy for selecting the best rough selection division mode according to the rough selection index value corresponding to each mode feature in each unit size block.

[0088] As an optional implementation, in this embodiment, the rough selection strategy may be: for each unit size block, the pattern feature corresponding to the minimum rough selection index value may be determined as the rough selection optimal division mode.

[0089] The tree coding unit division method provided in the present embodiment, when determining the coarse selection best division mode corresponding to each unit size block in the CTU, adopts a coarse selection mode selection algorithm to calculate a first preset number of preset mode features corresponding to each unit size block; calculates a coarse selection index value corresponding to each preset mode feature based on a preset coarse selection index in the coarse selection mode selection algorithm; and screens out the corresponding coarse selection best division mode according to the coarse selection index value corresponding to each preset mode feature. Since the number of calculated preset mode features configured in the coarse selection mode selection algorithm is the first preset number and the preset index is the coarse selection index, compared with determining the fine selection best division mode, the efficiency of determining the coarse selection best division mode corresponding to each unit size block can be effectively improved by reducing the number of calculated preset mode features and reducing the time complexity of calculating the preset coarse selection index.

[0090] Step 302 : Initially merge the unit-size blocks that meet the initial merging conditions according to each roughly selected optimal partitioning mode to obtain an initial merging result.

[0091] The initial merge result includes the initial merged size block.

[0092] It can be understood that the initial merging result also includes the unit size blocks that are not merged after the initial merging process is completed.

[0093] In this embodiment, the unit size block is the smallest size block in the CTU. In order to achieve video compression through video coding, the unit size blocks need to be initially merged first, so as to initially merge the unit size blocks that can be encoded together. Therefore, before the unit size blocks are initially merged, it is necessary to determine whether each unit size block meets the initial merging condition based on the roughly selected optimal division mode corresponding to each unit size block, and initially merge the unit size blocks that meet the initial merging condition.

[0094] As an optional implementation, in this embodiment, step 302 includes the following steps:

[0095] Step 302a, determining a unit size block that meets the initial merging condition according to each rough selection best partitioning mode and the rough selection index value corresponding to each rough selection best partitioning mode.

[0096] In this embodiment, when judging whether each unit size block meets the initial merging condition based on the coarse selection best division mode corresponding to each unit size block, since the coarse selection best division mode corresponding to each unit size block has a coarse selection index value, the coarse selection index value can represent the rough cost value of the unit size block when performing video encoding, so the coarse selection index value of the coarse selection best division mode corresponding to each unit size block can be obtained, and whether the initial merging condition is met is judged based on the coarse selection index value of the coarse selection best division mode corresponding to each unit size block, and then the unit size block that meets the initial merging condition is determined.

[0097] As an optional implementation, in this embodiment, step 302a includes the following solutions:

[0098] In response to the fact that the rough selection optimal partitioning modes corresponding to any multiple unit size blocks are consistent and the difference in the rough selection index values ​​corresponding to the multiple unit size blocks is less than a preset rough selection index threshold, the multiple unit size blocks are determined to be unit size blocks that meet the preliminary merging conditions.

[0099] Specifically, a plurality of unit size blocks having the same rough selection best partitioning mode can be first obtained based on the rough selection best partitioning mode corresponding to the unit size block. It is determined whether the difference in the rough selection index values ​​corresponding to the plurality of unit size blocks having the same rough selection best partitioning mode is less than a preset rough selection index threshold. If it is determined that the difference in the rough selection index values ​​corresponding to the plurality of unit size blocks is less than the preset rough selection index threshold, it means that the rough selection index values ​​corresponding to the plurality of unit size blocks are the same or similar, and it is determined that the plurality of unit size blocks can be initially used as a CU for video encoding during video encoding, and then the plurality of unit size blocks are determined to be unit size blocks that meet the preliminary merging conditions.

[0100] There is no limit on the size of the preset rough selection index threshold.

[0101] The tree coding unit division method provided in this embodiment, when determining the unit size blocks that meet the initial merging condition according to each rough selection best division mode and the rough selection index value corresponding to each rough selection best division mode, in response to the rough selection best division mode corresponding to any multiple unit size blocks being consistent, and the difference between the rough selection index values ​​corresponding to the multiple unit size blocks being less than a preset rough selection index threshold, the multiple unit size blocks are determined to be unit size blocks that meet the preliminary merging condition. Since the unit size blocks that meet the initial merging condition are determined from two dimensions of the rough selection best division mode and the rough selection index value corresponding to the rough selection best division mode, the determined unit size blocks that meet the preliminary merging condition can be made more accurate.

[0102] Step 302b, determining the initial clustering labels corresponding to the unit size blocks that meet the initial merging conditions.

[0103] In this embodiment, the corresponding initial clustering labels can be configured in advance based on each rough selection best partitioning mode to form a mapping relationship between the rough selection best partitioning mode and the initial clustering labels. It can be understood that the closer the rough selection best partitioning modes are, the closer the initial clustering labels corresponding to them are.

[0104] Specifically, in this embodiment, it can be determined that the unit size block that meets the initial merging conditions corresponds to the coarsely selected best partitioning mode, and the initial clustering label with a mapping relationship of the coarsely selected best partitioning mode of the unit size block that meets the initial merging conditions is found in the above mapping relationship as the corresponding initial clustering label.

[0105] Step 302c, based on the initial clustering labels corresponding to the unit size blocks that meet the initial merging conditions, initially merge the unit size blocks that meet the initial merging conditions to obtain an initial merging result.

[0106] As an optional implementation, in this embodiment, step 302c includes the following steps:

[0107] Step 302c1, obtaining a plurality of unit size blocks to be merged that have the same initial clustering label, or whose initial clustering labels are within the same preset merging label range.

[0108] The multiple unit size blocks to be merged are in a connected relationship, where at least one edge corresponding to any one of the multiple unit size blocks to be merged overlaps with at least one edge corresponding to another at least one unit size block to be merged.

[0109] Step 302c2, initially merging the unit size blocks to be merged to obtain an initial merging result.

[0110] Optionally, in this embodiment, the initial clustering labels corresponding to each unit size block can be compared, and multiple unit size blocks with the same initial clustering label and a connectivity relationship can be determined as size blocks to be merged, and the unit size blocks to be merged can be initially merged to obtain the initial merged size blocks, and the initial merged size blocks and the unit size blocks that have not been initially merged can be determined as the initial merging results.

[0111] Or optionally, in order to merge as many unit size blocks as possible and reduce the number of unit size blocks, multiple unit size blocks whose initial clustering labels are within the same preset merge label range and have a connectivity relationship are determined as size blocks to be merged, and the unit size blocks to be merged are initially merged to obtain initial merged size blocks, and the initial merged size blocks and the unit size blocks that have not been initially merged are determined as initial merging results.

[0112] There are multiple preset merged label ranges, and the values ​​corresponding to the multiple initial clustering labels within each preset merged label range are continuous.

[0113] The tree coding unit division method provided in the present embodiment performs initial merging of unit size blocks that meet the initial merging condition based on the initial clustering labels corresponding to the unit size blocks that meet the initial merging condition to obtain an initial merging result, and obtains multiple unit size blocks to be merged with the same initial clustering label or with the initial clustering labels within the same preset merging label range; the multiple unit size blocks to be merged are connected; the multiple unit size blocks to be merged are initially merged to obtain an initial merging result, and unit size blocks with the same or similar initial clustering labels can be merged, and two degrees of merging methods of unit size blocks are provided, and unit size blocks can be initially merged to different degrees based on the number of unit size blocks, which provides more selectivity for the initial merging method and also provides an optional initial merging method for the tree coding unit division method.

[0114] As another optional implementation, in this embodiment, step 302c includes the following steps:

[0115] Step 302ca, based on the initial clustering labels corresponding to the unit size blocks that meet the initial merging conditions, the partitioning strategy and at least one partitioning method of the size block configuration corresponding to each different size in the CTU, the CTU is divided into size blocks in descending order of size to obtain the divided size blocks.

[0116] Among them, at least one division method is configured for the size block corresponding to each size in the CTU. The division method may include at least one of the following:

[0117] No division (expressed as: ns), horizontal bisection (expressed as: h_bt), vertical bisection (expressed as: v_bt), horizontal trisection (expressed as: h_tt), vertical trisection (v_tt), and quartering (expressed as: qt).

[0118] The partitioning strategy is a strategy for partitioning the CTU into size blocks.

[0119] Optionally, the partitioning strategy may be: according to the initial clustering label, in the current size block, according to at least one of the configured partitioning methods, select the partitioning method that contains the most unit size blocks and has the same initial clustering label. If at least two partitioning methods contain the same number of unit size blocks, the sum of the rough selection index values ​​of the contained unit size blocks is calculated, and the partitioning method corresponding to the smallest sum of the rough selection index values ​​is selected. If there are at least two partitioning methods in which the sum of the rough selection index values ​​is equal and the smallest, the priority of the partitioning is determined according to the order of the configured partitioning methods, and the partitioning method with the highest priority is selected.

[0120] Among them, the earlier the division method is, the higher the corresponding priority is.

[0121] It is understandable that in the partitioning strategy, the size restriction condition of the standard video coding protocol needs to be met. The partitions that do not meet the size restriction condition of the standard video coding protocol can be eliminated.

[0122] Step 302cb: determine the divided size block as the initial merged size block.

[0123] It can be understood that the size block after the division includes at least one unit size block with the same initial clustering label, so the size block after the division can be determined as the initial merged size block.

[0124] Below Figure 4 As an example, this implementation mode is described in more detail.

[0125] like Figure 4 The left image in the figure is a 128x128 CTU, and each rectangular block represents an 8x8 unit size block. The value in the rectangular block represents the initial clustering label corresponding to the unit size block.

[0126] First, the partitioning strategy is configured, and the corresponding partitioning method is pre-configured for each size block. According to the pre-configured partitioning strategy, partitioning method and initial clustering labels corresponding to each unit size block, the CTU is partitioned into size blocks in descending order to obtain the completed size blocks.

[0127] An exemplary description is as follows:

[0128] (1) For a 128x128 CTU, it can be divided into four by default (expressed as: qt), that is, four 64x64 are obtained.

[0129] (2) For a 64x64 size block, the pre-configured partitioning modes are: no partitioning (expressed as: ns), and qt.

[0130] Taking the first 64x64 size block as an example, since the initial cluster labels within the 64x64 size block are not exactly the same, it is divided in the qt way to obtain four 32x32.

[0131] (3) 32x32 size block, the pre-configured partitioning methods are: ns, horizontal binary (expressed as: h_bt), vertical binary (expressed as: v_bt), horizontal trisection (expressed as: h_tt), vertical trisection (v_tt), qt.

[0132] Specifically, according to the initial clustering label, the division method that includes the merged maximum size block is selected. If the number of unit size blocks contained in the maximum size block included in two division methods is equal, the sum of the rough selection index values ​​(such as SAD) of the unit size blocks contained in the maximum size block is compared, and the division method with the smaller sum of the rough selection index values ​​is selected. If the sum of the rough selection index values ​​is equal, the order of the above-configured division methods is the division priority when the sum of the rough selection index values ​​is equal. Divide according to the division method with the highest priority. That is, the division methods with the highest division priority from high to low are s, h_bt, v_bt, h_tt, v_tt, qt.

[0133] Taking the first 32x32 as an example, when v_bt is performed, two 16x32 size blocks can be obtained. At this time, the number of merged blocks is the largest, so it is determined that 32x32 is v_bt first; after obtaining two 16x32 blocks, the 16x32 on the left has the same initial clustering label, so ns. For the 16x32 block on the right, h_bt and v_bt can both obtain a size block containing 4 8x8 blocks. Assuming that the cost of h_bt is the smallest, h_bt is selected for division. Therefore, the 16x32 size block on the right is divided into two 16x16 size blocks. The upper 16x16 block is v_bt judged by the initial clustering label, and the lower 16x16 size block is judged as ns by the label. At this time, the division of the first 32x32 block in the first 64x64 block is determined.

[0134] (4) For a 16x16 size block, the pre-configured partitioning method is: ns, h_bt, v_bt, qt.

[0135] The specific partitioning strategy is similar to the 32x32 partitioning strategy and will not be described in detail here.

[0136] However, it should be noted that when dividing each size block, the size restriction of the standard video coding protocol needs to be met. For example, for the divided 32xN or Nx32 blocks, further reasonable size judgment is performed according to the standard video coding protocol. For example, if the standard video coding protocol prohibits the binary tree division of the middle partition in the same direction after the ternary tree division, even if the ternary tree division method and the binary tree division method are configured, it is prohibited to perform the binary tree division of the middle partition in the same direction after the ternary tree division.

[0137] In the above example, the final initial merged size block is as follows Figure 4 As shown in the right figure.

[0138] The tree coding unit division method provided in this embodiment performs initial merging of each unit size block that meets the initial merging condition based on the initial clustering label corresponding to each unit size block that meets the initial merging condition to obtain the initial merging result. Based on the initial clustering label corresponding to each unit size block that meets the initial merging condition, the division strategy and at least one division method of the size block configuration corresponding to each different size in the CTU, the CTU is divided into size blocks in order from large to small, and the divided size blocks are obtained, and the divided size blocks are determined as the size blocks after initial merging. The CTU can be divided from the dimension of the size block from large to small according to the initial clustering label, the division strategy and at least one division method of the configuration, and then the initial merging of the unit size blocks that meet the initial merging condition is realized in reverse. Another optional initial merging method is provided for the tree coding unit division method.

[0139] Step 303: remove unreasonable sizes from the initial merged size blocks to obtain multiple initial divided size blocks.

[0140] As an optional implementation, in this embodiment, step 303 includes the following steps:

[0141] Step 303a: determine unreasonable sizes in the initial merged size blocks based on size restriction conditions in the standard video coding protocol.

[0142] The unreasonable size is a size that does not meet the size restriction condition of the standard video coding protocol.

[0143] Among them, the size constraints strictly followed in the standard video coding protocol may include: image boundary constraints, redundant partition constraints, virtual pipeline data units (VPDUs) constraints. The user-configurable size constraints in the standard video coding protocol may include: coding tree type, partition depth, partition type, mutual exclusivity and rationality requirements of partition size, etc.

[0144] Specifically, in this embodiment, for each initial merged size, whether the size of the initial merged size block is reasonable is judged based on the size restriction conditions in each standard video coding protocol, and the size corresponding to the initial merged size block that does not meet the size restriction conditions in at least one standard video coding protocol is determined as an unreasonable size.

[0145] Step 303b, splitting the initially merged size blocks corresponding to the unreasonable size to obtain a plurality of initially divided size blocks.

[0146] In this embodiment, unreasonable sizes in the initial merged size blocks are eliminated, that is, the initial merged size blocks corresponding to the unreasonable sizes are split so that the split size blocks meet the size restriction conditions of the standard video coding protocol.

[0147] The tree coding unit division method provided in the present embodiment determines the unreasonable sizes in the initial merged size blocks based on the size restriction conditions in the standard video coding protocol when eliminating the unreasonable sizes in the initial merged size blocks to obtain multiple initial divided size blocks; the initial merged size blocks corresponding to the unreasonable sizes are split to obtain multiple initial divided size blocks. Since the unreasonable sizes in the initial merged size blocks are determined according to the size restriction conditions in the standard video coding protocol, the accuracy of determining the unreasonable sizes can be guaranteed, and the unreasonable sizes can be accurately eliminated.

[0148] It should be noted that step 302 to step 303 are an optional implementation of step 202 in the first embodiment.

[0149] The tree coding unit division method provided in the present embodiment performs initial division on each unit size block according to each roughly selected optimal division mode to obtain a plurality of initially divided size blocks, performs initial merging on the unit size blocks that meet the initial merging condition according to each roughly selected optimal division mode to obtain an initial merging result; the initial merging result includes the initially merged size blocks; unreasonable sizes in the initially merged size blocks are eliminated to obtain a plurality of initially divided size blocks. Since not only the initial merging process is performed when the unit size blocks are initially divided, but also the unreasonable sizes of the initially merged size blocks in the initial merging result are eliminated, the accuracy of the initial division process can be effectively guaranteed.

[0150] Step 304, determining the best partitioning mode corresponding to each size block after initial partitioning.

[0151] The size blocks after the preliminary division include the size blocks that have undergone the preliminary division and the unit size blocks that have not been changed after the preliminary division process.

[0152] As an optional implementation, in this embodiment, step 304 includes the following steps:

[0153] Step 304a: Calculate a second preset number of preset pattern features corresponding to each initially divided size block using a fine selection pattern selection algorithm.

[0154] The second preset number is the number of pattern features determined in the fine selection mode selection algorithm. The specific value is not limited, such as 67, or greater than the number of pattern features corresponding to the rough selection best division mode.

[0155] The fine selection mode selection algorithm includes an algorithm for determining a second preset number of preset mode features and a preset fine selection index.

[0156] Among them, the preset fine selection index has a higher time complexity in calculating the index value than the preset rough selection index, but when the fine selection index value is used to screen out the fine selection best division mode, the fine selection best division mode is more accurate than the rough selection best division mode.

[0157] Specifically, in this embodiment, an algorithm for determining a second preset number of preset pattern features is used to calculate a second preset number of preset pattern features corresponding to each size block after initial division. If the CTU is an intra-frame module, the algorithm for determining the second preset number of preset pattern features may be a second preset fast angle search algorithm. The pattern feature may be Dir. If the CTU is an inter-frame module, the algorithm for determining the second preset number of preset pattern features may be a second preset fast motion search algorithm, and the pattern feature may be MV.

[0158] It should be noted that the algorithm types of the first preset fast angle search algorithm and the second preset fast angle search algorithm are not limited. Similarly, the algorithm types of the first preset fast motion search algorithm and the second preset fast motion search algorithm are also not limited. However, the second preset fast angle search algorithm is a more complex algorithm than the first preset fast angle search algorithm, and the number of Dir determined by it is larger and more accurate. Similarly, the second preset fast motion search algorithm is a more complex algorithm than the first preset fast motion search algorithm, and the number of MV determined by it is larger and more accurate.

[0159] The second preset number is greater than the first preset number.

[0160] Step 304b, calculating the fine selection index value corresponding to each preset mode feature based on the preset fine selection index in the fine selection mode selection algorithm.

[0161] Specifically, in this embodiment, a preset fine selection index is obtained from the fine selection mode selection algorithm. For each mode feature in each size block after initial division, a fine selection index value corresponding to the preset fine selection index is calculated.

[0162] In this embodiment, the method for calculating the fine selection index value corresponding to the preset fine selection index is the existing technology and will not be described in detail here.

[0163] Step 304c, selecting the corresponding optimal fine-selection division mode according to the fine-selection index value corresponding to each preset mode feature.

[0164] Specifically, in this embodiment, a preset fine selection strategy is obtained, and based on the preset fine selection strategy and according to the fine selection index value corresponding to each pattern feature in each size block after initial division, the corresponding fine selection best division mode is screened out.

[0165] The fine selection strategy is a strategy for selecting the best fine selection division mode according to the fine selection index value corresponding to each mode feature in each size block after the initial division.

[0166] As an optional implementation, in this embodiment, the fine selection strategy may be: for each size block after initial division, the pattern feature corresponding to the minimum fine selection index value may be determined as the best fine selection division pattern.

[0167] The tree coding unit division method provided in the present embodiment, when determining the fine-selection optimal division mode corresponding to each size block after initial division, adopts a fine-selection mode selection algorithm to calculate the second preset number of preset mode features corresponding to each size block after initial division; calculates the fine-selection index value corresponding to each preset mode feature based on the preset fine-selection index in the fine-selection mode selection algorithm; and selects the corresponding fine-selection optimal division mode according to the fine-selection index value corresponding to each preset mode feature, and the second preset number is greater than the first preset number. Since the number of calculated preset mode features configured in the fine-selection mode selection algorithm is the second preset number, the second preset number is greater than the first preset number, and the preset index is the fine selection index, compared with determining the rough-selection optimal division mode, the accuracy of determining the fine-selection optimal division mode corresponding to each size block after initial division can be effectively improved by increasing the number of calculated preset mode features and increasing the time complexity of calculating the preset fine selection index.

[0168] Step 305 , re-merge the blocks of the initial divided size that meet the re-merging condition according to each finely selected optimal division mode to obtain a re-merging result.

[0169] The re-merging result includes the re-merged size block.

[0170] It can be understood that the re-merging result also includes the blocks of the initial merged size that have not been merged after the re-merging process.

[0171] In this embodiment, the initial division of the unit size blocks is performed based on the rough-selected optimal division mode corresponding to each unit size block during the initial division process, so the initial division result is not very accurate. Therefore, in order to improve the accuracy of the division, the initial division size blocks that are significantly smaller in number than the initial unit size blocks are re-merged according to the corresponding fine-selected optimal division mode to obtain the re-merged result.

[0172] As an optional implementation, step 305 includes the following steps:

[0173] Step 305a: Determine the size blocks after initial partitioning that meet the re-merging condition according to each fine-selection optimal partitioning mode and the corresponding fine-selection index value under each fine-selection optimal partitioning mode.

[0174] In this embodiment, when judging whether each initially divided size block meets the re-merging condition based on the finely selected best division mode corresponding to each initially divided size block, since the finely selected best division mode corresponding to each initially divided size block has a fine selection index value, the fine selection index value can represent a more accurate cost value of the unit size block during video encoding, so the fine selection index value of the finely selected best division mode corresponding to each initially divided size block can be obtained, and whether the re-merging condition is met is judged based on the fine selection index value of the finely selected best division mode corresponding to each initially divided size block, and then the unit size block that meets the re-merging condition is determined.

[0175] As an optional implementation, step 305a includes the following scheme:

[0176] In response to the fact that the best fine-selection partitioning modes corresponding to any multiple initial-partitioned size blocks are consistent, and the difference in the fine-selection index values ​​corresponding to the multiple initial-partitioned size blocks is less than a preset fine-selection index threshold, the multiple initial-partitioned size blocks are determined to be initial-partitioned size blocks that meet the re-merging condition.

[0177] Specifically, a plurality of unit size blocks having the same fine-selection best partitioning mode can be first obtained based on the fine-selection best partitioning mode corresponding to the size block after initial partition. It is determined whether the difference in the fine-selection index values ​​corresponding to the plurality of size blocks after initial partition having the same fine-selection best partitioning mode is less than a preset fine-selection index threshold. If it is determined that the difference in the fine-selection index values ​​corresponding to the plurality of size blocks after initial partition is less than the preset fine-selection index threshold, it means that the fine-selection index values ​​corresponding to the plurality of size blocks after initial partition are the same or similar, and it is determined that the plurality of size blocks after initial partition can be used as a CU for video encoding during video encoding, and further the plurality of size blocks after initial partition are determined to be initial size blocks after initial partition that meet the re-merging condition.

[0178] There is no limit on the size of the preset fine-selection indicator threshold.

[0179] The tree coding unit division method provided by the present embodiment determines the size blocks after initial division that meet the re-merging condition according to each fine-selected optimal division mode and the fine-selection index value corresponding to each fine-selected optimal division mode, and in response to the fine-selected optimal division mode corresponding to any multiple size blocks after initial division being consistent, and the fine-selection index values ​​corresponding to the multiple size blocks after initial division being different from each other are less than a preset fine-selection index threshold, the multiple size blocks after initial division are determined to be the size blocks after initial division that meet the re-merging condition. Since the size blocks after initial division that meet the re-merging condition are determined from two dimensions of the fine-selected optimal division mode and the fine-selection index value corresponding to the fine-selected optimal division mode, the determined size blocks after initial division that meet the re-merging condition can be made more accurate.

[0180] Step 305b, determining the re-clustering labels corresponding to the blocks of the initial divided size that meet the re-merging conditions.

[0181] In this embodiment, the implementation of step 305b is similar to the implementation of step 302b, and will not be described in detail here.

[0182] Step 305c: Based on the re-clustering labels corresponding to the re-divided size blocks that meet the re-merging conditions, the re-merging of the re-divided size blocks that meet the re-merging conditions is performed to obtain a re-merging result.

[0183] As an optional implementation, step 305c includes the following steps:

[0184] Step 305c1, obtaining a plurality of size blocks to be merged that have the same re-clustering label, or whose re-clustering labels are within the same preset merging label range.

[0185] Among them, multiple size blocks to be merged are connected.

[0186] Step 305c2: Initially merge multiple blocks of the sizes to be merged to obtain a secondary merge result.

[0187] In this embodiment, the implementation of step 305c1-step 305c2 is similar to the implementation of step 302c1-step 302c2, and will not be described in detail here.

[0188] The tree coding unit division method provided in this embodiment, based on the re-clustering labels corresponding to the initial divided size blocks that meet the re-merging conditions, re-merges each initial divided size block that meets the re-merging conditions to obtain a re-merging result, obtains multiple size blocks to be merged with the same re-clustering label, or the re-clustering labels are within the same preset merging label range, and initially merges the multiple size blocks to be merged to obtain a re-merging result. The initial divided size blocks with the same or similar re-clustering labels can be merged, and two degrees of re-merging methods of the initial divided size blocks are provided. The initial divided size blocks can be merged to different degrees based on the number of initial divided size blocks, providing more selectivity for the re-merging method.

[0189] Step 306: remove unreasonable sizes from the re-merged size blocks to obtain multiple re-divided size blocks.

[0190] As an optional implementation, in this embodiment, step 306 includes the following steps:

[0191] Step 306a: determine the unreasonable size of the re-merged size block based on the size restriction condition in the standard video coding protocol.

[0192] Step 306b, splitting the re-merged size blocks corresponding to the unreasonable size to obtain a plurality of re-divided size blocks.

[0193] In this embodiment, the implementation of step 306a-step 306b is similar to the implementation of step 303a-step 303b, and will not be described in detail here.

[0194] The tree coding unit division method provided in this embodiment, when eliminating unreasonable sizes in the re-merged size blocks to obtain multiple re-divided size blocks, determines the unreasonable sizes in the re-merged size blocks based on the size restriction conditions in the standard video coding protocol, and splits the re-merged size blocks corresponding to the unreasonable sizes to obtain multiple re-divided size blocks. Since the unreasonable sizes in the re-merged size blocks are determined according to the size restriction conditions in the standard video coding protocol, the accuracy of determining the unreasonable sizes can be guaranteed, and the unreasonable sizes can be accurately eliminated.

[0195] It should be noted that step 305 to step 306 are an optional implementation of step 204 in the first embodiment.

[0196] The tree coding unit division method provided in this embodiment, when each initially divided size block is re-divided according to each finely selected optimal division mode to obtain multiple re-divided size blocks, the initially divided size blocks that meet the re-merging condition are re-merged according to each finely selected optimal division mode to obtain a re-merged result; the re-merged result includes the re-merged size blocks; unreasonable sizes in the re-merged size blocks are eliminated to obtain multiple re-divided size blocks. Since when the initially divided size blocks are re-divided, not only the re-merging process is performed, but also the re-merged size blocks in the re-merged result are eliminated with unreasonable sizes, the accuracy of the re-dividing process can be effectively guaranteed.

[0197] Step 307: using a rate-distortion optimization algorithm to determine the final optimal partitioning mode of each re-divided size block.

[0198] Specifically, in this embodiment, a rate-distortion optimization algorithm is used to calculate the preset pattern features of each re-divided size block, and all division patterns are traversed based on the preset pattern features to determine the final optimal division pattern.

[0199] Among them, the accuracy of the final optimal division mode is greater than the accuracy of the carefully selected optimal division mode.

[0200] Step 308: Determine whether each re-divided size block is a final divided CU based on the rate-distortion optimization cost value corresponding to each final optimal division mode. If not, execute step 309, otherwise end.

[0201] In this embodiment, a rate-distortion optimization algorithm is used to determine the rate-distortion optimization cost value of each re-divided size block corresponding to the final optimal division mode. Each rate-distortion optimization cost value is compared to determine whether each re-divided size block is the final divided CU.

[0202] Step 309 , in response to the re-divided size block not being the final divided CU, the re-divided size block is divided down one layer to obtain the final divided CU.

[0203] Specifically, in this embodiment, if it is determined that the size block after the second division is not the final divided CU, the size block after the second division is divided down one layer, that is, after the division, a smaller size block is obtained, and the smaller size block is determined as the final divided CU.

[0204] The tree coding unit division method provided in this embodiment adopts a rate-distortion optimization algorithm to determine the final optimal division mode of each re-divided size block when using a rate-distortion optimization algorithm to determine whether each re-divided size block is a final divided coding unit CU; based on the rate-distortion optimization cost value corresponding to each final optimal division mode, it is determined whether each re-divided size block is a final divided CU, and the rate-distortion optimization algorithm can be used to effectively ensure the accuracy of CTU division when determining whether each re-divided size block is a final divided coding unit CU.

[0205] The tree coding unit division method provided in this embodiment, in response to the re-divided size block is not the final divided CU, the re-divided size block is divided down by one layer to obtain the final divided CU. Since when the re-divided size block is not the final divided CU, the final divided CU is obtained by only dividing the re-divided size block down by one layer, so that the time complexity and resource occupancy can be further reduced.

[0206] Figure 5 A flowchart of a method for dividing a tree coding unit provided in another embodiment of the present application is shown in FIG. Figure 5 As shown, the method for dividing the tree coding unit provided in this embodiment is based on the method for dividing the tree coding unit provided in any of the above embodiments, and takes the type of CTU as an intra-frame module as an example to further illustrate the method for dividing the tree coding unit. The method for dividing the tree coding unit provided in this embodiment includes the following steps:

[0207] Step 401 : obtaining a tree coding unit CTU to be divided, and determining a roughly selected optimal intra-frame angle corresponding to each unit size block in the CTU.

[0208] Optionally, in this embodiment, in step 401, determining the roughly selected optimal intra-frame angle corresponding to each unit size block in the CTU includes the following steps:

[0209] Step 401a: use a first preset fast angle search algorithm to calculate a first preset number of intra-frame angles corresponding to each unit size block.

[0210] The type of the first preset fast angle search algorithm is not limited. The method of using the first preset fast angle search algorithm to calculate the intra-frame angle corresponding to each unit size block is a prior art and will not be described in detail in this embodiment.

[0211] Among them, the first preset number can be 33.

[0212] Step 401b, calculating the SAD value corresponding to the angle in each frame based on the SAD.

[0213] Among them, the method of calculating the SAD value corresponding to the angle in each frame based on SAD is a prior art and will not be described in detail here.

[0214] Step 401c, selecting the corresponding roughly selected best intra-frame angle according to the SAD value corresponding to each intra-frame angle.

[0215] Optionally, in this embodiment, the SAD values ​​corresponding to the angles in each frame may be compared to obtain the intra-frame angle corresponding to the minimum SAD value, and the intra-frame angle corresponding to the minimum SAD value may be determined as the roughly selected optimal intra-frame angle.

[0216] Step 402 : Initially merge the unit-sized blocks that meet the initial merging conditions according to the roughly selected best intra-frame angles to obtain an initial merging result.

[0217] Optionally, step 402 includes the following steps:

[0218] Step 402a, determining a unit size block that meets the initial merging condition according to each roughly selected best intra-frame angle and the SAD value corresponding to each roughly selected best intra-frame angle.

[0219] As an optional implementation, step 402a includes the following scheme:

[0220] In response to the coarsely selected best intra-frame angles corresponding to any plurality of unit size blocks being consistent and the SAD values ​​corresponding to the plurality of unit size blocks differing by less than a preset SAD threshold, the plurality of unit size blocks are determined to be unit size blocks satisfying preliminary merging conditions.

[0221] Step 402b, determining the initial clustering labels corresponding to the unit size blocks that meet the initial merging conditions.

[0222] Step 402c, based on the initial clustering labels corresponding to the unit size blocks that meet the initial merging conditions, initially merge the unit size blocks that meet the initial merging conditions to obtain an initial merging result.

[0223] Step 403: remove the unreasonable sizes in the initial merged size blocks to obtain multiple initial divided size blocks.

[0224] In this embodiment, the specific implementation scheme and beneficial effects of step 402-step 403 are similar to the implementation scheme and beneficial effects of step 302-step 303 in the above embodiment, and are not described in detail here.

[0225] Step 404, determining the finely selected optimal intra-frame angle corresponding to each initially divided size block.

[0226] As an optional implementation, in this embodiment, step 404 includes the following steps:

[0227] Step 404a: Use a second preset fast angle search algorithm to calculate a second preset number of intra-frame angles corresponding to each initially divided size block.

[0228] The type of the first preset fast angle search algorithm is not limited, and the second preset fast angle search algorithm is a more complex algorithm than the first preset fast angle search algorithm, and the number of intra-frame angles determined by the second preset fast angle search algorithm is greater and more accurate.

[0229] In this embodiment, the method of using the second preset fast angle search algorithm to calculate the intra-frame angle corresponding to each initially divided size block is a prior art, which will not be described in detail in this embodiment.

[0230] Among them, the second preset number can be 67.

[0231] Step 404b, calculating the SATD value corresponding to the angle in each frame based on SATD.

[0232] The method of calculating the SATD value corresponding to the angle in each frame based on SATD is a prior art and will not be described in detail here.

[0233] Among them, SATD has a higher time complexity than SAD in calculating specific values, but when SATD is used to screen out the fine-selected best intra-frame angle, the fine-selected best intra-frame angle is more accurate than the coarse-selected best intra-frame angle.

[0234] Step 404c: Filter out the corresponding optimal intra-frame angle according to the SATD value corresponding to each intra-frame angle.

[0235] Optionally, in this embodiment, the SATD values ​​corresponding to the intra-frame angles may be compared to obtain the intra-frame angle corresponding to the minimum SATD value, and the intra-frame angle corresponding to the minimum SATD value may be determined as the selected optimal intra-frame angle.

[0236] Step 405 , re-merge the blocks of the initial divided size that meet the re-merging condition according to each finely selected optimal intra-frame angle to obtain a re-merging result.

[0237] Optionally, step 405 includes the following steps:

[0238] Step 405a: Determine the initial divided size blocks that meet the re-merging condition according to each finely selected best intra-frame angle and the SATD value corresponding to each finely selected best intra-frame angle.

[0239] As an optional implementation, step 405a includes the following scheme:

[0240] In response to the consistency of the selected best intra-frame angles corresponding to any multiple initially divided size blocks, and the difference in SATD values ​​corresponding to the multiple initially divided size blocks is less than a preset SATD threshold, the multiple initially divided size blocks are determined to be initially divided size blocks that meet the re-merging condition.

[0241] Step 405b, determining the re-clustering labels corresponding to the blocks of the initial divided size that meet the re-merging conditions.

[0242] Step 405c: Based on the re-clustering labels corresponding to the re-divided size blocks that meet the re-merging conditions, the re-merge the re-divided size blocks that meet the re-merging conditions to obtain a re-merging result.

[0243] Step 406: remove unreasonable sizes from the re-merged size blocks to obtain a plurality of re-divided size blocks.

[0244] In this embodiment, the specific implementation scheme and beneficial effects of step 405-step 406 are similar to the implementation scheme and beneficial effects of step 305-step 306 in the above embodiment, and are not described in detail here.

[0245] Step 407: using a rate-distortion optimization algorithm to determine the final optimal intra-frame angle of each re-divided size block.

[0246] Step 408: Determine whether each re-divided size block is a final divided CU based on the rate-distortion optimization cost value corresponding to each final optimal intra-frame angle. If not, execute step 409, otherwise end.

[0247] Step 409 , in response to the re-divided size block not being the final divided CU, the re-divided size block is divided down one layer to obtain the final divided CU.

[0248] In this embodiment, the implementation method and beneficial effects of steps 407 to 409 are similar to the implementation scheme and beneficial effects of steps 307 to 309 in the above embodiment, and are not described in detail here.

[0249] Figure 6 A flowchart of a method for dividing tree coding units provided in another embodiment of the present application is shown in FIG. Figure 6 As shown, the method for dividing the tree coding unit provided in this embodiment is based on the method for dividing the tree coding unit provided in any of the above embodiments, and takes the type of CTU as an inter-frame module as an example to further illustrate the method for dividing the tree coding unit. The method for dividing the tree coding unit provided in this embodiment includes the following steps:

[0250] Step 501 : obtaining a tree coding unit CTU to be divided, and determining a roughly selected optimal inter-frame motion vector corresponding to each unit size block in the CTU.

[0251] Optionally, in this embodiment, in step 501, determining the roughly selected best inter-frame motion vector corresponding to each unit size block in the CTU includes the following steps:

[0252] Step 501a: Calculate a first preset number of inter-frame motion vectors corresponding to each unit size block using a first preset fast motion search algorithm.

[0253] The type of the first preset fast motion search algorithm is not limited. The method of using the first preset fast motion search algorithm to calculate the inter-frame motion vector corresponding to each unit size block is a prior art and will not be described in detail in this embodiment.

[0254] Step 501b: Calculate the SAD value corresponding to each inter-frame motion vector based on the SAD.

[0255] The method of calculating the SAD value corresponding to each inter-frame motion vector based on SAD is a prior art and will not be described in detail here.

[0256] Step 501c: Filter out the corresponding roughly selected best inter-frame motion vector according to the SAD value corresponding to each inter-frame motion vector.

[0257] Optionally, in this embodiment, the SAD values ​​corresponding to the inter-frame motion vectors may be compared to obtain the inter-frame motion vector corresponding to the minimum SAD value, and the inter-frame motion vector corresponding to the minimum SAD value may be determined as the roughly selected best inter-frame motion vector.

[0258] Step 502 : Initially merge the unit-sized blocks that meet the initial merging condition according to the roughly selected best inter-frame motion vectors to obtain an initial merging result.

[0259] Step 503: remove the unreasonable sizes in the initial merged size blocks to obtain a plurality of initial divided size blocks.

[0260] In this embodiment, the specific implementation scheme and beneficial effects of step 502-step 503 are similar to the implementation scheme and beneficial effects of step 302-step 303 in the above embodiment, and are not described in detail here.

[0261] Step 504: determine the finely selected best inter-frame motion vector corresponding to each initially divided size block.

[0262] As an optional implementation, in this embodiment, step 504 includes the following steps:

[0263] Step 504a: Use a second preset fast motion search algorithm to calculate a second preset number of inter-frame motion vectors corresponding to each of the initially divided size blocks.

[0264] The type of the first preset fast motion search algorithm is not limited, and the second preset fast motion search algorithm is a more complex algorithm than the first preset fast motion search algorithm, and the number of inter-frame motion vectors determined by the second preset fast motion search algorithm is greater and more accurate.

[0265] In this embodiment, the method of using the second preset fast motion search algorithm to calculate the inter-frame motion vectors corresponding to each initially divided size block is a prior art, which will not be described in detail in this embodiment.

[0266] The second preset number is greater than the first preset number.

[0267] Step 504b: Calculate the SATD value corresponding to each inter-frame motion vector based on SATD.

[0268] The method of calculating the SATD value corresponding to each inter-frame motion vector based on SATD is a prior art and will not be described in detail here.

[0269] Step 504c: Filter out the corresponding best inter-frame motion vector according to the SATD value corresponding to each inter-frame motion vector.

[0270] Step 505 : re-merge the blocks of the initial divided size that meet the re-merging condition according to the finely selected best inter-frame motion vectors to obtain a re-merging result.

[0271] Step 506: remove unreasonable sizes from the re-merged size blocks to obtain multiple re-divided size blocks.

[0272] Step 507: using a rate-distortion optimization algorithm to determine the final optimal inter-frame motion vector of each re-divided size block.

[0273] Step 508: Determine whether each re-divided size block is a final divided CU based on the rate-distortion optimization cost value corresponding to each final optimal inter-frame motion vector. If not, execute step 309, otherwise end.

[0274] Step 509: In response to the re-divided size block not being the final divided CU, the re-divided size block is divided down one layer to obtain the final divided CU.

[0275] In this embodiment, the implementation method and beneficial effects of steps 505 to 509 are similar to the implementation scheme and beneficial effects of steps 305 to 309 in the above embodiment, and are not described in detail here.

[0276] Figure 7 A schematic diagram of a tree coding unit division device provided in one embodiment of the present application is shown in FIG. Figure 7 As shown, the tree coding unit division device 60 provided in this embodiment includes an acquisition module 61, a determination module 62, an initial division module 63, a secondary division module 64 and a judgment module 65.

[0277] Among them, the acquisition module 61 is used to obtain the tree coding unit CTU to be divided. The determination module 62 is used to determine the rough-selected optimal division mode corresponding to each unit size block in the CTU. The initial division module 63 is used to perform initial division on each unit size block according to each rough-selected optimal division mode to obtain multiple size blocks after initial division. The determination module 62 is also used to determine the fine-selected optimal division mode corresponding to each size block after initial division. The re-division module 64 is used to re-divide each size block after initial division according to each fine-selected optimal division mode to obtain multiple size blocks after re-division. The judgment module 65 is used to determine whether each size block after re-division is a coding unit CU of the final division.

[0278] Optionally, the determination module 62, when determining the roughly selected optimal partitioning mode corresponding to each unit size block in the CTU, is specifically configured to:

[0279] A rough selection mode selection algorithm is used to calculate a first preset number of preset mode features corresponding to each unit size block; a rough selection index value corresponding to each preset mode feature is calculated based on a preset rough selection index in the rough selection mode selection algorithm; and a corresponding rough selection optimal division mode is screened out according to the rough selection index value corresponding to each preset mode feature.

[0280] Optionally, the initial division module 63 is specifically configured to:

[0281] According to each roughly selected optimal division mode, the unit size blocks that meet the initial merging conditions are initially merged to obtain an initial merging result; the initial merging result includes the initial merged size blocks; the unreasonable sizes in the initial merged size blocks are eliminated to obtain multiple initial divided size blocks.

[0282] Optionally, the initial partitioning module 63, when initially merging the unit size blocks satisfying the initial merging condition according to each roughly selected optimal partitioning mode to obtain an initial merging result, is specifically configured to:

[0283] According to each rough selection best division mode and the corresponding rough selection index value under each rough selection best division mode, the unit size block that meets the initial merging condition is determined; the initial clustering label corresponding to the unit size block that meets the initial merging condition is determined; based on the initial clustering label corresponding to each unit size block that meets the initial merging condition, the unit size blocks that meet the initial merging condition are initially merged to obtain an initial merging result.

[0284] Optionally, the initial partitioning module 63, when determining the unit size block satisfying the initial merging condition according to each rough selection best partitioning mode and the rough selection index value corresponding to each rough selection best partitioning mode, is specifically configured to:

[0285] In response to the fact that the rough selection optimal partitioning modes corresponding to any multiple unit size blocks are consistent and the difference in the rough selection index values ​​corresponding to the multiple unit size blocks is less than a preset rough selection index threshold, the multiple unit size blocks are determined to be unit size blocks that meet the preliminary merging conditions.

[0286] Optionally, the initial division module 63, when initially merging the unit size blocks satisfying the initial merging condition based on the initial clustering labels corresponding to the unit size blocks satisfying the initial merging condition to obtain the initial merging result, is specifically configured to:

[0287] Acquire multiple unit size blocks to be merged that have the same initial clustering label or whose initial clustering labels are within the same preset merging label range; the multiple unit size blocks to be merged are in a connected relationship; and initially merge the multiple unit size blocks to be merged to obtain an initial merging result.

[0288] Optionally, the initial division module 63, when initially merging the unit size blocks satisfying the initial merging condition based on the initial clustering labels corresponding to the unit size blocks satisfying the initial merging condition to obtain the initial merging result, is specifically configured to:

[0289] Based on the initial clustering labels corresponding to the unit size blocks that meet the initial merging conditions, the partitioning strategy and at least one partitioning method of the size block configuration corresponding to each different size in the CTU, the CTU is divided into size blocks in order from large to small to obtain the divided size blocks; and the divided size blocks are determined as the size blocks after initial merging.

[0290] Optionally, the initial division module 63, when removing unreasonable sizes from the initial merged size blocks to obtain multiple initial divided size blocks, is specifically used to:

[0291] The unreasonable size in the initial merged size block is determined based on the size restriction condition in the standard video coding protocol; the initial merged size block corresponding to the unreasonable size is split to obtain a plurality of initial divided size blocks.

[0292] Optionally, the determination module 62, when determining the finely selected optimal partitioning mode corresponding to each size block after initial partitioning, is specifically configured to:

[0293] A fine selection mode selection algorithm is used to calculate a second preset number of preset mode features corresponding to each size block after initial division; based on the preset fine selection indicators in the fine selection mode selection algorithm, the fine selection index value corresponding to each preset mode feature is calculated; according to the fine selection index value corresponding to each preset mode feature, the corresponding fine selection optimal division mode is screened out, and the second preset number is greater than the first preset number.

[0294] Optionally, the module 64 is further divided to be specifically used for:

[0295] According to each finely selected optimal division mode, the initial divided size blocks that meet the re-merging conditions are re-merged to obtain a re-merged result; the re-merged result includes the re-merged size blocks; unreasonable sizes in the re-merged size blocks are eliminated to obtain multiple re-divided size blocks.

[0296] Optionally, the re-dividing module 64, when re-merging the initially divided size blocks satisfying the re-merging condition according to each finely selected optimal division mode to obtain a re-merging result, is specifically configured to:

[0297] According to each fine-selection best division mode and the corresponding fine-selection index value under each fine-selection best division mode, the initial divided size blocks that meet the re-merging condition are determined; the re-clustering labels corresponding to the initial divided size blocks that meet the re-merging condition are determined; based on the re-clustering labels corresponding to the initial divided size blocks that meet the re-merging condition, the initial divided size blocks that meet the re-merging condition are re-merged to obtain the re-merging result.

[0298] Optionally, the re-dividing module 64, when determining the size blocks after initial partitioning that meet the re-merging condition according to each fine-selection optimal partitioning mode and the corresponding fine-selection index value under each fine-selection optimal partitioning mode, is specifically configured to:

[0299] In response to the fact that the best fine-selection partitioning modes corresponding to any multiple initial-partitioned size blocks are consistent, and the difference in the fine-selection index values ​​corresponding to the multiple initial-partitioned size blocks is less than a preset fine-selection index threshold, the multiple initial-partitioned size blocks are determined to be initial-partitioned size blocks that meet the re-merging condition.

[0300] Optionally, the judging module 65 is specifically configured to:

[0301] A rate-distortion optimization algorithm is used to determine the final optimal partitioning mode of each re-divided size block; based on the rate-distortion optimization cost value corresponding to each final optimal partitioning mode, it is determined whether each re-divided size block is a final partitioned CU.

[0302] Optionally, the method further includes: a final division module, configured to, in response to the re-divided size block not being the final divided CU, divide the re-divided size block one layer downward to obtain the final divided CU.

[0303] The tree coding unit division device provided in this embodiment can execute the tree coding unit division method provided in any of the above method embodiments. The implementation principle and technical effect are similar and will not be described here.

[0304] Figure 8 A schematic diagram of a tree coding unit division device provided in one embodiment of the present application. Figure 8 As shown, the tree coding unit division device 70 provided in this embodiment includes:

[0305] A processor 72 and a memory 71; wherein the memory 71 is used to store program codes; the processor 72 is used to call the degree code stored in the memory to execute the tree coding unit division method provided by any of the above embodiments. The relevant description can be understood by referring to the relevant descriptions and effects corresponding to the steps in the accompanying drawings, and no further details are given here.

[0306] The program may include program code, and the program code includes computer-executable instructions. The memory 801 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.

[0307] In this embodiment, the memory 71 and the processor 72 are connected via a bus. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0308] An embodiment of the present application further provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the tree coding unit division method provided in any one of the above embodiments.

[0309] An embodiment of the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements the tree coding unit division method provided in any one of the above embodiments.

[0310] The embodiment of the present application also provides an artificial intelligence chip and a board. The tree coding unit division method provided in any of the above embodiments is executed by using an artificial intelligence chip or a board. Fig. 9 is a structural diagram showing a board according to an embodiment of the present application. Fig. 9 As shown, the board 80 includes a chip 801, which is a system-on-chip (SoC), or system on chip, integrated with one or more combined processing devices, which are artificial intelligence computing units that support various deep learning and machine learning algorithms to meet the intelligent processing needs in complex scenarios in the fields of computer vision, speech, natural language processing, data mining, etc. In particular, deep learning technology is widely used in the field of cloud intelligence. A notable feature of cloud intelligence applications is the large amount of input data, which places high demands on the storage capacity and computing power of the platform. The board 80 of this embodiment is suitable for cloud intelligence applications and has huge off-chip storage, on-chip storage, and powerful computing power.

[0311] The chip 801 is connected to an external device 803 via an external interface device 802. The external device 803 is, for example, a server, a computer, a camera, a display, a mouse, a keyboard, a network card, or a wifi interface. The data to be processed can be transmitted from the external device 803 to the chip 801 via the external interface device 802. The calculation result of the chip 801 can be transmitted back to the external device 803 via the external interface device 802. According to different application scenarios, the external interface device 802 can have different interface forms, such as a PCIe interface.

[0312] The board 80 also includes a storage device 804 for storing data, which includes one or more storage units 805. The storage device 804 is connected to the control device 806 and the chip 801 through a bus and transmits data. The control device 806 in the board 80 is configured to regulate the state of the chip 801. To this end, in an application scenario, the control device 806 may include a single-chip microcomputer (Micro Controller Unit, MCU).

[0313] In a possible implementation, a combined processing device is also provided. Fig.10 is a structural diagram showing a combined processing device according to an embodiment of the present application. Fig.10 As shown in , the combined processing device 90 includes a computing device 901 , an interface device 902 , a processing device 903 and a storage device 904 .

[0314] The computing device 901 is configured to perform user-specified operations, and is mainly implemented as a single-core intelligent processor or a multi-core intelligent processor to perform deep learning or machine learning calculations. It can interact with the processing device 903 through the interface device 902 to jointly complete the user-specified operations.

[0315] The interface device 902 is used to transmit data and control instructions between the computing device 901 and the processing device 903. For example, the computing device 901 can obtain input data from the processing device 903 via the interface device 902 and write it into the storage device on the computing device 901 chip. Further, the computing device 901 can obtain control instructions from the processing device 903 via the interface device 902 and write them into the control cache on the computing device 901 chip. Alternatively or optionally, the interface device 902 can also read data in the storage device of the computing device 901 and transmit it to the processing device 903.

[0316] The processing device 903, as a general processing device, performs basic controls including but not limited to data handling, starting and / or stopping the computing device 901. Depending on the implementation, the processing device 903 can be a central processing unit (CPU), a graphics processing unit (GPU) or one or more types of processors in other general and / or special processors, these processors include but are not limited to digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., and their number can be determined according to actual needs. As before, only with respect to the computing device 901 of the present application, it can be regarded as having a single-core structure or a homogeneous multi-core structure. However, when the computing device 901 and the processing device 903 are integrated and considered together, the two are regarded as forming a heterogeneous multi-core structure.

[0317] The storage device 904 is used to store data to be processed, which may be DRAM 904 , which is a DDR memory, and is usually 16G or larger in size, and is used to store data of the computing device 901 and / or the processing device 903 .

[0318] Fig.11 , which is a schematic diagram of the internal structure of a single-core computing device. The single-core computing device 1000 is used to process input data such as computer vision, speech, natural language, and data mining. The single-core computing device 1000 includes three modules: a control module 1001, a computing module 1002, and a storage module 1003.

[0319] The control module 1001 is used to coordinate and control the operation of the computing module 1002 and the storage module 1003 to complete the deep learning task, and includes an instruction fetch unit (IFU) 10011 and an instruction decode unit (IDU) 10012. The instruction fetch unit 10011 is used to obtain instructions from the processing device, and the instruction decode unit 10012 decodes the obtained instructions and sends the decoding results to the computing module 1002 and the storage module 1003 as control information.

[0320] The operation module 1002 includes a vector operation unit 10021 and a matrix operation unit 10022. The vector operation unit 10021 is used to perform vector operations and can support complex operations such as vector multiplication, addition, and nonlinear transformation; the matrix operation unit 10022 is responsible for the core calculation of the deep learning algorithm, namely matrix multiplication and convolution.

[0321] The storage module 1003 is used to store or transfer relevant data, including a neuron RAM (NRAM) 10031, a parameter RAM (WRAM) 10032, and a direct memory access module (DMA) 10033. NRAM 10031 is used to store input neurons, output neurons, and intermediate results after calculation; WRAM 10032 is used to store the convolution kernel of the deep learning network, that is, the weight; DMA 10033 is connected to DRAM 904 through bus 1004, and is responsible for data transfer between the single-core computing device 1000 and DRAM 904.

[0322] Fig.12 , a schematic diagram of the internal structure of a computing device with multiple cores is shown. The multi-core computing device 1100 adopts a hierarchical structure design. The multi-core computing device 1100 is a system on chip, which includes at least one cluster, and each cluster includes multiple processor cores. In other words, the multi-core computing device 1100 is composed of a hierarchy of system on chip-cluster-processor core.

[0323] At the system-on-chip level, Fig.12 As shown, the multi-core computing device 1100 includes an external storage controller 1101 , a peripheral communication module 1102 , an on-chip interconnect module 1103 , a synchronization module 1104 and multiple clusters 1105 .

[0324] There may be multiple external storage controllers 1101, and two are shown in the figure as an example, which are used to respond to access requests issued by the processor core and access external storage devices, such as Fig.10DRAM 904 in the chip, thereby reading data from outside the chip or writing data. The peripheral communication module 1102 is used to receive control signals from the processing device through the interface device 902 to start the computing device 901 to perform tasks. The on-chip interconnect module 1103 connects the external storage controller 1101, the peripheral communication module 1102 and multiple clusters 1105 to transmit data and control signals between each module. The synchronization module 1104 is a global synchronization barrier controller (GBC) used to coordinate the work progress of each cluster and ensure information synchronization. Multiple clusters 1105 are the computing cores of the multi-core computing device 1100, and 4 are shown as an example in the figure. From the perspective of the cluster level, Fig.12 As shown, each cluster 1105 includes multiple processor cores (IPU cores) 1106 and a memory core (MEM core) 1107. Exemplarily, each cluster 1105 includes 4 processor cores and 1 memory, and the memory may be DRAM 904.

[0325] The figure shows four processor cores 1106 as an example, but the present application does not limit the number of processor cores 1106. Fig.10 Each processor core 1106 is similar to Fig.13 The single-core computing device 1200 also includes three modules: a control module 1201, a computing module 1202 and a storage module 1203. The functions and structures of the control module 1201, the computing module 1202 and the storage module 1203 are roughly the same as those of the control module 1001, the computing module 1002 and the storage module 1003. The control module 1201 includes an instruction fetch unit 12011 and an instruction decoding unit 12012. The computing module 1202 includes a vector computing unit 12021 and a matrix computing unit 12022. No further details are given. It should be noted that the storage module 1203 includes an input / output direct memory access module (IODMA) 12033 and a move direct memory access module (MVDMA) 12034. IODMA 12033 controls memory access between NRAM 12031 / WRAM 12032 and DRAM 904 via broadcast bus 1109 ; MVDMA 12034 is used to control memory access between NRAM 12031 / WRAM 12032 and storage unit (SRAM) 1108 .

[0326] Back to Fig.12The storage core 1107 is mainly used for storage and communication, that is, to store shared data or intermediate results between the processor cores 1106, and to perform communication between the cluster 1105 and the DRAM 904, communication between the clusters 1105, and communication between the processor cores 1106. In other embodiments, the storage core 1107 has the ability of scalar operations and is used to perform scalar operations.

[0327] The storage core 1107 includes an SRAM 1108, a broadcast bus 1109, a cluster direct memory access module (cluster direct memory access, CDMA) 1110 and a global direct memory access module (global direct memory access, GDMA) 1111. The SRAM 1108 plays the role of a high-performance data transfer station. The data reused between different processor cores 1106 in the same cluster 1105 does not need to be obtained from the DRAM 904 by each processor core 1106, but is transferred between the processor cores 1106 via the SRAM 1108. The storage core 1107 only needs to quickly distribute the reused data from the SRAM 1108 to multiple processor cores 1106, so as to improve the efficiency of inter-core communication and greatly reduce on-chip and off-chip input / output access.

[0328] The broadcast bus 1109, CDMA 1110 and GDMA 1111 are respectively used to perform communication between processor cores 1106, communication between clusters 1105 and data transmission between clusters 1105 and DRAM 904. They will be described below.

[0329] The broadcast bus 1109 is used to complete high-speed communication between the processor cores 1106 in the cluster 1105. The broadcast bus 1109 of this embodiment supports inter-core communication modes including unicast, multicast and broadcast. Unicast refers to point-to-point (e.g., single processor core to single processor core) data transmission, multicast is a communication mode of transmitting a copy of data from SRAM 1108 to specific processor cores 1106, and broadcast is a communication mode of transmitting a copy of data from SRAM 1108 to all processor cores 1106, which is a special case of multicast.

[0330] CDMA 1110 is used to control memory access to SRAM 1108 between different clusters 1105 within the same computing device.

[0331] GDMA 1111 cooperates with external memory controller 1101 to control the access from SRAM 1108 of cluster 1105 to DRAM 904, or reads data from DRAM 904 to SRAM 1108. As can be seen from the above, the communication between DRAM 904 and NRAM 12031 or WRAM 12032 can be realized through two channels. The first channel is to directly connect DRAM 904 and NRAM 12031 or WRAM 12032 through IODAM; the second channel is to first transfer data between DRAM 904 and SRAM 1108 through GDMA 1111, and then transfer data between SRAM 1108 and NRAM 12031 or WRAM 12032 through MVDMA. Although it seems that the second channel requires more components to participate and the data flow is longer, in fact, in some embodiments, the bandwidth of the second channel is much greater than the first channel, so the communication between DRAM 904 and NRAM 12031 or WRAM 12032 may be more efficient through the second channel. The embodiments of the present application can select the data transmission channel according to their own hardware conditions.

[0332] In other embodiments, the functions of GDMA 1111 and IODMA can be integrated into the same component. For the convenience of description, this application regards GDMA 1111 and IODMA as different components. For those skilled in the art, as long as the functions implemented and the technical effects achieved are similar to those of this application, they belong to the protection scope of this application. Furthermore, the functions of GDMA 1111, IODMA, CDMA 1110, and MVDMA can also be implemented by the same component.

[0333] An embodiment of the present application also provides an electronic device, which includes an artificial intelligence chip or board.

[0334] The foregoing may be better understood in view of the following clauses:

[0335] Clause 1. A method for partitioning a tree coding unit, comprising:

[0336] Obtain a tree coding unit CTU to be divided, and determine a roughly selected optimal division mode corresponding to each unit size block in the CTU;

[0337] Performing initial division on each unit size block according to each roughly selected optimal division mode to obtain a plurality of size blocks after initial division;

[0338] Determine the best partitioning mode corresponding to each size block after initial partitioning;

[0339] Re-dividing each initially divided size block according to each finely selected optimal division mode to obtain a plurality of re-divided size blocks;

[0340] It is determined whether each re-divided size block is a finally divided coding unit CU.

[0341] Clause 2: According to the method of clause 1, determine the rough selection optimal partitioning mode corresponding to each unit size block in the CTU, including:

[0342] Calculating a first preset number of preset mode features corresponding to each unit size block using a coarse mode selection algorithm;

[0343] Calculate the roughing index value corresponding to each preset mode feature based on the preset roughing index in the roughing mode selection algorithm;

[0344] The corresponding rough selection optimal division mode is selected according to the rough selection index value corresponding to each preset mode feature.

[0345] Clause 3. According to the method of clause 1, each unit size block is initially divided according to each roughly selected optimal division mode to obtain a plurality of initially divided size blocks, including:

[0346] Initially merge the unit size blocks that meet the initial merging conditions according to each roughly selected optimal division mode to obtain an initial merging result; the initial merging result includes the size blocks after initial merging;

[0347] The unreasonable sizes in the initial merged size blocks are eliminated to obtain multiple initial divided size blocks.

[0348] Clause 4: According to the method of clause 3, the unit size blocks that meet the initial merging conditions are initially merged according to each roughly selected best partitioning mode to obtain an initial merging result, including:

[0349] Determine a unit size block that meets the initial merging condition according to each rough selection best partitioning mode and the rough selection index value corresponding to each rough selection best partitioning mode;

[0350] Determine the initial clustering labels corresponding to the unit size blocks that meet the initial merging conditions;

[0351] Based on the initial clustering labels corresponding to the unit size blocks that meet the initial merging conditions, the unit size blocks that meet the initial merging conditions are initially merged to obtain an initial merging result.

[0352] Clause 5. According to the method of clause 4, according to each rough selection best partition mode and the corresponding rough selection index value under each rough selection best partition mode, determine the unit size block that meets the initial merging condition, including:

[0353] In response to the fact that the rough selection optimal partitioning modes corresponding to any multiple unit size blocks are consistent and the difference in the rough selection index values ​​corresponding to the multiple unit size blocks is less than a preset rough selection index threshold, the multiple unit size blocks are determined to be unit size blocks that meet the preliminary merging conditions.

[0354] Clause 6. According to the method of Clause 4, based on the initial clustering labels corresponding to the unit size blocks that meet the initial merging conditions, each unit size block that meets the initial merging condition is initially merged to obtain an initial merging result, including:

[0355] Acquire multiple unit size blocks to be merged that have the same initial clustering label, or whose initial clustering labels are within the same preset merging label range; the multiple unit size blocks to be merged are in a connected relationship;

[0356] Multiple unit size blocks to be merged are initially merged to obtain an initial merging result.

[0357] Clause 7. According to the method of Clause 4, based on the initial clustering labels corresponding to the unit size blocks that meet the initial merging conditions, each unit size block that meets the initial merging condition is initially merged to obtain an initial merging result, including:

[0358] Based on the initial clustering labels corresponding to the unit size blocks that meet the initial merging conditions, the partitioning strategy, and at least one partitioning method of the size block configurations corresponding to different sizes in the CTU, the CTU is partitioned into size blocks in descending order of size to obtain the partitioned size blocks;

[0359] The divided size blocks are determined as the initial merged size blocks.

[0360] Clause 8. According to the method of Clause 3, unreasonable sizes in the initial merged size blocks are eliminated to obtain multiple initial divided size blocks, including:

[0361] Determine unreasonable sizes in the size blocks after initial merging based on size restrictions in a standard video coding protocol;

[0362] The initially merged size blocks corresponding to the unreasonable sizes are split to obtain multiple initially divided size blocks.

[0363] Clause 9. According to the method of Clause 2, determining the best partitioning mode corresponding to each size block after the initial partitioning, including:

[0364] Calculate a second preset number of preset pattern features corresponding to each size block after initial division using a fine selection pattern selection algorithm;

[0365] Calculate the fine selection index value corresponding to each preset mode feature based on the preset fine selection index in the fine selection mode selection algorithm;

[0366] The corresponding optimal fine-selection division mode is selected according to the fine-selection index value corresponding to each preset mode feature, and the second preset number is greater than the first preset number.

[0367] Clause 10. According to the method of clause 1, each initially divided size block is further divided according to each finely selected optimal division mode to obtain a plurality of subdivided size blocks, including:

[0368] Re-merge the size blocks after initial division that meet the re-merge condition according to each finely selected optimal division mode to obtain a re-merge result; the re-merge result includes the re-merged size blocks;

[0369] The unreasonable sizes in the re-merged size blocks are eliminated to obtain multiple re-divided size blocks.

[0370] Clause 11. According to the method of clause 10, the blocks of the size after the initial partitioning that meet the re-merging condition are re-merged according to each selected optimal partitioning mode to obtain a re-merging result, including:

[0371] According to each fine selection best partitioning mode and the fine selection index value corresponding to each fine selection best partitioning mode, determine the size block after initial partitioning that meets the re-merging condition;

[0372] Determine the re-clustering labels corresponding to the size blocks after the initial division that meet the re-merging conditions;

[0373] Based on the re-clustering labels corresponding to the blocks of sizes after initial division that meet the re-merging conditions, the blocks of sizes after initial division that meet the re-merging conditions are re-merged to obtain a re-merging result.

[0374] Clause 12. According to the method of clause 11, based on each fine-selection best partitioning mode and the corresponding fine-selection index value under each fine-selection best partitioning mode, determining the size block after initial partitioning that meets the re-merging condition, including:

[0375] In response to the fact that the best fine-selection partitioning modes corresponding to any multiple initial-partitioned size blocks are consistent, and the difference in the fine-selection index values ​​corresponding to the multiple initial-partitioned size blocks is less than a preset fine-selection index threshold, the multiple initial-partitioned size blocks are determined to be initial-partitioned size blocks that meet the re-merging condition.

[0376] Clause 13. According to the method of any one of clauses 1 to 12, determining whether each re-divided size block is a finally divided coding unit CU comprises:

[0377] The rate-distortion optimization algorithm is used to determine the final optimal partitioning mode of each sub-divided size block;

[0378] Based on the rate-distortion optimization cost value corresponding to each final optimal partition mode, it is determined whether each re-partitioned size block is a final partitioned CU.

[0379] Clause 14. The method according to Clause 13, further comprising:

[0380] In response to the re-divided size block not being the final divided CU, the re-divided size block is divided down by one layer to obtain the final divided CU.

[0381] Clause 15. A device for dividing a tree coding unit, comprising:

[0382] An acquisition module, used for acquiring a tree coding unit CTU to be divided;

[0383] A determination module is used to determine the rough selection optimal partitioning mode corresponding to each unit size block in the CTU;

[0384] An initial partitioning module, used for initially partitioning each unit size block according to each roughly selected optimal partitioning mode, so as to obtain a plurality of initially partitioned size blocks;

[0385] The determination module is also used to determine the best partitioning mode corresponding to each size block after the initial partitioning;

[0386] A re-dividing module, used for re-dividing each initially divided size block according to each finely selected optimal division mode to obtain a plurality of re-divided size blocks;

[0387] The judgment module is used to use a rate-distortion optimization algorithm to determine whether each re-divided size block is a finally divided coding unit CU.

[0388] Clause 16. A tree coding unit partitioning device, comprising: a processor, and a memory communicatively connected to the processor;

[0389] Memory stores computer-executable instructions;

[0390] The processor executes the computer-executable instructions stored in the memory to implement the method as described in any one of clauses 1-14.

[0391] Clause 17. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to implement the method as described in any one of Clauses 1-14 when executed by a processor.

[0392] Clause 18. A computer program product comprising a computer program, which, when executed by a processor, implements the method as described in any one of Clauses 1 to 14.

[0393] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0394] It should be further noted that, although the various steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0395] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.

[0396] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.

[0397] If the integrated unit / module is implemented in the form of hardware, the hardware can be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc. Unless otherwise specified, the artificial intelligence processor can be any appropriate hardware processor, such as CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the storage unit can be any appropriate magnetic storage medium or magneto-optical storage medium, such as resistive random access memory RRAM (Resistive Random Access Memory), dynamic random access memory DRAM (Dynamic Random Access Memory), static random access memory SRAM (Static Random-Access Memory), enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), high-bandwidth memory HBM (High-Bandwidth Memory), hybrid memory cube HMC (Hybrid Memory Cube), etc.

[0398] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0399] In the above embodiments, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

Claims

1. A method for dividing a tree coding unit, characterized in that: include: Obtain a tree coding unit CTU to be divided, and determine a roughly selected optimal division mode corresponding to each unit size block in the CTU; Performing initial division on each unit size block according to each roughly selected optimal division mode to obtain a plurality of size blocks after initial division; Determine the best partitioning mode corresponding to each size block after the initial partitioning; Re-dividing each initially divided size block according to each finely selected optimal division mode to obtain a plurality of re-divided size blocks; It is determined whether each re-divided size block is a finally divided coding unit CU.

2. The method according to claim 1, characterized in that The determining of the roughly selected optimal partitioning mode corresponding to each unit size block in the CTU includes: Calculating a first preset number of preset mode features corresponding to each unit size block using a coarse mode selection algorithm; Calculate the rough selection index value corresponding to each of the preset mode features based on the preset rough selection index in the rough selection mode selection algorithm; The corresponding rough selection optimal division mode is screened out according to the rough selection index value corresponding to each of the preset mode characteristics.

3. The method according to claim 1, characterized in that The initial division of each unit size block according to each roughly selected optimal division mode to obtain a plurality of initially divided size blocks includes: Initially merge the unit size blocks that meet the initial merging conditions according to each roughly selected optimal division mode to obtain an initial merging result; the initial merging result includes the size blocks after initial merging; The unreasonable sizes in the initial merged size blocks are eliminated to obtain a plurality of initial divided size blocks.

4. The method according to claim 3, characterized in that The initial merging of the unit size blocks satisfying the initial merging condition according to each roughly selected optimal partitioning mode to obtain an initial merging result includes: Determine a unit size block that meets the initial merging condition according to each rough selection best partitioning mode and the rough selection index value corresponding to each rough selection best partitioning mode; Determine the initial clustering labels corresponding to the unit size blocks that meet the initial merging conditions; Based on the initial clustering labels corresponding to the unit size blocks that meet the initial merging conditions, the unit size blocks that meet the initial merging conditions are initially merged to obtain an initial merging result.

5. The method according to claim 4, characterized in that The step of determining the unit size block satisfying the initial merging condition according to each rough selection optimal partitioning mode and the rough selection index value corresponding to each rough selection optimal partitioning mode comprises: In response to the fact that the rough selection optimal partitioning modes corresponding to any multiple unit size blocks are consistent and the difference in the rough selection index values ​​corresponding to the multiple unit size blocks is less than a preset rough selection index threshold, the multiple unit size blocks are determined to be unit size blocks that meet the preliminary merging conditions.

6. The method according to claim 4, characterized in that The initial merging of the unit size blocks that meet the initial merging condition based on the initial clustering labels corresponding to the unit size blocks that meet the initial merging condition to obtain the initial merging result includes: Acquire multiple unit size blocks to be merged that have the same initial clustering label, or whose initial clustering labels are within the same preset merging label range; the multiple unit size blocks to be merged are in a connected relationship; The plurality of unit size blocks to be merged are initially merged to obtain an initial merging result.

7. The method according to claim 4, characterized in that The initial merging of the unit size blocks that meet the initial merging condition based on the initial clustering labels corresponding to the unit size blocks that meet the initial merging condition to obtain the initial merging result includes: Based on the initial clustering labels corresponding to the unit size blocks that meet the initial merging conditions, the partitioning strategy, and at least one partitioning method of the size block configurations corresponding to different sizes in the CTU, the CTU is partitioned into size blocks in descending order of size to obtain the partitioned size blocks; The divided size blocks are determined as the initial merged size blocks.

8. The method according to claim 3, characterized in that The step of removing unreasonable sizes from the initial merged size blocks to obtain a plurality of initial divided size blocks includes: Determine unreasonable sizes in the size blocks after initial merging based on size restrictions in a standard video coding protocol; The initially merged size blocks corresponding to the unreasonable sizes are split to obtain multiple initially divided size blocks.

9. The method according to claim 2, characterized in that: The step of determining the optimal partitioning mode corresponding to each of the size blocks after the initial partitioning comprises: Calculating a second preset number of preset pattern features corresponding to each of the size blocks after the initial division using a fine selection pattern selection algorithm; Calculate the fine selection index value corresponding to each of the preset mode features based on the preset fine selection index in the fine selection mode selection algorithm; The corresponding optimal fine-selection division mode is selected according to the fine-selection index value corresponding to each of the preset mode characteristics, and the second preset number is greater than the first preset number.

10. The method according to claim 1, characterized in that The step of re-dividing each initially divided size block according to each finely selected optimal division mode to obtain a plurality of re-divided size blocks includes: Re-merging the size blocks after initial division that meet the re-merging condition according to each finely selected optimal division mode to obtain a re-merging result; the re-merging result includes the re-merged size blocks; The unreasonable sizes in the re-merged size blocks are eliminated to obtain a plurality of re-divided size blocks.

11. The method according to claim 10, characterized in that The re-merging of the size blocks after initial division that meet the re-merging condition according to each finely selected optimal division mode to obtain a re-merging result includes: According to each fine selection best partitioning mode and the fine selection index value corresponding to each fine selection best partitioning mode, determine the size block after initial partitioning that meets the re-merging condition; Determine the re-clustering labels corresponding to the size blocks after the initial division that meet the re-merging conditions; Based on the re-clustering labels corresponding to the blocks of sizes after initial division that meet the re-merging conditions, the blocks of sizes after initial division that meet the re-merging conditions are re-merged to obtain a re-merging result.

12. The method according to claim 11, characterized in that The step of determining the size blocks after initial partitioning that meet the re-merging condition according to each fine-selection optimal partitioning mode and the corresponding fine-selection index value under each fine-selection optimal partitioning mode includes: In response to the fact that the best fine-selection partitioning modes corresponding to any multiple initial-partitioned size blocks are consistent, and the difference in the fine-selection index values ​​corresponding to the multiple initial-partitioned size blocks is less than a preset fine-selection index threshold, the multiple initial-partitioned size blocks are determined to be initial-partitioned size blocks that meet the re-merging condition.

13. The method according to any one of claims 1 to 12, characterized in that: The determining whether each re-divided size block is a finally divided coding unit CU comprises: The rate-distortion optimization algorithm is used to determine the final optimal partitioning mode of each sub-divided size block; Based on the rate-distortion optimization cost value corresponding to each final optimal partition mode, it is determined whether each re-partitioned size block is a final partitioned CU.

14. The method according to claim 13, characterized in that Also includes: In response to the re-divided size block not being the final divided CU, the re-divided size block is divided down by one layer to obtain the final divided CU.

15. A device for dividing a tree coding unit, characterized in that: include: An acquisition module, used for acquiring a tree coding unit CTU to be divided; A determination module, used to determine the roughly selected optimal partitioning mode corresponding to each unit size block in the CTU; An initial partitioning module, used for initially partitioning each unit size block according to each roughly selected optimal partitioning mode, so as to obtain a plurality of initially partitioned size blocks; The determination module is further used to determine the best partitioning mode corresponding to each size block after the initial partitioning; A re-dividing module, used for re-dividing each initially divided size block according to each finely selected optimal division mode to obtain a plurality of re-divided size blocks; The judgment module is used to determine whether each re-divided size block is a finally divided coding unit CU.

16. A tree coding unit partitioning device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 14.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 14 when executed by a processor.

18. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 14 is implemented.