Division decision-making method, device and equipment of video coding unit, and storage medium

By counting the number of coding units after quadtree division in the new generation encoder standard, it determines whether to skip the vertical or horizontal division decision, which solves the problem of multi-type tree division increasing computational complexity and improves video coding efficiency.

CN118694985APending Publication Date: 2024-09-24BIGO TECH PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410739420.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

The division structure of multi-type trees in the new generation encoder standard increases the computational complexity of the video encoder, reduces the encoding speed, and affects the video encoding efficiency.

Method used

By counting the number of coding units in the horizontal and vertical division directions after the quadtree division decision, and judging whether to skip the vertical or horizontal division decision based on the threshold, unnecessary division type decisions are reduced.

Benefits of technology

On the premise of reasonably sacrificing encoding quality, the computational complexity of the video encoder is reduced, the encoding speed is increased, and the video encoding efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118694985A
    Figure CN118694985A
Patent Text Reader

Abstract

The embodiment of the invention provides a video coding unit division decision-making method, a video coding unit division decision-making device, video coding unit division decision-making equipment and a storage medium. The number of first coding units corresponding to the horizontal division direction and the number of second coding units corresponding to the vertical division direction in the current coding area are counted based on the division decision result, and when the number of the first coding units is larger than the number of the second coding units and the number of the first coding units reaches a first number threshold value, coding is carried out. And skipping a vertical division decision of the current coding region under the condition that the number of the first coding units is greater than the number of the first coding units and the number of the second coding units reaches a second number threshold, and skipping a horizontal division decision of the current coding region under the condition that the number of the second coding units is greater than the number of the first coding units. Whether the to-be-executed division type of the current coding area executes the skipping decision or not is reasonably determined, the calculation complexity of a video coder is reduced, the coding speed is improved, and therefore the video coding efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of video coding technology, and in particular to a method, apparatus, device and storage medium for determining the division of a video coding unit. Background Art

[0002] In the new generation encoder standard, in addition to retaining the no-partition and quadtree partitioning in the previous generation encoder standard, it also supports the recursive partitioning structure of binary trees and ternary trees, also known as multi-type trees. Among them, the multi-type tree includes four types of partitions, namely vertical binary tree, horizontal binary tree, vertical ternary tree and horizontal ternary tree. During the partitioning process, the coding unit can select any partitioning tree, but once the coding unit selects a multi-type tree, subsequent nodes can only select a multi-type tree, and there is a limit on the maximum depth of the multi-type tree. The new generation encoder standard can decide which layer the current area needs to be divided into and what kind of partitioning to use based on the rate-distortion cost based on the video content within a limited depth range for the same coding area. Among them, a coding tree unit is usually taken as the root node. First, a decision on the non-division type is made, and then quadtree division is performed to divide the coding tree unit into 4 coding units for respective mode decisions, and these 4 coding units will also recursively make their own division decisions; after completing the quadtree division, it will return to the state of the coding tree unit, and then binary tree division and ternary tree division will be performed, and finally the division structure with the smallest rate-distortion cost will be used as the final division result of the coding tree unit.

[0003] Although the introduction of the new partitioning structure in the new generation encoder standard has brought better coding benefits, it requires more partitioning type decisions, which will increase the computational complexity of the video encoder, reduce the encoding speed, and affect the video encoding efficiency, which needs to be improved. Summary of the invention

[0004] The embodiments of the present application provide a method, apparatus, device and storage medium for making a partition decision of a video coding unit, which solves the problem that the computational complexity of a video encoder will increase, the encoding speed will decrease, and the video encoding efficiency will be affected due to the need to make more partition type decisions. The optimal coding unit partition information after referring to the quadtree partition decision can be used to reasonably determine whether the partition type to be executed in the current coding area executes a skip decision. Under the premise of reasonably sacrificing the encoding quality and maintaining the consistency of the subjective picture quality, the computational complexity of the video encoder can be reduced, the encoding speed can be increased, and the video encoding efficiency can be improved.

[0005] In a first aspect, an embodiment of the present application provides a method for determining the division of a video encoding unit, the method comprising:

[0006] In the case where a quadtree partition decision is completed for the current coding region, counting the number of first coding units corresponding to a horizontal partition direction and the number of second coding units corresponding to a vertical partition direction in the current coding region based on the partition decision result;

[0007] When the number of the first coding units is greater than the number of the second coding units and the number of the first coding units reaches a first number threshold, skipping a vertical division decision of the current coding area;

[0008] When the number of the second coding units is greater than the number of the first coding units and the number of the second coding units reaches a second number threshold, a horizontal split decision of the current coding area is skipped.

[0009] In a second aspect, an embodiment of the present application further provides a division decision device of a video encoding unit, comprising:

[0010] A coding unit quantity statistics module is configured to count the number of first coding units corresponding to the horizontal division direction and the number of second coding units corresponding to the vertical division direction in the current coding region based on the division decision result when the quadtree division decision is completed in the current coding region;

[0011] a vertical division decision skipping module, configured to skip the vertical division decision of the current coding area when the number of the first coding units is greater than the number of the second coding units and the number of the first coding units reaches a first number threshold;

[0012] The horizontal division decision skipping module is configured to skip the horizontal division decision of the current coding area when the number of the second coding units is greater than the number of the first coding units and the number of the second coding units reaches a second number threshold.

[0013] In a third aspect, an embodiment of the present application further provides a partition decision device for a video encoding unit, the device comprising:

[0014] one or more processors;

[0015] a storage device configured to store one or more programs,

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the partition decision method of the video encoding unit described in the embodiment of the present application.

[0017] In a fourth aspect, an embodiment of the present application further provides a non-volatile storage medium storing computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are configured to execute the partition decision method of the video encoding unit described in the embodiment of the present application.

[0018] In the fifth aspect, an embodiment of the present application also provides a computer program product, which includes a computer program, which is stored in a computer-readable storage medium, and at least one processor of the device reads and executes the computer program from the computer-readable storage medium, so that the device executes the partition decision method of the video encoding unit described in the embodiment of the present application.

[0019] In the embodiment of the present application, by counting the number of first coding units corresponding to the horizontal division direction and the number of second coding units corresponding to the vertical division direction in the current coding region based on the division decision result when the current coding region completes the quadtree division decision, when the number of first coding units is greater than the number of second coding units and the number of first coding units reaches the first number threshold, the vertical division decision of the current coding region is skipped, and when the number of second coding units is greater than the number of first coding units and the number of second coding units reaches the second number threshold, the horizontal division decision of the current coding region is skipped. In the above scheme, by counting the number of coding units corresponding to different division directions after the current coding region completes the quadtree division, the optimal coding unit division information after the quadtree division decision can be effectively referred to, and the number of coding units in different division directions can be determined in combination with the texture information content of the current coding region; by determining whether the division type to be executed in the current coding region executes the skip decision based on the comparison result of the number of coding units corresponding to different division directions and the number threshold obtained by statistics, the computational complexity of the video encoder can be reduced, the encoding speed can be increased, and the video encoding efficiency can be improved under the premise of reasonably sacrificing the encoding quality and maintaining the consistency of the subjective image quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A flowchart of a method for determining the division of a video encoding unit provided in an embodiment of the present application;

[0021] Figure 2 A schematic diagram of a quadtree partition decision result of a coding area corresponding to a coding unit of size 32×32 and a partition decision to be performed;

[0022] Figure 3 A flowchart of a division decision method for a video encoding unit including a process of determining the number of first encoding units and the number of second encoding units provided in an embodiment of the present application;

[0023] Figure 4 A flowchart of a partition decision method including a horizontal skip flag and a vertical skip flag detection process of a video encoding unit provided in an embodiment of the present application;

[0024] Figure 5A flowchart of a partition decision method including a process of determining a first quantity threshold and a second quantity threshold of a video encoding unit provided in an embodiment of the present application;

[0025] Figure 6 A flowchart of a partition decision method including a horizontal partition decision and a vertical partition decision process of a video encoding unit provided in an embodiment of the present application;

[0026] Figure 7 A structural block diagram of a division decision device of a video encoding unit provided in an embodiment of the present application;

[0027] Figure 8 A structural diagram of a partition decision device for a video encoding unit provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] The embodiments of the present application are further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the embodiments of the present application, rather than to limit the embodiments of the present application. It should also be noted that, for ease of description, only parts related to the embodiments of the present application are shown in the accompanying drawings, rather than all structures.

[0029] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0030] The partition decision method of the video coding unit provided in the embodiment of the present application is used to quickly determine the partition type that is most suitable for the current coding area, and to speed up video coding by skipping unnecessary partition type decisions by using the optimal coding unit partition information after the quadtree partition decision. Specific application scenarios may include: video conferencing, video calls, indoor live broadcasts, and outdoor live broadcasts. The several application scenarios listed above are only exemplary and explanatory. In actual applications, the partition decision method of the video coding unit can also be used in video coding in other scenarios, and the embodiment of the present application does not limit this. The present application aims to provide a partition decision method for a video coding unit to solve the problem that the computational complexity of the video encoder will increase, the encoding speed will decrease, and the video encoding efficiency will be affected due to the need to go through more partition type decisions.

[0031] In the method for deciding the division of the video coding unit provided in the embodiment of the present application, the executor of each step can be a computer device, which refers to any electronic device with data calculation, processing and storage capabilities, such as mobile phones, PCs (Personal Computers), tablet computers and other terminal devices, and can also be servers and other devices, which are not limited in the embodiment of the present application.

[0032] Figure 1 A flowchart of a division decision method of a video encoding unit provided in an embodiment of the present application, wherein the execution subject of each step in the division decision method may be a division decision device of the video encoding unit, such as Figure 1 As shown, the following steps are included:

[0033] Step S101: When a quadtree partitioning decision is completed for a current coding region, the number of first coding units corresponding to a horizontal partitioning direction and the number of second coding units corresponding to a vertical partitioning direction in the current coding region are counted based on the partitioning decision result.

[0034] Among them, in the new generation of encoder standards, with the coding tree unit as the root node, the decision of not dividing the type will be made first, and then the quadtree division will be performed to divide the coding tree unit into 4 coding units. Each coding unit can be used as a coding area to make the optimal mode decision, and the 4 coding units will also recursively make their own division decisions, where the optimal mode decision mainly involves prediction mode selection, transformation and quantization parameter selection, etc. In one embodiment, by calculating the rate-distortion cost of each candidate mode, the mode with the smallest rate-distortion cost can be determined as the optimal coding mode. In one embodiment, the calculation of the rate-distortion cost can comprehensively consider the distortion caused by the current coding mode and the bit rate consumed by encoding using the current coding mode. For example, the relevant formula for calculating the rate-distortion cost is as follows:

[0035] J=D+λ mode ·R

[0036] Where D represents the distortion value in the current coding mode, R represents the bit rate value in the current coding mode, and λ mode is the Lagrangian factor.

[0037] After the coding tree unit completes the quadtree partitioning decision, it will return to its initial state, and then perform binary tree partitioning and ternary tree partitioning. The obtained coding units will perform mode decisions and recursive partitioning decisions on the coding units themselves, where the binary tree partitioning may include horizontal binary tree partitioning and vertical binary tree partitioning, and the ternary tree partitioning may include horizontal ternary tree partitioning and vertical ternary tree partitioning. Finally, the partitioning structure with the smallest rate-distortion cost can be used as the final partitioning result of the coding tree unit. Figure 2Schematic diagram of the quadtree partition decision result and the partition decision to be performed for the coding area corresponding to the coding unit of 32×32 size. Figure 2 As shown, after the coding region 101 undergoes the quadtree partition decision, its partition decision result 102 may include multiple coding units corresponding to the horizontal partition direction and the vertical partition direction, and the partition decision result 102 is the optimal coding unit partition information after the quadtree partition decision. Then the coding region 101 needs to return to the original state and continue to make mode decisions for other pending partition types, which may include horizontal binary tree partition decision 103, vertical binary tree partition decision 104, horizontal ternary tree partition decision 105, and vertical ternary tree partition decision 106. Since the texture information content of the same coding region is fixed, after the quadtree partition decision, if the partition direction of the coding unit in the coding region is single, or most of the coding units correspond to the same partition direction, then the probability that the pending partition type corresponding to another partition direction is not suitable for the coding region is high, and its decision process can be skipped to achieve the purpose of accelerating encoding. Therefore, the number of first coding units corresponding to the horizontal division direction and the number of second coding units corresponding to the vertical division direction in the current coding area can be counted, where the width of the coding unit corresponding to the horizontal division direction will be greater than its height, and the width of the coding unit corresponding to the vertical division direction will be smaller than its height.

[0038] In one embodiment, the number of coding units corresponding to the horizontal division direction and the vertical division direction can be counted respectively according to the four divided sub-areas after the quadtree division, and then the first number of coding units corresponding to the horizontal division direction and the second number of coding units corresponding to the vertical division direction in the current coding area are obtained by cumulative calculation.

[0039] In one embodiment, the specific process of counting the number of first coding units corresponding to the horizontal division direction and the number of second coding units corresponding to the vertical division direction in the current coding area based on the division decision result may include: traversing multiple coding units in the current coding area where the division decision is completed, and determining the number of first coding units corresponding to the horizontal division direction and the number of second coding units corresponding to the vertical division direction according to the size information of each coding unit. The size information may be the width and height of the coding unit, the width being the length of the boundary of the coding unit in the horizontal direction, and the height being the length of the boundary of the coding unit in the vertical direction. If the width of the coding unit is greater than the height, it can be regarded as being obtained through horizontal division, and if the width of the coding unit is less than the height, it can be regarded as being obtained through vertical division. By comparing the width and height of each coding unit one by one, and accumulating the number of coding units in different division directions accordingly, until the number of first coding units corresponding to the horizontal division direction and the number of second coding units corresponding to the vertical division direction in the current coding area are counted. Figure 2 For example, after the quadtree partitioning decision is made for the coding area 101, statistics show that the number of first coding units corresponding to the horizontal partitioning direction is 10, and the number of second coding units corresponding to the vertical partitioning direction is 4.

[0040] Step S102: When the number of the first coding units is greater than the number of the second coding units and the number of the first coding units reaches a first number threshold, skipping the vertical division decision of the current coding area.

[0041] Among them, the first quantity threshold value can be used to determine whether the number of coding units corresponding to the horizontal division direction reaches a set ratio of the total number of coding units in the current coding area. In one embodiment, a first mapping relationship between the size of the coding area and different values ​​of the first quantity threshold value can be established in advance, and the first quantity threshold value corresponding to the current coding area can be determined by querying the first mapping relationship. In one embodiment, a first proportional coefficient can be set in advance, and the corresponding first quantity threshold value can be obtained by multiplying the size of the current coding area by the first proportional coefficient. Of course, the first quantity threshold value can also be adaptively set by the developer according to the coding effect of skipping the vertical division decision in the actual application scenario, which is not limited in this application. If the number of the first coding units reaches the first quantity threshold value, it can be regarded that the coding units of the current coding area are mostly obtained by horizontal division. Furthermore, if the number of the first coding units is greater than the number of the second coding units, it can be regarded that the coding units obtained by horizontal division are more than the coding units obtained by vertical division. Combined with the first coding unit number reaching the first quantity threshold value, it can be regarded that the coding units obtained by horizontal division are more than the coding units obtained by vertical division to a large extent, and the texture information content of the current coding area is more suitable for horizontal division decision. Thus, the vertical division decision of the current coding area can be skipped, and there is no need to execute the vertical division decision process with a smaller optimal probability, thereby improving the coding speed. The vertical division decision may include a vertical binary tree division decision and a vertical ternary tree division decision. In one embodiment, the current coding area may be provided with a vertical skip flag. If the vertical skip flag is a true value, the vertical division decision is skipped. If the vertical skip flag is a false value, the vertical division decision is not skipped. In the case where the number of the first coding unit is greater than the number of the second coding unit, and the number of the first coding unit reaches the first number threshold, the vertical skip flag corresponding to the current coding area may be set to a true value. Therefore, before the vertical division decision of the current coding area needs to be made, the vertical division decision may be skipped by detecting the vertical skip flag. If the vertical skip flag is a true value, the vertical division decision is skipped. If the vertical skip flag is a false value, the vertical division decision continues to be executed. In one embodiment, the vertical division type corresponding to the current coding area may be provided with an execution flag. If the execution flag is a true value, the division decision corresponding to the vertical division type is executed. If the execution flag is a false value, the division decision corresponding to the vertical division type is skipped. When the number of first coding units is greater than the number of second coding units and the number of first coding units reaches a first number threshold, the execution flag corresponding to the vertical division type can be selected to be set to a false value. The vertical division type can include vertical binary tree division and vertical ternary tree division.Therefore, before making a vertical division decision for the current coding area, it is possible to determine whether to execute the vertical division decision by detecting the execution flag corresponding to the vertical division type. If the execution flag is a true value, the vertical division decision is executed; if the execution flag is a false value, the vertical division decision is skipped.

[0042] Step S103: when the number of the second coding units is greater than the number of the first coding units and the number of the second coding units reaches a second number threshold, skipping the horizontal division decision of the current coding area.

[0043] Among them, the second quantity threshold can be used to determine whether the number of coding units corresponding to the vertical division direction reaches a set ratio of the total number of coding units in the current coding area. In one embodiment, a second mapping relationship between the size of the coding area and different values ​​of the second quantity threshold can be established in advance, and the second quantity threshold corresponding to the current coding area can be determined by querying the mapping relationship. In one embodiment, a second proportional coefficient can be set in advance, and the corresponding second quantity threshold can be obtained by multiplying the size of the current coding area by the second proportional coefficient. Of course, the second quantity threshold can also be adaptively set by the developer according to the coding effect of skipping the horizontal division decision in the actual application scenario, which is not limited in this application. If the number of the second coding units reaches the second quantity threshold, it can be regarded that the coding units of the current coding area are mostly obtained by vertical division. Furthermore, if the number of the second coding units is greater than the number of the first coding units, it can be regarded that the coding units obtained by vertical division are more than the coding units obtained by horizontal division. Combined with the second number of coding units reaching the second quantity threshold, it can be regarded that the coding units obtained by vertical division are more than the coding units obtained by horizontal division. The texture information content of the current coding area is more suitable for vertical division decision. Thus, the horizontal division decision of the current coding region can be skipped, and there is no need to execute the horizontal division decision process with a smaller optimal probability, thereby improving the coding speed. The horizontal division decision may include a horizontal binary tree division decision and a horizontal ternary tree division decision. In one embodiment, the current coding region may be provided with a horizontal skip flag. If the horizontal skip flag is a true value, the horizontal division decision is skipped. If the horizontal skip flag is a false value, the horizontal division decision is not skipped. In the case where the number of the second coding units is greater than the number of the first coding units and the number of the second coding units reaches the second number threshold, the horizontal skip flag corresponding to the current coding region may be selected to be set to a true value. Therefore, before the horizontal division decision of the current coding region needs to be made, the horizontal skip flag may be detected to determine whether to skip the horizontal division decision. If the horizontal skip flag is a true value, the horizontal division decision is skipped. If the horizontal skip flag is a false value, the horizontal division decision continues to be executed. In one embodiment, the horizontal division type corresponding to the current coding region may be provided with an execution flag. If the execution flag is a true value, the division decision corresponding to the horizontal division type is executed. If the execution flag is a false value, the division decision corresponding to the horizontal division type is skipped. When the number of second coding units is greater than the number of first coding units and the number of second coding units reaches a second number threshold, the execution flag corresponding to the horizontal partition type can be selected to be set to a false value, and the horizontal partition type can include horizontal binary tree partition and horizontal ternary tree partition.Therefore, before making a horizontal division decision for the current coding area, it is possible to determine whether to execute the horizontal division decision by detecting the execution flag corresponding to the horizontal division type. If the execution flag is a true value, the horizontal division decision is executed; if the execution flag is a false value, the horizontal division decision is skipped.

[0044] In the above, by counting the number of first coding units corresponding to the horizontal division direction and the number of second coding units corresponding to the vertical division direction in the current coding region based on the division decision result when the current coding region completes the quadtree division decision, when the number of first coding units is greater than the number of second coding units and the number of first coding units reaches the first number threshold, the vertical division decision of the current coding region is skipped, and when the number of second coding units is greater than the number of first coding units and the number of second coding units reaches the second number threshold, the horizontal division decision of the current coding region is skipped. In the above scheme, by counting the number of coding units corresponding to different division directions after the current coding region completes the quadtree division, the optimal coding unit division information after the quadtree division decision can be effectively referred to, and the number of coding units in different division directions can be determined in combination with the texture information content of the current coding region; by determining whether the division type to be executed in the current coding region executes the skip decision based on the comparison result of the number of coding units corresponding to different division directions and the number threshold obtained by statistics, the computational complexity of the video encoder can be reduced, the encoding speed can be increased, and the video encoding efficiency can be improved under the premise of reasonably sacrificing the encoding quality and maintaining the consistency of the subjective image quality. This improves the computing resource utilization on the server side, saves server costs, and reduces the CPU utilization on the client side, further improving the user experience.

[0045] Figure 3 A flowchart of a method for determining the number of first coding units and the number of second coding units of a video coding unit provided in an embodiment of the present application. Figure 3 As shown, the following steps are included:

[0046] Step S201: When a quadtree partitioning decision is completed for a current coding region, traverse multiple coding units in the current coding region where the partitioning decision is completed.

[0047] Step S202: when the width of the currently traversed coding unit is greater than the height, the number of first coding units in the corresponding horizontal division direction is increased.

[0048] If the width of the coding unit is greater than the height, it can be considered that the coding unit is finally obtained by horizontal division.

[0049] Step S203: when the width of the currently traversed coding unit is smaller than the height, the number of second coding units corresponding to the vertical division direction is increased.

[0050] If the width of a coding unit is smaller than its height, it can be considered that the coding unit is finally obtained by vertical division.

[0051] Step S204: When the number of the first coding units is greater than the number of the second coding units and the number of the first coding units reaches a first number threshold, skipping the vertical division decision of the current coding area.

[0052] Step S205: When the number of the second coding units is greater than the number of the first coding units and the number of the second coding units reaches a second number threshold, skipping the horizontal division decision of the current coding area.

[0053] As described above, by comparing the width and height of the coding unit, the division direction corresponding to the coding unit can be effectively determined, and the number of coding units corresponding to different division directions can be accurately counted, providing a reliable data basis for determining the skip division decision of the division type to be executed.

[0054] Figure 4 A flowchart of a method for determining a partition including a horizontal skip flag and a vertical skip flag detection process of a video encoding unit provided in an embodiment of the present application. Figure 4 As shown, the following steps are included:

[0055] Step S301: When a quadtree partitioning decision is completed for the current coding region, the number of first coding units corresponding to the horizontal partitioning direction and the number of second coding units corresponding to the vertical partitioning direction in the current coding region are counted based on the partitioning decision result.

[0056] Step S302: When the number of first coding units is greater than the number of second coding units and the number of first coding units reaches a first quantity threshold, a vertical skip flag corresponding to the vertical division decision of the current coding area is set to a true value; before making a vertical division decision of the current coding area, if it is detected that the vertical skip flag is a true value, the vertical division decision is skipped.

[0057] The vertical skip flag may be a reference for determining whether to skip the vertical division decision. If the vertical skip flag is a true value, the vertical division decision needs to be skipped. If the vertical skip flag is a false value, the vertical division decision needs to be executed. Therefore, before making a vertical division decision for the current coding area, it can be determined whether to skip the vertical division decision according to the value of the vertical skip flag.

[0058] Step S303: When the number of second coding units is greater than the number of first coding units and the number of second coding units reaches a second number threshold, a horizontal skip flag corresponding to the horizontal division decision of the current coding area is set to a true value; before making a horizontal division decision for the current coding area, if it is detected that the horizontal skip flag is a true value, the horizontal division decision is skipped.

[0059] The horizontal skip flag may be a reference for determining whether to skip the horizontal split decision. If the horizontal skip flag is a true value, the horizontal split decision needs to be skipped. If the horizontal skip flag is a false value, the horizontal split decision needs to be executed. Therefore, before making the horizontal split decision of the current coding area, it can be determined whether to skip the horizontal split decision according to the value of the horizontal skip flag.

[0060] As described above, by setting a skip flag corresponding to different partition type decisions, it is helpful to identify whether the partition type to be executed needs to skip the partition decision. By detecting the value of the skip flag, it is possible to quickly determine whether the decision needs to be skipped during the decision-making process. Moreover, setting the skip flag can also be beneficial to the maintenance and debugging of developers, ensuring that the partition decision is skipped under the conditions of reasonably sacrificing encoding quality and maintaining consistent subjective image quality.

[0061] Figure 5 A flowchart of a partition decision method including a process of determining a first quantity threshold and a second quantity threshold of a video encoding unit provided in an embodiment of the present application. Figure 5 As shown, the following steps are included:

[0062] Step S401: When a quadtree partitioning decision is completed for the current coding region, the number of first coding units corresponding to the horizontal partitioning direction and the number of second coding units corresponding to the vertical partitioning direction in the current coding region are counted based on the partitioning decision result.

[0063] Step S402: Divide the first size of the current coding region by the second size of the minimum coding unit to obtain the maximum number of the current unit.

[0064] The maximum number of current units may be the maximum number of coding units that can be obtained by dividing the current coding region according to the size of the minimum coding unit. For example, the size of the current coding region may be 32×32, and in the coding standard, the size of the minimum coding unit may be 4×4, so the maximum number of current units may be (32×32)÷(4×4)=64.

[0065] Step S403: multiply the current maximum number of units by the first threshold coefficient and the second threshold coefficient respectively to obtain a first number threshold and a second number threshold.

[0066] Among them, the first threshold coefficient can be a calculation factor for determining the first quantity threshold, and the second threshold coefficient can be a calculation factor for determining the second quantity threshold. The value range of the first threshold coefficient and the second threshold coefficient is between 0 and 1. For example, the first threshold coefficient or the second threshold coefficient can be 0.3, 0.4, and 0.5. Among them, the larger the first threshold coefficient or the second threshold coefficient, the larger the first quantity threshold or the second quantity threshold, which means that the number of first coding units in the horizontal division direction or the number of second coding units in the vertical division direction need to be more, so that the corresponding division decision can be triggered to be skipped, the coding speed is improved to a small extent, and the coding quality is relatively less affected. Correspondingly, the smaller the first threshold coefficient or the second threshold coefficient, the smaller the first quantity threshold or the second quantity threshold, which means that the number of first coding units in the horizontal division direction or the number of second coding units in the vertical division direction need to be less, that is, the corresponding division decision can be triggered to be skipped, the coding speed is improved to a large extent, and the coding quality is relatively affected. Therefore, the developer can make adaptive adjustments to the first threshold coefficient and the second threshold coefficient according to the balanced requirements of different coding quality and coding speed in the actual application scenario, which is not limited in this application.

[0067] Step S404: When the number of the first coding units is greater than the number of the second coding units and the number of the first coding units reaches a first number threshold, skipping the vertical division decision of the current coding area.

[0068] Step S405: When the number of the second coding units is greater than the number of the first coding units and the number of the second coding units reaches a second number threshold, skipping the horizontal division decision of the current coding area.

[0069] As described above, by calculating the first quantity threshold and the second quantity threshold based on the current maximum number of units, the first threshold coefficient and the second threshold coefficient, the quantity threshold can be effectively adjusted to adapt to the current coding area size, thereby improving the accuracy of the decision to skip division. At the same time, by setting the adjustable first threshold coefficient and the second threshold coefficient, it can be effectively adapted to the balanced requirements of coding quality and coding speed in different application scenarios, which is conducive to achieving the purpose of accelerating the coding speed under the condition of less coding quality loss.

[0070] Figure 6 The present invention provides a flow chart of a video encoding unit including a method for performing a horizontal partition decision and a vertical partition decision process. Figure 6 As shown, the following steps are included:

[0071] Step S501: When a quadtree partitioning decision is completed for the current coding region, the number of first coding units corresponding to the horizontal partitioning direction and the number of second coding units corresponding to the vertical partitioning direction in the current coding region are counted based on the partitioning decision result.

[0072] Step S502: When the number of the first coding units is greater than the number of the second coding units and the number of the first coding units reaches a first number threshold, skipping the vertical division decision of the current coding area.

[0073] Step S503: When the number of the second coding units is greater than the number of the first coding units and the number of the second coding units reaches a second number threshold, skipping the horizontal division decision of the current coding area.

[0074] Step S504: When the number of the first coding units is less than or equal to the number of the second coding units, or the number of the first coding units does not reach the first number threshold, perform a vertical division decision on the current coding area.

[0075] Among them, if the number of first coding units is less than or equal to the number of second coding units, or the number of first coding units does not reach the first number threshold, it can be regarded that not most of the coding units in the current coding area correspond to the horizontal division direction, and the probability that the division type to be executed corresponding to the vertical division direction is not suitable for the coding area is low, and therefore it is necessary to execute the vertical division decision of the current coding area.

[0076] Step S505: When the number of the second coding units is less than or equal to the number of the first coding units, or the number of the second coding units does not reach the second number threshold, perform horizontal division decision on the current coding area.

[0077] Among them, if the number of second coding units is less than or equal to the number of first coding units, or the number of second coding units does not reach the second number threshold, it can be regarded that not most of the coding units in the current coding area correspond to the vertical division direction, and the probability that the division type to be executed corresponding to the horizontal division direction is not suitable for the coding area is low, and therefore it is necessary to execute the horizontal division decision of the current coding area.

[0078] As mentioned above, when the relevant comparison results of the first number of coding units, the second number of coding units, the first number threshold and the second number threshold cannot satisfy the executable skip partitioning decision, continuing to execute the relevant partitioning decision can avoid causing a large loss of encoding quality and ensure the video encoding effect.

[0079] Figure 7 This is a structural block diagram of a video encoding unit division decision device provided in an embodiment of the present application. The device is configured to execute the video encoding unit division decision method provided in the above embodiment, and has the corresponding functional modules and beneficial effects of the execution method. Figure 7 As shown, the device specifically includes:

[0080] The coding unit number counting module 201 is configured to count the number of first coding units corresponding to the horizontal division direction and the number of second coding units corresponding to the vertical division direction in the current coding region based on the division decision result when the quadtree division decision is completed in the current coding region;

[0081] A vertical division decision skipping module 202 is configured to skip the vertical division decision of the current coding area when the number of the first coding units is greater than the number of the second coding units and the number of the first coding units reaches a first number threshold;

[0082] The horizontal division decision skipping module 203 is configured to skip the horizontal division decision of the current coding region when the number of the second coding units is greater than the number of the first coding units and the number of the second coding units reaches a second number threshold.

[0083] In the above, by counting the number of first coding units corresponding to the horizontal division direction and the number of second coding units corresponding to the vertical division direction in the current coding region based on the division decision result when the current coding region completes the quadtree division decision, when the number of first coding units is greater than the number of second coding units and the number of first coding units reaches the first number threshold, the vertical division decision of the current coding region is skipped, and when the number of second coding units is greater than the number of first coding units and the number of second coding units reaches the second number threshold, the horizontal division decision of the current coding region is skipped. In the above scheme, by counting the number of coding units corresponding to different division directions after the current coding region completes the quadtree division, the optimal coding unit division information after the quadtree division decision can be effectively referred to, and the number of coding units in different division directions can be determined in combination with the texture information content of the current coding region; by determining whether the division type to be executed in the current coding region executes the skip decision based on the comparison result of the number of coding units corresponding to different division directions and the number threshold obtained by statistics, the computational complexity of the video encoder can be reduced, the encoding speed can be increased, and the video encoding efficiency can be improved under the premise of reasonably sacrificing the encoding quality and maintaining the consistency of the subjective image quality. This improves the computing resource utilization on the server side, saves server costs, and reduces the CPU utilization on the client side, further improving the user experience.

[0084] In a possible embodiment, the coding unit quantity statistics module 201 is configured as follows:

[0085] A plurality of coding units in the current coding area where the division decision is completed are traversed, and the number of first coding units corresponding to the horizontal division direction and the number of second coding units corresponding to the vertical division direction are determined according to the size information of each coding unit.

[0086] In a possible embodiment, the coding unit quantity statistics module 201 is further configured to:

[0087] When the width of the currently traversed coding unit is greater than the height, the number of first coding units in the corresponding horizontal division direction is incremented;

[0088] When the width of the currently traversed coding unit is smaller than the height, the number of second coding units in the corresponding vertical division direction is incremented.

[0089] In a possible embodiment, the vertical partition decision skipping module 202 is configured as follows:

[0090] The vertical skip flag corresponding to the vertical division decision of the current coding area is set to a true value. Before making the vertical division decision of the current coding area, if it is detected that the vertical skip flag is a true value, the vertical division decision is skipped.

[0091] In a possible embodiment, the horizontal partition decision skipping module 203 is configured as follows:

[0092] The horizontal skip flag corresponding to the horizontal division decision of the current coding area is set to a true value. Before making the horizontal division decision of the current coding area, if it is detected that the horizontal skip flag is a true value, the horizontal division decision is skipped.

[0093] In a possible embodiment, it further includes a quantity threshold determination module configured to:

[0094] Divide the first size of the current coding area by the second size of the minimum coding unit to obtain the maximum number of the current unit;

[0095] The current maximum number of units is multiplied by the first threshold coefficient and the second threshold coefficient respectively to obtain a first number threshold and a second number threshold.

[0096] In a possible embodiment, it further includes a partition decision execution module configured as follows:

[0097] When the number of the first coding units is less than or equal to the number of the second coding units, or the number of the first coding units does not reach the first number threshold, executing a vertical division decision of the current coding area;

[0098] When the number of the second coding units is less than or equal to the number of the first coding units, or the number of the second coding units does not reach the second number threshold, a horizontal division decision of the current coding area is performed.

[0099] Figure 8 A structural diagram of a video encoding unit partition decision device provided in an embodiment of the present application, such as Figure 8As shown, the device includes a processor 301, a memory 302, an input device 303 and an output device 304; the number of processors 301 in the device can be one or more. Figure 8 A processor 301 is taken as an example; the processor 301, memory 302, input device 303 and output device 304 in the device can be connected by a bus or other means. Figure 8 The example of connecting through a bus is taken. The memory 302, as a computer-readable storage medium, can be configured to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the division decision method of the video encoding unit in the embodiment of the present application. The processor 301 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 302, that is, implements the above-mentioned division decision method of the video encoding unit. The input device 303 can be configured to receive input digital or character information, and generate key signal input related to user settings and function control of the device. The output device 304 may include a display device such as a display screen.

[0100] An embodiment of the present application also provides a non-volatile storage medium containing computer executable instructions. When the computer executable instructions are executed by a computer processor, they are configured to execute a method for deciding the division of a video coding unit described in the above embodiment, which includes: when a quadtree division decision is completed in a current coding area, counting the number of first coding units corresponding to a horizontal division direction and the number of second coding units corresponding to a vertical division direction in the current coding area based on the division decision result; when the number of first coding units is greater than the number of second coding units and the number of first coding units reaches a first number threshold, skipping the vertical division decision of the current coding area; when the number of second coding units is greater than the number of first coding units and the number of second coding units reaches a second number threshold, skipping the horizontal division decision of the current coding area.

[0101] It is worth noting that in the embodiment of the division decision device of the above-mentioned video encoding unit, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not configured to limit the protection scope of the embodiments of the present application.

[0102] In some possible implementations, various aspects of the method provided in the present application may also be implemented in the form of a program product, which includes a program code. When the program product is run on a computer device, the program code is configured to enable the computer device to execute the steps of the method according to various exemplary implementations of the present application described above in this specification. For example, the computer device may execute the division decision method of the video encoding unit recorded in the embodiment of the present application. The program product may be implemented in any combination of one or more readable media.

Claims

1. A method for determining the division of a video coding unit, characterized in that: include: In the case where a quadtree partition decision is completed for the current coding region, counting the number of first coding units corresponding to a horizontal partition direction and the number of second coding units corresponding to a vertical partition direction in the current coding region based on the partition decision result; When the number of the first coding units is greater than the number of the second coding units and the number of the first coding units reaches a first number threshold, skipping a vertical division decision of the current coding area; When the number of the second coding units is greater than the number of the first coding units and the number of the second coding units reaches a second number threshold, a horizontal split decision of the current coding area is skipped.

2. The video coding unit division decision method according to claim 1, characterized in that: The method of counting the number of first coding units corresponding to the horizontal division direction and the number of second coding units corresponding to the vertical division direction in the current coding area based on the division decision result includes: Traverse multiple coding units in the current coding area where the division decision is completed, and determine the number of first coding units corresponding to the horizontal division direction and the number of second coding units corresponding to the vertical division direction according to the size information of each of the coding units.

3. The video coding unit division decision method according to claim 2, characterized in that: The determining, according to the size information of each of the coding units, the number of first coding units corresponding to the horizontal division direction and the number of second coding units corresponding to the vertical division direction comprises: When the width of the currently traversed coding unit is greater than the height, the number of first coding units corresponding to the horizontal division direction is incremented; When the width of the currently traversed coding unit is smaller than the height, the number of second coding units corresponding to the vertical division direction is incremented.

4. The video coding unit division decision method according to claim 1, characterized in that: The decision to skip the vertical division of the current coding area includes: The vertical skip flag corresponding to the vertical division decision of the current coding area is set to a true value. Before making the vertical division decision of the current coding area, if it is detected that the vertical skip flag is a true value, the vertical division decision is skipped.

5. The video coding unit division decision method according to claim 1, characterized in that: The decision to skip the horizontal division of the current coding area includes: The horizontal skip flag corresponding to the horizontal division decision of the current coding area is set to a true value. Before making the horizontal division decision of the current coding area, if it is detected that the horizontal skip flag is a true value, the horizontal division decision is skipped.

6. The video coding unit division decision method according to claim 1, characterized in that: After counting the number of first coding units corresponding to the horizontal division direction and the number of second coding units corresponding to the vertical division direction in the current coding area based on the division decision result, the method further includes: Dividing the first size of the current coding region by the second size of the minimum coding unit to obtain the maximum number of current units; The current maximum number of units is multiplied by a first threshold coefficient and a second threshold coefficient respectively to obtain a first number threshold and a second number threshold.

7. The method for determining the division of a video coding unit according to any one of claims 1 to 6, characterized in that: Also includes: When the number of the first coding units is less than or equal to the number of the second coding units, or the number of the first coding units does not reach a first number threshold, executing a vertical division decision of the current coding area; When the number of the second coding units is less than or equal to the number of the first coding units, or the number of the second coding units does not reach a second number threshold, a horizontal division decision of the current coding area is performed.

8. A division decision device for a video coding unit, characterized in that: include: A coding unit quantity statistics module is configured to count the number of first coding units corresponding to the horizontal division direction and the number of second coding units corresponding to the vertical division direction in the current coding region based on the division decision result when the quadtree division decision is completed in the current coding region; a vertical division decision skipping module, configured to skip the vertical division decision of the current coding area when the number of the first coding units is greater than the number of the second coding units and the number of the first coding units reaches a first number threshold; The horizontal division decision skipping module is configured to skip the horizontal division decision of the current coding area when the number of the second coding units is greater than the number of the first coding units and the number of the second coding units reaches a second number threshold.

9. A partition decision device for a video encoding unit, the device comprising: one or more processors; A storage device configured to store one or more programs, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the partition decision method of the video encoding unit described in any one of claims 1-7.

10. A non-volatile storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute the partition decision method of the video encoding unit according to any one of claims 1 to 7 when executed by a computer processor.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the partition decision method of the video encoding unit according to any one of claims 1 to 7 is implemented.