AVS3 intra-frame block division method and related equipment

Through the greedy search algorithm, AVS3 intra-block partitioning is solved, and the problems of large computing volume and high hardware resource consumption in the prior art are solved, and more efficient coding time and hardware resource utilization are achieved.

CN116233419BActive Publication Date: 2025-08-08PENG CHENG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310189368.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-22
Publication Date
2025-08-08
Estimated Expiration
2043-02-22

AI Technical Summary

Technical Problem

The existing AVS3 intra prediction technology has a large amount of calculation, which leads to high resource consumption during hardware implementation and high difficulty in hardware design and scheduling.

Method used

The greedy search algorithm is used to divide the brightness block layer by layer from top to bottom, calculate the rate distortion cost of each layer of encoding unit, discard the non-optimal division method, and store the optimal results in the cache.

Benefits of technology

The calculation pipeline count is reduced by about three-quarters of the encoding time and about 95% of the rate distortion cost, saving hardware circuit area and simplifying hardware scheduling complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116233419B_ABST
    Figure CN116233419B_ABST
Patent Text Reader

Abstract

The present invention discloses an AVS3 intra-frame block division method and related equipment. The method includes: using a greedy search algorithm to divide the maximum coding unit in a video frame into luminance blocks layer by layer from top to bottom to obtain five-layer luminance block division results; calculating the rate-distortion cost of each coding unit in each layer of luminance block division results of the maximum coding unit under five luminance intra-frame prediction modes to obtain the optimal luminance intra-frame prediction mode for each coding unit; storing the reconstructed pixels of the final coding result corresponding to the fifth layer of luminance block division results in the maximum coding unit into the upper row buffer, and storing the reconstructed pixels of the coding results corresponding to the first four layers of luminance block division results into the left row buffer. The present invention obtains the optimal block division method and coding unit intra-frame prediction mode of the maximum coding unit in the video frame by using the intra-frame prediction technology of the greedy search algorithm, which greatly saves coding time and circuit area and simplifies hardware scheduling complexity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video coding technology, and in particular to an AVS3 intra-frame block division method, system, terminal and computer-readable storage medium. Background Art

[0002] AVS3 (Audio Video Coding Standard) is the third-generation audio and video coding standard independently developed by my country. The intra-frame prediction technology in the coding standard achieves the purpose of video compression by removing information redundancy within the video frame.

[0003] Existing intra-frame prediction techniques use a bottom-up, brute-force search approach to find the optimal block partitioning and intra-frame prediction mode for each coding unit (CU). The drawbacks of existing intra-frame prediction techniques include high computational complexity, resulting in high resource consumption during hardware implementation, and the recursive algorithm structure, which makes hardware design and scheduling difficult.

[0004] Therefore, the existing technology still needs to be improved and developed. Summary of the Invention

[0005] The main purpose of the present invention is to provide an AVS3 intra-frame block partitioning method, system, terminal and computer-readable storage medium, aiming to solve the problems in the prior art that the large computational complexity of the intra-frame prediction mode leads to large resource consumption during hardware implementation and its recursive algorithm structure leads to difficulty in hardware design and scheduling.

[0006] To achieve the above object, the present invention provides an AVS3 intra-frame block division method, the AVS3 intra-frame block division method comprising the following steps:

[0007] Obtaining a maximum coding unit in a video frame, and dividing the maximum coding unit into luminance blocks layer by layer from top to bottom using a greedy search algorithm to obtain a five-layer luminance block division result of the maximum coding unit;

[0008] Calculating the rate-distortion cost of each coding unit in the luma block division results of each layer of the maximum coding unit under five luma intra prediction modes, and obtaining the optimal luma intra prediction mode for each coding unit according to the rate-distortion cost;

[0009] The reconstructed pixels of the final coding result corresponding to the fifth layer of luminance block division results in the maximum coding unit are stored in the upper row cache, and the reconstructed pixels of the coding results corresponding to the first four layers of luminance block division results in the maximum coding unit are stored in the left row cache.

[0010] Optionally, the AVS3 intra-frame block division method, wherein the obtaining of the maximum coding unit in the video frame, and the use of a greedy search algorithm to perform layer-by-layer luminance block division on the maximum coding unit from top to bottom to obtain a five-layer luminance block division result of the maximum coding unit, further comprises:

[0011] Selecting five candidate luma intra prediction modes from the 33 standard luma intra prediction modes in AVS3 according to a coarse mode decision algorithm in AVS3;

[0012] The luma intra prediction mode is used for rate-distortion cost calculation of the maximum coding module partition and rate-distortion cost calculation of the best prediction mode of the coding unit.

[0013] Optionally, the AVS3 intra-frame block division method, wherein obtaining a maximum coding unit in a video frame, and dividing the maximum coding unit into luminance blocks layer by layer from top to bottom using a greedy search algorithm to obtain a five-layer luminance block division result of the maximum coding unit, specifically includes:

[0014] According to the greedy search algorithm, a latest mode decision circuit is established, wherein the latest mode decision circuit includes five brightness mode decisions and one chrominance mode decision;

[0015] Obtaining a maximum coding unit having a size of 64x64 within a video frame, inputting the maximum coding unit into the latest mode decision circuit, and performing luminance block division on a first layer of the maximum coding unit according to a first luminance mode decision made by the latest mode decision circuit;

[0016] Calculating each luminance block division method in the first layer according to a rate-distortion algorithm to obtain a rate-distortion cost corresponding to each luminance block division method in the first layer;

[0017] Selecting the luminance block division method with the minimum rate-distortion cost to divide the first layer, and obtaining a division result of the first layer and coding units obtained after the division of the first layer;

[0018] The luminance block division method with the minimum rate-distortion cost is the optimal division method for the current division layer;

[0019] Inputting the division result of the first layer into the next layer, and continuing to select the luminance block division method with the smallest rate-distortion cost for division until a division result of the fifth layer is obtained, and finally obtaining a five-layer luminance block division result of the maximum coding unit and multiple coding units obtained after the five-layer luminance block division of the maximum coding unit;

[0020] Among them, each brightness mode decision in the latest mode decision circuit corresponds to processing the brightness block division of each layer of the maximum coding unit.

[0021] Optionally, the AVS3 intra-frame block division method, wherein the division result of the first layer is input to the next layer, and the luminance block division method with the smallest rate-distortion cost is continuously selected for division until the division result of the fifth layer is obtained, specifically includes:

[0022] After selecting the luminance block division method with the minimum rate-distortion cost to divide the first layer, obtaining the optimal division method and the division result of the first layer, and discarding the non-optimal division method and the division result corresponding to the non-optimal division method;

[0023] The division result of the first layer is input into the next layer, and the luminance block division method with the smallest rate-distortion cost is continuously selected for division until the division result of the fifth layer is obtained, and the non-optimal division method in each layer and the division results corresponding to the non-optimal division method are discarded.

[0024] Optionally, the AVS3 intra block partitioning method, wherein the calculating the rate-distortion cost of each coding unit in the luma block partitioning results of each layer of the maximum coding unit under five luma intra prediction modes, and obtaining the optimal luma intra prediction mode for each coding unit according to the rate-distortion cost, specifically includes:

[0025] Obtaining multiple coding units obtained by optimally dividing each layer in the maximum coding unit, and inputting the multiple coding units into five luma intra prediction modes;

[0026] Calculate the rate-distortion cost of each coding unit in five luma intra prediction modes, and obtain the luma intra prediction mode with the minimum rate-distortion cost for the coding unit. The luma intra prediction mode with the minimum rate-distortion cost is the optimal luma intra prediction mode for the coding unit.

[0027] Optionally, the AVS3 intra-frame block division method, wherein the reconstructed pixels of the final coding result corresponding to the fifth-level luminance block division result in the maximum coding unit are stored in the upper row buffer, and the reconstructed pixels of the coding result corresponding to the first four-level luminance block division results in the maximum coding unit are stored in the left row buffer, specifically includes:

[0028] After the maximum coding unit passes through the latest mode decision circuit, a reconstructed pixel of the final coding result and a chroma optimal intra-frame prediction mode corresponding to the chroma mode decision are obtained, and the reconstructed pixel of the final coding result is the output value of the fifth-level circuit module in the latest mode decision circuit corresponding to the fifth-level luminance block division result in the maximum coding unit;

[0029] Storing the reconstructed pixels of the final encoding result in an upper row buffer for use in adjacent maximum coding units within the video frame for performing intra-frame mode decision calculation;

[0030] The first four stages of the circuit modules of the latest mode decision circuit are used to obtain the coding result of the current division layer of the maximum coding unit.

[0031] Optionally, the AVS3 intra-frame block division method, wherein the reconstructed pixels of the final coding result corresponding to the fifth-level luminance block division result in the maximum coding unit are stored in the upper row buffer, and the reconstructed pixels of the coding result corresponding to the first four-level luminance block division results in the maximum coding unit are stored in the left row buffer, further comprising:

[0032] If the width of the video frame is greater than five times the maximum coding unit, the first four stages in the latest mode decision circuit obtain reconstructed pixels of the final coding result.

[0033] Optionally, in the AVS3 intra-frame block division method, the circuit module is a processing module corresponding to each brightness mode decision in the latest mode decision circuit, which is used to obtain the encoding result of each layer after the maximum coding unit is divided.

[0034] Optionally, in the AVS3 intra-frame block division method, the luminance block division method includes: no division, quadtree division, horizontal binary tree division, vertical binary tree division, horizontal enhanced quadtree division and vertical enhanced quadtree division.

[0035] Optionally, the AVS3 intra-frame block partitioning method, wherein the rate-distortion algorithm includes: intra-frame prediction, row discrete cosine transform, column discrete cosine transform, quantization, inverse quantization, column inverse discrete cosine transform, row discrete cosine transform and bit rate estimation.

[0036] In addition, to achieve the above-mentioned object, the present invention further provides an AVS3 intra-frame block division system, wherein the AVS3 intra-frame block division system includes:

[0037] A maximum coding unit division module is used to obtain a maximum coding unit in a video frame, and use a greedy search algorithm to divide the maximum coding unit into luminance blocks layer by layer from top to bottom to obtain a five-layer luminance block division result of the maximum coding unit;

[0038] an optimal prediction mode acquisition module, configured to calculate the rate-distortion cost of each coding unit in the luma block division results of each layer of the maximum coding unit under five luma intra prediction modes, and obtain the optimal luma intra prediction mode for each coding unit according to the rate-distortion cost;

[0039] The coding result storage module is used to store the reconstructed pixels of the final coding result corresponding to the fifth layer of brightness block division results in the maximum coding unit into the upper side row cache, and to store the reconstructed pixels of the coding results corresponding to the first four layers of brightness block division results in the maximum coding unit into the left side row cache.

[0040] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and an AVS3 encoder chip stored on the memory and capable of running on the processor, and when the AVS3 encoder chip is executed by the processor, the steps of the AVS3 intra-frame block division method as described above are implemented.

[0041] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores an AVS3 encoder chip, and when the AVS3 encoder chip is executed by a processor, it implements the steps of the AVS3 intra-frame block division method as described above.

[0042] In the present invention, a maximum coding unit in a video frame is obtained, and a greedy search algorithm is used to divide the maximum coding unit into luminance blocks layer by layer from top to bottom to obtain five-layer luminance block division results of the maximum coding unit; the rate-distortion cost of each coding unit in each layer of luminance block division results of the maximum coding unit under five luminance intra-frame prediction modes is calculated, and the optimal luminance intra-frame prediction mode of each coding unit is obtained according to the rate-distortion cost; the reconstructed pixels of the final coding result corresponding to the fifth layer of luminance block division result in the maximum coding unit are stored in the upper row cache, and the reconstructed pixels of the coding results corresponding to the first four layers of luminance block division results in the maximum coding unit are stored in the left row cache. The present invention adopts an intra-frame prediction technology with a greedy search algorithm to obtain the optimal block division method of the largest coding unit in the video frame and the optimal intra-frame prediction mode of the coding unit, and discards the non-optimal block division method of the coding unit in each layer, saving a lot of calculations. For the software implementation of the intra-frame prediction technology, the present invention saves about three-quarters of the encoding time; for hardware implementation, the present invention saves about 95% of the number of pipelines for rate-distortion cost calculation, greatly saving circuit area and simplifying the complexity of hardware scheduling. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a flow chart of a preferred embodiment of the AVS3 intra-frame block division method of the present invention;

[0044] Figure 2 Schematic diagram of the maximum coding unit level pipeline structure in a preferred embodiment of the AVS3 intra-frame block partitioning method of the present invention;

[0045] Figure 32 is a schematic diagram of a greedy search technique for an intra-frame prediction algorithm in a preferred embodiment of the AVS3 intra-frame block partitioning method of the present invention;

[0046] Figure 4 This is a schematic diagram of the rate-distortion cost calculation pipeline structure and timing in a preferred embodiment of the AVS3 intra-frame block partitioning method of the present invention;

[0047] Figure 5 Schematic diagram of the design of internal and external line buffers of the largest coding unit in a preferred embodiment of the AVS3 intra-frame block partitioning method of the present invention;

[0048] Figure 6 1 is a structural diagram of a preferred embodiment of the AVS3 intra-frame block partitioning system of the present invention;

[0049] Figure 7 FIG. 4 is a structural diagram of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solutions and advantages of the present invention more clear and distinct, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0051] The AVS3 intra-frame block division method described in the preferred embodiment of the present invention is as follows: Figure 1 As shown, the AVS3 intra-frame block division method includes the following steps:

[0052] Step S10: Obtain a maximum coding unit in a video frame, and use a greedy search algorithm to divide the maximum coding unit into luminance blocks layer by layer from top to bottom to obtain a five-layer luminance block division result of the maximum coding unit.

[0053] The maximum coding unit is a rectangular pixel block within a video frame, also called a coding block, which is used to execute a predictive coding algorithm.

[0054] Among them, the intra-frame prediction technology in the AVS3 third-generation audio and video coding standard is a predictive coding technology performed on the current frame. It achieves the purpose of compressing the video by removing information redundancy within the video frame. The intra-frame prediction technology finds the optimal block division method for each maximum coding unit (LCU) and the optimal intra-frame prediction mode for each coding unit (CU) under the principle of minimizing the rate-distortion cost. The purpose of the intra-frame prediction technology is to find the block division method and prediction mode with the lowest rate-distortion cost for each coding unit.

[0055] The original intra-frame prediction technology adopts a bottom-up brute force search algorithm, while the present invention adopts a top-down greedy search algorithm to replace the original brute force search algorithm. The brute force search is a "bottom-up" full search technology, that is, for each maximum coding unit, it is necessary to calculate all possible block division methods and corresponding costs. The full search technology can obtain the optimal block division result, but the amount of calculation is huge. The "top-down" method adopted in the present invention corresponds to the greedy search technology. The greedy search technology starts from the maximum coding unit and only calculates the rate-distortion cost of block division when the maximum coding unit is divided down one layer. According to the rate-distortion cost calculation result, the non-optimal block division method is discarded, and only the optimal division method is retained to perform the next layer division until the last layer is divided. The advantage is that a lot of calculation is saved.

[0056] Specifically, according to the coarse mode decision algorithm in AVS3, five candidate luma intra prediction modes are selected from the standard 33 luma intra prediction modes in AVS3.

[0057] Among them, the AVS3 standard includes a total of 33 luminance intra-frame prediction modes. For each coding block, different intra-frame prediction modes correspond to different prediction results and corresponding coding costs. The intra-frame prediction algorithm needs to select the intra-frame prediction mode with the lowest coding cost.

[0058] The luma intra prediction mode is used for rate-distortion cost calculation of the maximum coding module partition and rate-distortion cost calculation of the best prediction mode of the coding unit.

[0059] According to the greedy search algorithm, an updated mode decision circuit is established, wherein the updated mode decision circuit includes five brightness mode decisions and one chrominance mode decision.

[0060] Among them, the present invention proposes Figure 2 The AVS3 encoder hardware structure shown in the figure is Figure 2 The upper middle section shows the LCU-level circuit pipeline structure before the algorithm modification, including six circuit modules: data acquisition, coarse mode decision, mode decision, deblocking filtering, sample adaptive compensation, and entropy coding. These six modules simultaneously process different LCU maximum coding units (LCUs), improving the encoder circuit's throughput. Furthermore, the firmware is used to configure encoder parameters and obtain encoder operating status; the memory is used to exchange data between the encoder and the host computer, including raw pixels and encoded bitstreams.

[0061] like Figure 2 As shown, Figure 2The lower part is the latest mode decision circuit structure designed according to the greedy search algorithm, which is used to replace the mode decision circuit in the original LCU maximum coding unit level pipeline. The five circuit modules on the left correspond to the greedy calculation process of the luminance block division method, and the sixth circuit module corresponds to the chrominance intra-frame prediction mode calculation module. In order to ensure that the overall throughput remains unchanged, these six circuit modules adopt an LCU-level pipeline design.

[0062] In the pipeline design, each layer of the maximum coding unit requires an independent circuit module, and the latest mode decision circuit includes five brightness mode decisions and one chrominance mode decision, which respectively correspond to the six layers of division results in the newly created division results.

[0063] The use of luminance block division can make the chrominance block division result follow the luminance, which can save the chrominance calculation amount and the corresponding circuit area. The reason why the optimal intra-frame prediction mode of chrominance needs to be calculated is that chrominance and luminance are different color components, and their intra-frame prediction modes are quite different. Therefore, the optimal intra-frame prediction mode of chrominance needs to be calculated separately.

[0064] A maximum coding unit with a size of 64x64 in a video frame is obtained, the maximum coding unit is input into the latest mode decision circuit, and brightness blocks are divided on the first layer of the maximum coding unit according to the first brightness mode decision in the latest mode decision circuit.

[0065] The AVS3 standard stipulates that the maximum LCU size can be set to 128x128. The present invention sets the LCU size to 64x64 in consideration of factors such as hardware storage resources and real-time encoding.

[0066] In the present invention, the size of the LCU is set to 64x64, and the 4x4 division method is removed. Therefore, a total of five layers of greedy search are required to obtain the final division result. In addition, in order to further reduce the amount of calculation and circuit area, the present invention removes the calculation of the chroma block division method and adopts the luminance block division result.

[0067] The luminance block division modes include: no division, quadtree division, horizontal binary tree division, vertical binary tree division, horizontal enhanced quadtree division and vertical enhanced quadtree division.

[0068] Each luminance block division method in the first layer is calculated according to a rate-distortion algorithm to obtain a rate-distortion cost corresponding to each luminance block division method in the first layer.

[0069] The rate-distortion cost is an indicator for measuring the performance of the current block partitioning method and prediction mode, which comprehensively considers two indicators: prediction error and bit rate.

[0070] The rate-distortion algorithm includes: intra-frame prediction, row discrete cosine transform, column discrete cosine transform, quantization, inverse quantization, column inverse discrete cosine transform, row discrete cosine transform and code rate estimation.

[0071] The luminance block division method with the minimum rate-distortion cost is selected to divide the first layer, and a division result of the first layer and coding units obtained after the division of the first layer are obtained.

[0072] The minimum rate-distortion cost means that each block division method will generate a corresponding rate-distortion cost. By comparing the numerical values of the rate-distortion costs, the block division method with the smallest numerical value is selected. The luminance block division method with the minimum rate-distortion cost is the optimal division method for the current division layer.

[0073] After selecting the brightness block division method with the smallest rate-distortion cost to divide the first layer, the optimal division method and the division result of the first layer are obtained, and the non-optimal division method and the division result corresponding to the non-optimal division method are discarded.

[0074] Among them, such as Figure 3 As shown, Figure 3 The three-layer block division depth on the left is used as an example to describe the process of the greedy search algorithm of the present invention: Figure 3 The square CU0 shown in the figure has a maximum of six partitioning methods, namely NO-SPLIT, QT quadtree, BTH horizontal binary tree, BTV vertical binary tree, EQTH horizontal enhanced quadtree, and EQTV vertical enhanced quadtree, according to the partitioning of its parent node and its CU size. The rate-distortion cost of all possible partitioning methods in the first layer of the greedy search algorithm is calculated, and the partitioning method with the minimum rate-distortion cost is selected. Figure 3 As shown in the first layer partitioning results, the QT quadtree partitioning method has the lowest rate-distortion cost, and the other partitioning methods are discarded.

[0075] Among them, such as Figure 3 As shown, Figure 3 CU0 in the figure represents a square coding unit in the division process. If CU0 is the largest coding unit, there is no parent node. If it is not the largest coding unit, the division of its parent node determines the possible division methods of CU0.

[0076] The division result of the first layer is input into the next layer, and the luminance block division method with the smallest rate-distortion cost is continued to be selected for division until the division result of the fifth layer is obtained, and finally the five-layer luminance block division result of the maximum coding unit and the multiple coding units obtained after the five-layer luminance block division of the maximum coding unit are obtained.

[0077] Among them, each brightness mode decision in the latest mode decision circuit corresponds to processing the brightness block division of each layer of the maximum coding unit.

[0078] The maximum side length of the largest coding unit is 64, and the minimum side length is 4. Therefore, a five-layer greedy search structure is designed, but five layers are not absolute, because the division depth and division process of each LCU are different, and circuit area and coding performance need to be comprehensively considered.

[0079] like Figure 3 As shown, after obtaining the division results of the first layer, the division results of the first layer are input to the second layer, and the optimal division methods of the four CUs are calculated in turn in the second layer. Among them, the optimal division method of the two CUs in the upper left corner and the lower right corner of the division results of the first layer is NO-SPLIT, and no division is required for the next layer. The optimal division methods of CU1 and CU2 are EQTV vertical enhanced quadtree division and BTH horizontal binary tree division, respectively, and the division results need to be input to the third layer. Similarly, the optimal division methods of CU3 and CU4 obtained in the third layer are EQTV vertical enhanced quadtree division and BTH horizontal binary tree division, respectively. So far, the final division result of the CU0 maximum coding unit is obtained, as shown in Figure 3 Shown on the right.

[0080] The above-mentioned division method of the maximum coding unit of the present invention reduces the number of block division calculations and ultimately reduces hardware resource consumption. In terms of hardware implementation, the original brute force search technology requires a total of 2272 pipelines for rate-distortion cost calculation, while the greedy search technology only requires 121 pipelines, which greatly saves hardware resources.

[0081] Step S20: Calculate the rate-distortion cost of each coding unit in the luminance block division results of each layer of the maximum coding unit under five luminance intra prediction modes, and obtain the optimal luminance intra prediction mode for each coding unit according to the rate-distortion cost.

[0082] Among them, for a coding unit CU of a specific size, after Figure 4 The rate-distortion algorithm shown in the upper part calculates the rate-distortion cost of the current intra-frame prediction mode of the coding unit. In order to calculate the optimal prediction mode of the coding unit, it is necessary to perform the above calculations on the five candidate prediction modes output by the rough mode decision (RMD). Considering the balance between hardware resource consumption and computational efficiency, the present invention designs a hardware pipeline structure for the rate-distortion algorithm, and its timing diagram is shown in FIG. Figure 4 As shown in the lower part, the numbers in the figure represent the corresponding intra-frame prediction mode numbers.

[0083] The coding unit of a specific size means that each size of the coding block corresponds to a different circuit design, that is, the coding block size is one of all possible sizes, including 64x64, 64x32, 32x64, 64x16, 16x64, 64x8, 8x64, 32x32, 32x16, 16x32, 32x8, 8x32, 32x4, 4x32, 16x16, 16x8, 8x16, 16x4, 4x16, 8x8, 8x4, and 4x8.

[0084] Specifically, multiple coding units obtained after optimal division of each layer in the maximum coding unit are obtained, and the multiple coding units are input into five luminance intra prediction modes.

[0085] Among them, the coarse mode decision algorithm refers to the 33 luminance intra-frame prediction modes included in the AVS3 standard. In order to reduce the computational complexity of the process of calculating the rate-distortion cost of different prediction modes, the coarse mode decision algorithm is used to select 5 candidate prediction modes from the 33 prediction modes and perform rate-distortion cost calculation. Specifically, which five candidate prediction modes are related to the content of the coding block?

[0086] Calculate the rate-distortion cost of each coding unit in five luma intra prediction modes, and obtain the luma intra prediction mode with the minimum rate-distortion cost for the coding unit. The luma intra prediction mode with the minimum rate-distortion cost is the optimal luma intra prediction mode for the coding unit.

[0087] Step S30: store the reconstructed pixels of the final coding result corresponding to the fifth layer of luminance block division results in the maximum coding unit in the upper row cache, and store the reconstructed pixels of the coding results corresponding to the first four layers of luminance block division results in the maximum coding unit in the left row cache.

[0088] Among them, the line cache technology is used to store previously processed information. During the intra-frame prediction algorithm, each coding block requires the encoded information of adjacent blocks. This information is stored in the line cache. The line cache stores the reconstructed pixels of adjacent encoded coding units, which are used for the intra-frame mode decision calculation of the coding unit currently being encoded. During the encoding process, the coding unit currently being encoded needs to read the adjacent encoded pixels and other encoding information from the line cache.

[0089] The reconstructed pixels are pixels obtained after encoding and decoding the coding block, which are not completely the same as the original pixels and can be understood as pixels seen at the decoding end.

[0090] Specifically, when the maximum coding unit passes through the latest mode decision circuit, the reconstructed pixels of the final coding result and the chroma optimal intra-frame prediction mode corresponding to the chroma mode decision are obtained. The reconstructed pixels of the final coding result are the output values of the fifth-level circuit module in the latest mode decision circuit corresponding to the fifth-layer luminance block division result in the maximum coding unit.

[0091] The reconstructed pixels of the final encoding result of the newly created division result luminance block are the output values of the fifth-level circuit module in the latest mode decision circuit.

[0092] The circuit module is a processing module corresponding to each brightness mode decision in the latest mode decision circuit, and is used to obtain the encoding result of each layer after the maximum coding unit is divided.

[0093] The final encoding result can only be obtained at the fifth level. To ensure codec consistency and video encoding performance, the final encoding result must be stored in the line buffer. However, for the greedy search algorithm's LCU maximum coding unit hardware pipeline circuit, the final luminance encoding result is the output of the last circuit module, so the first four circuit modules cannot obtain this result.

[0094] Storing the reconstructed pixels of the final encoding result in an upper row buffer for use in adjacent maximum coding units within the video frame for performing intra-frame mode decision calculation;

[0095] The first four stages of the circuit modules of the latest mode decision circuit are used to obtain the coding result of the current division layer of the maximum coding unit.

[0096] like Figure 5 As shown, the present invention designs a row cache technical solution for the dependency of encoding results between the maximum coding units as follows: because the block division methods of the circuits at each level are different, the rate-distortion cost calculation within the maximum coding unit can only use the encoded CU encoding unit results of the current circuit. For the external left row cache, due to the circuit design of the maximum coding unit-level pipeline, during the calculation process of the first four-level circuit modules, the fifth-level circuit module has not yet output the reconstructed pixels of the final encoding result required by the left row cache. Therefore, similar to the internal row cache, the left row cache can only store the encoded CU encoding unit results of the current circuit. In order to reduce the loss of encoding performance, the upper row cache is used to store the reconstructed pixels of the final encoding result output by the fifth-level circuit module.

[0097] For the upper row buffer, if the width of the video frame is greater than five times the maximum coding unit, the first four stages in the latest mode decision circuit obtain reconstructed pixels of the final coding result.

[0098] The technical effects brought about by the present invention are as follows:

[0099] 1. The present invention applies the greedy search algorithm to the CU coding unit block partition calculation in the AVS3 intra-frame prediction mode, reducing the algorithm calculation amount and hardware resource consumption.

[0100] 2. The present invention designs a corresponding hardware circuit structure and a line cache technology solution for the application of the intra-frame prediction mode of the greedy search technology, which not only efficiently implements the intra-frame prediction mode algorithm but also reduces the coding performance loss.

[0101] In addition, an alternative solution of the present invention may be to adopt other optimized search algorithms or directly adopt the original brute force search algorithm to implement the AVS3 intra-frame prediction mode and its hardware circuit. A variant solution may be to combine the greedy search algorithm and the brute force search algorithm, that is, to use brute force search technology in some layers and greedy search technology in other layers, and implement the corresponding hardware circuit.

[0102] Further, if Figure 6 As shown, based on the above-mentioned AVS3 intra-frame block division method, the present invention also provides an AVS3 intra-frame block division system, wherein the AVS3 intra-frame block division system includes:

[0103] The maximum coding unit division module 51 is used to obtain the maximum coding unit in the video frame, and use a greedy search algorithm to divide the maximum coding unit into luminance blocks layer by layer from top to bottom to obtain a five-layer luminance block division result of the maximum coding unit;

[0104] an optimal prediction mode acquisition module 52, configured to calculate the rate-distortion cost of each coding unit in the luma block division results of each layer of the maximum coding unit under five luma intra prediction modes, and obtain the optimal luma intra prediction mode for each coding unit according to the rate-distortion cost;

[0105] The coding result storage module 53 is used to store the reconstructed pixels of the final coding result corresponding to the fifth layer of luminance block division results in the maximum coding unit in the upper row cache, and to store the reconstructed pixels of the coding results corresponding to the first four layers of luminance block division results in the maximum coding unit in the left row cache.

[0106] Further, if Figure 7 As shown, based on the above-mentioned AVS3 intra-frame block division method and system, the present invention also provides a terminal and a system-on-chip (SoC) architecture accordingly, wherein the terminal includes a processor 10, a memory 20, a display 30 and an AVS3 encoder chip 40, wherein the AVS encoder chip 40 completes real-time encoding of the video stream according to the configured parameters, and the AVS3 intra-frame block division circuit is a sub-module in the AVS encoder chip. Figure 7Only some of the components of the terminal are shown, but it should be understood that implementation of all of the shown components is not required, and more or fewer components may be implemented instead.

[0107] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Furthermore, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store video frames to be encoded and encoded bit files, as well as to store application software and various types of data installed on the terminal, such as the program code of the installation terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, the AVS3 encoder chip 40 may be executed by the processor 10, thereby implementing the AVS3 intra-frame block division method in the present application.

[0108] In some embodiments, the processor 10 can be a central processing unit (CPU), a microprocessor or other data processing chip, used to configure the operating parameters of the AVS3 encoder chip, and also used to run the program code or process data stored in the AVS3 encoder chip 40, such as executing the AVS3 intra-frame block division method.

[0109] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display 30 is used to play decoded video streams, display information on the terminal, and display a visual user interface. Components 10-30 of the terminal communicate with each other via a system bus.

[0110] In one embodiment, when the processor 10 executes the AVS3 intra-frame block division program in the AVS3 encoder chip 40, the following steps are implemented:

[0111] Obtaining a maximum coding unit in a video frame, and dividing the maximum coding unit into luminance blocks layer by layer from top to bottom using a greedy search algorithm to obtain a five-layer luminance block division result of the maximum coding unit;

[0112] Calculating the rate-distortion cost of each coding unit in the luma block division results of each layer of the maximum coding unit under five luma intra prediction modes, and obtaining the optimal luma intra prediction mode for each coding unit according to the rate-distortion cost;

[0113] The reconstructed pixels of the final coding result corresponding to the fifth layer of luminance block division results in the maximum coding unit are stored in the upper row cache, and the reconstructed pixels of the coding results corresponding to the first four layers of luminance block division results in the maximum coding unit are stored in the left row cache.

[0114] The method of obtaining a maximum coding unit in a video frame and dividing the maximum coding unit into luminance blocks layer by layer from top to bottom using a greedy search algorithm to obtain a five-layer luminance block division result of the maximum coding unit may also include:

[0115] Selecting five candidate luma intra prediction modes from the 33 standard luma intra prediction modes in AVS3 according to a coarse mode decision algorithm in AVS3;

[0116] The luma intra prediction mode is used for rate-distortion cost calculation of the maximum coding module partition and rate-distortion cost calculation of the best prediction mode of the coding unit.

[0117] The step of obtaining the maximum coding unit in the video frame and dividing the maximum coding unit into luminance blocks layer by layer from top to bottom using a greedy search algorithm to obtain a five-layer luminance block division result of the maximum coding unit specifically includes:

[0118] According to the greedy search algorithm, a latest mode decision circuit is established, wherein the latest mode decision circuit includes five brightness mode decisions and one chrominance mode decision;

[0119] Obtaining a maximum coding unit having a size of 64x64 within a video frame, inputting the maximum coding unit into the latest mode decision circuit, and performing luminance block division on a first layer of the maximum coding unit according to a first luminance mode decision made by the latest mode decision circuit;

[0120] Calculating each luminance block division method in the first layer according to a rate-distortion algorithm to obtain a rate-distortion cost corresponding to each luminance block division method in the first layer;

[0121] Selecting the luminance block division method with the minimum rate-distortion cost to divide the first layer, and obtaining a division result of the first layer and coding units obtained after the division of the first layer;

[0122] The luminance block division method with the minimum rate-distortion cost is the optimal division method for the current division layer;

[0123] Inputting the division result of the first layer into the next layer, and continuing to select the luminance block division method with the smallest rate-distortion cost for division until a division result of the fifth layer is obtained, and finally obtaining a five-layer luminance block division result of the maximum coding unit and multiple coding units obtained after the five-layer luminance block division of the maximum coding unit;

[0124] Among them, each brightness mode decision in the latest mode decision circuit corresponds to processing the brightness block division of each layer of the maximum coding unit.

[0125] The step of inputting the division result of the first layer to the next layer and continuing to select the luminance block division method with the minimum rate-distortion cost for division until the division result of the fifth layer is obtained specifically includes:

[0126] After selecting the luminance block division method with the minimum rate-distortion cost to divide the first layer, obtaining the optimal division method and the division result of the first layer, and discarding the non-optimal division method and the division result corresponding to the non-optimal division method;

[0127] The division result of the first layer is input into the next layer, and the luminance block division method with the smallest rate-distortion cost is continuously selected for division until the division result of the fifth layer is obtained, and the non-optimal division method in each layer and the division results corresponding to the non-optimal division method are discarded.

[0128] The step of calculating the rate-distortion cost of each coding unit in the luminance block division result of each layer of the maximum coding unit under five luminance intra prediction modes, and obtaining the optimal luminance intra prediction mode for each coding unit according to the rate-distortion cost, specifically includes:

[0129] Obtaining multiple coding units obtained by optimally dividing each layer in the maximum coding unit, and inputting the multiple coding units into five luma intra prediction modes;

[0130] Calculate the rate-distortion cost of each coding unit in five luma intra prediction modes, and obtain the luma intra prediction mode with the minimum rate-distortion cost for the coding unit. The luma intra prediction mode with the minimum rate-distortion cost is the optimal luma intra prediction mode for the coding unit.

[0131] The step of storing the reconstructed pixels of the final coding result corresponding to the fifth-level luminance block division result in the maximum coding unit into the upper row buffer, and storing the reconstructed pixels of the coding result corresponding to the first four-level luminance block division results in the maximum coding unit into the left row buffer, specifically includes:

[0132] After the maximum coding unit passes through the latest mode decision circuit, a reconstructed pixel of the final coding result and a chroma optimal intra-frame prediction mode corresponding to the chroma mode decision are obtained, and the reconstructed pixel of the final coding result is the output value of the fifth-level circuit module in the latest mode decision circuit corresponding to the fifth-level luminance block division result in the maximum coding unit;

[0133] Storing the reconstructed pixels of the final encoding result in an upper row buffer for use in adjacent maximum coding units within the video frame for performing intra-frame mode decision calculation;

[0134] The first four stages of the circuit modules of the latest mode decision circuit are used to obtain the coding result of the current division layer of the maximum coding unit.

[0135] The method further includes storing the reconstructed pixels of the final coding result corresponding to the fifth layer luminance block division result in the maximum coding unit into the upper row buffer, and storing the reconstructed pixels of the coding result corresponding to the first four layers luminance block division results in the maximum coding unit into the left row buffer, and then further including:

[0136] If the width of the video frame is greater than five times the maximum coding unit, the first four stages in the latest mode decision circuit obtain reconstructed pixels of the final coding result.

[0137] The circuit module is a processing module corresponding to each brightness mode decision in the latest mode decision circuit, and is used to obtain the encoding result of each layer after the maximum coding unit is divided.

[0138] The luminance block division modes include: no division, quadtree division, horizontal binary tree division, vertical binary tree division, horizontal enhanced quadtree division and vertical enhanced quadtree division.

[0139] The rate-distortion algorithm includes: intra-frame prediction, row discrete cosine transform, column discrete cosine transform, quantization, inverse quantization, column inverse discrete cosine transform, row discrete cosine transform and code rate estimation.

[0140] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores an AVS3 encoder chip, and when the AVS3 intra-frame block division program in the AVS3 encoder chip is executed by a processor, the steps of the AVS3 intra-frame block division method described above are implemented.

[0141] In summary, the present invention provides an AVS3 intra-frame block division method and related equipment, the method comprising: obtaining a maximum coding unit in a video frame, and using a greedy search algorithm to divide the maximum coding unit into layers of luminance blocks from top to bottom to obtain five layers of luminance block division results of the maximum coding unit; calculating the rate-distortion cost of each coding unit in each layer of luminance block division results of the maximum coding unit under five luminance intra-frame prediction modes, and obtaining the optimal luminance intra-frame prediction mode of each coding unit according to the rate-distortion cost; storing the reconstructed pixels of the final coding result corresponding to the fifth layer of luminance block division result in the maximum coding unit in the upper row cache, and storing the reconstructed pixels of the coding results corresponding to the first four layers of luminance block division results in the maximum coding unit in the left row cache. The present invention adopts an intra-frame prediction technology with a greedy search algorithm to obtain the optimal block division method of the largest coding unit in the video frame and the optimal intra-frame prediction mode of the coding unit, and discards the non-optimal block division method of the coding unit in each layer, saving a lot of calculations. For the software implementation of the intra-frame prediction technology, the present invention saves about three-quarters of the encoding time; for hardware implementation, the present invention saves about 95% of the number of pipelines for rate-distortion cost calculation, greatly saving circuit area and simplifying the complexity of hardware scheduling.

[0142] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or terminal comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or terminal comprising the element.

[0143] Of course, those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware (such as a processor, controller, etc.) through a computer program. The program can be stored in a computer-readable storage medium that can be read by a computer. When the program is executed, it can include the processes in the above-described method embodiments. The computer-readable storage medium can be a memory, a magnetic disk, an optical disk, etc.

[0144] It should be understood that the application of the present invention is not limited to the above examples. For those skilled in the art, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. An AVS3 intra-frame block division method, characterized in that: The AVS3 intra-frame block division method includes: Obtaining a maximum coding unit in a video frame, and dividing the maximum coding unit into luminance blocks layer by layer from top to bottom using a greedy search algorithm to obtain a five-layer luminance block division result of the maximum coding unit; Calculating the rate-distortion cost of each coding unit in the luma block division results of each layer of the maximum coding unit under five luma intra prediction modes, and obtaining the optimal luma intra prediction mode for each coding unit according to the rate-distortion cost; The reconstructed pixels of the final coding result corresponding to the fifth layer of luminance block division results in the maximum coding unit are stored in the upper row cache, and the reconstructed pixels of the coding results corresponding to the first four layers of luminance block division results in the maximum coding unit are stored in the left row cache.

2. The AVS3 intra-frame block division method according to claim 1, wherein: The method further includes: obtaining a maximum coding unit in a video frame, dividing the maximum coding unit into luminance blocks layer by layer from top to bottom using a greedy search algorithm, and obtaining a five-layer luminance block division result of the maximum coding unit. Selecting five candidate luma intra prediction modes from the 33 standard luma intra prediction modes in AVS3 according to a coarse mode decision algorithm in AVS3; The luma intra prediction mode is used for rate-distortion cost calculation of the maximum coding module partition and rate-distortion cost calculation of the best prediction mode of the coding unit.

3. The AVS3 intra-frame block division method according to claim 1, wherein: The method of obtaining a maximum coding unit in a video frame and dividing the maximum coding unit into luminance blocks layer by layer from top to bottom using a greedy search algorithm to obtain a five-layer luminance block division result of the maximum coding unit specifically includes: According to the greedy search algorithm, a latest mode decision circuit is established, wherein the latest mode decision circuit includes five brightness mode decisions and one chrominance mode decision; Obtaining a maximum coding unit having a size of 64x64 within a video frame, inputting the maximum coding unit into the latest mode decision circuit, and performing luminance block division on a first layer of the maximum coding unit according to a first luminance mode decision made by the latest mode decision circuit; Calculating each luminance block division method in the first layer according to a rate-distortion algorithm to obtain a rate-distortion cost corresponding to each luminance block division method in the first layer; Selecting the luminance block division method with the minimum rate-distortion cost to divide the first layer, and obtaining a division result of the first layer and coding units obtained after the division of the first layer; The luminance block division method with the minimum rate-distortion cost is the optimal division method for the current division layer; Inputting the division result of the first layer into the next layer, and continuing to select the luminance block division method with the smallest rate-distortion cost for division until a division result of the fifth layer is obtained, and finally obtaining a five-layer luminance block division result of the maximum coding unit and multiple coding units obtained after the five-layer luminance block division of the maximum coding unit; Among them, each brightness mode decision in the latest mode decision circuit corresponds to processing the brightness block division of each layer of the maximum coding unit.

4. The AVS3 intra-frame block division method according to claim 3, characterized in that: The step of inputting the division result of the first layer into the next layer and continuing to select the luminance block division method with the minimum rate-distortion cost for division until the division result of the fifth layer is obtained specifically includes: After selecting the luminance block division method with the minimum rate-distortion cost to divide the first layer, obtaining the optimal division method and the division result of the first layer, and discarding the non-optimal division method and the division result corresponding to the non-optimal division method; The division result of the first layer is input into the next layer, and the luminance block division method with the smallest rate-distortion cost is continuously selected for division until the division result of the fifth layer is obtained, and the non-optimal division method in each layer and the division results corresponding to the non-optimal division method are discarded.

5. The AVS3 intra-frame block division method according to claim 2, wherein: Calculating the rate-distortion cost of each coding unit in the luma block division results of each layer of the maximum coding unit under five luma intra prediction modes, and obtaining the optimal luma intra prediction mode for each coding unit according to the rate-distortion cost, specifically includes: Obtaining multiple coding units obtained by optimally dividing each layer in the maximum coding unit, and inputting the multiple coding units into five luma intra prediction modes; Calculate the rate-distortion cost of each coding unit in five luma intra prediction modes, and obtain the luma intra prediction mode with the minimum rate-distortion cost for the coding unit. The luma intra prediction mode with the minimum rate-distortion cost is the optimal luma intra prediction mode for the coding unit.

6. The AVS3 intra-frame block division method according to claim 1, characterized in that: The storing of the reconstructed pixels of the final coding result corresponding to the fifth layer luminance block division result in the maximum coding unit into the upper row buffer, and the storing of the reconstructed pixels of the coding result corresponding to the first four layers luminance block division results in the maximum coding unit into the left row buffer specifically includes: After the maximum coding unit passes through the latest mode decision circuit, a reconstructed pixel of the final coding result and a chroma optimal intra-frame prediction mode corresponding to the chroma mode decision are obtained, and the reconstructed pixel of the final coding result is the output value of the fifth-level circuit module in the latest mode decision circuit corresponding to the fifth-level luminance block division result in the maximum coding unit; Storing the reconstructed pixels of the final encoding result in an upper row buffer for use in adjacent maximum coding units within the video frame for performing intra-frame mode decision calculation; The first four stages of the circuit modules of the latest mode decision circuit are used to obtain the coding result of the current division layer of the maximum coding unit.

7. The AVS3 intra-frame block division method according to claim 6, characterized in that: The method further includes storing the reconstructed pixels of the final coding result corresponding to the fifth layer luminance block division result in the maximum coding unit into the upper row buffer, and storing the reconstructed pixels of the coding result corresponding to the first four layers luminance block division results in the maximum coding unit into the left row buffer, and then further including: If the width of the video frame is greater than five times the maximum coding unit, the first four stages in the latest mode decision circuit obtain reconstructed pixels of the final coding result.

8. The AVS3 intra-frame block division method according to claim 6, characterized in that: The circuit module is a processing module corresponding to each brightness mode decision in the latest mode decision circuit, and is used to obtain the encoding result of each layer after the maximum coding unit is divided.

9. The AVS3 intra-frame block division method according to claim 3, characterized in that: The luminance block division modes include: no division, quadtree division, horizontal binary tree division, vertical binary tree division, horizontal enhanced quadtree division and vertical enhanced quadtree division.

10. The AVS3 intra-frame block division method according to claim 3, wherein: The rate-distortion algorithm includes: intra-frame prediction, row discrete cosine transform, column discrete cosine transform, quantization, inverse quantization, column inverse discrete cosine transform, row discrete cosine transform and code rate estimation.

11. An AVS3 intra-frame block partitioning system, characterized in that: The AVS3 intra-frame block partitioning system includes: A maximum coding unit division module is used to obtain a maximum coding unit in a video frame, and use a greedy search algorithm to divide the maximum coding unit into luminance blocks layer by layer from top to bottom to obtain a five-layer luminance block division result of the maximum coding unit; an optimal prediction mode acquisition module, configured to calculate the rate-distortion cost of each coding unit in the luma block division results of each layer of the maximum coding unit under five luma intra prediction modes, and obtain the optimal luma intra prediction mode for each coding unit according to the rate-distortion cost; The coding result storage module is used to store the reconstructed pixels of the final coding result corresponding to the fifth layer of brightness block division results in the maximum coding unit into the upper side row cache, and to store the reconstructed pixels of the coding results corresponding to the first four layers of brightness block division results in the maximum coding unit into the left side row cache.

12. A terminal, characterized in that: The terminal includes: a memory, a processor and an AVS3 encoder chip. When the AVS3 encoder chip is executed by the processor, the steps of the AVS3 intra-frame block division method according to any one of claims 1 to 10 are implemented.

13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores an AVS3 encoder chip, and when the AVS3 encoder chip is executed by a processor, the steps of the AVS3 intra-frame block division method according to any one of claims 1 to 10 are implemented.

Citation Information

Patent Citations

  • Method and device for video transcoding using quad-tree based mode selection

    US20110170608A1

  • On split prediction

    US20220132103A1