Coding unit division mode determination method and device, equipment, medium and product
By obtaining parameter information of the encoding processing process and using the probability prediction model of the division method, determining the division method of the encoding unit is solved, and the problems of inefficient division of the encoding unit and inaccurate results are achieved, and more efficient and stable division of the encoding unit is achieved.
Patent Information
- Application Number
- CN202411597948.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-28
AI Technical Summary
In the prior art, the division efficiency of the encoding unit is low and the division results are inaccurate and unstable.
By obtaining parameter information of the encoding process that matches the initial division state of the encoding unit, and using the division method probability prediction model, based on the pixel information and parameter information of the encoding unit, the probability that each division method is used to divide the encoding unit is determined, and finally the division method of the encoding unit is determined based on the probability sorting result.
The accuracy of probability prediction of coding unit division method is improved, the accuracy and stability of coding unit division results are improved, and the efficiency of coding unit division acceleration is further improved.
Smart Images

Figure CN119544996A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video coding and decoding, and in particular to a method, device, equipment, medium and product for determining a coding unit division method. Background Art
[0002] The division acceleration of coding units refers to the process of speeding up the division of coding units (CUs) by optimizing algorithms and technical means during the video encoding process, thereby reducing the encoding complexity and improving the encoding efficiency. Among them, the determination of the division method of coding units is a key step in division acceleration. In the prior art, coding units are usually divided using a quadtree-based coding unit division structure. However, this method is relatively complex and time-consuming, resulting in low efficiency in the division of coding units. In addition, it is easily affected by slight changes or noise in the input data, resulting in reduced accuracy and stability of the division results. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a method, device, equipment, medium and product for determining a coding unit division method, so as to solve the problems of low efficiency of coding unit division and inaccurate and unstable division results in related technologies.
[0004] In order to solve the above technical problems, the embodiments of the present application are implemented as follows: In a first aspect, an embodiment of the present application provides a method for determining a coding unit division method, including: Acquire parameter information of a coding process matching an initial division state of the coding unit; the initial division state of the coding unit is a non-divided state; Determining the probability that each partitioning method is used to partition the coding unit based on the pixel information of the coding unit and the parameter information through a partitioning method probability prediction model; The partitioning method includes one or more of the following: no partitioning, quadtree partitioning, vertical binary tree partitioning, horizontal binary tree partitioning, vertical ternary tree partitioning, and horizontal ternary tree partitioning; The probabilities of the division modes are sorted, and based on the sorting result, the division mode of the coding unit is determined.
[0005] In a second aspect, an embodiment of the present application provides a device for determining a coding unit division method, including: A parameter acquisition module, used to acquire parameter information of a coding process matching an initial division state of the coding unit; the initial division state of the coding unit is a non-divided state; A probability determination module, configured to determine the probability that each partitioning mode is used to partition the coding unit based on the pixel information of the coding unit and the parameter information through a partitioning mode probability prediction model; wherein the partitioning mode includes one or more of the following: no partitioning, quadtree partitioning, vertical binary tree partitioning, horizontal binary tree partitioning, vertical ternary tree partitioning, and horizontal ternary tree partitioning; The division determination module sorts the probabilities of the division modes and determines the division mode of the coding unit based on the sorting result.
[0006] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a communication interface, a memory and a communication bus; wherein the processor, the communication interface and the memory communicate with each other through a bus; the memory is used to store computer programs; the processor is used to execute the programs stored in the memory, and implement the method for determining the coding unit division method as described in the first aspect.
[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for determining the coding unit division method as described in the first aspect is implemented.
[0008] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method for determining the coding unit division method as described in the first aspect.
[0009] In the embodiment of the present application, first, parameter information of the encoding process matching the initial division state of the encoding unit is obtained; the initial division state of the encoding unit is a non-divided state; then, through the probability prediction model of the division method, based on the pixel information and parameter information of the encoding unit, the probability of each division method being used to divide the encoding unit is determined; the division method includes one or more of the following: non-division, quadtree division, vertical binary tree division, horizontal binary tree division, vertical ternary tree division and horizontal ternary tree division; then, the probability of each division method is sorted, and based on the sorting result, the division method of the encoding unit is determined. It can be seen that through the embodiment of the present application, by obtaining the parameter information of the encoding process matching the encoding unit in the non-divided state, and through the probability prediction model of the division method, according to the pixel information and parameter information of the encoding unit, the probability of each division method being used to divide the encoding unit is determined, and finally the division method of the encoding unit is determined according to the probability sorting result, which can not only improve the accuracy of the probability prediction of the division method, but also improve the accuracy and stability of the encoding unit division result, and further improve the efficiency of the acceleration of the encoding unit division. By sorting the probabilities of model outputs and selecting the optimal or suboptimal prediction results, the cost of model prediction errors can be reduced and the robustness of the model can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0011] Figure 1 A flowchart of a method for determining a coding unit division method provided in an embodiment of the present application; Figure 2 A schematic diagram of a process for determining a coding unit division method provided in an embodiment of the present application; Figure 3 A schematic diagram of the module composition of a device for determining a coding unit division method provided in an embodiment of the present application; Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0012] Embodiments of the present application provide a method, apparatus, device, medium, and product for determining a coding unit division method.
[0013] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0014] The method for determining the coding unit division method provided in the embodiment of the present application can be applied to the scenario of accelerating the division of coding units (CU) in the video coding standard. In a specific application scenario, for the coding unit in the video coding standard, a division method suitable for the coding unit is determined.
[0015] The following is a detailed description of the method for determining the coding unit division method provided in the embodiment of the present application in combination with the above-mentioned specific application scenario.
[0016] Figure 1 A flowchart of a method for determining a coding unit division method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, an embodiment of the present application provides a method for determining a coding unit division method, which can be executed by a server, and the server can be an independent server, a server cluster composed of multiple servers, or a cloud server for cloud computing processing. The method for determining a coding unit division method can specifically include the following steps: S102, obtaining parameter information of a coding process that matches an initial division state of the coding unit; the initial division state of the coding unit is a non-divided state.
[0017] A coding unit is a basic coding block in the video coding standard, which is used to compress and encode video data. The size and shape of a coding unit can be flexibly adjusted according to the texture characteristics of the image and the coding requirements. A coding unit can contain one or more smaller coding units, or be encoded as a complete coding unit.
[0018] In the embodiment of the present application, the coding unit may be a coding unit in the Versatile Video Coding (VVC) video coding standard, or may be a coding unit in other video coding standards. The initial division state of the coding unit is a non-divided state.
[0019] In one implementation, when the coding unit is not divided, the optimal prediction mode of the coding unit is searched, and parameter information such as the rate-distortion cost (RDCost) of the optimal prediction mode, the transform kernel (Transform Kernels) of the optimal prediction mode, and whether the residual coefficient of the optimal prediction mode is an all-zero block is obtained. These parameter information are parameter information for the encoder to perform the encoding process. The optimal prediction mode matches the coding unit in the non-divided state, that is, the prediction mode is most suitable for the current coding unit in the non-divided state.
[0020] The optimal prediction mode of the coding unit is a prediction mode selected based on certain algorithms and strategies. During the video encoding process, in order to find the optimal prediction mode, the coding unit will traverse a variety of different prediction modes, including intra-frame prediction, inter-frame prediction, and Skip mode. In the process of determining the optimal prediction mode, the coding unit will calculate the rate-distortion cost of all inter-frame prediction and intra-frame prediction modes for each depth CU. The RDO cost is an indicator that comprehensively considers the encoding bit rate and distortion, and is used to evaluate the performance of different prediction modes. The coding unit will select the mode with the smallest RDO cost as the optimal prediction mode for the current depth CU.
[0021] In the parameter information, the rate-distortion cost is used to select modes and balance coding efficiency and quality during the encoding process. It is usually defined as the weighted sum between distortion (or error) and the bit rate required for encoding. The transform kernel is a matrix used to linearly transform image or video data. This transform is usually intended to reduce the correlation of the data, making the transformed data easier to compress. In video compression coding, the residual coefficients are usually related to the motion estimation and compensation process. The residual coefficients reflect the difference between the actual pixel value and the predicted pixel value obtained through motion estimation and compensation. These difference values (i.e., residuals) are embedded in the bitstream after transformation (such as discrete cosine transform DCT), quantization, entropy coding and other steps to achieve compression and transmission of video data.
[0022] S104, through the division method probability prediction model, based on the pixel information and parameter information of the coding unit, determine the probability that each division method is used to divide the coding unit; wherein the division method includes one or more of the following: no division, quadtree division, vertical binary tree division, horizontal binary tree division, vertical ternary tree division and horizontal ternary tree division.
[0023] In an embodiment of the present application, after obtaining the parameter information, the pixel information and parameter information of the pixel value of the coding unit can be input into a partitioning method probability prediction model. Through the partitioning method probability prediction model, the output obtains the probability that no partitioning, quadtree partitioning, vertical binary tree partitioning, horizontal binary tree partitioning, vertical ternary tree partitioning and horizontal ternary tree partitioning are used to divide the coding unit.
[0024] S106, sorting the probabilities of the division modes, and determining the division mode of the coding units based on the sorting result.
[0025] In the embodiment of the present application, the probabilities of the various division modes output by the division mode probability prediction model are sorted to obtain the probability sorting results of the various division modes. Then, the division mode of the coding unit is determined according to the sorting results.
[0026] Preferably, the probabilities of the various division modes may be sorted in order from large to small.
[0027] In one example, assume that the output of the probability prediction model of the partitioning method is: the probability of no partitioning is 51%, the probability of quadtree partitioning is 85%, the probability of vertical binary tree partitioning is 70%, the probability of horizontal binary tree partitioning is 30%, the probability of vertical ternary tree partitioning is 20%, and the probability of horizontal ternary tree partitioning is 10%. In order of probability from large to small, the probabilities of the above partitioning methods are sorted, and the probability sorting result is: quadtree partitioning>vertical binary tree partitioning>no partitioning>horizontal binary tree partitioning>vertical ternary tree partitioning>horizontal ternary tree partitioning.
[0028] In one embodiment, the division method includes no division; and based on the sorting result, determining the division method of the coding unit includes: Determine whether the partitioning method with the highest probability in the sorting result is no partitioning; If it is determined that the division method with the highest probability ranking is not to be divided, then the division method of the coding unit is determined to be not to be divided; otherwise, the division method of the coding unit is determined based on the division method with the highest probability ranking.
[0029] In the embodiment of the present application, it is necessary to determine whether the division method ranked first in probability in the sorting result is a non-division method. If it is determined that the division method ranked first in probability is a non-division method, then the determination process of the current division method is terminated, and the current coding unit is not divided. If it is determined that the division method ranked first in probability is not a non-division method, then based on the division method ranked first in probability, the division method of the coding unit is further determined.
[0030] Continuing with the above example, the division method ranked first in probability in the above example is quadtree division, not non-division. Therefore, the division method of the coding unit can be further determined based on the quadtree division ranked first in probability.
[0031] In one embodiment, determining a division method of the coding unit based on the division method ranked first in probability includes: Determine a first rate distortion cost of the partitioning method with the highest probability and a second rate distortion cost of no partitioning; Determining a first rate distortion cost magnitude relationship between the first rate distortion cost and the second rate distortion cost; Based on the first rate-distortion cost relationship, a division method of the coding units is determined.
[0032] In the embodiment of the present application, first, it is necessary to calculate the first rate distortion cost of the division method ranked first in probability and the second rate distortion cost of no division; then, determine the first rate distortion cost size relationship between the first rate distortion cost of the division method ranked first in probability and the second rate distortion cost of no division; then, determine the division method of the coding unit according to the determined first rate distortion cost size relationship.
[0033] It should be noted that the calculation method of the rate-distortion cost of each division method can refer to the relevant technology, and this application will not go into details here.
[0034] Continuing with the above example, assuming that the first rate distortion cost of the quadtree partition ranked first in probability is a, and the second rate distortion cost of not partitioning is b. It is necessary to determine the size relationship between a and b, and determine the division method of the coding unit according to the size relationship between a and b.
[0035] In one embodiment, based on the first rate-distortion cost relationship, determining the division method of the coding unit includes: If the first rate distortion cost is smaller than the second rate distortion cost, and the probability difference between the first probability of the division method ranked first in probability and the second probability of no division is greater than the first preset probability difference threshold, then the division method of the coding unit is determined to be the division method ranked first in probability; otherwise, the division method of the coding unit is determined to be no division; If the first rate distortion cost magnitude relationship is that the first rate distortion cost is less than the second rate distortion cost, and the probability difference between the first probability of the division method ranked first in probability and the second probability of no division is less than the second preset probability difference threshold, then determining the third rate distortion cost of the division method ranked second in probability, and determining the division method of the coding unit based on the second rate distortion cost magnitude relationship between the first rate distortion cost and the third rate distortion cost; If the first rate distortion cost size relationship is that the first rate distortion cost is less than the second rate distortion cost, and the probability difference between the first probability of the division method ranked first in probability and the second probability of no division is between the first preset probability difference threshold and the second preset probability difference threshold, then the third rate distortion cost size relationship between the first rate distortion cost of the preset multiple and the second rate distortion cost is determined, and based on the third rate distortion cost size relationship, the division method of the coding unit is determined.
[0036] In the embodiment of the present application, if the first rate-distortion cost size relationship is that the first rate-distortion cost of the division method ranked first in probability is less than the second rate-distortion cost of not dividing, and the probability difference between the first probability of the division method ranked first in probability and the second probability of not dividing is greater than the first preset probability difference threshold, then the division method of the coding unit is determined to be the division method ranked first in probability. If the first rate-distortion cost size relationship is that the first rate-distortion cost of the division method ranked first in probability is greater than the second rate-distortion cost of not dividing, indicating that the rate-distortion cost of not dividing is small, then the division method of the coding unit is determined to be not dividing.
[0037] In one example, it is assumed that the first rate-distortion cost a of the quadtree partition with the first probability ranking is 0.05, the first probability p1 is 85%, the second rate-distortion cost b of not partitioning is 0.058, and the second probability p2 is 51%. The first preset probability difference threshold θ is 30%. It can be obtained that the first rate-distortion cost a is less than the second rate-distortion cost b, and the difference between p1 and p2 is 34%, which is greater than the first preset probability difference threshold θ of 30%. Therefore, it is determined that the division method of the coding unit is the quadtree partition with the first probability ranking.
[0038] In another example, assuming that the first rate-distortion cost a of the quadtree partition ranked first in probability is 0.05, the second rate-distortion cost b of no partition is 0.048, and the first rate-distortion cost a is greater than the second rate-distortion cost b, then it can be determined that the division method of the coding unit is no division.
[0039] In the embodiment of the present application, if the first rate distortion cost is that the first rate distortion cost of the division method ranked first in probability is less than the second rate distortion cost of no division, and the probability difference between the first probability of the division method ranked first in probability and the second probability of no division is less than the second preset probability difference threshold, then the third rate distortion cost of the division method ranked second in probability is calculated, and the second rate distortion size relationship between the third rate distortion cost and the first rate distortion cost is determined. If the third rate distortion cost is greater than the first rate distortion cost, it means that the rate distortion cost of the division method ranked first in probability is smaller, then the division method ranked first in probability is determined as the division method of the coding unit. If the third rate distortion cost is less than the first rate distortion cost, it means that the rate distortion cost of the division method ranked second in probability is smaller, then the division method ranked second in probability is determined as the division method of the coding unit.
[0040] In one implementation, the first preset probability difference threshold may be twice the second preset probability difference threshold.
[0041] In one example, it is assumed that the first rate-distortion cost a of the quadtree partition ranked first in probability is 0.05, the first probability p1 is 85%, the second rate-distortion cost b of not partitioning is 0.058, and the second probability p2 is 75%. The second preset probability difference threshold is 15%. The partitioning method ranked second in probability is horizontal binary tree partitioning. It can be obtained that the first rate-distortion cost a is less than the second rate-distortion cost b, and the probability difference between the first probability p1 and the second probability p2 is 10%, which is less than the second preset probability difference threshold 15%. Then, the third rate-distortion cost c of the horizontal binary tree partition ranked second in probability can be calculated. Assuming that the third rate-distortion cost c is 0.04, which is less than the first rate-distortion cost a, then it can be determined that the partitioning method of the coding unit is horizontal binary tree partitioning.
[0042] In another example, assuming that the third rate-distortion cost c is 0.06, which is greater than the first rate-distortion cost a, it can be determined that the division method of the coding unit is quadtree division.
[0043] In the embodiment of the present application, if the first rate distortion cost relationship is that the first rate distortion cost of the division method ranked first in probability is less than the second rate distortion cost without division, and the difference between the first probability of the division method ranked first in probability and the second probability without division is between the first preset probability difference threshold and the second preset probability difference threshold, then the third rate distortion cost relationship between the first rate distortion cost of the preset multiple and the second rate distortion cost without division is further determined. Then, according to the third rate distortion cost relationship, the division method of the coding unit is determined.
[0044] Preferably, the preset multiple may be twice.
[0045] In one example, it is assumed that the first rate distortion cost a of the quadtree partition ranked first in probability is 0.02, the first probability p1 is 85%, the second rate distortion cost b of non-partition is 0.058, and the second probability p2 is 60%. The first preset probability difference threshold θ is 30%, and the second preset probability difference threshold is θ / 2, which is 15%. It can be obtained that the first rate distortion cost a is less than the second rate distortion cost b, and the probability difference between the first probability p1 and the second probability p2 is 25%, which is greater than the second preset probability difference threshold 15% and less than the first preset probability difference threshold 30%. In this case, it is necessary to further compare the size relationship between the twice first rate distortion cost a and the non-partitioned second rate distortion cost b to further determine the division method of the coding unit.
[0046] In another example, assuming that the first rate distortion cost a of the quadtree partition ranked first in probability is 0.05, the second rate distortion cost b of no partition is 0.058, and the partition method ranked second in probability is horizontal binary tree partition, and its third rate distortion cost c is 0.04. It can be seen that twice the first rate distortion cost a is 0.1, which is greater than the second rate distortion cost of no partition, 0.058. In this case, the third rate distortion cost c of the partition method ranked second in probability and the second rate distortion cost b of no partition can be compared to further determine the partition method of the coding unit.
[0047] In one embodiment, based on the third rate-distortion cost relationship, determining the division method of the coding unit includes: If the third rate distortion cost is a preset multiple of the first rate distortion cost which is smaller than the second rate distortion cost, then determining the division method ranked first in probability as the division method of the coding unit; Otherwise, a fourth rate-distortion cost magnitude relationship between the third rate-distortion cost and the second rate-distortion cost is determined, and based on the fourth rate-distortion cost magnitude relationship, a division manner of the coding units is determined.
[0048] In the embodiment of the present application, if the first rate distortion cost of the preset multiple is less than the second rate distortion cost of no division, it means that the rate distortion cost of the division method ranked first in probability is much smaller than the rate distortion cost of no division, and therefore, the division method of the coding unit can be determined as the division method ranked first in probability. If the first rate distortion cost of the preset multiple is greater than the second rate distortion cost of no division, then the fourth rate distortion cost size relationship between the third rate distortion cost of the division method ranked second in probability and the second rate distortion cost of no division is compared. If the third rate distortion cost is less than the second rate distortion cost of no division, then the division method of the coding unit is determined to be the division method ranked second in probability; if the third rate distortion cost is greater than the second rate distortion cost of no division, then the division method of the coding unit is determined to be no division.
[0049] Continuing with the above example, assume that the first rate distortion cost a of the quadtree partition with the first probability is 0.02, and the second rate distortion cost b of no partition is 0.058. It can be seen that twice the first rate distortion cost a is 0.04, which is less than the second rate distortion cost of no partition 0.058. Therefore, the quadtree partition with the first probability can be determined as the division method of the coding unit.
[0050] In another example, assume that the first rate distortion cost a of the quadtree partition ranked first in probability is 0.05, the second rate distortion cost b of no partition is 0.058, and the partition method ranked second in probability is horizontal binary tree partition, and its third rate distortion cost c is 0.04. It can be seen that twice the first rate distortion cost a is 0.1, which is greater than the second rate distortion cost of no partition, 0.058. In this case, the third rate distortion cost c of the partition method ranked second in probability is compared with the second rate distortion cost b of no partition. It can be seen that the third rate distortion cost c of the partition method ranked second in probability is 0.04, which is less than the second rate distortion cost of no partition, 0.058. Therefore, the partition method ranked second in probability can be determined as the partition method of the coding unit.
[0051] In one embodiment, it further includes: Obtaining sample pixel information of a sample coding unit, and label probabilities that each division method is used to divide the sample coding unit; an initial division state of the sample coding unit is a non-division state; By using a pre-built neural network, based on sample pixel information and sample parameter information, the prediction probability of each division method being used to divide the sample coding unit is determined; According to the difference between the prediction probability of each partitioning method and the label probability of each partitioning method, a neural network is trained, and the trained neural network is a partitioning method probability prediction model.
[0052] In the embodiment of the present application, the training process of the probability prediction model of the division method is also included, which is specifically as follows: first, the training samples and labels of the probability prediction model of the division method are determined, and the training samples include the sample pixel information of the sample coding unit, the sample parameter information of the coding process matching the undivided state of the sample coding unit, and the label is the probability of each division method. Then, the training samples and labels are input into the pre-built neural network, and the predicted probability of each division method being used to divide the sample coding unit is output. Then, according to the difference between the predicted probability of each division method and the label probability of each division method, as well as the loss function, the parameters in the neural network training process are continuously adjusted, and the neural network is trained until the difference between the predicted probability of each division method and the label probability of each division method is less than the preset probability difference threshold. Finally, the trained neural network is converted into a probability prediction model of the division method.
[0053] In one implementation, the sample pixel information of the sample coding unit may be pixel information of a pixel value of the sample coding unit. The sample parameter information of the encoding process matched by the initial division state of the sample coding unit is parameter information such as the rate distortion cost under the optimal prediction mode of the sample coding unit, the transformation kernel of the optimal prediction mode, and whether the residual coefficient of the optimal prediction mode is an all-zero block. The optimal prediction mode matches the sample coding unit in the non-divided state, that is, the prediction mode is most suitable for the sample coding unit in the current non-divided state.
[0054] In one implementation, assuming that the sample coding unit is divided into quadtree divisions, the label probability of the quadtree division is 100%, and the label probability of each other division except the quadtree division is 0%.
[0055] In one implementation, the pre-built neural network may be a recurrent neural network (RNN).
[0056] In the embodiment of the present application, first, parameter information of the encoding process matching the initial division state of the encoding unit is obtained; the initial division state of the encoding unit is a non-divided state; then, through the probability prediction model of the division method, based on the pixel information and parameter information of the encoding unit, the probability of each division method being used to divide the encoding unit is determined; the division method includes one or more of the following: non-division, quadtree division, vertical binary tree division, horizontal binary tree division, vertical ternary tree division and horizontal ternary tree division; then, the probability of each division method is sorted, and based on the sorting result, the division method of the encoding unit is determined. It can be seen that through the embodiment of the present application, by obtaining the parameter information of the encoding process matching the encoding unit in the non-divided state, and through the probability prediction model of the division method, according to the pixel information and parameter information of the encoding unit, the probability of each division method being used to divide the encoding unit is determined, and finally the division method of the encoding unit is determined according to the probability sorting result, which can not only improve the accuracy of the probability prediction of the division method, but also improve the accuracy and stability of the encoding unit division result, and further improve the efficiency of the acceleration of the encoding unit division. By sorting the probabilities of model outputs and selecting the optimal or suboptimal prediction results, the cost of model prediction errors can be reduced and the robustness of the model can be improved.
[0057] Figure 2 A schematic diagram of the process of determining the coding unit division method provided in the embodiment of the present application, such as Figure 2 As shown, first, in the state where the current coding unit is not divided, the optimal prediction mode of the coding unit is searched; then, the pixel value information of the pixel points of the current coding unit and the parameter information of the encoding process under the optimal prediction mode are input into the probability prediction model of the division method, and the probability that each division method is used to divide the coding unit is output. Next, the probabilities of each division method are sorted from large to small to obtain the sorting result; the division method is selected according to the sorting result, and the rate-distortion cost of the selected division method is calculated. Finally, the rate-distortion cost of the selected division method is compared with the rate-distortion cost of no division, and the optimal division method is selected according to the comparison result.
[0058] By obtaining the parameter information of the encoding process that matches the coding unit in the undivided state, and using the probability prediction model of the division method, according to the pixel information and parameter information of the coding unit, the probability of each division method being used to divide the coding unit is determined, and finally the division method of the coding unit is determined according to the probability sorting result, which can not only improve the accuracy of the probability prediction of the division method, but also improve the accuracy and stability of the coding unit division result, and further improve the efficiency of the coding unit division acceleration. By sorting the probabilities of the model output, the optimal or suboptimal prediction results are selected, which can reduce the cost of model prediction errors and improve the robustness of the model.
[0059] Corresponding to the method for determining the coding unit division mode provided in the above embodiment, based on the same technical concept, the embodiment of the present application further provides a device for determining the coding unit division mode. Figure 3 A schematic diagram of the module composition of the device for determining the coding unit division method provided in an embodiment of the present application, such as Figure 3 As shown, the device for determining the coding unit division method includes: The parameter acquisition module 301 is used to acquire parameter information of a coding process that matches an initial division state of a coding unit; the initial division state of the coding unit is a non-division state; A probability determination module 302 is used to determine the probability that each partitioning method is used to partition the coding unit based on the pixel information of the coding unit and the parameter information through a partitioning method probability prediction model; wherein the partitioning method includes one or more of the following: no partitioning, quadtree partitioning, vertical binary tree partitioning, horizontal binary tree partitioning, vertical ternary tree partitioning, and horizontal ternary tree partitioning; The division determination module 303 sorts the probabilities of the division modes, and determines the division mode of the coding unit based on the sorting result.
[0060] In a possible implementation, the division method includes no division; the division determination module 303 is specifically used to determine whether the division method ranked first in probability in the sorting result is no division; If it is determined that the division method ranked first in probability is not divided, then the division method of the coding unit is determined to be not divided; otherwise, the division method of the coding unit is determined based on the division method ranked first in probability.
[0061] In a possible implementation, the above-mentioned partition determination module 303 is further specifically used to determine the first rate-distortion cost of the partitioning method ranked first in probability and the second rate-distortion cost of not partitioning; Determining a first rate distortion cost magnitude relationship between the first rate distortion cost and the second rate distortion cost; Based on the first rate-distortion cost relationship, a division method of the coding unit is determined.
[0062] In a possible implementation, the division determination module 303 is further specifically configured to determine that the division mode of the coding unit is the division mode ranked first in probability if the first rate distortion cost is smaller than the second rate distortion cost, and the difference between the first probability of the division mode ranked first in probability and the second probability of no division is greater than a first preset probability difference threshold; otherwise, determine that the division mode of the coding unit is no division; If the first rate distortion cost relationship is that the first rate distortion cost is less than the second rate distortion cost, and the probability difference between the first probability of the division method ranked first in probability and the second probability of no division is less than a second preset probability difference threshold, then determining the third rate distortion cost of the division method ranked second in probability, and determining the division method of the coding unit based on the second rate distortion cost relationship between the first rate distortion cost and the third rate distortion cost; If the first rate distortion cost size relationship is that the first rate distortion cost is less than the second rate distortion cost, and the probability difference between the first probability of the division method ranked first in the probability ranking and the second probability of not dividing is between the first preset probability difference threshold and the second preset probability difference threshold, then determine the third rate distortion cost size relationship between the first rate distortion cost of a preset multiple and the second rate distortion cost, and based on the third rate distortion cost size relationship, determine the division method of the coding unit.
[0063] In a possible implementation, the above-mentioned division determination module 303 is further specifically used to determine the division method ranked first in probability as the division method of the coding unit if the first rate-distortion cost whose magnitude relationship of the third rate-distortion cost is a preset multiple is less than the second rate-distortion cost; Otherwise, a fourth rate-distortion cost magnitude relationship between the third rate-distortion cost and the second rate-distortion cost is determined, and based on the fourth rate-distortion cost magnitude relationship, a division manner of the coding unit is determined.
[0064] In a possible implementation, the apparatus further includes a model training module, configured to obtain sample pixel information of a sample coding unit, sample parameter information of a coding process matching an initial division state of the sample coding unit, and a label probability that each division mode is used to divide the sample coding unit; the initial division state of the sample coding unit is a non-divided state; Determining, by a pre-built neural network, based on the sample pixel information and the sample parameter information, the prediction probability that each of the division modes is used to divide the sample coding unit; The neural network is trained according to the difference between the prediction probability of each of the division methods and the label probability of each of the division methods, and the trained neural network is the division method probability prediction model.
[0065] In the embodiment of the present application, first, parameter information of the encoding process matching the initial division state of the encoding unit is obtained; the initial division state of the encoding unit is a non-divided state; then, through the probability prediction model of the division method, based on the pixel information and parameter information of the encoding unit, the probability of each division method being used to divide the encoding unit is determined; the division method includes one or more of the following: non-division, quadtree division, vertical binary tree division, horizontal binary tree division, vertical ternary tree division and horizontal ternary tree division; then, the probability of each division method is sorted, and based on the sorting result, the division method of the encoding unit is determined. It can be seen that through the embodiment of the present application, by obtaining the parameter information of the encoding process matching the encoding unit in the non-divided state, and through the probability prediction model of the division method, according to the pixel information and parameter information of the encoding unit, the probability of each division method being used to divide the encoding unit is determined, and finally the division method of the encoding unit is determined according to the probability sorting result, which can not only improve the accuracy of the probability prediction of the division method, but also improve the accuracy and stability of the encoding unit division result, and further improve the efficiency of the acceleration of the encoding unit division. By sorting the probabilities of model outputs and selecting the optimal or suboptimal prediction results, the cost of model prediction errors can be reduced and the robustness of the model can be improved.
[0066] The device for determining the coding unit division method provided in the embodiment of the present application can implement each process in the embodiment corresponding to the method for determining the coding unit division method mentioned above. To avoid repetition, they will not be described again here.
[0067] It should be noted that the device for determining the coding unit division method provided in the embodiment of the present application and the method for determining the coding unit division method provided in the embodiment of the present application are based on the same inventive concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned method for determining the coding unit division method, and the repeated parts will not be repeated.
[0068] Corresponding to the method for determining the coding unit division mode provided in the above embodiment, based on the same technical concept, an embodiment of the present application further provides an electronic device, which is used to execute the method for determining the coding unit division mode. Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 4As shown, the electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors 401 and memory 402, and the memory 402 may store one or more storage applications or data. Among them, the memory 402 may be a temporary storage or a permanent storage. The application stored in the memory 402 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the electronic device. Furthermore, the processor 401 may be configured to communicate with the memory 402 to execute a series of computer executable instructions in the memory 402 on the electronic device. The electronic device may also include one or more power supplies 403, one or more wired or wireless network interfaces 404, one or more input and output interfaces 405, and one or more keyboards 406.
[0069] In a specific embodiment, the electronic device includes a processor, a communication interface, a memory and a communication bus; wherein the processor, the communication interface and the memory communicate with each other through the bus; the memory is used to store a computer program; the processor is used to execute the program stored in the memory to implement the following method steps: Acquire parameter information of a coding process matching an initial division state of the coding unit; the initial division state of the coding unit is a non-divided state; Determining the probability that each partitioning method is used to partition the coding unit based on the pixel information of the coding unit and the parameter information through a partitioning method probability prediction model; The partitioning method includes one or more of the following: no partitioning, quadtree partitioning, vertical binary tree partitioning, horizontal binary tree partitioning, vertical ternary tree partitioning, and horizontal ternary tree partitioning; The probabilities of the division modes are sorted, and based on the sorting result, the division mode of the coding unit is determined.
[0070] In the embodiment of the present application, first, parameter information of the encoding process matching the initial division state of the encoding unit is obtained; the initial division state of the encoding unit is a non-divided state; then, through the probability prediction model of the division method, based on the pixel information and parameter information of the encoding unit, the probability of each division method being used to divide the encoding unit is determined; the division method includes one or more of the following: non-division, quadtree division, vertical binary tree division, horizontal binary tree division, vertical ternary tree division and horizontal ternary tree division; then, the probability of each division method is sorted, and based on the sorting result, the division method of the encoding unit is determined. It can be seen that through the embodiment of the present application, by obtaining the parameter information of the encoding process matching the encoding unit in the non-divided state, and through the probability prediction model of the division method, according to the pixel information and parameter information of the encoding unit, the probability of each division method being used to divide the encoding unit is determined, and finally the division method of the encoding unit is determined according to the probability sorting result, which can not only improve the accuracy of the probability prediction of the division method, but also improve the accuracy and stability of the encoding unit division result, and further improve the efficiency of the acceleration of the encoding unit division. By sorting the probabilities of model outputs and selecting the optimal or suboptimal prediction results, the cost of model prediction errors can be reduced and the robustness of the model can be improved.
[0071] The present application also provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the following method steps are implemented: Acquire parameter information of a coding process matching an initial division state of the coding unit; the initial division state of the coding unit is a non-divided state; Determining the probability that each partitioning method is used to partition the coding unit based on the pixel information of the coding unit and the parameter information through a partitioning method probability prediction model; The partitioning method includes one or more of the following: no partitioning, quadtree partitioning, vertical binary tree partitioning, horizontal binary tree partitioning, vertical ternary tree partitioning, and horizontal ternary tree partitioning; The probabilities of the division modes are sorted, and based on the sorting result, the division mode of the coding unit is determined.
[0072] In the embodiment of the present application, first, parameter information of the encoding process matching the initial division state of the encoding unit is obtained; the initial division state of the encoding unit is a non-divided state; then, through the probability prediction model of the division method, based on the pixel information and parameter information of the encoding unit, the probability of each division method being used to divide the encoding unit is determined; the division method includes one or more of the following: non-division, quadtree division, vertical binary tree division, horizontal binary tree division, vertical ternary tree division and horizontal ternary tree division; then, the probability of each division method is sorted, and based on the sorting result, the division method of the encoding unit is determined. It can be seen that through the embodiment of the present application, by obtaining the parameter information of the encoding process matching the encoding unit in the non-divided state, and through the probability prediction model of the division method, according to the pixel information and parameter information of the encoding unit, the probability of each division method being used to divide the encoding unit is determined, and finally the division method of the encoding unit is determined according to the probability sorting result, which can not only improve the accuracy of the probability prediction of the division method, but also improve the accuracy and stability of the encoding unit division result, and further improve the efficiency of the acceleration of the encoding unit division. By sorting the probabilities of model outputs and selecting the optimal or suboptimal prediction results, the cost of model prediction errors can be reduced and the robustness of the model can be improved.
[0073] An embodiment of the present application also provides a computer program product. When the computer program is executed by a processor, each process of the above-mentioned method for determining the coding unit division method is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0074] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0075] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.
[0076] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0077] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0078] In a typical configuration, an electronic device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0079] Memory may include non-permanent storage in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0080] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0081] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0082] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0083] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for determining a coding unit division method, characterized in that: The method comprises: Acquire parameter information of a coding process matching an initial division state of the coding unit; the initial division state of the coding unit is a non-divided state; Determining the probability that each partitioning method is used to partition the coding unit based on the pixel information of the coding unit and the parameter information through a partitioning method probability prediction model; The partitioning method includes one or more of the following: no partitioning, quadtree partitioning, vertical binary tree partitioning, horizontal binary tree partitioning, vertical ternary tree partitioning, and horizontal ternary tree partitioning; The probabilities of the division modes are sorted, and based on the sorting result, the division mode of the coding unit is determined.
2. The method according to claim 1, characterized in that: The division method includes no division; and determining the division method of the coding unit based on the sorting result includes: Determine whether the partitioning method ranked first in probability in the sorting result is no partitioning; If it is determined that the division method ranked first in probability is not divided, then the division method of the coding unit is determined to be not divided; otherwise, the division method of the coding unit is determined based on the division method ranked first in probability.
3. The method according to claim 2, characterized in that The determining the division method of the coding unit based on the division method ranked first in the probability ranking includes: Determine a first rate-distortion cost of the partitioning method ranked first in probability and a second rate-distortion cost of not partitioning; Determining a first rate distortion cost magnitude relationship between the first rate distortion cost and the second rate distortion cost; Based on the first rate-distortion cost relationship, a division method of the coding unit is determined.
4. The method according to claim 3, characterized in that The determining the division method of the coding unit based on the first rate-distortion cost relationship includes: If the first rate distortion cost is smaller than the second rate distortion cost, and the probability difference between the first probability of the division method ranked first in probability and the second probability of no division is greater than a first preset probability difference threshold, then determining that the division method of the coding unit is the division method ranked first in probability; otherwise, determining that the division method of the coding unit is no division; If the first rate distortion cost relationship is that the first rate distortion cost is less than the second rate distortion cost, and the probability difference between the first probability of the division method ranked first in probability and the second probability of no division is less than a second preset probability difference threshold, then determining the third rate distortion cost of the division method ranked second in probability, and determining the division method of the coding unit based on the second rate distortion cost relationship between the first rate distortion cost and the third rate distortion cost; If the first rate distortion cost size relationship is that the first rate distortion cost is less than the second rate distortion cost, and the probability difference between the first probability of the division method ranked first in the probability ranking and the second probability of not dividing is between the first preset probability difference threshold and the second preset probability difference threshold, then determine the third rate distortion cost size relationship between the first rate distortion cost of a preset multiple and the second rate distortion cost, and based on the third rate distortion cost size relationship, determine the division method of the coding unit.
5. The method according to claim 4, characterized in that The determining the division method of the coding unit based on the third rate-distortion cost relationship includes: If the magnitude relationship of the third rate-distortion cost is that the first rate-distortion cost of a preset multiple is smaller than the second rate-distortion cost, determining the division method ranked first in the probability ranking as the division method of the coding unit; Otherwise, a fourth rate-distortion cost magnitude relationship between the third rate-distortion cost and the second rate-distortion cost is determined, and based on the fourth rate-distortion cost magnitude relationship, a division manner of the coding unit is determined.
6. The method according to claim 1, characterized in that The method also includes: Acquire sample pixel information of a sample coding unit, sample parameter information of a coding process matching an initial division state of the sample coding unit, and label probabilities that each division mode is used to divide the sample coding unit; the initial division state of the sample coding unit is a non-division state; Determining, by a pre-built neural network, based on the sample pixel information and the sample parameter information, the prediction probability that each of the division modes is used to divide the sample coding unit; The neural network is trained according to the difference between the prediction probability of each of the division methods and the label probability of each of the division methods, and the trained neural network is the division method probability prediction model.
7. A device for determining a coding unit division method, characterized in that: include: A parameter acquisition module, used to acquire parameter information of a coding process matching an initial division state of the coding unit; The initial division state of the coding unit is a non-division state; A probability determination module, configured to determine the probability that each partitioning mode is used to partition the coding unit based on the pixel information of the coding unit and the parameter information through a partitioning mode probability prediction model; wherein the partitioning mode includes one or more of the following: no partitioning, quadtree partitioning, vertical binary tree partitioning, horizontal binary tree partitioning, vertical ternary tree partitioning, and horizontal ternary tree partitioning; The division determination module sorts the probabilities of the division modes and determines the division mode of the coding unit based on the sorting result.
8. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus; wherein the processor, the communication interface and the memory communicate with each other through the bus; the memory is used to store computer programs; the processor is used to execute the programs stored in the memory to implement the steps of the method for determining the coding unit division method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for determining the coding unit division method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that It includes a computer program, which, when executed by a processor, implements the steps of the method for determining the coding unit division method as described in any one of claims 1 to 6.
