CN114827603A - CU block division method, device and medium based on AVS3 texture information - Google Patents

CU block division method, device and medium based on AVS3 texture information Download PDF

Info

Publication number
CN114827603A
CN114827603A CN202210281645.1A CN202210281645A CN114827603A CN 114827603 A CN114827603 A CN 114827603A CN 202210281645 A CN202210281645 A CN 202210281645A CN 114827603 A CN114827603 A CN 114827603A
Authority
CN
China
Prior art keywords
block
gradient
divided
avs3
threshold
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210281645.1A
Other languages
Chinese (zh)
Inventor
梁凡
贾一凡
张坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sun Yat Sen University
Original Assignee
Sun Yat Sen University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sun Yat Sen University filed Critical Sun Yat Sen University
Priority to CN202210281645.1A priority Critical patent/CN114827603A/en
Publication of CN114827603A publication Critical patent/CN114827603A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a CU block dividing method based on AVS3 texture information, a computer device and a storage medium, which comprises the steps of obtaining the variance, the horizontal gradient and the vertical gradient of a CU block to be divided, selecting to skip certain dividing modes according to the relation between the variance, the horizontal gradient and the vertical gradient and a first threshold value and the like, obtaining candidate dividing modes, selecting an optimal dividing mode from the candidate dividing modes, dividing the CU block to be divided by the optimal dividing mode and the like. According to the method, the CU blocks are divided into different categories by extracting texture information based on the variance and the Scharr operator, the low-complexity variance is used for analyzing a division mode pruning strategy of the flat blocks and the complex blocks, the rapid division of the CU blocks is realized, the AVS3 encoder speed is improved, the Scharr operator is used for considering both the fine texture direction and the texture direction, and the algorithm is balanced between the encoding speed and the encoding quality; the invention is widely applied to the technical field of video coding.

Description

CU block division method, device and medium based on AVS3 texture information
Technical Field
The invention relates to the technical field of video coding, in particular to a CU block dividing method based on AVS3 texture information, a computer device and a storage medium.
Background
With the development of network technology, the way of transmitting information through video becomes more and more extensive, and the requirements on video coding technology are also increasing. For example, although AVS3 has higher encoding quality than AVS2, the time complexity is doubled, and the encoding speed is reduced under the condition that other conditions are not changed, which is not favorable for the application of the new video encoding technology.
Interpretation of terms:
video coding: video coding is one of compression technologies, and a video source file is compressed into a bit stream file by a coding method on the premise of keeping quality as much as possible, so that the storage space and the transmission bandwidth of a video can be saved.
Video decoding: the video decoding is a decompression process corresponding to video coding, and the video can be obtained by decoding the bit stream file.
AVS 3: the Third Generation Audio and Video coding technology Standard (The Third Generation of Audio Video coding Standard) is The latest domestic Video coding Standard, still adopts a block-based hybrid coding framework, and has performance improvement of 30% compared with The previous Generation AVS 2.
Block division: in the encoding process, the AVS3 completes modules such as Prediction, Transform, quantization, entropy Coding and the like by taking a block as a Unit, and includes a Coding Unit (CU), a Prediction Unit (PU), and a Transform Unit (TU). Each frame of image in the video is divided into a plurality of 128 × 128 lcus (target Coding units), all possible partitioning modes are recursively traversed to smaller CUs, and the mode with the lowest Rate Distortion (RD) cost is selected as the optimal partitioning mode.
Dividing modes: the AVS3 has 6 partition modes, which are non-partition (No Split), Vertical Binary Tree partition (BV), Horizontal Binary Tree partition (BH), Vertical enhanced quadtree partition (EQTV), Horizontal enhanced quadtree partition (EQTH), and quadtree partition (QT). Fig. 1 is an example of quadtree partitioning (QT), enhanced quadtree partitioning (EQT), and binary tree partitioning (BT).
Intra-frame prediction: and predicting the current pixel by taking the adjacent pixels (A-E areas of the second image) on the upper side and the left side as reference pixels by utilizing the spatial correlation of the pixels, and completing the processes of encoding, transmitting, decoding and the like together with the difference value of the predicted value and the original value, namely the residual error and encoding parameter information. The accuracy of the prediction is strongly related to the compression performance. The AVS3 has 66 intra-frame prediction modes, namely a non-angle mode (0-2) and an angle mode (3-65), and the various angle modes refine the prediction direction, improve the sensitivity to the directional texture of the video and are more beneficial to the processing of the rich texture area.
Intra-frame derivation tree: (Intra Derived Tree, Intra DT): in order to improve the prediction accuracy, during prediction, a CU is divided into 2 or 4 PUs for prediction, and an optimal PU division mode is selected. Intra sub-block partitioning (ISP) in the foreign latest Video Coding (VVC) standard is similar to Intra DT in AVS 3. Fig. 2 is a diagram illustrating a reference pixel distribution in intra prediction, and fig. 3 is a diagram illustrating an intra prediction mode.
Disclosure of Invention
In view of at least one technical problem of complexity of an encoding algorithm and the like of the current AVS3 video encoding technology, the present invention aims to provide a CU block partitioning method, a computer apparatus and a storage medium based on AVS3 texture information.
In one aspect, an embodiment of the present invention includes a CU block partitioning method based on AVS3 texture information, including:
acquiring the variance, the horizontal gradient and the vertical gradient of a CU block to be divided;
determining a first gradient ratio and a second gradient ratio according to the horizontal gradient and the vertical gradient; the first gradient ratio is a ratio of the horizontal gradient to the vertical gradient, and the second gradient ratio is a ratio of the vertical gradient to the horizontal gradient;
when the variance is smaller than a first threshold value, or the horizontal gradient and the vertical gradient are both smaller than a second threshold value, selecting a non-division mode as an optimal division mode; otherwise, comparing the variance with a third threshold;
when the variance is larger than the third threshold, skipping a non-division mode; otherwise, comparing the first gradient ratio with a fourth threshold value;
skipping a horizontal division mode when the first gradient ratio is greater than the fourth threshold; otherwise, comparing the second gradient ratio with a fourth threshold value;
skipping a vertical division mode when the second gradient ratio is greater than the fourth threshold;
selecting an optimal partitioning mode from the candidate partitioning modes; the candidate partition modes include other partition modes than the skipped partition mode;
and dividing the CU blocks to be divided in the optimal division mode.
Further, the selecting an optimal partition mode from the candidate partition modes includes:
respectively calculating rate-distortion costs for each of the candidate partition modes;
and taking the division mode with the minimum corresponding rate distortion cost as the optimal division mode.
Further, the method for partitioning a CU block based on AVS3 texture information further includes:
setting a quantization step size QP;
setting coefficient values α, γ, μ, and β;
calculating the first threshold Th1 by the formula Th1 ═ α × QP;
calculating the second threshold Th2 by the formula Th2 ═ γ × QP;
calculating the third threshold Th3 by the formula Th3 ═ μ × QP;
the fourth threshold Th4 is calculated by the formula Th 4-QP/β.
Further, the method for partitioning a CU block based on AVS3 texture information further includes:
the first threshold is also adjusted after the selecting of the optimal partitioning mode from the candidate partitioning modes.
Further, the adjusting the first threshold includes:
when the variance is smaller than a first threshold value, or the horizontal gradient and the vertical gradient are both smaller than a second threshold value, adjusting the coefficient value alpha; otherwise, the coefficient value alpha is reduced.
Further, the obtaining the variance, the horizontal gradient and the vertical gradient of the CU block to be partitioned includes:
by the formula
Figure BDA0003558029410000031
Calculating the variance Var; wherein M is the number of pixels in the horizontal direction of the CU block to be divided, N is the number of pixels in the vertical direction of the CU block to be divided, and I (I, j) is the pixel value at the coordinate point (I, j) of the CU block to be divided,
Figure BDA0003558029410000032
is the average pixel value of the CU block to be divided.
Further, the obtaining the variance, the horizontal gradient and the vertical gradient of the CU block to be partitioned includes:
by the formula
Figure BDA0003558029410000033
And
Figure BDA0003558029410000034
calculating the horizontal gradient G x (ii) a Wherein M is the number of pixels in the horizontal direction of the CU block to be divided, N is the number of pixels in the vertical direction of the CU block to be divided, and P is a 3 × 3 luminance value matrix centered on a coordinate point (i, j) in the CU block to be divided.
Further, the obtaining the variance, the horizontal gradient and the vertical gradient of the CU block to be partitioned includes:
by the formula
Figure BDA0003558029410000035
And
Figure BDA0003558029410000036
calculating the vertical gradient G y (ii) a Wherein M is the number of pixels in the horizontal direction of the CU block to be divided, N is the number of pixels in the vertical direction of the CU block to be divided, and P is a 3 × 3 luminance value matrix centered on a coordinate point (i, j) in the CU block to be divided.
In another aspect, embodiments of the present invention also include a computer apparatus including a memory for storing at least one program and a processor for loading the at least one program to perform the method of CU block partitioning based on AVS3 texture information in an embodiment.
In another aspect, embodiments of the present invention also include a storage medium in which a processor-executable program is stored, which, when executed by a processor, is configured to perform a CU block partitioning method based on AVS3 texture information in an embodiment.
The invention has the beneficial effects that: in the CU block division method based on the AVS3 texture information, the texture information is extracted based on the variance and the Scharr operator to divide the CU blocks into different categories, the low-complexity variance is used for analyzing the division mode pruning strategy of the flat blocks and the complex blocks, the rapid division of the CU blocks is realized, the AVS3 encoder speed is improved, the Scharr operator is used for considering both the fine texture direction and the texture direction, and the algorithm is balanced between the encoding speed and the encoding quality;
drawings
FIG. 1 is an example of quadtree partitioning (QT), enhanced quadtree partitioning (EQT), and binary tree partitioning (BT);
FIG. 2 is a diagram illustrating a distribution of reference pixels for intra prediction;
FIG. 3 is a diagram illustrating intra prediction modes;
FIG. 4 is a flowchart of a CU block partitioning method based on AVS3 texture information according to an embodiment;
FIG. 5 is a schematic diagram illustrating the effect of dividing the sequence of Basketball in the embodiment;
fig. 6 is a schematic diagram illustrating an effect of dividing the City sequence by a quantization step QP of 45 in the embodiment;
fig. 7 is a schematic diagram illustrating an effect of dividing a City sequence by a quantization step QP of 27 in the embodiment;
fig. 8 is a diagram illustrating the effect of the first frame division on the Crew sequence in the embodiment.
Detailed Description
In this embodiment, referring to fig. 4, the method for partitioning a CU block based on AVS3 texture information includes the following steps:
s1, obtaining variance Var and horizontal gradient G of a CU block to be divided x And a vertical gradient G x
S2, according to the horizontal gradient G x And a vertical gradient G x Determining a first gradient ratio G xy And a second gradient ratio G yx
S3, when the variance Var is smaller than a first threshold Th1 or a horizontal gradient G x And a vertical gradient G y All are smaller than a second threshold Th2, and a non-division mode is selected as an optimal division mode; otherwise, the variance Var is compared with a third threshold Th 3;
s4, when the variance Var is larger than a third threshold Th3, skipping the non-division mode; otherwise, the first gradient ratio G is set xy Comparing with a fourth threshold Th 4;
s5, when the first gradient ratio G xy Greater than the fourth threshold Th4, the horizontal division mode is skipped; otherwise, the second gradient ratio G is set yx Comparing with a fourth threshold Th 4;
s6, when the second gradient ratio G yx Greater than a fourth threshold Th4, the vertical partition mode is skipped;
s7, selecting an optimal partitioning mode from the candidate partitioning modes; the candidate division modes include division modes other than the skipped division mode;
and S8, dividing the CU blocks to be divided in the optimal division mode.
In step S1, the formula is used
Figure BDA0003558029410000051
The variance Var of the CU block to be partitioned is calculated. Wherein M is the pixel number of the CU blocks to be divided in the horizontal direction, N is the pixel number of the CU blocks to be divided in the vertical direction,i (I, j) is the pixel value at coordinate point (I, j) of the CU block to be divided,
Figure BDA0003558029410000052
is the average pixel value of the CU block to be divided. Specifically, the brightness value of the pixel point may be used as the pixel value.
In step S1, the formula is used
Figure BDA0003558029410000053
And
Figure BDA0003558029410000054
calculating the horizontal gradient G of the CU block to be divided x . Wherein, M is the number of pixels in the horizontal direction of the CU block to be divided, N is the number of pixels in the vertical direction of the CU block to be divided, and P is a 3 × 3 luminance value matrix centered on the coordinate point (i, j) in the CU block to be divided.
In step S1, the formula is used
Figure BDA0003558029410000055
And
Figure BDA0003558029410000056
calculating the vertical gradient G of the CU block to be divided y . Wherein, M is the number of pixels in the horizontal direction of the CU block to be divided, N is the number of pixels in the vertical direction of the CU block to be divided, and P is a 3 × 3 luminance value matrix centered on the coordinate point (i, j) in the CU block to be divided.
In step S1, the horizontal gradient G of the CU block to be divided is calculated by the Scharr operator x And a vertical gradient G y And therefore, edge detection of the CU blocks to be divided is realized. Compared with other operators for edge detection, such as Soble, Canny and Laphlacian operators, the Scharr operator has a small convolution kernel (the size of the convolution kernel is the same as that of the Soble operator), is low in calculation complexity (the calculation complexity is similar to that of the Soble operator), has larger adjacent boundary pixels, is more efficient than the Canny operator, can pay more attention to the fine texture characteristics, can calculate smaller gradient change and is higher in accuracy.
In step S1, the calculated horizontal ladderDegree G x Denotes the magnitude of the gradient, G, of the CU block to be partitioned in the horizontal direction x The larger the size, the more drastic the pixel variation in the horizontal direction of the CU block to be divided, with obvious vertical texture. Vertical gradient G y Denotes the gradient size, G, of the CU block to be partitioned in the vertical direction y The larger the size, the more drastic the pixel variation in the vertical direction of the CU block to be divided, with obvious horizontal texture.
In step S2, a horizontal gradient G is obtained x And the vertical gradient G y The ratio of the first gradient to the second gradient is calculated xy I.e. by
Figure BDA0003558029410000057
By finding the vertical gradient G y And horizontal gradient G x The ratio of the first gradient and the second gradient is calculated yx I.e. by
Figure BDA0003558029410000058
Referring to FIG. 4, in step S3, it is determined that "the variance Var is smaller than the first threshold Th1 or G x And G y Are both smaller than the second threshold Th2 ", i.e., determining that" the variance Var is smaller than the first thresholds Th1 "and" G x And G y Whether at least one of the two conditions is smaller than the second threshold Th2 ″ is satisfied, if at least one of the two conditions is satisfied, it is indicated that the to-be-divided CU block is an overall flat CU block, the pixel distribution is relatively balanced, the fluctuation is not large, a complex division mode can be skipped, and the non-division mode can be directly selected as an optimal division mode.
Referring to FIG. 4, in step S3, if "the variance Var is less than the first threshold Th1 or G x And G y Are both smaller than the second threshold value Th2 ", i.e.," the variance Var is smaller than the first threshold values Th1 "and" G x And G y Both of the two conditions, which are smaller than the second threshold Th2 ″, are not satisfied, which indicates that the CU block to be divided is not an entirely flat CU block, the pixel distribution is not balanced enough, and there is a fluctuation that cannot be ignored, and a suitable division pattern needs to be selected, and then step S4 is performed.
Referring to fig. 4, in step S4, the variance Var is compared with the third threshold Th3, and if the variance Var > the third threshold Th3, it indicates that the CU block to be partitioned has a large magnitude of variance, and the texture of the CU block with large variance has high diversity, and a complex partition boundary is basically selected to partition rich texture, and the partition depth is deep, so the CU with large variance can directly skip the attempt of non-partition mode. If the variance Var is less than or equal to the third threshold Th3, step S5 is performed.
Referring to fig. 4, in step S5, the first gradient ratio G is adjusted xy And compared with the fourth threshold Th 4. If the first gradient ratio G xy The fourth threshold Th4 indicates that the CU blocks to be divided have obvious vertical texture, and horizontal division modes such as a horizontal binary tree, a horizontal enhanced quadtree division mode and a horizontal Intra DT mode can be skipped. If the first gradient ratio G xy ≦ fourth threshold Th4, step S6 is performed.
Referring to fig. 4, in step S6, the second gradient ratio G is set yx And compared with the fourth threshold Th 4. If the second gradient ratio G yx The fourth threshold Th4 indicates that the CU blocks to be divided have obvious horizontal texture, and vertical division modes such as a vertical binary tree, a vertical enhanced quadtree division mode and a vertical Intra DT mode can be skipped. If the second gradient ratio G yx ≦ fourth threshold Th4, all partition modes may be skipped, and the non-partition mode is selected as the optimal partition mode.
Except for the case where the non-division mode is directly selected as the optimal division mode in steps S3 and S6, some division modes are skipped in other cases, and the non-skipped division modes become part of the candidate division modes, i.e., the resulting candidate division modes are a set of non-skipped division modes. In step S7, each of the candidate partition modes is calculated to calculate a rate distortion cost RDO, and the partition mode with the smallest calculation rate distortion cost is selected as the optimal partition mode.
In step S8, the CU block to be divided is divided in the optimal division mode selected in step S7. If it is the optimal division mode that is directly selected as the non-division mode in step S3 and step S6, the CU block to be divided may not be divided in step S8.
In this embodiment, the principle of steps S1-S8 is explained in conjunction with the Basketball sequence shown in fig. 5.
From a study of fig. 5, the following characteristics can be summarized:
(1) according to the texture characteristics and distribution characteristics of the CU blocks, the CU blocks can be classified into three categories according to flatness, directionality and difference;
(2) from the viewpoint of flatness, it is observed that the more flat CU blocks tend to be non-divided, such as the area a, the area B, and the area C in fig. 5, the variance is relatively small, the value is below 1000, non-division or simple binary tree division tends to be selected for the CU blocks, and the division depth is very small. It can be said that flat CU blocks do not need to be finely divided, enabling easy coding while still preserving image detail.
(3) From the aspect of directionality, texture information can be extracted from the CU block by using an edge detection method, and if there is an obvious texture in the horizontal or vertical direction, the partition mode most suitable for the current CU block is a partition mode with a large probability that the partition mode is consistent with the texture direction. The area D and the area E in fig. 5 are located at the boundary of the wall and have texture close to the horizontal direction, so that the sub-CU block has more horizontal division modes and larger corresponding variance values.
(4) From the viewpoint of difference, if a CU block is neither flat nor has an obvious direction, it is indicated that the CU block contains rich texture information, in which case, division is generally selected, so that the final division result is finer and more suitable for the texture distribution of the CU block, and direct selection without division is not beneficial to retaining image details. Region F and region G in fig. 5, containing complex textures of the player's head and back on the jersey, respectively, the CU block is finally divided into larger depths, with a variance that is directly an order of magnitude higher, with a large order of magnitude variance indicating the direction for the coding-it is not wise to choose this simple way of processing without dividing.
The above analysis shows different characteristics of different types of CU blocks when the partition mode is selected. Therefore, in steps S1-S8, the Scharr operator is used to extract the flatness and edge information of the CU, different partition mode decision algorithms can be designed from three angles of flatness, directionality and difference, and partition modes are effectively pruned.
Besides, by analyzing the association between the CU block partitioning and the size of the CU block, the Quantization step size (QP) and the texture complexity, it is found that the large-sized CUs are less in number and more prone to partitioning, so as to retain most of the texture details, and if too many partitioning modes are avoided for the large-sized CUs, large distortion is caused; the number of small-sized CUs is considerable, but there is a greater tendency not to partition, the depth of small-sized CUs is generally larger, and the limitation of the depth by AVS3 itself makes it possible to try a smaller number of partition modes, which negatively affects the complexity if they are subjected to a block partitioning fast algorithm for many times. Therefore, the CU block division fast algorithm should compromise the selection algorithm parameters in consideration of the influence of the CU size on the pruning efficiency.
In the present embodiment, steps S1-S8 are executed, and the quantization step QP is set to 45 to divide the City sequence, and the result is shown in fig. 6; steps S1-S8 are executed, and the City sequence is divided by setting the quantization step QP 27, and the result is shown in fig. 7, so that it can be seen that the quantization step QP is an important influence factor of the final division result. Specifically, the smaller the quantization step QP is, the finer the division result is, and the number of CU blocks obtained by division increases rapidly, and if the same strategy is used for different quantization step QPs, the accuracy of the pruning algorithm is greatly affected.
In the present embodiment, the influence of the quantization step QP is taken into consideration when performing steps S1-S8. Specifically, the quantization step QP and the coefficient values α, γ, μ, and β may be set before step S3 is executed. The first threshold value Th1 is calculated by formula Th1 ═ α × QP, the second threshold value Th2 is calculated by formula Th2 ═ γ × QP, the third threshold value Th3 is calculated by formula Th3 ═ μ × QP, and the fourth threshold value Th4 is calculated by formula Th4 ═ QP/β.
Experiments have shown that a good partitioning effect can be achieved with α of 7, γ of 25, μ of 700 and β of 25.
After the first threshold Th1, the second threshold Th2, the third threshold Th3, and the fourth threshold Th4 are calculated by the quantization step QP, step S3 and other steps may be performed.
In this embodiment, the first threshold Th1 may be adaptively adjusted according to the pruning effect. Specifically, the value of the coefficient α may be adjusted after the optimal partition pattern is selected from the candidate partition patterns after step S7 is executed, so that the adjusted first threshold Th1 can be calculated from the adjusted value of α when the CU block is next divided.
Specifically, it may be determined that "the variance Var is smaller than the first threshold Th1, or the horizontal gradient G is smaller than" the variance Var is smaller than "the first threshold Th 1" after the step S7 is performed x And a vertical gradient G y Whether the conditions are smaller than the second threshold Th2 ″ is satisfied, which is the condition for determining whether the CU block to be divided is flat in step S3. If "the variance Var is smaller than the first threshold Th1, or the horizontal gradient G x And a vertical gradient G y If the conditions that the values are smaller than the second threshold value Th2 ″ are satisfied, indicating that the CU block to be divided belongs to a flat block, the coefficient value α is adjusted so that the first threshold value Th1 calculated when the steps S1 to S8 are executed again is larger; if "the variance Var is smaller than the first threshold Th1, or the horizontal gradient G x And a vertical gradient G y The conditions that both are smaller than the second threshold Th2 ″ are not satisfied, indicating that the CU block to be divided belongs to a complex block, the coefficient value α is adjusted so that the first threshold Th1 calculated when steps S1-S8 are executed again is smaller.
Specifically, each time the coefficient value α is increased by 0.1, each time the coefficient value α is decreased by 0.05, the adjustment range of the coefficient value α is limited to [6.75,7.25 ].
The principle of the adaptive adjustment of the first threshold Th1 is as follows: flat blocks tend to be adjacent, and if the current CU block is already a flat block, the next encoded CU block is likely to be a flat block as well, the threshold is adjusted up to increase the likelihood of skipping the partition. If the current CU block is a complex block, the next coded CU block is likely to be a complex block as well, the threshold is turned down to increase the likelihood of skipping the non-partition.
In this embodiment, by adjusting the first threshold Th1, it is possible to realize adaptive adjustment according to the pruning effect, thereby avoiding an online training process, and also realizing a self-learning process in the case of performing the CU block partitioning method based on AVS3 texture information in this embodiment offline.
The invention can be implemented on the reference software HPM10.0 of AVS3, with HPM10.0 as the reference set of algorithms. The invention is configured according to the universal test conditions issued by AVS3, and the universal test sequences are tested in an All Intra (AI) mode, including class A, class B and class C, and the quantization parameters QP are 27, 32, 38 and 45. Objective metrics commonly used in video compression are BD-PSNR, which characterizes video image quality, and BD-Rate, which characterizes bitrate level. When the BD-Rate is a negative value, the code Rate is reduced and the performance is improved under the same PSNR condition; a positive value indicates that the code rate is increased and the performance is reduced. The invention mainly faces to a CU block division fast algorithm, so the quality is measured by Time Saving (TS) and BD-Rate. Wherein, the Time saving rate TS can be calculated by the following formula prop The coding Time, consumed by the algorithm proposed by the present invention base For the coding Time consumed by the reference software HPM10.0 in AVS3, the object of the invention is to determine the Time base Basically reduces the Time as much as possible under the condition of limitation of AVS3 standard and hardware prop The time saving rate TS is improved.
Figure BDA0003558029410000091
The experimental results of the present invention are shown in table 1. It can be seen that the invention saves 26.07% of time and the normalized coding time saving Rate exceeds 66% in the case of only bringing about a BD-Rate rise of 0.47%, which means that if the BD-Rate rises by 1%, 66% of coding time can be saved on average overall, and the fast CU block partitioning algorithm based on the AVS3 texture information enables the encoder of AVS3 to obtain significant performance improvement. From experimental data, it can be known that there is a certain effect difference between different sequences, the normalized time saving Rate is distributed between 31 and 140, generally, the coding time saved by the sequences with little BD-Rate rise is also less, generally, the sequences fluctuate around the average value, and the normalized time saving Rate of Crew is the lowest, as low as 31. The main reason for this phenomenon is that the textures of different video sequences are different, the Crew sequence itself has a large piece of solid background, the number of CU blocks which are selected not to be divided is large, the algorithm in the present invention evaluates these CU blocks as well, but since the division modes which can be skipped by itself are limited, only BD-Rate is added in the end, and a small portion of acceptable errors are introduced.
Table 1 CU block partitioning fast algorithm results based on AVS3 texture information
Figure BDA0003558029410000092
Figure BDA0003558029410000101
In table 1, the first frame division result for the Crew sequence is shown in fig. 8.
In summary, it can be concluded that the CU block division method based on the AVS3 texture information in this embodiment has the following characteristics:
1. accelerating the AVS3 encoder by texture detection on the basis of the AVS 3;
2. texture information is extracted based on the variance and the Scharr operator, the CU is divided into three categories according to flatness, directivity and difference, the low-complexity variance is used for analyzing a division mode pruning strategy of a flat block and a complex block, the rapid division of the CU block is realized, the speed of an AVS3 encoder is improved, the Scharr operator is used for considering both fine texture and texture direction, and the algorithm is balanced between the encoding speed and the encoding quality;
3. the threshold required by the on-line training pruning algorithm is avoided, and a method for automatically adjusting the threshold according to the pruning algorithm is adopted, so that redundant time consumption is avoided, additional training time is avoided, and self-adaptive adjustment can be realized;
4. the method has the advantages that a complex texture detection algorithm is not needed, the complexity is low, the implementation method is reasonable, the unsuitable division modes are directly eliminated, the process of carrying out Rate distortion cost calculation on the division modes with low selection possibility is avoided, the accuracy of the pruning algorithm is high, the division modes to be skipped are judged in advance and basically are unlikely to be selected as the optimal division modes, and the BD-Rate surge is avoided.
The same technical effects as those of the CU block division method based on the AVS3 texture information in the embodiment can be achieved by writing a computer program that executes the CU block division method based on the AVS3 texture information in the embodiment, writing the computer program into a computer device or a storage medium, and executing the CU block division method based on the AVS3 texture information in the embodiment when the computer program is read out and run.
It should be noted that, unless otherwise specified, when a feature is referred to as being "fixed" or "connected" to another feature, it can be directly fixed or connected to the other feature or indirectly fixed or connected to the other feature. Furthermore, the descriptions of upper, lower, left, right, etc. used in the present disclosure are only relative to the mutual positional relationship of the constituent parts of the present disclosure in the drawings. As used in this disclosure, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. In addition, unless defined otherwise, all technical and scientific terms used in this example have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the description of the embodiments herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this embodiment, the term "and/or" includes any combination of one or more of the associated listed items.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element of the same type from another. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, without departing from the scope of the present disclosure. The use of any and all examples, or exemplary language ("e.g.," such as "or the like") provided with this embodiment is intended merely to better illuminate embodiments of the invention and does not pose a limitation on the scope of the invention unless otherwise claimed.
It should be recognized that embodiments of the present invention can be realized and implemented by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer readable memory. The methods may be implemented in a computer program using standard programming techniques, including a non-transitory computer-readable storage medium configured with the computer program, where the storage medium so configured causes a computer to operate in a specific and predefined manner, according to the methods and figures described in the detailed description. Each program may be implemented in a high level procedural or object oriented programming language to communicate with a computer system. However, the program(s) can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language. Furthermore, the program can be run on a programmed application specific integrated circuit for this purpose.
Further, operations of processes described in this embodiment can be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described in this embodiment (or variations and/or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) collectively executed on one or more processors, by hardware, or combinations thereof. The computer program includes a plurality of instructions executable by one or more processors.
Further, the method may be implemented in any type of computing platform operatively connected to a suitable interface, including but not limited to a personal computer, mini computer, mainframe, workstation, networked or distributed computing environment, separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, and the like. Aspects of the invention may be embodied in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, optically read and/or write storage medium, RAM, ROM, or the like, such that it may be read by a programmable computer, which when read by the storage medium or device, is operative to configure and operate the computer to perform the procedures described herein. Further, the machine-readable code, or portions thereof, may be transmitted over a wired or wireless network. The invention described in this embodiment includes these and other different types of non-transitory computer-readable storage media when such media include instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor. The invention also includes the computer itself when programmed according to the methods and techniques described herein.
A computer program can be applied to input data to perform the functions described in the present embodiment to convert the input data to generate output data that is stored to a non-volatile memory. The output information may also be applied to one or more output devices, such as a display. In a preferred embodiment of the invention, the transformed data represents physical and tangible objects, including particular visual depictions of physical and tangible objects produced on a display.
The above description is only a preferred embodiment of the present invention, and the present invention is not limited to the above embodiment, and any modifications, equivalent substitutions, improvements, etc. within the spirit and principle of the present invention should be included in the protection scope of the present invention as long as the technical effects of the present invention are achieved by the same means. The invention is capable of other modifications and variations in its technical solution and/or its implementation, within the scope of protection of the invention.

Claims (10)

1. A CU block division method based on AVS3 texture information, wherein the CU block division method based on AVS3 texture information comprises the following steps:
acquiring the variance, the horizontal gradient and the vertical gradient of a CU block to be divided;
determining a first gradient ratio and a second gradient ratio according to the horizontal gradient and the vertical gradient; the first gradient ratio is a ratio of the horizontal gradient to the vertical gradient, and the second gradient ratio is a ratio of the vertical gradient to the horizontal gradient;
when the variance is smaller than a first threshold value, or the horizontal gradient and the vertical gradient are both smaller than a second threshold value, selecting a non-division mode as an optimal division mode; otherwise, comparing the variance with a third threshold value;
when the variance is larger than the third threshold, skipping a non-division mode; otherwise, comparing the first gradient ratio with a fourth threshold value;
skipping a horizontal division mode when the first gradient ratio is greater than the fourth threshold; otherwise, comparing the second gradient ratio with a fourth threshold value;
skipping a vertical division mode when the second gradient ratio is greater than the fourth threshold;
selecting an optimal partitioning mode from the candidate partitioning modes; the candidate partition modes include other partition modes than the skipped partition mode;
and dividing the CU blocks to be divided in the optimal division mode.
2. The AVS3 texture information-based CU block partitioning method of claim 1, wherein the selecting an optimal partitioning mode from the candidate partitioning modes comprises:
respectively calculating rate-distortion costs for each of the candidate partition modes;
and taking the division mode with the minimum corresponding rate distortion cost as the optimal division mode.
3. The AVS3 texture information-based CU block division method of claim 1, wherein the AVS3 texture information-based CU block division method further comprises:
setting a quantization step QP;
setting coefficient values α, γ, μ, and β;
calculating the first threshold Th1 by the formula Th1 ═ α × QP;
calculating the second threshold Th2 by the formula Th2 ═ γ × QP;
calculating the third threshold Th3 by the formula Th3 ═ μ × QP;
the fourth threshold Th4 is calculated by the formula Th 4-QP/β.
4. The AVS3 texture information-based CU block division method of claim 3, wherein the AVS3 texture information-based CU block division method further comprises:
the first threshold is also adjusted after the selecting of the optimal partitioning mode from the candidate partitioning modes.
5. The AVS3 texture information-based CU block division method of claim 4, wherein the adjusting the first threshold comprises:
when the variance is smaller than a first threshold value, or the horizontal gradient and the vertical gradient are both smaller than a second threshold value, adjusting the coefficient value alpha; otherwise, the coefficient value alpha is reduced.
6. The AVS3 texture information-based CU block division method according to any one of claims 1-5, wherein the obtaining the variance, the horizontal gradient and the vertical gradient of the CU block to be divided comprises:
by the formula
Figure FDA0003558029400000021
Calculating the variance Var; wherein M is the number of pixels in the horizontal direction of the CU block to be divided, N is the number of pixels in the vertical direction of the CU block to be divided, and I (I, j) is the pixel value at the coordinate point (I, j) of the CU block to be divided,
Figure FDA0003558029400000022
is the average pixel value of the CU block to be divided.
7. The AVS3 texture information-based CU block division method according to any one of claims 1-5, wherein the obtaining the variance, the horizontal gradient and the vertical gradient of the CU block to be divided comprises:
by the formula
Figure FDA0003558029400000023
And
Figure FDA0003558029400000024
calculating the horizontal gradient G x (ii) a Wherein M is the number of pixels in the horizontal direction of the CU block to be divided, N is the number of pixels in the vertical direction of the CU block to be divided, and P is a 3 × 3 luminance value matrix centered on a coordinate point (i, j) in the CU block to be divided.
8. The AVS3 texture information-based CU block division method according to any one of claims 1-5, wherein the obtaining the variance, the horizontal gradient and the vertical gradient of the CU block to be divided comprises:
by the formula
Figure FDA0003558029400000025
And
Figure FDA0003558029400000026
calculating the vertical gradient G y (ii) a Wherein M is the number of pixels in the horizontal direction of the CU block to be divided, N is the number of pixels in the vertical direction of the CU block to be divided, and P is a 3 × 3 luminance value matrix centered on a coordinate point (, j) in the CU block to be divided.
9. A computer apparatus comprising a memory for storing at least one program and a processor for loading the at least one program to perform the AVS3 texture information-based CU block partitioning method of any one of claims 1-8.
10. A storage medium having stored therein a processor-executable program, wherein the processor-executable program, when executed by a processor, is configured to perform the AVS3 texture information-based CU block partitioning method of any one of claims 1-8.
CN202210281645.1A 2022-03-22 2022-03-22 CU block division method, device and medium based on AVS3 texture information Pending CN114827603A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210281645.1A CN114827603A (en) 2022-03-22 2022-03-22 CU block division method, device and medium based on AVS3 texture information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210281645.1A CN114827603A (en) 2022-03-22 2022-03-22 CU block division method, device and medium based on AVS3 texture information

Publications (1)

Publication Number Publication Date
CN114827603A true CN114827603A (en) 2022-07-29

Family

ID=82531900

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210281645.1A Pending CN114827603A (en) 2022-03-22 2022-03-22 CU block division method, device and medium based on AVS3 texture information

Country Status (1)

Country Link
CN (1) CN114827603A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116033172A (en) * 2022-12-18 2023-04-28 重庆邮电大学 VVC intra-frame rapid coding method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116033172A (en) * 2022-12-18 2023-04-28 重庆邮电大学 VVC intra-frame rapid coding method
CN116033172B (en) * 2022-12-18 2024-01-05 北京盛大博通文化发展有限公司 VVC intra-frame rapid coding method

Similar Documents

Publication Publication Date Title
EP3758375A1 (en) Method and apparatus for image coding, electronic device and computer-readable storage medium
CN108184115B (en) HEVC intra-frame CU partition and PU prediction mode selection method and system
CN109068142B (en) 360-degree video intra-frame prediction rapid decision-making method, device, coder-decoder and medium
CA2664668A1 (en) Intra prediction encoding control method and apparatus, program therefor, and storage medium which stores the program
CN108063944B (en) Perception code rate control method based on visual saliency
US20120039389A1 (en) Distortion weighing
US11336915B2 (en) Global motion vector video encoding systems and methods
CN111988611A (en) Method for determining quantization offset information, image coding method, image coding device and electronic equipment
US10123021B2 (en) Image encoding apparatus for determining quantization parameter, image encoding method, and program
CN111429497B (en) Self-adaptive CU splitting decision method based on deep learning and multi-feature fusion
WO2020180449A1 (en) Method and device for picture encoding and decoding
CN108353175A (en) The method and apparatus of prediction processing vision signal caused by coefficient of utilization
CN114827603A (en) CU block division method, device and medium based on AVS3 texture information
CN112291562A (en) Fast CU partition and intra mode decision method for H.266/VVC
CN112929657B (en) H.266/VVC rapid CU partition decision method based on gradient and variance
CN114666592A (en) CU block division method, device and medium based on AVS3 encoding history information
CN111246218B (en) CU segmentation prediction and mode decision texture coding method based on JND model
CN114827606A (en) Quick decision-making method for coding unit division
WO2019120255A1 (en) Motion vector selection method and apparatus, electronic device, and medium
CN107547895B (en) Image processing method and device
CN104995917A (en) Self-adaption motion estimation method and module thereof
KR101630167B1 (en) Fast Intra Prediction Mode Decision in HEVC
JP6239838B2 (en) Moving picture encoding apparatus, control method thereof, and imaging apparatus
CN110958454B (en) Intra-frame prediction method, system and computer readable storage medium
Tang et al. Optimization of CU Partition Based on Texture Degree in H. 266/VVC

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination