Division decision method and device based on coefficient features, equipment and storage medium
By flexibly setting the skip threshold for video coding blocks and determining the partitioning strategy based on the number of non-zero coefficients and rate-distortion cost, the problem that fixed thresholds cannot adapt to different video content is solved, and efficient video coding is achieved.
Patent Information
- Application Number
- CN202510939118.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-11-18
AI Technical Summary
In existing video coding standards, the fixed skip decision threshold division scheme cannot adapt to different video content and is prone to misjudgment of skip decisions, resulting in poor video coding performance.
By determining the number of non-zero coefficients in the transform coefficients of the current coding block and the rate-distortion cost of the best mode, a skip judgment threshold is flexibly set. Based on the size information of the coding block and the number of non-zero coefficients, the first non-block partitioning skip strategy is determined, indicating whether to skip the non-block partitioning prediction.
It improves video encoding efficiency and ensures good video encoding results, accurately determining the types of segments that can be skipped.
Smart Images

Figure CN120980243A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of video coding, and particularly relate to a partition decision method and device based on coefficient characteristics, an apparatus, and a storage medium. BACKGROUND
[0002] A new generation of video coding standards (such as AV1, VVC) adopts a block-based hierarchical coding structure, and through recursive partitioning, different texture complexities are adapted, and very large quality gains are achieved. However, the exhaustive all possible partitioning modes results in extremely high computational complexity, and a 128x128 coding tree unit (CTU, Coding Tree Unit) in the video coding standard VVC can generate more than 10000 partition combinations, resulting in an exponential increase in mode decision complexity.
[0003] In order to improve the video coding efficiency, it is necessary to skip part of the partition prediction types that are less likely to be the optimal partition type. At present, the partition decision skipping is generally based on a fixed skip judgment threshold, that is, when the rate-distortion cost of a certain partition type exceeds the skip judgment threshold, the partition prediction of the partition type is skipped. However, the partition decision skipping scheme with a fixed skip judgment threshold cannot adapt to different video contents, is prone to misjudgment of skip decision, and has poor video coding effect. SUMMARY
[0004] Embodiments of the present application provide a partition decision method and device based on coefficient characteristics, an apparatus, and a storage medium. The number of non-zero coefficients in the transform coefficients of the current coding block and the rate-distortion cost of the best mode are determined to flexibly determine the skip judgment threshold, and the first non-square block partition skipping strategy for the current coding block is flexibly determined to make partition decision for the current coding block, so as to solve the technical problem that the partition decision skipping scheme with a fixed skip judgment threshold in the related art cannot adapt to different video contents, is prone to misjudgment of skip decision, and has poor video coding effect. The skip judgment threshold is flexibly determined according to the number of non-zero coefficients reflecting the video content and the rate-distortion cost, the partition type that can be skipped is accurately determined, the video coding efficiency is improved, and the good video coding effect is effectively ensured.
[0005] In a first aspect, embodiments of the present application provide a partition decision method based on coefficient characteristics, comprising: determining the number of non-zero coefficients in the transform coefficients of the current coding block and the rate-distortion cost of the best mode; determining a skip judgment threshold according to the size information of the current coding block and the number of non-zero coefficients, wherein the skip judgment threshold is positively correlated with the size information of the current coding block, and the skip judgment threshold is negatively correlated with the number of non-zero coefficients; determine a first non-square partition skip strategy for the current coding block based on the rate-distortion cost and the skip judgment threshold, the first non-square partition skip strategy being used to indicate whether to skip non-square partition prediction for the current coding block; make a partition decision for the current coding block based on the first non-square partition skip strategy.
[0006] In a second aspect, an embodiment of the present application provides a partition decision device based on coefficient characteristics, comprising a feature acquisition module, a threshold determination module, a strategy determination module, and a partition decision module, wherein: The feature acquisition module is configured to determine a number of non-zero coefficients in transform coefficients of a current coding block, and a rate-distortion cost of a best mode; The threshold determination module is configured to determine a skip judgment threshold based on size information of the current coding block and the number of non-zero coefficients, wherein the skip judgment threshold is positively correlated with the size information of the current coding block, and the skip judgment threshold is negatively correlated with the number of non-zero coefficients; The strategy determination module is configured to determine a first non-square partition skip strategy for the current coding block based on the rate-distortion cost and the skip judgment threshold, the first non-square partition skip strategy being used to indicate whether to skip non-square partition prediction for the current coding block; The partition decision module is configured to make a partition decision for the current coding block based on the first non-square partition skip strategy.
[0007] In a third aspect, an embodiment of the present application provides a partition decision device based on coefficient characteristics, comprising a 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 partition decision method based on coefficient characteristics as described in the first aspect.
[0008] In a fourth aspect, an embodiment of the present application provides a non-volatile storage medium storing computer executable instructions, which, when executed by a computer processor, are used to perform the partition decision method based on coefficient characteristics as described in the first aspect.
[0009] In a fifth aspect, an embodiment of the present application provides a computer program product, which comprises a computer program stored in a computer readable storage medium, and at least one processor of a device reads and executes the computer program from the computer readable storage medium, so that the device performs the partition decision method based on coefficient characteristics as described in the first aspect.
[0010] The embodiment of the present application determines the number of non-zero coefficients in the transform coefficients of the current coding block and the rate-distortion cost of the best mode, determines the skip judgment threshold according to the size information of the current coding block and the number of non-zero coefficients, determines the first non-square partition skip strategy for the current coding block according to the rate-distortion cost and the skip judgment threshold, the first non-square partition skip strategy is used to indicate whether to skip the non-square partition prediction of the current coding block, and the current coding block is divided based on the first non-square partition skip strategy, the number of non-zero coefficients in the transform coefficients of the current coding block and the rate-distortion cost of the best mode are flexibly determined to determine the skip judgment threshold, the first non-square partition skip strategy for the current coding block is flexibly determined to make the division decision for the current coding block, and the video coding efficiency can be improved while ensuring good video coding effect. BRIEF DESCRIPTION OF DRAWINGS
[0011] Figure 1 is a flowchart of a partition decision method based on coefficient characteristics provided by the embodiment of the present application; Figure 2 is a flowchart of another partition decision method based on coefficient characteristics provided by the embodiment of the present application; Figure 3 is a sub-block partition schematic diagram provided by the embodiment of the present application; Figure 4 is a structure schematic diagram of a partition decision device based on coefficient characteristics provided by the embodiment of the present application; Figure 5 is a structure schematic diagram of a partition decision device based on coefficient characteristics provided by the embodiment of the present application. DETAILED DESCRIPTION
[0012] In order to make the purpose, technical scheme and advantages of the present application more clear, the specific embodiments of the present application are described in detail below in combination with the drawings. It can be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, in order to facilitate the description, only the parts related to the present application are shown in the drawings, but not all the contents. Before discussing the example embodiments in more detail, it should be mentioned that some example embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of the operations can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The above processes can be terminated when the operations are completed, but can also have additional steps not included in the drawings. The above processes can correspond to methods, functions, procedures, subroutines, subprograms, etc.
[0013] The coefficient feature-based partition decision method provided in the application can be applied to the partition decision process in video coding, and aims to flexibly determine a skip judgment threshold according to the number of non-zero coefficients in the transform coefficients of a current coding block and the rate-distortion cost of the best mode, and flexibly determine a first non-square block partition skip strategy for the current coding block to make a partition decision for the current coding block.
[0014] The existing partition fast exit scheme mainly focuses on early termination based on rate-distortion cost, early termination based on statistical features, and termination based on machine learning prediction. The early termination scheme based on rate-distortion cost generally compares the rate-distortion cost of the current block with the skip judgment threshold, and if the rate-distortion cost of the current block is lower than the skip judgment threshold, further partition is terminated. However, it is difficult for the fixed skip judgment threshold to adapt to different quantization parameters (QP, Quantization Parameter) and contents of videos, and the skip of the partition decision is prone to misjudgment. The early termination scheme based on statistical features skips the partition of flat blocks through gradient, variance and other statistical features, but is only applicable to simple textures and cannot handle directional textures, nor can it distinguish whether the optimal partition direction is horizontal or vertical, and the partition decision effect is poor. The termination scheme based on machine learning prediction uses a neural network to predict the optimal partition mode, but this scheme is difficult to model the global dependency of rate-distortion optimization and is also limited by the computational amount of the neural network, making it difficult to deploy to actual application environment. Therefore, the application provides a coefficient feature-based partition decision method to solve the technical problems that the existing partition decision skip scheme cannot adapt to different video contents, is prone to misjudgment of the skip decision, and has poor video coding effect.
[0015] Figure 1 A flowchart of the coefficient feature-based partition decision method provided in the application is given, and the coefficient feature-based partition decision method provided in the application can be executed by a coefficient feature-based partition decision device, which can be realized by hardware and / or software and integrated in a coefficient feature-based partition decision equipment.
[0016] The following describes the coefficient feature-based partition decision method executed by the coefficient feature-based partition decision device as an example. Referring to Figure 1 , the coefficient feature-based partition decision method comprises: S110: determining the number of non-zero coefficients in the transform coefficients of a current coding block and the rate-distortion cost of the best mode.
[0017] Exemplarily, transform coefficients of the current coding block are determined, and the number of non-zero coefficients in the transform coefficients is determined, and a rate-distortion cost corresponding to the best mode of the current coding block is determined. The transform coefficients can be understood as a mathematical representation of the current coding block converted from a spatial domain (pixels) to a frequency domain (frequency components), and the transform coefficients can be recorded in the form of a matrix, and the simpler the structure of the current coding block is, the fewer non-zero coefficients in the transform coefficients are, and the position of the smallest non-zero coefficient is closer to the top left corner of the transform coefficients. The number of non-zero coefficients is the number of non-zero coefficients in the transform coefficients, and the transform coefficients include luminance transform coefficients of a luminance component (Y component) and chrominance transform coefficients of a chrominance component (UV component). The number of non-zero coefficients in the transform coefficients of the current coding block provided by the present application can be the sum of the number of luminance non-zero coefficients in the luminance transform coefficients of the luminance component and the number of chrominance non-zero coefficients in the chrominance component.
[0018] In an embodiment, the transform coefficients can be obtained by transforming and quantizing the current coding block in a rate distortion optimized quantization (RDOQ) process. The current coding block can be a coded block, and the current coding block can be encoded according to the best mode determined in the mode decision. After the encoding of the current coding block is completed, the rate-distortion cost corresponding to the current coding block can be determined.
[0019] S120: determining a skip judgment threshold according to the size information of the current coding block and the number of non-zero coefficients, wherein the skip judgment threshold is positively correlated with the size information of the current coding block, and the skip judgment threshold is negatively correlated with the number of non-zero coefficients.
[0020] Exemplarily, the skip judgment threshold is determined according to the size information of the current coding block and the number of non-zero coefficients. The current coding block provided by the present application can be a square block (i.e., the height and the width of the current coding block are the same).
[0021] The skip judgment threshold is positively correlated with the size information of the current coding block, that is, the smaller the size information of the current coding block is, the smaller the skip judgment threshold is, and the requirement for division skipping is more stringent. For example, the judgment threshold corresponding to the coding block with a size information of 64x64 or 128x128 is greater than the judgment threshold corresponding to the coding block with a size information of 32x32 or 16x16. The skip judgment threshold is negatively correlated with the number of non-zero coefficients, that is, the more the number of non-zero coefficients is, the smaller the corresponding skip judgment threshold is, which means that the more complex the current coding block is, the more stringent (smaller) the skip judgment threshold is.
[0022] S130: determining a first non-square partition skip strategy for the current coding block according to the rate-distortion cost and the skip judgment threshold, the first non-square partition skip strategy being used to indicate whether to skip non-square partition prediction for the current coding block.
[0023] For example, the first non-square partition skip strategy for the current coding block is determined according to the rate-distortion cost and the skip judgment threshold. For example, when the rate-distortion cost is less than the skip judgment threshold, the current coding block can be considered as a simple block, and the first non-square partition skip strategy for the current coding block is determined as skipping non-square partition prediction for the current coding block. When the rate-distortion cost is greater than or equal to the skip judgment threshold, the first non-square partition skip strategy for the current coding block is determined as not skipping non-square partition prediction for the current coding block.
[0024] For example, when the size information of the current coding block is 64x64, the first non-square partition skip strategy can be used to indicate whether to skip non-square sub-block partition prediction with sizes of 64x32, 64x16, 32x64, 16x64, but will not affect non-square sub-block partition decision with sizes of 32x16, 32x8, because the parent blocks of these non-square sub-blocks are 32x32, and determining that the 64x64 block is a simple block does not mean that each 32x32 block in it is also a simple block.
[0025] S140: performing partition decision for the current coding block based on the first non-square partition skip strategy.
[0026] For example, when the size information of the current coding block is 64x64, if the first non-square partition skip strategy indicates to skip non-square partition prediction for the current coding block, then non-square sub-block partition prediction with sizes of 64x32, 64x16, 32x64, 16x64 is skipped; if the first non-square partition skip strategy indicates not to skip non-square partition prediction for the current coding block, then non-square sub-block partition prediction with sizes of 64x32, 64x16, 32x64, 16x64 is performed.
[0027] The above, by determining the number of non-zero coefficients in the transform coefficients of the current coding block and the rate-distortion cost of the best mode, determining the skip judgment threshold according to the size information of the current coding block and the number of non-zero coefficients, determining the first non-square partition skip strategy for the current coding block according to the rate-distortion cost and the skip judgment threshold, the first non-square partition skip strategy is used to indicate whether to skip the non-square partition prediction of the current coding block, and the current coding block is divided based on the first non-square partition skip strategy. The number of non-zero coefficients in the transform coefficients of the current coding block and the rate-distortion cost of the best mode are flexibly determined, the first non-square partition skip strategy for the current coding block is flexibly determined to make the division decision of the current coding block, which can improve the video coding efficiency while ensuring good video coding effect.
[0028] On the basis of the above embodiment, Figure 2 The flowchart of another partition decision method based on coefficient characteristics provided by the embodiment of the present application is given, which is a specific embodiment of the above-mentioned partition decision method based on coefficient characteristics. Referring to Figure 2 The partition decision method based on coefficient characteristics includes: S210: determining the number of non-zero coefficients in the transform coefficients of the current coding block and the rate-distortion cost of the best mode.
[0029] S220: determining the skip judgment threshold according to the size information of the current coding block and the number of non-zero coefficients, wherein the skip judgment threshold is positively related to the size information of the current coding block, and the skip judgment threshold is negatively related to the number of non-zero coefficients.
[0030] In one possible embodiment, the partition decision method based on coefficient characteristics provided by the present application determines the skip judgment threshold according to the size information of the current coding block and the number of non-zero coefficients, including: S221: in the case that the size information of the current coding block is within a preset size range and the number of non-zero coefficients is a first preset number, determining the skip judgment threshold according to the Lagrange multiplier corresponding to the current coding block and a first preset proportion coefficient.
[0031] S222: in the case that the size information of the current coding block is within a preset size range, the number of non-zero coefficients is greater than the first preset number, and the number of non-zero coefficients of the luminance component in the transform coefficients of the current coding block is less than a second preset number, determining the skip judgment threshold according to the Lagrange multiplier corresponding to the current coding block, a second preset proportion coefficient and a preset offset parameter, wherein the second preset number is determined according to the size information of the current coding block.
[0032] S223: determining the skip judgment threshold according to the Lagrange multiplier corresponding to the current coding block and the third preset proportion coefficient, in a case that the size information of the current coding block is below the preset size range and the number of non-zero coefficients of the luminance component in the transform coefficients of the current coding block is the third preset number.
[0033] For example, the preset size range provided by the present application can be the size range of 64x64 and 128x128, and the first preset number can be set to 0, that is, in a case that the current coding block is a square block of 64x64 or 128x128 and the number of non-zero coefficients is 0, the skip judgment threshold is determined according to the Lagrange multiplier corresponding to the current coding block and the first preset proportion coefficient.
[0034] In an embodiment, the maximum of the Lagrange multiplier corresponding to the current coding block and the first preset minimum threshold value can be determined, and the maximum is multiplied by the first preset proportion coefficient to obtain the skip judgment threshold. For example, the skip judgment threshold can be determined by the following formula: th=k1*max(lambda, a1), wherein th is the skip judgment threshold, k1 is the first preset proportion coefficient, lambda is the Lagrange multiplier, a1 is the first preset minimum threshold value, for example, a1=120000. Alternatively, the first preset proportion coefficient can be determined according to the product of the width, height of the current coding block and a preset parameter, for example, k1=bwidth*bheight*m, wherein bwidth and bheight are the width and height of the current coding block respectively, and m is a preset parameter, m<1, for example, m=0.125.
[0035] By accurately determining the skip judgment threshold according to the Lagrange multiplier corresponding to the current coding block and the first preset proportion coefficient in a case that the size information of the current coding block is within the preset size range and the number of non-zero coefficients is the first preset number, and accurately judging whether to skip the non-square block partition prediction of the current coding block, the video coding efficiency can be improved while ensuring good video coding effect.
[0036] For example, in a case that the size information of the current coding block is within the preset size range, the number of non-zero coefficients is greater than the first preset number, and the number of non-zero coefficients of the luminance component in the transform coefficients of the current coding block is less than the second preset number, the skip judgment threshold can be determined according to the Lagrange multiplier corresponding to the current coding block, the second preset proportion coefficient and a preset offset parameter.
[0037] For example, the preset size range can be 64x64 and 128x128, and the first preset number can be set as 0. When the current coding block is a square block of 64x64 or 128x128, and the number of non-zero coefficients is greater than 0, the number of non-zero coefficients of the luminance component of the current coding block is determined. When the number of non-zero coefficients is less than the second preset number, the skip judgment threshold is determined according to the Lagrange multiplier corresponding to the current coding block and the second preset proportion coefficient. When the number of non-zero coefficients is greater than or equal to the second preset number, the first non-square partition skip strategy for the current coding block is determined as not skipping the non-square partition prediction of the current coding block.
[0038] The second preset number is determined according to the size information of the current coding block. For example, the product of the side length (for example, the height of the current coding block) in the size information of the current coding block and the sixth preset proportion coefficient can be used as the second preset number. For example, when c_y < k6*bheight, the skip judgment threshold can be further determined. If c_y >= k6*bheight, the first non-square partition skip strategy of not skipping the non-square partition prediction can be directly determined. Wherein, c_y is the number of non-zero coefficients of the luminance component, k6 is the sixth preset proportion coefficient, for example, k6 = 0.5.
[0039] In an embodiment, the maximum value of the Lagrange multiplier corresponding to the current coding block and the second preset minimum threshold value is determined. The product of the maximum value, the second preset proportion coefficient and the preset offset parameter is the skip judgment threshold. For example, the skip judgment threshold can be determined by the following formula: th = k2*max(lambda, a2)*offset, wherein th is the skip judgment threshold, k2 is the second preset proportion coefficient, lambda is the Lagrange multiplier, a2 is the second preset minimum threshold value, for example, a2 = 120000, offset is the preset offset parameter, offset < 1, for example, offset = 0.25. Alternatively, the second preset proportion coefficient can be determined according to the product of the width, height of the current coding block and the preset parameter, for example, k2 = bwidth*bheight*m, wherein bwidth and bheight are the width and height of the current coding block respectively, and m is the preset parameter, m < 1, for example, m = 0.125.
[0040] The application determines the skip judgment threshold according to the Lagrange multiplier corresponding to the current coding block, the second preset proportion coefficient and the preset offset parameter when the size information of the current coding block is within the preset size range, the number of non-zero coefficients is greater than the first preset number, and the number of non-zero coefficients of the luminance component in the transform coefficients of the current coding block is less than the second preset number, accurately judges whether to skip the non-square partition prediction of the current coding block, and can improve the video coding efficiency while ensuring good video coding effect.
[0041] For example, the preset size range provided by the application can be the size range of 64x64 and 128x128, and the third preset number can be set to 0, that is, when the current coding block is a square block smaller than 64x64 (for example, the size of the current coding block is 32x32, 16x16 or 8x8), the number of non-zero coefficients of the luminance component in the transform coefficients of the current coding block is determined. When the number of non-zero coefficients of the luminance component is the third preset number, the skip judgment threshold is determined according to the Lagrange multiplier corresponding to the current coding block and the third preset proportion coefficient. When the number of non-zero coefficients of the luminance component is greater than the third preset number, it can be determined that the first non-square partition skip strategy for the current coding block is not to skip the non-square partition prediction of the current coding block.
[0042] In one embodiment, the maximum value of the Lagrange multiplier corresponding to the current coding block and the third preset minimum threshold value is determined, the maximum value is multiplied by the third preset proportion coefficient to obtain the skip judgment threshold. For example, the skip judgment threshold can be determined by the following formula: th=k3*max(lambda,a3), wherein th is the skip judgment threshold, k3 is the third preset proportion coefficient, for example k3=64, lambda is the Lagrange multiplier, a3 is the third preset minimum threshold value, for example a3=120000.
[0043] The application determines the skip judgment threshold according to the Lagrange multiplier corresponding to the current coding block and the third preset proportion coefficient when the size information of the current coding block is below the preset size range and the number of non-zero coefficients of the luminance component in the transform coefficients of the current coding block is the third preset number, accurately judges whether to skip the non-square partition prediction of the current coding block, and can improve the video coding efficiency while ensuring good video coding effect.
[0044] S230: determining a first non-square partition skip strategy for the current coding block according to the rate-distortion cost and the skip judgment threshold, the first non-square partition skip strategy being used to indicate whether to skip the non-square partition prediction for the current coding block.
[0045] S240: making a partition decision for the current coding block based on the first non-square partition skip strategy. S250: determining first transform coefficient statistical information of the current coding block in a first partition direction, and determining second transform coefficient statistical information of the current coding block in a second partition direction.
[0046] In an embodiment, after the encoding of the current coding block is completed, the current coding block can be divided into two sub-blocks as parent blocks, and transform and quantization processing is performed on the two sub-blocks, thereby further optimizing the partition of the following blocks.
[0047] For example, the first transform coefficient statistical information of the current coding block in the first partition direction is determined, and the second transform coefficient statistical information of the current coding block in the second partition direction is determined, wherein the first partition direction and the second partition direction are perpendicular, for example, the first partition direction can be a horizontal direction, and the second partition direction can be a vertical direction.
[0048] For example, the current coding block is divided in the first partition direction to obtain two horizontal sub-blocks, and the horizontal sub-block transform coefficient statistical information corresponding to the two sub-blocks is determined, the two horizontal sub-block transform coefficient statistical information is added to obtain the first transform coefficient statistical information, and the current coding block is divided in the second partition direction to obtain two vertical sub-blocks, and the vertical sub-block transform coefficient statistical information corresponding to the two sub-blocks is determined, the two vertical sub-block transform coefficient statistical information is added to obtain the second transform coefficient statistical information.
[0049] In an embodiment, the transform coefficient information (including the first transform coefficient information and the second transform coefficient information) provided by the present application can include one or more combinations of the first position of the last non-zero coefficient in the transform coefficient, the second position of the minimum non-zero coefficient in the transform coefficient, and the number of non-zero coefficients in the transform coefficient.
[0050] In a possible embodiment, in the partition decision method based on coefficient characteristics provided by the present application, the first transform coefficient statistical information of the current coding block in the first partition direction can be determined by dividing the current coding block into a first sub-block and a second sub-block in the first partition direction, determining the first transform coefficient information of the first sub-block and the second transform coefficient information of the second sub-block, and determining the first transform coefficient statistical information of the first partition direction according to the first transform coefficient information and the second transform coefficient information.
[0051] According to the first division direction, the current coding block is divided into a first sub-block and a second sub-block, the first sub-block and the second sub-block are respectively subjected to transform and quantization processing to obtain first transform coefficient information of the first sub-block and second transform coefficient information of the second sub-block, and first transform coefficient statistical information of the first division direction is determined according to the first transform coefficient information and the second transform coefficient information.
[0052] Optionally, the first transform coefficient information and the second transform coefficient information are added, and the addition result is determined as the first transform coefficient statistical information of the first division direction. According to the first division direction, the current coding block is divided into a first sub-block and a second sub-block, the first transform coefficient information of the first sub-block and the second transform coefficient information of the second sub-block are determined, and the first transform coefficient statistical information of the first division direction is determined according to the first transform coefficient information and the second transform coefficient information. The coefficient characteristics of the non-square sub-block can be accurately reflected, the timing of skipping the non-square block division prediction of the current coding block in the first division direction or the second division direction can be accurately determined, and the video coding efficiency is improved.
[0053] In one possible embodiment, the second transform coefficient statistical information of the second division direction of the current coding block determined in the division decision method based on the coefficient characteristics provided by the application can be that the current coding block is divided into a third sub-block and a fourth sub-block according to the second division direction, third transform coefficient information of the third sub-block and fourth transform coefficient information of the fourth sub-block are determined, and the second transform coefficient statistical information of the second division direction is determined according to the third transform coefficient information and the fourth transform coefficient information.
[0054] According to the second division direction, the current coding block is divided into a third sub-block and a fourth sub-block, the third sub-block and the fourth sub-block are respectively subjected to transform and quantization processing to obtain third transform coefficient information of the third sub-block and fourth transform coefficient information of the fourth sub-block, and second transform coefficient statistical information of the second division direction is determined according to the third transform coefficient information and the fourth transform coefficient information.
[0055] Optionally, the third transform coefficient information and the fourth transform coefficient information are added, and the addition result is determined as the second transform coefficient statistical information of the second division direction. According to the second division direction, the current coding block is divided into a third sub-block and a fourth sub-block, the third transform coefficient information of the third sub-block and the fourth transform coefficient information of the second sub-block are determined, and the second transform coefficient statistical information of the second division direction is determined according to the third transform coefficient information and the fourth transform coefficient information. The coefficient characteristics of the non-square sub-block can be accurately reflected, the timing of skipping the non-square block division prediction of the current coding block in the first division direction or the second division direction can be accurately determined, and the video coding efficiency is improved.
[0056] S260: determining a second non-square partition skip strategy for the current coding block according to the first transform coefficient statistics and the second transform coefficient statistics, the second non-square partition skip strategy being used to indicate whether to skip the non-square partition prediction of the current coding block in the first partition direction or the second partition direction.
[0057] Exemplarily, the second non-square partition skip strategy for the current coding block is determined according to the first transform coefficient statistics and the second transform coefficient statistics determined above. The second non-square partition skip strategy is used to indicate whether to skip the non-square partition prediction of the current coding block in the first partition direction or the second partition direction.
[0058] In one possible embodiment, the method for determining the partition decision based on the coefficient characteristics provided by the present application includes determining a second non-square partition skip strategy for the current coding block according to the first transform coefficient statistics and the second transform coefficient statistics, which includes: S261: in a case where the first transform coefficient statistics is greater than a product of the second transform coefficient statistics and a fourth preset proportion coefficient, determining the second non-square partition skip strategy for the current coding block as skipping the non-square partition of the current coding block in the first partition direction.
[0059] S262: in a case where the second transform coefficient statistics is greater than a product of the first transform coefficient statistics and a fifth preset proportion coefficient, determining the second non-square partition skip strategy for the current coding block as skipping the non-square partition of the current coding block in the second partition direction.
[0060] Exemplarily, a first product of the second transform coefficient statistics and the fourth preset proportion coefficient is determined, and the first transform coefficient statistics and the first product are compared. In a case where the first transform coefficient statistics is greater than the first product, it can be considered that the horizontal sub-block partition is more reasonable than the vertical sub-block partition for the current coding block, and thus the second non-square partition skip strategy for the current coding block is determined as skipping the non-square partition of the current coding block in the first partition direction. Optionally, the fourth preset proportion coefficient provided by the present application is greater than 1, for example, the fourth preset proportion coefficient can be set as 1.25. By determining to skip the non-square partition of the current coding block in the first partition direction in a case where the first transform coefficient statistics is greater than the product of the second transform coefficient statistics and the fourth preset proportion coefficient, the video coding efficiency is improved while the good video coding effect is ensured.
[0061] In one embodiment, a second product of the first transform coefficient statistic information and a fifth preset proportion coefficient is determined, the second transform coefficient statistic information is compared with the second product, and when the second transform coefficient statistic information is greater than the second product, it is considered that the vertical sub-block partition of the current coding block is more reasonable than the horizontal sub-block partition, and then the second non-square block partition skip strategy of the current coding block is determined as skipping the non-square block partition of the current coding block in the second partition direction. Optionally, the fifth preset proportion coefficient provided in the present application is greater than 1, for example, the fifth preset proportion coefficient can be set to 1.25. Through the determination of skipping the non-square block partition of the current coding block in the second partition direction when the second transform coefficient statistic information is greater than the product of the first transform coefficient statistic information and the fifth preset proportion coefficient, the video coding efficiency is improved while the good video coding effect is ensured.
[0062] S270: performing sub-block partition decision of the current coding block based on the second non-square block partition skip strategy.
[0063] Exemplarily, after the second non-square block partition skip strategy is determined, the sub-block partition decision of the current coding block can be performed based on the second non-square block partition skip strategy. For example, Figure 3 A sub-block partition diagram provided by the present application is shown in the following figure, Figure 3 Nine different partition modes are shown in the figure, the first partition direction partition of the current coding block corresponds to the PARTITION_HORZ partition in the figure, and the second partition direction partition of the current coding block corresponds to the PARTITION_VERT partition in the figure.
[0064] If the second non-square block partition skip strategy indicates that the non-square block partition prediction of the current coding block in the first partition direction or the second partition direction is not skipped, then the full non-square sub-block partition decision of the current coding block shown in the figure is performed. If the second non-square block partition skip strategy indicates that the non-square block partition prediction of the current coding block in the first partition direction is skipped, then the non-square sub-block partition decision of PARTITION_HORZ_4, PARTITION_HORZ_A, PARTITION_HORZ_B and PARTITION_HORZ is skipped. If the second non-square block partition skip strategy indicates that the non-square block partition prediction of the current coding block in the second partition direction is skipped, then the non-square sub-block partition decision of PARTITION_VERT_4, PARTITION_VERT_A, PARTITION_VERT_B and PARTITION_VERT is skipped.
[0065] In one possible embodiment, after the sub-block partition decision of the current coding block based on the first non-square block partition skip strategy is performed in the coefficient feature based partition decision method provided by the present application, the method can further include: determine the distortion statistics, the standard deviation statistics and the number of non-zero coefficients of the luma component in the transform coefficients of the current coding block for quad-tree partitioning of the current coding block; determine a first block partitioning skip strategy for the current coding block according to the distortion statistics, the standard deviation statistics and the number of non-zero coefficients of the luma component, the first block partitioning skip strategy being used to indicate whether to skip sub-block partitioning prediction of the current coding block; make a partitioning decision for the sub-blocks of the current coding block based on the first block partitioning skip strategy.
[0066] Exemplarily, the distortion statistics, the standard deviation statistics and the number of non-zero coefficients of the luma component in the transform coefficients of the current coding block for quad-tree partitioning of the current coding block are determined. Optionally, after the encoding of the current coding block is completed, a reconstructed image block can be obtained by decoding the encoding result of the current coding block, the source image block corresponding to the current coding block and the reconstructed image block are respectively subjected to quad-tree partitioning, rate-distortion information of four sub-blocks is calculated based on the quad-tree partitioning results of the source image block and the reconstructed image, and the distortion statistics and the standard deviation statistics for quad-tree partitioning of the current coding block are obtained according to the rate-distortion information of the four sub-blocks. The distortion statistics is the average value corresponding to the rate-distortion information of the four sub-blocks, and the standard deviation statistics is the standard deviation corresponding to the rate-distortion information of the four sub-blocks.
[0067] In one embodiment, the first block partitioning skip strategy for the current coding block is determined according to the distortion statistics, the standard deviation statistics and the number of non-zero coefficients of the luma component. After the first block partitioning skip strategy is determined, a partitioning decision can be made for the sub-blocks of the current coding block based on the first block partitioning skip strategy.
[0068] The first block partitioning skip strategy can be used to indicate whether to skip square sub-block partitioning prediction of the current coding block. For example, when the size of the current coding block is 32x32, the first block partitioning skip strategy can be used to indicate whether to skip square sub-block partitioning prediction of the current coding block with sizes of 16x16, 8x8 and 4x4. According to the distortion statistics, the standard deviation statistics and the number of non-zero coefficients of the luma component in the transform coefficients of the current coding block for quad-tree partitioning of the current coding block, the first block partitioning skip strategy for the current coding block is determined, and a partitioning decision is made for the sub-blocks of the current coding block based on the first block partitioning skip strategy. The accurate skip of the partitioning decision of part of the square sub-blocks can improve the video coding efficiency while ensuring good video coding effect.
[0069] In a possible embodiment, the coefficient feature-based partition decision method provided in the present application determines the first square partition skip strategy for the current coding block according to the distortion statistical information, the standard deviation statistical information, and the number of non-zero luminance coefficients, which can be: in a case where the distortion statistical information is less than the product of the side length of the current four-tree-partition sub-block and a first preset coefficient, the standard deviation statistical information is less than the product of the Lagrange multiplier corresponding to the current coding block and a second preset coefficient, and the number of non-zero luminance coefficients is a fourth preset number, the first square partition skip strategy for the current coding block is determined to be skipping the sub-block partition prediction of the current coding block.
[0070] Exemplarily, in a case where the distortion statistical information is less than the product of the side length of the current four-tree-partition sub-block and a first preset coefficient, the standard deviation statistical information is less than the product of the Lagrange multiplier corresponding to the current coding block and a second preset coefficient, and the number of non-zero luminance coefficients is a fourth preset number, it can be considered that the average distortion and the distortion standard deviation of the four sub-blocks of the current coding block are small, and the number of non-zero luminance coefficients of the luminance component of the parent block (i.e., the current coding block) is small enough, and the current coding block is a minimal block. The first square partition skip strategy for the current coding block is determined to be skipping the sub-block partition prediction of the current coding block, so as to skip the square sub-block partition decision of all the sub-blocks under the current coding block.
[0071] For example, in a case where the following conditions are met, the first square partition skip strategy of skipping the sub-block partition prediction of the current coding block can be generated: std < lambda * z && D_avg < x * sq_size && c_y = b. Wherein, std is the standard deviation statistical information, lambda is the Lagrange multiplier, z is the second preset coefficient, D_avg is the distortion statistical information, x is the first preset coefficient, sq_size is the side length of the current four-tree-partition sub-block, c_y is the number of non-zero luminance coefficients, b is the fourth preset number, for example, b = 0.
[0072] The present application generates the first square partition skip strategy of skipping the sub-block partition prediction of the current coding block in a case where the distortion statistical information is less than the product of the side length of the current four-tree-partition sub-block and a first preset coefficient, the standard deviation statistical information is less than the product of the Lagrange multiplier corresponding to the current coding block and a second preset coefficient, and the number of non-zero luminance coefficients is a fourth preset number, accurately skips the partition decision of part of the square sub-blocks, and can improve the video coding efficiency while ensuring good video coding effect.
[0073] In one possible implementation, the coefficient characteristic based partition decision method provided in the present application further comprises: determining distortion information corresponding to the current coding block, consumed code rate, and Lagrange multiplier; determining a first rate-distortion cost of the current coding block in the chroma component according to a first preset tuning coefficient, the distortion information, the consumed code rate, and the Lagrange multiplier; adjusting the quantization parameter based on the first rate-distortion cost to determine the number of non-zero coefficients in the transform coefficients of the current coding block after the quantization parameter adjustment; in a case where the number of non-zero coefficients is less than or equal to a fifth preset number, determining a second rate-distortion cost of the current coding block in the chroma component according to a second preset tuning coefficient, the distortion information, the consumed code rate, and the Lagrange multiplier, the second preset tuning coefficient being less than the first preset tuning coefficient; and determining whether to skip the residual coding of the current coding block according to the first rate-distortion cost and the second rate-distortion cost.
[0074] For example, the distortion information corresponding to the current coding block, the consumed code rate, and the Lagrange multiplier are determined, the first preset tuning coefficient, the consumed code rate, and the Lagrange multiplier are multiplied, and the multiplication result is added to the distortion information to obtain the first rate-distortion cost of the current coding block in the chroma component. In one embodiment, after the first rate-distortion cost is obtained, the quantization parameter adjustment can be performed based on the first rate-distortion cost to determine the number of non-zero coefficients in the transform coefficients of the current coding block after the quantization parameter adjustment.
[0075] In one embodiment, in a case where the number of non-zero coefficients in the transform coefficients of the current coding block is less than or equal to the fifth preset number (for example, the fifth preset number is set to 4), the second preset tuning coefficient, the consumed code rate, and the Lagrange multiplier are multiplied, and the multiplication result is added to the distortion information to obtain the second rate-distortion cost of the current coding block in the chroma component. In a case where the number of non-zero coefficients in the transform coefficients of the current coding block is greater than the fifth preset number, it is determined to keep the residual coding of the current coding block in the skip mode decision.
[0076] In one embodiment, the first rate-distortion cost and the second rate-distortion cost are compared, in a case where the second rate-distortion cost is less than the first rate-distortion cost, it is determined to skip the residual coding of the current coding block in the skip mode decision, and in a case where the second rate-distortion cost is greater than or equal to the first rate-distortion cost, it is determined to keep the residual coding of the current coding block in the skip mode decision.
[0077] For example, the first rate-distortion cost can be determined by the following formula: J1=D+R*lambda*c1. The second rate-distortion cost can be determined by the following formula: J2=D+R*lambda*c2. Wherein, D is the distortion information, R is the consumed code rate, lambda is the Lagrange multiplier, c1 is the first preset tuning coefficient, and c2 is the second preset tuning coefficient. The second preset tuning coefficient provided by the present application is smaller than the first preset tuning coefficient, for example, the first preset tuning coefficient can be set to 1.06, and the second preset tuning coefficient can be set to 0.88.
[0078] It needs to be explained that the related art does not distinguish the Lagrange multiplier used in the conventional quantization parameter adjustment and the Lagrange multiplier used in the skip mode decision. For the chroma component, the rate-distortion cost calculation formula is J3=D+R*lambda*c3, wherein c3 is the third preset tuning coefficient, and the third preset tuning coefficient is greater than the first preset tuning coefficient, for example, c3=1.25. The Lagrange multiplier used in the conventional quantization parameter adjustment of the chroma component is too large, which not only does not bring gain to the luminance component, but also leads to a large loss of the chroma component. And the Lagrange multiplier used in the subsequent skip mode decision is not optimized, which leads to the inaccuracy of the rate-distortion quantization model and affects the video coding quality. The present application optimizes the rate-distortion cost in the quantization parameter adjustment and the skip mode decision through different preset tuning coefficients, reduces the loss of the luminance component, improves the gain of the chroma component, and balances the video coding speed, efficiency and quality.
[0079] The above, by determining the number of non-zero coefficients in the transform coefficients of the current coding block and the rate-distortion cost of the best mode, determining the skip judgment threshold according to the size information of the current coding block and the number of non-zero coefficients, determining the first non-square partition skip strategy for the current coding block according to the rate-distortion cost and the skip judgment threshold, the first non-square partition skip strategy is used to indicate whether to skip the non-square partition prediction of the current coding block, and the partition decision of the current coding block is made based on the first non-square partition skip strategy, the skip judgment threshold is flexibly determined according to the number of non-zero coefficients in the transform coefficients of the current coding block and the rate-distortion cost of the best mode, and the first non-square partition skip strategy for the current coding block is flexibly determined to make the partition decision of the current coding block, which can improve the video coding efficiency while ensuring good video coding effect. At the same time, according to the first transform coefficient statistical information of the current coding block in the first partition direction and the second transform coefficient statistical information in the second partition direction, the second non-square partition skip strategy for the current coding block is determined, and the sub-block of the current coding block is partitioned based on the second non-square partition skip strategy, and the partition decision of part of the non-square sub-block is accurately skipped, which can improve the video coding efficiency while ensuring good video coding effect.
[0080] Figure 4 A structure schematic diagram of a coefficient characteristic-based partition decision device provided by an embodiment of the present application is given. Referring to Figure 4 The coefficient characteristic-based partition decision device includes a characteristic acquisition module 41, a threshold determination module 42, a strategy determination module 43, and a partition decision module 44.
[0081] The characteristic acquisition module 41 is configured to determine the number of non-zero coefficients in the transform coefficients of the current coding block and the rate-distortion cost of the best mode. The threshold determination module 42 is configured to determine a skip judgment threshold according to the size information of the current coding block and the number of non-zero coefficients, wherein the skip judgment threshold is positively correlated with the size information of the current coding block, and the skip judgment threshold is negatively correlated with the number of non-zero coefficients. The strategy determination module 43 is configured to determine a first non-square block partition skip strategy for the current coding block according to the rate-distortion cost and the skip judgment threshold, wherein the first non-square block partition skip strategy is used to indicate whether to skip the non-square block partition prediction of the current coding block. The partition decision module 44 is configured to make a partition decision for the current coding block based on the first non-square block partition skip strategy.
[0082] By determining the number of non-zero coefficients in the transform coefficients of the current coding block and the rate-distortion cost of the best mode, determining the skip judgment threshold according to the size information of the current coding block and the number of non-zero coefficients, determining the first non-square block partition skip strategy for the current coding block according to the rate-distortion cost and the skip judgment threshold, using the first non-square block partition skip strategy to indicate whether to skip the non-square block partition prediction of the current coding block, and making a partition decision for the current coding block based on the first non-square block partition skip strategy, the skip judgment threshold is flexibly determined according to the number of non-zero coefficients in the transform coefficients of the current coding block and the rate-distortion cost of the best mode, the first non-square block partition skip strategy for the current coding block is flexibly determined to make a partition decision for the current coding block, and the video coding efficiency can be improved while ensuring good video coding effect.
[0083] In one possible embodiment, the threshold determination module 42 determines the skip judgment threshold according to the size information of the current coding block and the number of non-zero coefficients, and is configured as follows: In a case where the size information of the current coding block is within a preset size range and the number of non-zero coefficients is a first preset number, the skip judgment threshold is determined according to the Lagrange multiplier corresponding to the current coding block and a first preset proportion coefficient. In a case that the size information of the current coding block is within a preset size range, the number of non-zero coefficients is greater than a first preset number, and the number of non-zero coefficients of the luminance component in the transform coefficients of the current coding block is less than a second preset number, the skip judgment threshold is determined according to the Lagrange multiplier corresponding to the current coding block, a second preset proportion coefficient, and a preset offset parameter, wherein the second preset number is determined according to the size information of the current coding block. In a case that the size information of the current coding block is below a preset size range, and the number of non-zero coefficients of the luminance component in the transform coefficients of the current coding block is a third preset number, the skip judgment threshold is determined according to the Lagrange multiplier corresponding to the current coding block and a third preset proportion coefficient.
[0084] In one possible embodiment, the coefficient feature based partition decision device further comprises a second decision module, which is configured to: determine first transform coefficient statistical information of the current coding block in a first partition direction, and determine second transform coefficient statistical information of the current coding block in a second partition direction; determine a second non-square block partition skip strategy for the current coding block according to the first transform coefficient statistical information and the second transform coefficient statistical information, the second non-square block partition skip strategy being used to indicate whether to skip non-square block partition prediction of the current coding block in the first partition direction or the second partition direction; make partition decision for sub-blocks of the current coding block based on the second non-square block partition skip strategy.
[0085] In one possible embodiment, the second decision module determines the first transform coefficient statistical information of the current coding block in the first partition direction, and is configured to: divide the current coding block into a first sub-block and a second sub-block according to the first partition direction, determine first transform coefficient information of the first sub-block and second transform coefficient information of the second sub-block, and determine the first transform coefficient statistical information of the first partition direction according to the first transform coefficient information and the second transform coefficient information, wherein the transform coefficient information comprises a first position of a last non-zero coefficient in the transform coefficients, a second position of a smallest non-zero coefficient in the transform coefficients, and a number of non-zero coefficients in the transform coefficients; determine the second transform coefficient statistical information of the current coding block in the second partition direction, and is configured to: divide the current coding block into a third sub-block and a fourth sub-block according to the second partition direction, determine third transform coefficient information of the third sub-block and fourth transform coefficient information of the fourth sub-block, and determine the second transform coefficient statistical information of the second partition direction according to the third transform coefficient information and the fourth transform coefficient information.
[0086] In a possible embodiment, the second decision module determines a second non-square partition skip strategy for the current coding block according to the first transform coefficient statistical information and the second transform coefficient statistical information, and is configured to: determine the second non-square partition skip strategy for the current coding block as skipping non-square partition of the current coding block in the first partition direction, in a case where the first transform coefficient statistical information is greater than a product of the second transform coefficient statistical information and a fourth preset proportion coefficient. determine the second non-square partition skip strategy for the current coding block as skipping non-square partition of the current coding block in the second partition direction, in a case where the second transform coefficient statistical information is greater than a product of the first transform coefficient statistical information and a fifth preset proportion coefficient.
[0087] In a possible embodiment, the coefficient feature based partition decision apparatus further includes a third decision module, which is configured to: determine distortion statistical information, standard deviation statistical information, and a number of non-zero coefficients of transform coefficients of the current coding block in a luminance component in the current coding block performing a quad-tree partition; determine a first square partition skip strategy for the current coding block according to the distortion statistical information, the standard deviation statistical information, and the number of non-zero coefficients, the first square partition skip strategy being used to indicate whether to skip sub-block partition prediction of the current coding block; make a partition decision for a sub-block of the current coding block based on the first square partition skip strategy.
[0088] In a possible embodiment, the third decision module determines the first square partition skip strategy for the current coding block according to the distortion statistical information, the standard deviation statistical information, and the number of non-zero coefficients, and is configured to: determine the first square partition skip strategy for the current coding block as skipping sub-block partition prediction of the current coding block, in a case where the distortion statistical information is less than a product of a side length of a current quad-tree partition sub-block and a first preset coefficient, the standard deviation statistical information is less than a product of a Lagrange multiplier corresponding to the current coding block and a second preset coefficient, and the number of non-zero coefficients is a fourth preset number.
[0089] In a possible embodiment, the coefficient feature based partition decision apparatus further includes a residual decision module, which is configured to: determine distortion information corresponding to the current coding block, consumed code rate, and a Lagrange multiplier, determine a first rate-distortion cost of the current coding block in a chroma component according to a first preset tuning coefficient, the distortion information, the consumed code rate, and the Lagrange multiplier; perform quantization parameter adjustment based on the first rate-distortion cost, and determine a number of non-zero coefficients of transform coefficients of the current coding block after the quantization parameter adjustment; In a case that the number of non-zero coefficients is less than or equal to the fifth preset number, a second rate-distortion cost of the current coding block in the chroma component is determined according to a second preset tuning coefficient, the distortion information, the consumed code rate and the Lagrange multiplier, and the second preset tuning coefficient is less than the first preset tuning coefficient. It is determined whether to skip the residual coding of the current coding block according to the first rate-distortion cost and the second rate-distortion cost.
[0090] It is to be noted that, in the above-mentioned embodiments of the coefficient feature-based partition decision apparatus, each unit and module included is only logically divided according to functions, but is not limited to the above-mentioned division, as long as the corresponding functions can be implemented. In addition, the specific names of each functional unit are only for mutual distinction, and do not limit the protection scope of the embodiments of the present application.
[0091] The embodiments of the present application further provide a coefficient feature-based partition decision device, which can integrate the coefficient feature-based partition decision apparatus provided by the embodiments of the present application. Figure 5 is a structural schematic diagram of a coefficient feature-based partition decision device provided by the embodiments of the present application. Referring to Figure 5 The coefficient feature-based partition decision device includes an input device 53, an output device 54, a memory 52 and one or more processors 51; the memory 52 is used to store one or more programs; when the one or more programs are executed by the one or more processors 51, the one or more processors 51 implement the coefficient feature-based partition decision method provided by the above-mentioned embodiments. The coefficient feature-based partition decision apparatus, device and computer provided above can be used to execute the coefficient feature-based partition decision method provided by any of the above-mentioned embodiments, and have the corresponding functions and advantages.
[0092] The embodiments of the present application further provide a nonvolatile storage medium storing computer executable instructions, which, when executed by a computer processor, are used to execute the coefficient feature-based partition decision method provided by the above-mentioned embodiments. Of course, the nonvolatile storage medium storing computer executable instructions provided by the embodiments of the present application is not limited to the coefficient feature-based partition decision method provided above, but can also execute the related operations in the coefficient feature-based partition decision method provided by any of the embodiments of the present application. The coefficient feature-based partition decision apparatus, device and storage medium provided in the above-mentioned embodiments can execute the coefficient feature-based partition decision method provided by any of the embodiments of the present application, and the technical details not described in the above-mentioned embodiments can be referred to the coefficient feature-based partition decision method provided by any of the embodiments of the present application.
[0093] On the basis of the above-mentioned embodiments, the embodiments of the present application further provide a computer program product, the technical solution of the present application or the whole or part of the contribution to the prior art can be embodied in the form of a software product, the computer program product is stored in a storage medium, and includes a plurality of instructions for making a computer device, a mobile terminal or a processor therein execute all or part of the steps of the coefficient feature-based partition decision method provided by the embodiments of the present application.
Claims
1. A partitioning decision method based on coefficient features, characterized in that, include: Determine the number of non-zero coefficients in the transform coefficients of the current coding block, and the rate-distortion cost of the optimal mode; A skip judgment threshold is determined based on the size information of the current coding block and the number of non-zero coefficients, wherein the skip judgment threshold is positively correlated with the size information of the current coding block and negatively correlated with the number of non-zero coefficients; A first non-block partitioning skipping strategy for the current coding block is determined based on the rate-distortion cost and the skipping judgment threshold. The first non-block partitioning skipping strategy is used to indicate whether to skip the non-block partitioning prediction for the current coding block. The current coding block is partitioned based on the first non-block partitioning skipping strategy.
2. The partitioning decision method based on coefficient features according to claim 1, characterized in that, The step of determining the skip threshold based on the size information of the current coding block and the number of non-zero coefficients includes: If the size information of the current coding block is within a preset size range and the number of non-zero coefficients is a first preset number, a skip judgment threshold is determined based on the Lagrange multiplier corresponding to the current coding block and the first preset scaling factor. If the size information of the current coding block is within a preset size range, the number of non-zero coefficients is greater than a first preset number, and the number of non-zero luminance coefficients in the luminance component of the transform coefficients of the current coding block is less than a second preset number, a skip judgment threshold is determined based on the Lagrange multiplier corresponding to the current coding block, the second preset scaling factor, and the preset offset parameter, wherein the second preset number is determined based on the size information of the current coding block. If the size information of the current coding block is below a preset size range, and the number of non-zero luminance coefficients in the luminance component of the transformation coefficients of the current coding block is a third preset number, a skip judgment threshold is determined based on the Lagrange multiplier corresponding to the current coding block and the third preset scaling factor.
3. The partitioning decision method based on coefficient features according to claim 1, characterized in that, After making a partitioning decision on the current coding block based on the first non-block partitioning skipping strategy, the method further includes: Determine the first transform coefficient statistics of the current coding block in the first partitioning direction, and determine the second transform coefficient statistics of the current coding block in the second partitioning direction; A second non-block partitioning skipping strategy for the current coding block is determined based on the first transform coefficient statistics and the second transform coefficient statistics. The second non-block partitioning skipping strategy is used to indicate whether to skip the non-block partitioning prediction of the current coding block in the first partitioning direction or the second partitioning direction. The sub-blocks of the current coding block are partitioned based on the second non-block partitioning skipping strategy.
4. The partitioning decision method based on coefficient features according to claim 3, characterized in that, The determination of the first transform coefficient statistics of the current coding block in the first partitioning direction includes: The current coding block is divided into a first sub-block and a second sub-block according to the first division direction. The first transform coefficient information of the first sub-block and the second transform coefficient information of the second sub-block are determined. The first transform coefficient statistical information of the first division direction is determined according to the first transform coefficient information and the second transform coefficient information. The transform coefficient information includes the first position of the last non-zero coefficient in the transform coefficient, the second position of the smallest non-zero coefficient in the transform coefficient, and the number of non-zero coefficients in the transform coefficient. The determination of the second transform coefficient statistics of the current coding block in the second partitioning direction includes: The current coding block is divided into a third sub-block and a fourth sub-block according to the second division direction. The third transform coefficient information of the third sub-block and the fourth transform coefficient information of the fourth sub-block are determined. The second transform coefficient statistical information of the second division direction is determined based on the third transform coefficient information and the fourth transform coefficient information.
5. The partitioning decision method based on coefficient features according to claim 3, characterized in that, The step of determining the second non-block segmentation skipping strategy for the current coding block based on the first transform coefficient statistics and the second transform coefficient statistics includes: If the first transformation coefficient statistics are greater than the product of the second transformation coefficient statistics and the fourth preset ratio coefficient, the second non-block partitioning skipping strategy for the current coding block is determined to be to skip the non-block partitioning of the current coding block in the first partitioning direction. If the second transformation coefficient statistics are greater than the product of the first transformation coefficient statistics and the fifth preset proportional coefficient, the second non-block partitioning skipping strategy for the current coding block is determined to be to skip the non-block partitioning of the current coding block in the second partitioning direction.
6. The partitioning decision method based on coefficient features according to claim 1, characterized in that, After making a partitioning decision on the current coding block based on the first non-block partitioning skipping strategy, the method further includes: Determine the distortion statistics, standard deviation statistics, and the number of non-zero luminance coefficients in the luminance component among the transform coefficients of the current coding block for quadtree partitioning; Based on the distortion statistics, the standard deviation statistics, and the number of non-zero luminance coefficients, a first block partitioning skipping strategy for the current coding block is determined. The first block partitioning skipping strategy is used to indicate whether to skip the sub-block partitioning prediction for the current coding block. The sub-blocks of the current coding block are partitioned based on the first block partitioning skipping strategy.
7. The partitioning decision method based on coefficient features according to claim 6, characterized in that, The step of determining the first block segmentation skipping strategy for the current coded block based on the distortion statistics, the standard deviation statistics, and the number of non-zero luminance coefficients includes: If the distortion statistics are less than the product of the side length of the current quadtree sub-block and the first preset coefficient, the standard deviation statistics are less than the product of the Lagrange multiplier corresponding to the current coding block and the second preset coefficient, and the number of non-zero luminance coefficients is the fourth preset number, then the first block division skipping strategy for the current coding block is determined to be skipping the sub-block division prediction for the current coding block.
8. The partitioning decision method based on coefficient features according to claim 1, characterized in that, Before determining the number of non-zero coefficients in the transform coefficients of the current coding block and the rate-distortion cost of the optimal mode, the method further includes: Determine the distortion information, bit rate consumption, and Lagrange multiplier corresponding to the current coding block. Based on the first preset tuning coefficient, the distortion information, the bit rate consumption, and the Lagrange multiplier, determine the first rate distortion cost of the current coding block in the chroma component. Based on the first rate-distortion cost, the quantization parameters are adjusted to determine the number of non-zero coefficients in the transform coefficients of the current coding block after the quantization parameter adjustment. When the number of non-zero coefficients is less than or equal to the fifth preset number, the second rate-distortion cost of the current coding block in the chroma component is determined according to the second preset tuning coefficient, the distortion information, the consumed code rate and the Lagrange multiplier, wherein the second preset tuning coefficient is less than the first preset tuning coefficient. Whether to skip residual coding of the current coding block is determined based on the first rate-distortion cost and the second rate-distortion cost.
9. A partitioning decision device based on coefficient features, characterized in that, It includes a feature acquisition module, a threshold determination module, a policy determination module, and a partitioning decision module, wherein: The feature acquisition module is configured to determine the number of non-zero coefficients in the transform coefficients of the current coding block, and the rate-distortion cost of the optimal mode. The threshold determination module is configured to determine a skip judgment threshold based on the size information of the current coding block and the number of non-zero coefficients, wherein the skip judgment threshold is positively correlated with the size information of the current coding block and negatively correlated with the number of non-zero coefficients; The strategy determination module is configured to determine a first non-block partitioning skip strategy for the current coding block based on the rate-distortion cost and the skip judgment threshold. The first non-block partitioning skip strategy is used to indicate whether to skip the non-block partitioning prediction for the current coding block. The partitioning decision module is configured to make a partitioning decision for the current coding block based on the first non-block partitioning skip strategy.
10. A partitioning decision-making device based on coefficient features, characterized in that, include: Memory and one or more processors; The memory is used 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 coefficient feature-based partitioning decision method as described in any one of claims 1-8.
11. A non-volatile storage medium for storing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the coefficient-based partitioning decision method as described in any one of claims 1-8.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the partitioning decision method based on coefficient features as described in any one of claims 1-8.