An intra-coded block adaptive partitioning method, system, device and storage medium
By calculating the optimal rate-distortion cost and the exponential model fitting of the current layer coding block, the process of dividing intra-frame coding blocks is simplified, the problem of long time consumption in intra-frame coding block division is solved, and coding efficiency and speed are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI LUOTA INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2023-05-12
- Publication Date
- 2026-05-08
AI Technical Summary
In existing technologies, the process of dividing intra-frame coding blocks is time-consuming, which affects coding efficiency.
By calculating the optimal rate-distortion cost of the current layer's coding block and calculating the partitioning threshold based on a set exponential model, the optimal rate-distortion cost and pixel information of the coding block are fitted using the exponential model to determine whether to partition the coding block, thus simplifying the layer-by-layer calculation process.
While ensuring the accuracy of coding block division, the calculation process for coding block division judgment is simplified, thereby improving the efficiency of coding block division and the speed of intra-frame coding.
Smart Images

Figure CN116567233B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video coding technology, and in particular to an intra-frame adaptive coding block partitioning method, system, device and storage medium. Background Technology
[0002] Intra-frame coding is a crucial core technology in video coding. During the video coding process, such as... Figure 1 As shown, each frame of video is first divided into fixed-size coding units, and then, based on the complexity of the image, coding blocks are further divided layer by layer on top of these coding units. Different regions have different numbers of coding block layers, resulting in different block sizes. Currently, when determining the number of coding block layers, the optimal rate-distortion cost for each layer is calculated, and the layer with the lowest optimal rate-distortion cost is selected as the optimal number of coding block layers, thus accurately dividing intra-frame coding blocks.
[0003] However, the method of determining the optimal number of layers for the decision coding block requires calculating the optimal rate-distortion cost layer by layer, which makes the intra-frame coding block division time-consuming, thus making the entire intra-frame coding process time-consuming and affecting the intra-frame coding efficiency. Summary of the Invention
[0004] This application provides an adaptive partitioning method, system, device, and storage medium for intra-frame coded blocks, which can improve the partitioning speed of intra-frame coded blocks and solve the technical problem of long partitioning decision time for intra-frame coded blocks.
[0005] In a first aspect, embodiments of this application provide an intra-frame coded block adaptive partitioning method, comprising:
[0006] Calculate the optimal rate-distortion cost of the current layer coding block, and calculate the partitioning threshold of the current layer coding block based on the set exponential model of the current layer. The set exponential model is pre-constructed by fitting the optimal rate-distortion cost of different coding blocks and the corresponding pixel information.
[0007] If the optimal rate-distortion cost of the current layer coding block is less than the partitioning threshold, the partitioning of the current layer coding block ends. If the optimal rate-distortion cost of the current layer coding block is greater than or equal to the partitioning threshold, the current layer coding block is partitioned, and the next layer coding block partitioning decision is entered.
[0008] In a second aspect, embodiments of this application provide an intra-frame coded block adaptive partitioning system, comprising:
[0009] The calculation module is configured to calculate the optimal rate-distortion cost of the current layer coding block and calculate the partitioning threshold of the current layer coding block based on the set exponential model of the current layer. The set exponential model is pre-constructed by fitting the optimal rate-distortion cost of different coding blocks and the corresponding pixel information.
[0010] The partitioning module is configured to end the partitioning of the current layer coding block if the optimal rate-distortion cost of the current layer coding block is less than the partitioning threshold, and to partition the current layer coding block and proceed to the next level coding block partitioning decision if the optimal rate-distortion cost of the current layer coding block is greater than or equal to the partitioning threshold.
[0011] In a third aspect, embodiments of this application provide an intra-frame coded block adaptive partitioning device, comprising:
[0012] Memory and one or more processors;
[0013] The memory is configured to store one or more programs;
[0014] When the one or more programs are executed by the one or more processors, the one or more processors implement the intra-frame coded block adaptive partitioning method as described in the first aspect.
[0015] In a fourth aspect, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions configured, when executed by a computer processor, to perform the intra-frame coded block adaptive partitioning method as described in the first aspect.
[0016] In a fifth aspect, embodiments of this application provide a computer program product containing instructions that, when executed on a computer or processor, cause the computer or processor to perform the intra-frame coded block adaptive partitioning method as described in the first aspect.
[0017] This application's embodiments calculate the optimal rate-distortion cost (ODC) of the current layer's coding block and, based on a predefined exponential model, calculate the partitioning threshold for the current layer's coding block. The exponential model is pre-constructed by fitting the ODC of different coding blocks with their corresponding pixel information. If the ODC of the current layer's coding block is less than the partitioning threshold, the partitioning of the current layer's coding block ends. If the ODC of the current layer's coding block is greater than or equal to the partitioning threshold, the current layer's coding block is partitioned, and the process proceeds to the next level's coding block partitioning decision. By employing this technique, an exponential model is constructed by fitting the optimal ODC of the coding block with its corresponding pixel information. This exponential model is then used to accurately determine coding block partitioning decisions. This simplifies the calculation process for coding block partitioning decisions while ensuring the accuracy of coding block partitioning, reducing computational complexity, and thus improving the efficiency of coding block partitioning calculations and increasing the intra-frame coding speed of the video. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of the coding block division in the video encoding process;
[0019] Figure 2 This is a flowchart of an intra-frame coded block adaptive partitioning method provided in an embodiment of this application;
[0020] Figure 3 This is a schematic diagram of the layer-by-layer partitioning decision of the coding block in the embodiments of this application;
[0021] Figure 4 This is a flowchart of the iterative correction process for the set index model in the embodiments of this application;
[0022] Figure 5 This is a schematic diagram of the structure of an intra-frame coded block adaptive partitioning system provided in an embodiment of this application;
[0023] Figure 6 This is a schematic diagram of the structure of an intra-frame coded block adaptive partitioning device provided in an embodiment of this application. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. It should also be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but may also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0025] The intra-coded block adaptive partitioning provided in this application aims to construct an exponential model by fitting the optimal rate-distortion cost of the coded block and the corresponding pixel information, calculate the partitioning threshold through the exponential model, and then quickly decide whether to partition the coded block based on the comparison result of the optimal rate-distortion cost of the coded block and the partitioning threshold, thereby improving the efficiency of coded block partitioning decision and increasing the speed of coded block partitioning.
[0026] In relevant coding block partitioning decision schemes, the optimal rate-distortion cost is typically calculated layer by layer, and then compared among the various optimal rate-distortion costs. The number of layers corresponding to the optimal rate-distortion cost with the smallest value is selected as the optimal number of partitioning layers for the coding block. Since the optimal rate-distortion cost of all layers of coding blocks needs to be calculated, the computational load is inevitably long, which prolongs the entire coding block partitioning process, thereby delaying intra-frame coding and affecting coding efficiency. Based on this, this application provides an adaptive intra-frame coding block partitioning method to solve the technical problem of long time consumption in intra-frame coding block partitioning decisions.
[0027] Example:
[0028] Figure 2 A flowchart of an intra-frame coded block adaptive partitioning method provided in this application embodiment is given. The intra-frame coded block adaptive partitioning method provided in this embodiment can be executed by an intra-frame coded block adaptive partitioning device, which can be implemented by software and / or hardware. The intra-frame coded block adaptive partitioning device can consist of two or more physical entities, or it can consist of a single physical entity. Generally, the intra-frame coded block adaptive partitioning device can be a computing device such as an encoder device, an encoding server, a computer, or a host device.
[0029] The following description uses the intra-frame adaptive block partitioning device as an example to illustrate the implementation of the intra-frame adaptive block partitioning method. (Refer to...) Figure 2 The intra-frame coded block adaptive partitioning method specifically includes:
[0030] S110. Calculate the optimal rate-distortion cost of the current layer coding block, and calculate the partitioning threshold of the current layer coding block based on the set exponential model of the current layer. The set exponential model is pre-fitted and constructed using the optimal rate-distortion cost of different coding blocks and the corresponding pixel information.
[0031] S120. If the optimal rate-distortion cost of the current layer coding block is less than the partitioning threshold, end the partitioning of the current layer coding block. If the optimal rate-distortion cost of the current layer coding block is greater than or equal to the partitioning threshold, partition the current layer coding block and proceed to the next level coding block partitioning decision.
[0032] In this embodiment of the application, when dividing intra-frame coding blocks, an exponential model prediction method is used instead of traversing all levels of coding blocks to calculate the optimal rate-distortion cost, thereby reducing the amount of computation in the coding block division decision process and improving the coding block division speed.
[0033] It is understandable that when dividing coding blocks layer by layer, if it is necessary to calculate the optimal rate-distortion cost for each level of the coding block, and then select the optimal number of division layers based on the rate-distortion cost, then the optimal rate-distortion cost needs to be calculated once for each level from the largest level of the coding block to the smallest division level set for the video frame. However, the intra-frame coding block adaptive partitioning method of this application only needs to calculate whether the current level of the coding block is the optimal level when dividing coding blocks layer by layer from large to small, and then decide whether to continue partitioning. The calculation process only needs to continue until the optimal division level. Compared with the method of calculating the optimal rate-distortion cost for all levels, this application embodiment significantly reduces the optimal rate-distortion cost calculation process for subsequent levels by adaptively determining whether to continue partitioning coding blocks, thereby improving the coding block partitioning speed.
[0034] Furthermore, when determining whether to partition the current layer of coding blocks, an exponential model is used, constructed by fitting the optimal rate-distortion cost of different coding blocks with their corresponding pixel information. This exponential model is used to calculate a partitioning threshold, and then the actual optimal rate-distortion cost of the current layer of coding blocks is compared with the partitioning threshold to determine whether to partition the current layer of coding blocks. Since the exponential model is constructed by fitting the optimal rate-distortion cost of different coding blocks with their corresponding pixel information, the partitioning threshold it calculates can be represented as the estimated optimal rate-distortion cost information of the current layer of coding blocks. If the actual optimal rate-distortion cost of the current layer of coding blocks is smaller than the estimated optimal rate-distortion cost information, it means that the actual rate-distortion situation of the current layer of coding blocks is better than the rate-distortion situation estimated by the exponential model. In this case, it is determined that the current layer of coding blocks does not need to be partitioned, and further partitioning may require incurring a greater rate-distortion cost. Conversely, if the actual rate-distortion situation after partitioning the current layer of coding blocks deviates from the rate-distortion situation estimated by the exponential model, it is determined that the current layer of coding blocks needs to be partitioned, and the partitioning decision for the next layer of coding blocks is made.
[0035] The rate-distortion cost is equal to D + λR, where D represents distortion, R represents code rate, and λ represents the Lagrange multiplier. It can be understood that the smaller the rate-distortion cost, the better the coding performance. By finding the level with the minimum rate-distortion cost, the optimal coding block partitioning result can be obtained.
[0036] Based on the aforementioned code block partitioning logic, partitioning decisions are made layer by layer until the optimal rate-distortion cost is less than the partitioning threshold calculated by the exponential model, at which point the code block partitioning process ends. Since the exponential model is constructed by fitting the optimal rate-distortion cost of different code blocks with their corresponding pixel information, and the optimal rate-distortion cost of different code blocks is used as the partitioning threshold for model prediction formula fitting, the estimated partitioning threshold can be ensured to accurately reflect the rate-distortion situation of the corresponding code block. By comparing the partitioning threshold provided by the exponential model with the actual optimal rate-distortion cost of the code block for partitioning decisions, the accuracy of code block partitioning can be ensured while improving the speed of code block partitioning decisions.
[0037] For example, such as Figure 3 As shown, when making intra-frame coding block partitioning decisions for video images, the partitioning starts from the top-level coding block and proceeds downwards. At each level, the coding block partitioning decision process described in steps S110-S120 is followed. If partitioning can continue to the next level, the above operation is repeated. Otherwise, the coding block partitioning process ends, resulting in the optimal number of partitioning levels and the corresponding coding mode.
[0038] Specifically, the setting index model in this application embodiment is constructed by fitting the mapping relationship between the partitioning threshold and the corresponding pixel information and video characteristic parameters. The setting index model uses the optimal rate-distortion cost of different coding blocks as the partitioning threshold in advance, inputs the optimal rate-distortion cost of different coding blocks and the corresponding pixel information into the formula of the setting index model, fits to obtain the model influence coefficient, and obtains the video characteristic parameters based on the model influence coefficient.
[0039] An exponential model is fitted using a large amount of actual optimal rate-distortion cost and corresponding pixel information, enabling this model to predict the rate-distortion cost of a coding block. This exponential model is then used to predict the rate-distortion cost of the current coding block, i.e., the partitioning threshold. The actual rate-distortion cost of the current coding block is compared to this partitioning threshold to determine whether to terminate the partitioning process for the current coding block.
[0040] The formula for this exponential model is expressed as:
[0041] y = ae bx
[0042] Where a and b represent video feature parameters, y represents the partitioning threshold, and x represents the pixel information of the current layer coding block.
[0043] Pixel information can encode the variance, mean, or gradient of pixels in a block. Different pixel information and different levels of coding blocks correspond to different optimal rate-distortion costs. When constructing the exponential model, the known pixel information and optimal rate-distortion cost of different coding blocks are first input into the exponential model formula. The values of video characteristic parameters a and b are then fitted using a large amount of data. These values are then substituted into the exponential model formula for subsequent calculation of the partitioning threshold. When making a partitioning decision for a coding block, the pixel information of that block is input into the exponential model, which outputs the corresponding estimated partitioning threshold. This threshold is then used to determine whether to partition the current coding block by comparing it with the optimal rate-distortion cost. In practical applications, the amount of fitted data can be adaptively adjusted according to the required accuracy of the exponential model's prediction to ensure sufficient prediction accuracy.
[0044] Furthermore, after dividing the current layer's coding blocks, such as Figure 4 As shown, it also includes:
[0045] S1301. Detect whether the current layer coding block is at the set lowest level. If the current layer coding block is at the lowest level, end the coding block division.
[0046] S1302. Determine whether there is an error in the division of the intra-frame coding block based on the optimal rate-distortion cost of each layer of coding block;
[0047] S1303. If it is determined that there is an error in the current intra-frame coding block division, select the optimal rate-distortion cost with the smallest value in each layer of coding blocks and the corresponding pixel information as correction data, so as to set the iterative correction of the exponential model.
[0048] Except when the optimal rate-distortion cost is less than the partitioning threshold, if the current layer of coding blocks has already reached the preset minimum level during the layer-by-layer partitioning process, there is no need to further partition the coding blocks in order to improve coding efficiency.
[0049] After completing the coding block partitioning, this embodiment further verifies whether the current coding block partitioning is accurate, and corrects the exponential model based on the verification results. Specifically, by calculating the optimal rate-distortion cost of coding blocks at all levels, it is determined whether the optimal rate-distortion cost of the coding block at the current end-partitioning level is the minimum among all levels. It is understood that if the optimal rate-distortion cost of the coding block at the end-partitioning level is the minimum, then the current intra-frame coding block partitioning is determined to be accurate. Conversely, if the optimal rate-distortion cost of the coding block at the end-partitioning level is not the minimum value among all levels, then the current intra-frame coding block partitioning is determined to have an error. In this case, to improve the accuracy of the coding block partitioning decision, the exponential model needs to be corrected so that its estimated partitioning threshold can more accurately determine whether to perform coding block partitioning.
[0050] Based on this, if it is determined that there is an error in the current intra-frame coding block division, the optimal rate-distortion cost with the smallest value in each coding block and the corresponding pixel information will be selected as correction data, and this correction data will be used to iteratively correct the exponential model.
[0051] The iterative correction process for the exponential model includes: calculating the mean of a set number of correction data points and using the mean data to update the video characteristic parameters of the exponential model.
[0052] For example, since the initial values of video characteristic parameters a and b in the exponential model are derived from fitting a large amount of data, they are general parameters and may not be optimal for the current encoded video, potentially leading to inaccuracies. For instance, the exponential model might determine that the current encoded block should continue to the next level of partitioning, even after the next level, the current level's partitioning might still be better. While this doesn't affect the encoding quality, the computation time spent on the next level's partitioning decision inevitably increases the encoding duration. Therefore, to improve the accuracy of the exponential model, the pixel information of the current level and the corresponding optimal rate-distortion cost are used to update the model parameters, allowing the model to better fit the current encoded image and adaptively improve accuracy. Simultaneously, to prevent the influence of outliers on the model, after accumulating a set number of data points, this batch of data is averaged to obtain the data mean. This data mean is then used to further fit the video characteristic parameters of the exponential model, thus smoothing out the influence of outliers.
[0053] Furthermore, considering the different characteristics of coding blocks at different levels, using the same exponential model for different coding blocks can easily lead to certain estimation errors. Therefore, based on this principle, in this embodiment, when updating the exponential model, for the first coding block to be partitioned, the exponential model constructed using the initial values of a and b obtained above is used for the coding block partitioning decision. Subsequent coding blocks are then updated in the same manner, and the updated exponential model is used for the corresponding coding block partitioning decision.
[0054] The specific values of the video characteristic parameters for different coding blocks are different. The first coding block of the corresponding video frame uses the model influence coefficient as the video characteristic parameter, while the remaining coding blocks use the video characteristic parameters of the coding blocks they reference as reference data, and update their own video characteristic parameters based on the reference data and the average data of the corresponding level.
[0055] For example, for the first coded block, since there is no reference coded block data, the values of its video characteristic parameters a and b are initially obtained by fitting values from a large amount of data. Subsequently, after the coded blocks to the left or above are encoded, the current block to be encoded will use the information from the coded blocks to the left or above, combined with the average data used for iterative updates of the exponential model, to update the video characteristic parameters a and b in the exponential model.
[0056] The process of updating its own video characteristic parameters based on reference data and the data mean of the corresponding level includes: determining the prediction error information of the set exponential model based on the data mean of the corresponding level; and updating its own video characteristic parameters based on the prediction error information, reference data, and the set adjustment rate coefficient.
[0057] In this embodiment, the video feature parameters are updated using gradient descent. The new video feature parameters are obtained based on the old video feature parameters. Furthermore, the old video feature parameters are taken from the video feature parameters of the exponential model of the reference coding block. The old video feature parameters are defined as reference data. When updating the video feature parameters, the prediction error information of the current exponential model can first be determined based on the mean of the aforementioned data and the corresponding estimated partition threshold of the exponential model. Adding this prediction error information to the reference data yields the new video feature parameters, thus completing the update of the video feature parameters.
[0058] Optionally, to ensure that the updates of video characteristic parameters a and b are within a reasonable range and to prevent excessive changes from causing model errors, an adjustment rate coefficient can be added when calculating the new video characteristic parameters. By adjusting the rate coefficient, the adjustment range of the video characteristic parameters can be controlled, thereby enabling the updated exponential model to more accurately predict the partitioning threshold, and thus achieve more accurate coding module partitioning.
[0059] In practical applications, the update of the exponential model can also introduce other different influencing parameters, and the updated video characteristic parameters a and b can be calculated using the corresponding formulas. This application does not impose fixed restrictions on the specific model update method, and will not elaborate further here.
[0060] Thus, an exponential model is constructed by fitting actual data, and this model is used to make coding block partitioning decisions. Furthermore, based on reference data provided by neighboring already encoded blocks and combined with historical error data of the exponential model, the exponential model of the block to be encoded is updated in real time. This ensures the accuracy of coding block partitioning while accelerating the encoding speed.
[0061] The above describes a process where the optimal rate-distortion cost (ODC) of the current layer's coding block is calculated, and a partitioning threshold for the current layer's coding block is calculated based on a pre-defined exponential model. This exponential model is pre-built by fitting the ODC of different coding blocks with their corresponding pixel information. If the ODC of the current layer's coding block is less than the partitioning threshold, the partitioning of the current layer's coding block ends. If the ODC of the current layer's coding block is greater than or equal to the partitioning threshold, the current layer's coding block is partitioned, and the process proceeds to the next level's coding block partitioning decision. By employing this technique, an exponential model is built by fitting the optimal ODC of the coding block with its corresponding pixel information. This exponential model is then used to accurately determine coding block partitioning decisions. This approach simplifies the calculation process for coding block partitioning decisions while ensuring the accuracy of the partitioning, reducing computational complexity and thus improving the efficiency of coding block partitioning calculations and increasing the intra-frame coding speed of the video.
[0062] Based on the above embodiments, Figure 5 This is a schematic diagram of an intra-frame coded block adaptive partitioning system provided in this application. (Reference) Figure 5 The intra-frame coded block adaptive partitioning system provided in this embodiment specifically includes: a calculation module 21 and a partitioning module 22.
[0063] The calculation module 21 is configured to calculate the optimal rate-distortion cost of the current layer coding block and calculate the partitioning threshold of the current layer coding block based on the set exponential model of the current layer. The set exponential model is pre-fitted and constructed using the optimal rate-distortion cost of different coding blocks and the corresponding pixel information.
[0064] The partitioning module 22 is configured to end the partitioning of the current layer coding block when the optimal rate-distortion cost of the current layer coding block is less than the partitioning threshold, and to partition the current layer coding block and proceed to the next level coding block partitioning decision when the optimal rate-distortion cost of the current layer coding block is greater than or equal to the partitioning threshold.
[0065] Specifically, the index model is constructed by fitting the mapping relationship between the partitioning threshold and the corresponding pixel information and video characteristic parameters. The index model is constructed by pre-setting the optimal rate-distortion cost of different coding blocks as the partitioning threshold, inputting the optimal rate-distortion cost of different coding blocks and the corresponding pixel information into the formula of the index model, fitting to obtain the model influence coefficient, and obtaining the video characteristic parameters based on the model influence coefficient.
[0066] Specifically, the formula for the exponential model is expressed as follows:
[0067] y = ae bx
[0068] Where a and b represent video feature parameters, y represents the partitioning threshold, and x represents the pixel information of the current layer coding block.
[0069] Specifically, after dividing the current layer's coded blocks, the process also includes:
[0070] Check if the current layer coding block is at the set lowest level. If the current layer coding block is at the lowest level, end the coding block division.
[0071] Determine whether there is an error in the division of the intra-frame coding block based on the optimal rate-distortion cost of each layer of coding block;
[0072] If it is determined that there is an error in the current intra-frame coding block division, the optimal rate-distortion cost with the smallest value in each coding block and the corresponding pixel information are selected as correction data to be used for setting the iterative correction of the exponential model.
[0073] Specifically, the iterative correction of the exponential model is defined, including:
[0074] Calculate the mean of a set number of corrected data points, and use the mean to update the video characteristic parameters of the set exponential model.
[0075] Specifically, different coding blocks have different values for video feature parameters. The first coding block of a corresponding video frame uses the model influence coefficient as its video feature parameter, while the remaining coding blocks use the video feature parameters of the coding blocks they reference as reference data. Based on the reference data and the average data of the corresponding level, they update their own video feature parameters.
[0076] Specifically, the video characteristic parameters are updated based on reference data and the data mean of the corresponding level, including:
[0077] The prediction error information of the index model is determined based on the data mean of the corresponding level;
[0078] It updates its own video characteristic parameters based on prediction error information, reference data, and the set adjustment rate coefficient.
[0079] The above describes a process where the optimal rate-distortion cost (ODC) of the current layer's coding block is calculated, and a partitioning threshold for the current layer's coding block is calculated based on a pre-defined exponential model. This exponential model is pre-built by fitting the ODC of different coding blocks with their corresponding pixel information. If the ODC of the current layer's coding block is less than the partitioning threshold, the partitioning of the current layer's coding block ends. If the ODC of the current layer's coding block is greater than or equal to the partitioning threshold, the current layer's coding block is partitioned, and the process proceeds to the next level's coding block partitioning decision. By employing this technique, an exponential model is built by fitting the optimal ODC of the coding block with its corresponding pixel information. This exponential model is then used to accurately determine coding block partitioning decisions. This approach simplifies the calculation process for coding block partitioning decisions while ensuring the accuracy of the partitioning, reducing computational complexity and thus improving the efficiency of coding block partitioning calculations and increasing the intra-frame coding speed of the video.
[0080] The intra-coded block adaptive partitioning system provided in this application embodiment can be configured to execute the intra-coded block adaptive partitioning method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0081] Based on the above practical examples, this application also provides an intra-frame coded block adaptive partitioning device, referring to... Figure 6 The intra-frame coded block adaptive partitioning device includes a processor 31, a memory 32, a communication module 33, an input device 34, and an output device 35. The memory, 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 intra-frame coded block adaptive partitioning method described in any embodiment of this application (e.g., a computation module in an intra-frame coded block adaptive partitioning system). The communication module is configured to perform data transmission. The processor executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory, thereby implementing the aforementioned intra-frame coded block adaptive partitioning method. The input device can be configured to receive input digital or character information and generate key signal inputs related to user settings and function control of the device. The output device may include a display device such as a screen. The intra-frame coded block adaptive partitioning device provided above can be configured to execute the intra-frame coded block adaptive partitioning method provided in the above embodiments, possessing corresponding functions and beneficial effects.
[0082] Based on the above embodiments, this application also provides a computer-readable storage medium storing computer-executable instructions. These computer-executable instructions, when executed by a computer processor, are configured to perform an intra-frame coded block adaptive partitioning method. The storage medium can be any type of memory device or storage device. Of course, the computer-readable storage medium provided in this application may not be limited to the intra-frame coded block adaptive partitioning method described above; it may also execute related operations within the intra-frame coded block adaptive partitioning method provided in any embodiment of this application.
[0083] Based on the above embodiments, this application also provides a computer program product. The technical solution of this application, in essence or in other words, the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer program product is stored in a storage medium and includes several instructions to cause a computer device, mobile terminal, or processor therein to execute all or part of the steps of the intra-frame coded block adaptive partitioning method described in the various embodiments of this application.
Claims
1. An adaptive partitioning method for intra-frame coded blocks, characterized in that, include: The optimal rate-distortion cost of the current layer coding block is calculated, and the partitioning threshold of the current layer coding block is calculated based on the set index model of the current layer. The set index model is constructed by fitting the mapping relationship between the partitioning threshold and the corresponding pixel information and video characteristic parameters. The set index model obtains the model influence coefficient by pre-setting the optimal rate-distortion cost of different coding blocks as the partitioning threshold, inputting the optimal rate-distortion cost of different coding blocks and the corresponding pixel information into the formula of the set index model, and then fitting the model influence coefficient. The video characteristic parameters are obtained based on the model influence coefficient. If the optimal rate-distortion cost of the current layer coding block is less than the partitioning threshold, the partitioning of the current layer coding block ends. If the optimal rate-distortion cost of the current layer coding block is greater than or equal to the partitioning threshold, the current layer coding block is partitioned, and the next layer coding block partitioning decision is entered.
2. The intra-frame coded block adaptive partitioning method according to claim 1, characterized in that, The formula for the defined exponential model is expressed as follows: Where a and b represent the video characteristic parameters, y represents the partitioning threshold, and x represents the pixel information of the current layer coding block.
3. The intra-frame coded block adaptive partitioning method according to claim 1, characterized in that, After dividing the current layer coding block, the following is also included: Detect whether the current layer coding block is at the set lowest level. If the current layer coding block is at the lowest level, end the coding block division. Determine whether there is an error in the division of the intra-frame coding block based on the optimal rate-distortion cost of each layer of coding block; If it is determined that there is an error in the current intra-frame coding block division, the optimal rate-distortion cost with the smallest value in each coding block and the corresponding pixel information are selected as correction data for iterative correction of the set exponential model.
4. The intra-frame coded block adaptive partitioning method according to claim 3, characterized in that, The iterative correction of the defined exponential model includes: The mean of the corrected data is calculated for a set number of data points, and the mean of the data is used to update the video characteristic parameters of the set index model.
5. The intra-frame coded block adaptive partitioning method according to claim 4, characterized in that, The video characteristic parameters have different values for different coding blocks. The first coding block of the corresponding video frame uses the model influence coefficient as the video characteristic parameter, and the remaining coding blocks use the video characteristic parameters of the coding blocks they reference as reference data, and update their own video characteristic parameters based on the reference data and the average value of the data at the corresponding level.
6. The intra-frame coded block adaptive partitioning method according to claim 5, characterized in that, Updating its own video characteristic parameters based on the reference data and the data mean of the corresponding level includes: The prediction error information of the set index model is determined based on the mean of the data at the corresponding level; The video characteristic parameters are updated based on the prediction error information, the reference data, and the set adjustment rate coefficient.
7. An intra-frame coded block adaptive partitioning system, characterized in that, include: The calculation module is configured to calculate the optimal rate-distortion cost of the current layer coding block and calculate the partitioning threshold of the current layer coding block based on the set index model of the current layer. The set index model is constructed by fitting the mapping relationship between the partitioning threshold and the corresponding pixel information and video characteristic parameters. The set index model obtains the model influence coefficient by pre-setting the optimal rate-distortion cost of different coding blocks as the partitioning threshold, inputting the optimal rate-distortion cost of different coding blocks and the corresponding pixel information into the formula of the set index model, and obtaining the model influence coefficient. The video characteristic parameters are obtained based on the model influence coefficient. The partitioning module is configured to compare the optimal rate-distortion cost of the current layer coding block with the partitioning threshold. If the optimal rate-distortion cost of the current layer coding block is less than the partitioning threshold, the partitioning of the current layer coding block ends. If the optimal rate-distortion cost of the current layer coding block is greater than or equal to the partitioning threshold, the current layer coding block is partitioned, and the next level coding block partitioning decision is entered.
8. An intra-frame coded block adaptive partitioning device, characterized in that, include: Memory and one or more processors; The memory is configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the intra-frame coded block adaptive partitioning 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 computer-executable instructions that, when executed by a computer processor, are configured to perform the intra-frame coded block adaptive partitioning method as described in any one of claims 1-6.
10. A computer program product, characterized in that, The computer program product includes instructions that, when executed on a computer or processor, cause the computer or processor to perform the intra-frame coded block adaptive partitioning method as described in any one of claims 1-6.
Citation Information
Patent Citations
Coding processing method and device, electronic equipment and storage medium
CN115623204A
Coding processing method and device, electronic equipment and storage medium
CN115623205A