An Intra mode selection method for skipping large-size CU

By skipping the Intra mode selection method of large-size CUs, the encoding process of the VVC encoder is optimized, solving the problem of long encoding time caused by the large amount of calculation of Intra mode selection in the existing technology, and achieving a significant improvement in encoding speed.

CN114245135BActive Publication Date: 2024-09-24HANGZHOU ARCVIDEO TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111610303.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2024-09-24
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

When the VVC encoder in the prior art encodes I frames, the Intra mode selection requires a large amount of calculation, resulting in too long encoding time, which is unacceptable especially in real-time encoding scenarios.

Method used

An Intra mode selection method that skips large-size CUs is adopted. By judging the height and width, Qp value and variance value of the CU, unnecessary prediction calculations are reduced, and multi-directional prediction and mode are only performed on CUs that meet specific conditions. Choose to optimize the coding process.

Benefits of technology

Without losing encoding quality, the encoding speed of I frames is significantly accelerated. The encoding time of I frames in the VVC encoder is saved by about 15%, especially at medium and high bit rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114245135B
    Figure CN114245135B
Patent Text Reader

Abstract

The present invention relates to video processing technology, and discloses an Intra mode selection method for skipping a large-size CU. The Intra mode selection method for skipping a large-size CU is applied to the I frame of a VVC encoder, and the method performs fast Intra mode selection and division type selection for a CU with a height or width greater than 32. The present invention speeds up the encoding speed of the I frame without losing the encoding quality. Under the condition of medium and high bit rate encoding, the present invention saves about 15% of the encoding time of the I frame in the VVC encoder without reducing the compression efficiency. At the same time, under low bit rate encoding, the encoding time of the I frame in the VVC encoder is saved by about 5%.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to video processing technology, and in particular to an Intra mode selection method for skipping a large-size CU in an I frame of a VVC encoder. Background Art

[0002] In the latest video compression standard VVC published by the MPEG organization in 2020, in order to improve compression efficiency, it supports multiple division modes, increasing from one in HEVC to five. However, it also causes encoding a block with a width of 128 and a height of 128 to require traversing millions of CU coding units, and the Intra mode intra-frame coding mode has increased to 67 modes, which seriously increases the encoding time. It takes several minutes to encode an I frame with a width of 1920 and a height of 1080. This is unacceptable for real-time encoding scenarios, such as recording systems.

[0003] For example, in the prior art, the patent application number is: CN201711481714.9; the patent name is, HEVC intra-frame CU division and PU prediction mode selection method and system. Its calculation of histogram, obtaining texture intensity and complexity requires additional calculation, and the calculation amount for large CU CU coding units is large. Summary of the invention

[0004] Aiming at the problem of large computational complexity and long encoding time in the Intra mode selection in the prior art, the present invention provides an Intra mode selection method and system for skipping large-size CUs.

[0005] In order to solve the above technical problems, the present invention is solved by the following technical solutions:

[0006] A method for selecting an Intra mode for skipping a large-size CU is applied to an I frame of a VVC encoder, and the method includes:

[0007] S1, judge the height or width of CU, if the height or width is greater than 64, execute S3, otherwise execute S2;

[0008] S2, judging the height or width of the CU, if the height or width is greater than 32 and Qp is less than the first Qp threshold, then executing S3, otherwise executing S6;

[0009] S3, calculate the variance value Var between CU pixels; and judge the variance value, when Var is less than the variance threshold VarThr; execute S4, otherwise execute S11;

[0010] S4, predict the CU in at least three directions, and determine the sad value of each direction according to the predicted value of each direction and each pixel value, put the sad value of each direction into a Sad list, and determine the minimum predicted value Minsad1;

[0011] S5, judging the minimum value Minsad1, when the minimum value Minsad1 is less than the first threshold Sad64Thr, executing S12, otherwise executing S11;

[0012] S6, judging the height or width of the CU, if the height or width is greater than 32, executing S7, otherwise executing S12;

[0013] S7, predict the CU in at least three directions, and determine the sad value of each direction according to the predicted value of each direction and each pixel value, put the sad value of each direction into a Sad list, and determine the minimum predicted value as Minsad2;

[0014] S8, judging the minimum value Minsad2, when the minimum value Minsad2 is less than the second threshold Sad32Thr, executing S9, otherwise executing S11;

[0015] S9, judging the current Qp value, if the Qp value is less than the second Qp threshold, executing S10, otherwise executing S14;

[0016] S10, perform Planar mode prediction on the CU, and calculate the Sad value PlanarSad of the predicted value in the Planar mode and the CU pixel value, put PlanarSad into the Sad list, and find the minimum value MinSad3; if MinSad3 is less than the third threshold Sad32Thr2, jump to S14; otherwise, execute S11;

[0017] S11, the CU is divided into QT mode only, and the Intra mode selection of the CU ends;

[0018] S12, perform other Intra mode prediction on the CU, calculate the predicted value under the prediction mode and the Sad of the CU pixel value, and put the predicted value into the Sad list;

[0019] S13, determine whether there is an Intra mode that has not been predicted, if yes, jump to S12; otherwise, execute S14;

[0020] S14. Arrange all Sad values ​​in the Sad list from small to large, take the first N Intra modes, select the best Intra mode as the mode selection result of this CU, and the CU will have multiple sub-CU division modes specified by the standard to complete the Intra mode selection of the entire CU.

[0021] Preferably, S3, calculating the variance value Var between CU pixels, and calculating the variance value by formula 1;

[0022]

[0023] In the formula, i is the number of pixels; n is the total pixel value, x is i is the i-th pixel value.

[0024] Preferably, S4, predicting the CU in at least three directions, the three directions are respectively DC mode, vertical mode and horizontal mode prediction, and calculating the sad value DCsad1 of the DC mode, the sad value Horsad1 of the vertical mode and the sad value Versad1 of the horizontal mode by a formula;

[0025]

[0026]

[0027]

[0028] Among them, Hvalue i is the predicted value of the i-th vertical mode, Vvalue i is the predicted value of the i-th horizontal mode, DCvalue i is the predicted value of the ith DC mode, x i is the pixel value of the i-th CU

[0029] Preferably, S7, performing at least three-directional prediction on the CU, calculating a second prediction value DCsad2 in the DC mode, a second prediction value Horsad2 in the vertical mode, and a second prediction value Versad2 in the horizontal mode;

[0030]

[0031]

[0032]

[0033] Preferably, the variance threshold VarThr, the first threshold Sad64Thr, the second threshold Sad32Thr and the third threshold Sad32Thr2 are determined according to the value of Qp.

[0034] Preferably, the first Qp threshold is 10; the second Qp threshold is 40.

[0035] In order to solve the above technical problems, the present invention also provides an electronic device, comprising: at least one processor and a memory; the memory stores computer execution instructions; the at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the Intra mode selection method for skipping a large-size CU.

[0036] In order to solve the above technical problems, the present invention also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the Intra mode selection method for skipping a large-size CU is implemented.

[0037] The present invention has significant technical effects due to the adoption of the above technical solution:

[0038] 1. The present invention accelerates the encoding speed of I frame without losing the encoding quality.

[0039] 2. Under the condition of medium and high bit rate encoding, the present invention saves about 15% of the encoding time of I frame in the VVC encoder without reducing the compression efficiency. At the same time, under the condition of low bit rate encoding, the encoding time of I frame in the VVC encoder is saved by about 5%. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 This is a flow chart of Example 1 of the present invention.

[0041] Figure 2 It is a flow chart of the present invention.

[0042] Figure 3 This is a flow chart of Embodiment 2 of the present invention.

[0043] in:

[0044] CU is a coding unit;

[0045] I frame: Intra-coded picture frame;

[0046] Intra: intra-frame coding;

[0047] VVC: Versatile Video Coding, universal video coding. DETAILED DESCRIPTION

[0048] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0049] Example 1

[0050] The Intra mode selection method in the prior art includes:

[0051] Step 1, Intra mode selection of a CU in an I frame starts;

[0052] Step 2: Make a prediction for the current Intra mode.

[0053] Step 3, calculate the Sad of the difference between the predicted value and the pixel value of the current CU, and put it into a Sad list; all Intra modes are completed, and if completed, execute step 4, otherwise return to step 2;

[0054] Step 4: Arrange all the values ​​in the Sad list from small to large. Take the first N Intra modes and use a more accurate method with more calculations to select an optimal Intra mode as the mode selection result of this CU. This CU has multiple sub-CU division modes specified by the standard. The Intra mode selection of a CU in the I frame is completed.

[0055] Example 2

[0056] The difference from Embodiment 1 is that this embodiment provides an Intra mode selection method for skipping a large-size CU, which is applied to an I frame of a VVC encoder, and the method includes:

[0057] S1, judge the height or width of CU, if the height or width is greater than 64, execute S3, otherwise execute S2;

[0058] S2, judging the height or width of the CU, if the height or width is greater than 32 and Qp is less than the first Qp threshold, then executing S3, otherwise executing S6;

[0059] S3, calculate the variance value Var between CU pixels; and judge the variance value, when Var is less than the variance threshold VarThr; execute S4, otherwise execute S11;

[0060] S4, predict the CU in at least three directions, and determine the sad value of each direction according to the predicted value of each direction and each pixel value, put the sad value of each direction into a Sad list, and determine the minimum predicted value Minsad1;

[0061] S5, judging the minimum value Minsad1, when the minimum value Minsad1 is less than the first threshold Sad64Thr, executing S12, otherwise executing S11;

[0062] S6, judging the height or width of the CU, if the height or width is greater than 32, executing S7, otherwise executing S12;

[0063] S7, predict the CU in at least three directions, and determine the sad value of each direction according to the predicted value of each direction and each pixel value, put the sad value of each direction into a Sad list, and determine the minimum predicted value as Minsad2;

[0064] S8, judging the minimum value Minsad2, when the minimum value Minsad2 is less than the second threshold Sad32Thr, executing S9, otherwise executing S11;

[0065] S9, judging the current Qp value, if the Qp value is less than the second Qp threshold, executing S10, otherwise executing S14;

[0066] S10, perform Planar mode prediction on the CU, and calculate the Sad value PlanarSad of the predicted value in the Planar mode and the CU pixel value, put PlanarSad into the Sad list, and find the minimum value MinSad3; if MinSad3 is less than the third threshold Sad32Thr2, jump to S14; otherwise, execute S11;

[0067] S11, the CU is divided into QT mode only, and the Intra mode selection of the CU ends;

[0068] S12, perform other Intra mode prediction on the CU, calculate the predicted value under the prediction mode and the Sad of the CU pixel value, and put the predicted value into the Sad list;

[0069] S13, determine whether there is an Intra mode that has not been predicted, if yes, jump to S12; otherwise, execute S14;

[0070] S14. Arrange all Sad values ​​in the Sad list from small to large, take the first N Intra modes, select the best Intra mode as the mode selection result of this CU, and the CU will have multiple sub-CU division modes specified by the standard to complete the Intra mode selection of the entire CU.

[0071] S3, calculating the variance value Var between CU pixels, and calculating the variance value by formula 1;

[0072]

[0073] In the formula, i is the number of pixels; n is the total pixel value, x is i is the i-th pixel value.

[0074] S4, predict the CU in three directions, namely DC mode, vertical mode and horizontal mode, and calculate the sad value DCsad1 of the DC mode, the sad value Horsad1 of the vertical mode and the sad value Versad1 of the horizontal mode by the formula;

[0075]

[0076]

[0077]

[0078] Where i is a positive integer, ranging from 1 to n; Hvalue i is the predicted value of the i-th vertical mode, Vvalue i is the predicted value of the i-th horizontal mode, DCvalue i is the predicted value of the ith DC mode, x i is the pixel value of the i-th CU

[0079] S7, perform three-directional prediction on the CU, and calculate the second prediction value DCsad2 of the DC mode, the second prediction value Horsad2 of the vertical mode, and the second prediction value Versad2 of the horizontal mode;

[0080]

[0081]

[0082]

[0083] The variance threshold VarThr, the first threshold Sad64Thr, the second threshold Sad32Thr, and the third threshold Sad32Thr2 are determined according to the value of Qp.

[0084] The first Qp threshold is 10; the second Qp threshold is 40.

[0085] The Intra mode selection performed by this embodiment has a small amount of calculation and fast encoding.

[0086] Example 3

[0087] Based on Example 2, the difference from Example 2 is that this embodiment replaces the vertical mode prediction with any direction prediction adjacent to the vertical, such as Intra_ANGULAR49 or NTRA_ANGULAR51; and replaces the horizontal mode prediction with any direction prediction adjacent to the horizontal, such as NTRA_ANGULAR17 or NTRA_ANGULAR19.

[0088] Example 4

[0089] Based on the above embodiments, this embodiment also provides an electronic device, which includes: at least one processor and a memory; the memory stores computer execution instructions; the at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the Intra mode selection method for skipping a large-size CU.

[0090] Example 5

[0091] Based on the above embodiment, this embodiment further provides a computer-readable storage medium, in which computer-executable instructions are stored. When the processor executes the computer-executable instructions, the Intra mode selection method for skipping a large-size CU is implemented.

Claims

1. A method for selecting an Intra mode for skipping a large-size CU, applied to an I frame of a VVC encoder, comprising: S1, judge the height or width of CU, if the height or width is greater than 64, execute S3, otherwise execute S2; S2, judging the height or width of the CU, if the height or width is greater than 32 and Qp is less than the first Qp threshold, then executing S3, otherwise executing S6; S3, calculate the variance value Var between CU pixels; and judge the variance value, when Var is less than the variance threshold VarThr; execute S4, otherwise execute S11; S4, predict the CU in at least three directions, and determine the sad value of each direction according to the predicted value of each direction and each pixel value, put the sad value of each direction into a Sad list, and determine the minimum predicted value Minsad1; S5, judging the minimum value Minsad1, when the minimum value Minsad1 is less than the first threshold Sad64Thr, executing S12, otherwise executing S11; S6, judging the height or width of the CU, if the height or width is greater than 32, executing S7, otherwise executing S12; S7, predict the CU in at least three directions, and determine the sad value of each direction according to the predicted value of each direction and each pixel value, put the sad value of each direction into a Sad list, and determine the minimum predicted value Minsad2; S8, judging the minimum value Minsad2, when the minimum value Minsad2 is less than the second threshold Sad32Thr, executing S9, otherwise executing S11; S9, judging the current Qp value, if the Qp value is less than the second Qp threshold, executing S10, otherwise executing S14; S10, perform Planar mode prediction on the CU, and calculate the Sad value PlanarSad of the predicted value in the Planar mode and the CU pixel value, put PlanarSad into the Sad list, and find the minimum value MinSad3; if MinSad3 is less than the third threshold Sad32Thr2, jump to S14; otherwise, execute S11; S11, the CU is divided into QT mode only, and the Intra mode selection of the CU ends; S12, perform other Intra mode prediction on the CU, calculate the predicted value under the prediction mode and the Sad of the CU pixel value, and put the predicted value into the Sad list; S13, determine whether there is an Intra mode that has not been predicted, if yes, jump to S12; otherwise, execute S14; S14. Arrange all Sad values ​​in the Sad list from small to large, take the first N Intra modes, select the best Intra mode as the mode selection result of this CU, and the CU will have multiple sub-CU division modes specified by the standard to complete the Intra mode selection of the entire CU.

2. The Intra mode selection method for skipping a large-size CU according to claim 1, characterized in that: S3, calculating the variance value Var between CU pixels, and calculating the variance value by formula 1; In the formula, i is the number of pixels; n is the total pixel value, x is i is the i-th pixel value.

3. The method for selecting an Intra mode for skipping a large-size CU according to claim 1, characterized in that: S4, predict the CU in at least three directions, the three directions are DC mode, vertical mode and horizontal mode prediction, and calculate the sad value DCsad1 of the DC mode, the sad value Horsad1 of the vertical mode and the sad value Versad1 of the horizontal mode by a formula; Where i is a positive integer, ranging from 1 to n; Hvalue i is the predicted value of the i-th vertical mode, Vvalue i is the predicted value of the i-th horizontal mode, DCvalue i is the predicted value of the ith DC mode, x i is the pixel value of the i-th CU.

4. The method for selecting an Intra mode for skipping a large-size CU according to claim 1, characterized in that: S7, perform at least three-directional prediction on the CU, and calculate a second prediction value DCsad2 in the DC mode, a second prediction value Horsad2 in the vertical mode, and a second prediction value Versad2 in the horizontal mode; 。 5. The method for selecting an Intra mode for skipping a large-size CU according to claim 1, characterized in that: The variance threshold VarThr, the first threshold Sad64Thr, the second threshold Sad32Thr, and the third threshold Sad32Thr2 are determined according to the value of Qp.

6. The method for selecting an Intra mode for skipping a large-size CU according to claim 1, characterized in that: The first Qp threshold is 10; the second Qp threshold is 40.

7. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes an Intra mode selection method for skipping a large-size CU as described in any one of claims 1 to 6.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, an Intra mode selection method for skipping a large-size CU as described in any one of claims 1 to 6 is implemented.