HEVC (High Efficiency Video Coding) method based on simplified intra-frame and inter-frame decisions and CU (Coding Unit) division decision
By simplifying the intra-frame prediction mode and inter-frame motion vector calculation, and combining the cost function to decide CU division, the HEVC encoding complexity and latency are reduced, the computing resource consumption problem of HEVC encoding on the hardware platform is solved, and efficient encoding is achieved.
Patent Information
- Application Number
- CN202510957847.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2025-10-03
AI Technical Summary
The HEVC coding standard has high computational complexity and large resource consumption on hardware platforms, which increases latency and makes it difficult to apply on platforms with limited computing and storage resources.
Simplify the calculation of intra-frame prediction mode, simplify the calculation of inter-frame motion vector, decide CU division through cost function, simplify the HEVC encoding algorithm, and reduce computational complexity and delay.
While ensuring image coding performance, the algorithm calculation complexity and time are reduced, making it suitable for platforms with limited hardware resources and achieving high-performance and low-latency HEVC coding.
Smart Images

Figure CN120751123A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of HEVC coding, and in particular to an HEVC coding method based on simplified intra-frame and inter-frame decisions and CU partitioning decisions. Background Art
[0002] With the rapid development of computers and the internet, multimedia data communication technologies, with images and video as key representations, have rapidly taken off. Simple text and voice communication methods no longer meet people's daily needs. Multimedia communication has gained widespread adoption across various industries and is widely used in distance education, teleconferencing, videophones, security monitoring, and other fields, transforming the way we live, learn, and work. HEVC, the latest digital video compression standard, utilizes a number of high-performance compression coding technologies. While these technologies improve coding performance, they also lead to a sharp increase in computational complexity and significantly increase encoding time. On the software side, HEVC supports coding block sizes of 64*64, 32*32, 16*16, 8*8, and 4*4, with each block having 35 intra-frame prediction directions. HEVC determines the optimal block partitioning and prediction mode by iterating through all possible combinations and optimizing them using rate-distortion optimization. While HEVC's optimal block partitioning and prediction mode combination can achieve high compression ratios and image quality, it also comes with significant complexity and resource requirements, and these computations directly increase latency. In terms of hardware, it places very high demands on hardware structure and resources, which is difficult to achieve in practical applications.
[0003] Obviously, on hardware platforms and systems with high latency requirements, directly using the reference software of the HEVC video coding standard to implement compression coding means extremely high computational complexity and large consumption of storage resources, which in turn limits its application on hardware platforms with limited computing and storage resources.
[0004] While the HEVC video coding standard brings significant improvements in the compression efficiency of image / video data, it also means higher computational complexity and longer processing delay. Summary of the Invention
[0005] In light of this, the present invention provides a HEVC encoding method based on simplified intra-frame and inter-frame decisions and CU partitioning. This algorithm primarily simplifies the intra-frame and inter-frame prediction algorithms, while utilizing a cost function to derive the prediction mode for the current coding block. It then further simplifies the CU partitioning based on the intra-frame prediction direction and inter-frame motion vector characteristics of the current coding block. While maintaining image coding performance, this method significantly reduces the algorithm's computational complexity and time, making it possible to implement a high-performance, low-latency HEVC encoding algorithm on platforms with limited hardware resources.
[0006] The HEVC encoding method based on simplified intra-frame, inter-frame decision and CU partition decision proposed in the present invention is characterized by comprising the following steps:
[0007] S1. Simplify intra prediction mode calculation;
[0008] S2, simplify the calculation of inter-frame motion vector;
[0009] S3, making decisions on intra-frame prediction mode and inter-frame motion vector;
[0010] S4, correcting the prediction mode of the current block;
[0011] S5, CU partition decision;
[0012] S6. Encoding is performed based on the CU block information determined by the partitioning decision and the prediction mode information of the current block after the prediction mode is corrected.
[0013] Preferably, the specific steps of step S1 are:
[0014] S11. Construct a candidate mode list containing N candidate modes based on prediction mode information of surrounding prediction blocks, where 10<N<35; first, add the DC prediction mode, the Planar prediction mode, the vertical prediction mode, and the horizontal prediction mode to the candidate mode list; let the number of added candidate modes be M, and if M<N, then expand the candidate mode list for the remaining N-M candidate modes based on the prediction modes of the surrounding blocks; then expand based on the nearest neighbor mode, that is, if prediction mode number 20 is in the candidate list, but 21, 22, 19, and 18 are not in the candidate list, then during expansion, one or more of 21, 22, 19, and 18 may be added to the candidate mode list until the candidate mode list is completed;
[0015] S12. Perform intra-frame prediction on the constructed candidate mode list in turn, then select three prediction modes with the smallest residual SAD, and perform Hadamard calculation on these three residuals. Store the prediction mode with the smallest sum of the absolute values of the Hadamard transform values, and store the sum of the absolute values of the corresponding Hadamard transform values.
[0016] Preferably, the specific steps of step S2 are: using a spiral search algorithm to perform inter-frame motion search on HEVC encoding, and the range of the search window is R*R, where R≤15.
[0017] Preferably, the specific steps of step S3 are: calculating the SAD of the residual values of all basic blocks, selecting three residual values with the smallest SAD in the basic blocks, performing Hadamard transform calculation on these three residual values, selecting and storing the motion vector with the smallest sum of the absolute values of the Hadamard transform values, and storing the sum of the absolute values of the Hadamard transform of the motion vector; the calculation formula of the sum of the absolute values of the Hadamard transform is as follows:
[0018]
[0019] Among them SATD H is the weighted sum of the absolute values of the Hadamard transform, H represents the normalized M*M Hadamard matrix, and X represents the prediction residual of the M*M size block; SATD H The smallest one is selected as the motion vector of the current coding block; the Hadamard matrix is expressed as:
[0020]
[0021] Preferably, the prediction and calculation in the above steps are both performed based on a block of size 8*8.
[0022] Preferably, the specific steps of step S4 are: for the largest coding block of 64*64, taking 8*8 blocks as units, counting the number of blocks within the frame and between frames respectively;
[0023]
[0024] Among them, intra cnt and inter cnt Respectively represents the number of intra prediction mode and inter prediction mode blocks of 64*64 block statistics; mode Indicates the prediction mode of the current block.
[0025] Preferably, the prediction mode correction method of the current block is as follows:
[0026]
[0027] Where T and T2 are the set thresholds; if the current block is in intra prediction mode, most prediction modes for 64*64 blocks are inter prediction modes, and the residual value of the intra prediction mode is Residual value with inter prediction mode If the difference is less than T2, the prediction mode of the current block is corrected to the inter-frame prediction mode, that is, the inter-frame prediction mode is used as the optimal prediction mode for the current block; if the current block is in the inter-frame prediction mode, most of the prediction modes for the 64*64 block are intra-frame prediction modes, and the residual value of the inter-frame prediction mode is Residual value with inter prediction mode If the difference is less than T2, the prediction mode of the current block is corrected to the intra prediction mode, that is, the intra prediction mode is used as the optimal prediction mode of the current block.
[0028] Preferably, the specific steps of step S5 are as follows: divide by the method of sequentially merging 8*8 blocks upward; first, judge the prediction mode included in an 8*8 block. If there are both intra prediction modes and inter prediction modes, no merging is performed.
[0029] If all four 8*8 blocks are in the intra prediction mode, count the minimum value ntraIdx_min of the prediction modes of the current four blocks and the maximum value intraIdx_max of the current prediction mode.
[0030]
[0031] Among them, intraIdx_min 16 and intraIdx_max 16 represent the minimum value and the maximum value of the prediction mode labels in the four 8*8 blocks. Among them, and represent the minimum value and the maximum value of the prediction mode label of the i-th 8*8 block in the four 8*8 blocks. When intraIdx_max 16 -intraIdx min16 <INTRA_TH, 16*16 merging is performed, otherwise no merging is performed.
[0032] If all four 8*8 blocks are in the inter prediction mode, count the average value of the motion vectors of the four 8*8 blocks. The formula is
[0033]
[0034] Among them, MvMean_x 16 and MvMean_y 16 respectively represent the motion mean value in the X direction and the motion mean value in the Y direction of the current 16*16 block. and respectively represent the values in the X direction and the Yf direction of the motion vector of the 8*8 block. <00001? sup>
[0035] When the motion directions of the four 8*8 blocks are inconsistent, no merging is performed. When the motion directions of the four 8*8 blocks are consistent, further calculate the variance MV of the motion vector of the 16*16 block Dsum16 ;
[0036]
[0037] Among them, MV Dsum16 represents the variance of the motion vector of the current 16*16 block. When MVDsum16 Four 8×8 blocks are merged when MVD_TH is reached; MVD_TH is a set threshold.
[0038] Preferably, the intra prediction mode and inter motion vector information of the current block are obtained, the CU block information divided according to the intra prediction mode and inter motion vector information of the current block is obtained, and encoding is performed.
[0039] The method of the present invention mainly includes a simplified inter prediction algorithm; intra / inter prediction mode decision-making; adjustment of the prediction mode of the current block; CU division decision-making; and further encoding using the obtained encoding information. Among them, the simplified intra encoding algorithm mainly simplifies the rate-distortion cost estimation of 35 intra encoding directions; the simplified inter prediction mode mainly simplifies the motion search algorithm and search window considering the requirements for resources and complexity implementation on the hardware platform; the intra / inter prediction mode decision-making selects and makes a decision according to the simplified rate-distortion cost; the adjustment of the prediction mode of the current block mainly considers the relationship between the complexity of subsequent encoding, the encoding compression ratio and performance, and further adjusts it into a mode more conducive to hardware encoding; the CU division decision-making makes a decision according to the relationship between the intra encoding mode distribution characteristics and the inter motion vector. The embodiment of the present invention, especially for the HEVC intra encoding algorithm that is difficult to implement on hardware. Under the premise of ensuring the image compression quality as much as possible, this algorithm saves hardware resources, reduces the hardware complexity and difficulty, shortens the intra encoding time, and reduces the delay of compression encoding while effectively using the hardware storage resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a flowchart of the HEVC algorithm for simplified intra / inter decision-making and CU block division of the present invention;
[0041] Figure 2 It is a schematic diagram of the simplified intra prediction process;
[0042] Figure 3 It is a schematic diagram of the construction process of the intra candidate list;
[0043] Figure 4 It is a schematic diagram of the simplified inter prediction process;
[0044] Figure 5 It is a schematic diagram of the inter spiral motion search;
[0045] Figure 6 It is a schematic diagram of the adjustment process of the local block prediction mode;
[0046] Figure 7 It is a schematic diagram of the process of merging M×M CU blocks into 2M×2M;
[0047] Figure 8It is a schematic diagram of the results of intra-frame and inter-frame prediction modes and CU division; DETAILED DESCRIPTION
[0048] In order to make the technical problems, technical solutions and beneficial effects solved by the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. 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.
[0049] The technical solutions provided by the embodiments of the present invention are as follows:
[0050] A HEVC coding algorithm that simplifies intra-frame and inter-frame decision making and CU block division, such as Figure 1 As shown, the following steps are included: S1, simplifying the intra-frame prediction mode;
[0051] S2, simplified inter-frame prediction mode;
[0052] S3, intra-frame and inter-frame prediction mode decision;
[0053] S4, correcting the prediction mode of the current block;
[0054] S5, CU partition decision;
[0055] S6. Encoding is performed based on the CU block information determined by the partitioning decision and the prediction mode information of the current block after the prediction mode is corrected.
[0056] The simplified intra-frame coding algorithm primarily simplifies the rate-distortion cost estimation for 35 intra-frame coding directions. The simplified inter-frame prediction mode primarily simplifies the motion search algorithm and search window based on the resource and complexity requirements of the hardware platform. The intra-frame and inter-frame prediction mode decisions are made based on the simplified rate-distortion cost. The current block prediction mode is adjusted primarily to a mode more conducive to hardware coding, taking into account the complexity of subsequent coding and the relationship between coding compression rate and performance. The CU partitioning decision is made based on the relationship between the distribution characteristics of intra-frame coding modes and the inter-frame motion vector. Intra-frame coding has 35 coding modes, which have been simplified to M. Inter-frame motion search is complex, and this application proposes a simplified search algorithm. The final coding method for the current block is to compare the optimal intra-frame coding and the optimal inter-frame coding to select the better of the two. For the partitioning decision, taking a 64*64 block as an example, the entire block can be encoded using a single coding mode, or it can be divided into multiple 8*8 or 16*16 blocks, and the optimal coding mode can be selected for each block. To finally decide whether to divide the image, you need to see whether the result obtained by using a 64*64 block as a prediction unit or dividing it into smaller blocks as prediction units is closer and better.
[0057] In this embodiment, considering the relationship between algorithm performance and algorithm complexity, the maximum CU can be 64*64 and the minimum CU is 8*8.
[0058] The prediction of simple intra-frame and inter-frame modes uses 8*8 blocks for prediction and decision making.
[0059] The simplified intra-frame prediction mode first constructs a candidate list containing N candidate modes based on the prediction mode information of surrounding prediction blocks. Unlike the construction of the HEVC intra-frame candidate list, N is selected to be larger. This is because intra-frame prediction aims to obtain the optimal intra-frame prediction distortion through a simplified judgment model, so as to more accurately make decisions based on inter-frame prediction distortion. N is generally selected to be greater than 10 and less than 35. The candidate mode is selected based on the prediction mode of the surrounding already coded blocks. In this real-time example, N = 15.
[0060] The candidate mode list construction process involves constructing a candidate mode list containing N candidate modes based on the prediction mode information of surrounding prediction blocks, where 10 < N < 35. First, the DC prediction mode, planar prediction mode, vertical prediction mode, and horizontal prediction mode are added to the candidate mode list. Let M be the number of added candidate modes. If M < N, the remaining N - M candidate modes are expanded based on the prediction modes of surrounding blocks. The candidate mode list is then expanded based on the nearest neighbor mode. For example, if prediction mode number 20 is in the candidate list, but 21, 22, 19, and 18 are not, one or more of these numbers can be added to the candidate mode list until the candidate mode list is complete. Currently, mainstream coding techniques draw inspiration from the 3D-HEVC DMM standard for constructing prediction candidate lists. This standard selects seven candidate modes from four commonly used prediction modes: DC, planar, vertical, horizontal, and surrounding blocks. This application candidate list is based on standard improvements, first of all, it also follows the DC, Plannar, vertical, horizontal and surrounding blocks.
[0061] As the top priority selection, if the number of selection modes does not reach the target N, the neighboring prediction modes in the first candidate list of DC, Planar, Vertical, Horizontal, and the second candidate list of surrounding block prediction modes will be used. For example, if prediction mode 20 is included in the list, the list does not have N. The method to complete the list is to add 19, 21, 18, and 22.
[0062] Simplified inter-frame prediction primarily simplifies HEVC's cumbersome inter-frame motion search. Considering the complexity of hardware implementation, this motion search uses a spiral search algorithm, with the search window limited to R*R, where R<=15. In this real-time example, R=7.
[0063] Among them, the intra-frame prediction of the corresponding mode is performed in sequence for the constructed candidate list, and then the three prediction residual values with the smallest SAD are selected, and the three residual values are Hadamard calculated. The prediction mode with the smallest sum of the absolute values of the Hadamard transform values is stored, and the absolute sum of the corresponding Hadamard transform values is also stored. The Hadamard transform formula is as follows:
[0064]
[0065] Among them SATD H is the weighted sum of the absolute values of the Hadamard transform, H represents the normalized M*M Hadamard matrix, and X represents the prediction residual of the M*M size block; SATD H The smallest one is selected as the motion vector of the current coding block; the Hadamard matrix is expressed as:
[0066]
[0067] The decision of the intra / inter prediction mode is mainly determined based on the size of the weighted sum of the absolute values of the Hadamard transform obtained above, that is, the motion vector of the current coding block is selected as the motion vector of the current coding block.
[0068] Among them, the local prediction block mode adjustment is mainly considered. For intra-frame and inter-frame prediction modes with little difference, the distribution of the current block prediction mode can be comprehensively considered, and then the prediction mode of the coding block can be appropriately adjusted. The adjustment rule is to count the number of intra-frame and inter-frame blocks separately in units of 8*8 blocks for the largest coding block of 64*64.
[0069]
[0070] Among them, intra cnt and inter cnt Respectively represents the number of intra prediction mode and inter prediction mode blocks of 64*64 block statistics. mode Indicates the prediction mode of the current block. The rules for modifying the prediction mode of the current block are as follows:
[0071]
[0072] In this real-time example, T=8, T2=200.
[0073] The CU block division decision is mainly made by merging 8*8 blocks upwards in sequence. That is, 8*8 blocks are merged into 16*16 blocks, 16*16 blocks are further merged into 32*32 blocks, and 32*32 blocks are further merged into 64*64 blocks.
[0074] Among them, the merging rule is that for an 8×8 block merged into a 16×16 block, first judge the prediction mode included in an 8×8 block. If there are both intra-frame and inter-frame modes, the current four 8×8 blocks will not be merged, that is, the partitioning mode is 8×8. If the current 16×16 block is all intra-frame prediction mode or all inter-frame prediction mode, the merging follows certain rules. If the four 8×8 blocks included in the current 16×16 block are all intra-frame prediction mode, the rule for judging whether the current block is merged is as follows: first, count the minimum value (0 - 35) of the prediction modes of the current four blocks and the maximum value (0 - 35) of the current prediction mode. If the difference between the minimum value and the maximum value of the prediction mode is within a certain range, that is, intraIdx_max–intraIdx_min < INTRA_TH, it means that the prediction directions of the current 16×16 block are basically the same and can be merged, otherwise it cannot be merged. In this real example, INTRA_TH = 5.
[0075] Among them, if the four 8×8 blocks included in the current 16×16 block are all inter-frame, the rule for judging whether the current block is merged is as follows: first, count the average value of the motion vectors of the four 8×8 blocks, that is, the following formula:
[0076]
[0077] where MvMean_x 16 and MvMean_y 16 respectively represent the motion mean value in the X direction and the motion mean value in the Y direction of the current 16×16 block. and respectively represent the values in the X direction and the Yf direction of the motion vectors of the 8×8 blocks. The basis for judging whether the current block is merged is as follows: first, judge whether the motion directions of the current four blocks are the same. If the motion directions are the same, then make the next judgment, judge the variance value of the 16×16 motion vector. If the variance value is less than a certain threshold MVD_TH, it can be merged, otherwise it cannot be merged. The judgment of the variance value is as follows:
[0078]
[0079] where MV Dsum16 represents the variance of the motion vector of the current 16×16 block. When the motion vectors of the four blocks are in the same direction and MV Dsum16 < MVD_TH, it is merged, otherwise it is not merged. In the real example of this invention, MVD_TH = 16.
[0080] Among them, for the merging of larger 2M*2M blocks, it will be judged based on the merging of M*M blocks, that is, further statistical calculation and judgment will be carried out using the statistical information of M*M. For a 2M*2M block, if all four M*M blocks are in a mergeable state, then further judgment will be made downward. If all four M*M blocks of the current 2M*2M are in the intra prediction mode, then the minimum intra prediction mode label and the maximum intra prediction mode label will be statistically calculated. The statistical method is as follows:
[0081]
[0082] Among them, intraIdx_min 2M and intraIdx_max 2M represent the minimum and maximum prediction mode labels in the 2M*2M block. Among them and represent the minimum and maximum prediction mode labels of the i-th M*M block in the 2M*2M block. When is satisfied, then the 2M*2M block will be merged; otherwise, it will not be merged. In this embodiment, INTRA_TH = 5.
[0083] If the 2M*2M block is in the inter prediction mode, the formula for statistically calculating the merging information is as follows:
[0084]
[0085] Among them, MvMean_x 2M and MvMean_y 2M respectively represent the average value of the motion vector in the X direction and the average value of the motion vector in the Y direction of the current 2M*2M block, and MV<( Dsum_2M represents the variance of the 2M*2M motion vector. When MV Dsum_2M < MVD_TH, the current 2M*2M block will be merged; otherwise, it will not be merged. In this real-time example, MVD_TH = 16.
[0086] Encoding is performed according to the CU block information determined by the partitioning and the prediction mode information corrected by the prediction mode of the current block. Among them, after obtaining the above statistical information, the known encoding method is used for intra-frame encoding and inter-frame encoding. Among them, intra-frame encoding will traverse from the obtained minimum prediction mode to the maximum prediction mode label, and finally select the optimal prediction mode. Inter-frame encoding will perform sub-pixel interpolation according to the known motion vector to obtain an accurate motion vector for inter-frame encoding.
[0087] This embodiment relies on a single V7-690T FPGA with a compression processing capability of no less than 120MSPS. Furthermore, the encoding latency from encoder data to compressed bitstream is less than 300ms. Compared to HEVC's intra-frame and inter-frame prediction modes, the rate-distortion selection process is significantly less complex, and CU partitioning eliminates the need for tedious iterations, reducing hardware complexity and resources.
[0088] Among them, the embodiment of the present invention can be applied to HEVC encoding hardware platforms with high resource requirements and high latency requirements. The algorithm is an optimized design for hardware implementation based on the existing H.265 video coding standard. The main idea is to simplify the intra-frame / inter-frame prediction algorithm, and at the same time use the cost function to derive the prediction mode of the current coding block, and then further simplify the CU division according to the intra-frame prediction direction and inter-frame motion vector characteristics of the current coding block. That is, the algorithm redesigns and optimizes the parts of HEVC that have limited impact on performance but have high computational complexity, or are not conducive to parallel implementation, so as to meet application requirements and expected characteristics on the target FPGA platform.
[0089] like Figure 2 This is a simplified diagram of the intra-frame prediction mode flow. The main simplification lies in constructing a list of likely candidates. The cost function for determining the most likely intra-frame prediction mode is the SAD of the residual. The optimal prediction mode is selected by choosing the one with the smallest sum of the absolute values of the Hadamard transform from among the three possible prediction modes. This reduces the complexity of intra-frame prediction mode selection while maintaining accuracy.
[0090] like Figure 3 Figure 2 shows the process for constructing an intra-frame candidate mode list. First, the number of candidate modes in the candidate list is determined. Then, the DC prediction mode, planar prediction mode, vertical prediction mode, and horizontal prediction mode are added to the prediction list. Finally, the prediction modes of adjacent blocks are added to the candidate list. If the number of candidate prediction modes in each candidate list does not reach the total number N, the candidate mode list is further expanded. This expansion is based on nearest neighbor expansion based on the modes already in the candidate list.
[0091] like Figure 4 As shown in the figure, the simplified inter-frame prediction process diagram is shown. The simplified inter-frame prediction mode mainly uses spiral search to reduce the complexity of hardware implementation and facilitate data reading. The second is integer pixel search, judging the SAD of the residual value, and selecting the top three most likely MVs. Finally, Hadamard transform is performed on the prediction residuals under these three MVs (motion vectors), and the MV with the smallest Hadamard transform is selected as the optimal MV for the current coding block.
[0092] like Figure 5As shown, it is a schematic diagram of the spiral search of the inter-frame prediction mode. This search mode can simplify the hardware platform's reading of video data, that is, the storage addresses read can be continuous.
[0093] like Figure 6 The following figure shows a flow chart of the local block prediction mode adjustment process. This step mainly includes two steps: modifying the prediction mode of the local block to an intra prediction mode and modifying it to an inter prediction mode. The basis for modifying the prediction mode of the local block is to centralize the prediction mode without sacrificing coding performance. This facilitates the division and merging of CU modules and saves the bitrate of mode information encoding to a certain extent.
[0094] like Figure 7 Figure 2 shows a flow chart of merging M*M CU blocks into 2M*2M blocks. This step is mainly divided into the merging process when all four blocks are in intra-frame prediction mode and the merging process when all four blocks are in inter-frame prediction mode. For the four blocks that are all in intra-frame prediction mode, if the difference between the largest intra-frame prediction mode number and the smallest prediction mode number of the four blocks is less than the set threshold, it indicates that the prediction direction of the current blocks is highly similar and can be merged. For the case where all four blocks are in inter-frame prediction mode, the motion direction of the four blocks and the volatility of the motion vector are used to determine whether the current block should be merged.
[0095] like Figure 8 , which is a schematic diagram of intra-frame and inter-frame prediction modes and CU division results. The prediction mode of the white blocks is inter-frame, and the prediction mode of the black blocks is intra-frame.
[0096] This embodiment uses simplified intra-frame prediction and simplified inter-frame prediction to merge coding blocks that have been determined to be intra-frame or inter-frame based on the characteristics of the prediction information. This significantly reduces computational complexity, latency, and implementation resources, while ensuring high compression rates and video quality. This specifically addresses the difficulty of implementing the highly complex and resource-intensive HEVC on hardware platforms.
[0097] 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 through a computer program. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0098] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A HEVC encoding method based on simplified intra-frame, inter-frame decision and CU partition decision, characterized in that: The steps include: S1. Simplify intra prediction mode calculation; S2, simplify the calculation of inter-frame motion vector; S3, making decisions on intra-frame prediction mode and inter-frame motion vector; S4, correcting the prediction mode of the current block; S5, CU partition decision; S6. Encoding is performed based on the CU block information determined by the partitioning decision and the prediction mode information of the current block after the prediction mode is corrected.
2. The HEVC encoding method according to claim 1, wherein The specific steps of step S1 are: S11. Construct a candidate mode list containing N candidate modes according to prediction mode information of surrounding prediction blocks, where 10<N<35; first, add the DC prediction mode, the Planar prediction mode, the vertical prediction mode, and the horizontal prediction mode to the candidate mode list; Let the number of added candidate modes be M. If M < N, then the remaining N - M candidate modes are used to expand the candidate mode list according to the prediction modes of the surrounding blocks; then the list is expanded according to the nearest neighbor mode. That is, if the prediction mode number 20 is in the candidate list, but 21, 22, 19, and 18 are not in the candidate list, then one or more of 21, 22, 19, and 18 can be added to the candidate mode list during expansion until the candidate mode list is completed. S12. Perform intra-frame prediction on the constructed candidate mode list in turn, then select three prediction modes with the smallest residual SAD, and perform Hadamard calculation on these three residuals. Store the prediction mode with the smallest sum of the absolute values of the Hadamard transform values, and store the sum of the absolute values of the corresponding Hadamard transform values.
3. The HEVC encoding method according to claim 1, wherein The specific steps of step S2 are: using a spiral search algorithm to perform inter-frame motion search on HEVC encoding, and the range of the search window is R*R, where R≤15.
4. The HEVC encoding method according to claim 3, wherein The specific steps of step S3 are: calculating the SAD of the residual values of all basic blocks, selecting three residual values with the smallest SAD in the basic blocks, performing Hadamard transform calculation on these three residual values, selecting and storing the motion vector with the smallest sum of the absolute values of the Hadamard transform values, and storing the sum of the absolute values of the Hadamard transform of the motion vector; the calculation formula of the sum of the absolute values of the Hadamard transform is as follows: Among them SATD H is the weighted sum of the absolute values of the Hadamard transform, H represents the normalized M*M Hadamard matrix, and X represents the prediction residual of the M*M size block; SATD H The smallest one is selected as the motion vector of the current coding block; the Hadamard matrix is expressed as:
5. The HEVC encoding method according to any one of claims 2 to 4, wherein: Jun is calculated based on 8*8 size blocks.
6. The HEVC encoding method according to claim 1, wherein The specific steps of step S4 are as follows: for the largest coding block of 64*64, taking 8*8 blocks as units, respectively counting the number of blocks within the frame and between frames; Among them, intra cnt and inter cnt Respectively represents the number of intra prediction mode and inter prediction mode blocks of 64*64 block statistics; mode Indicates the prediction mode of the current block.
7. The HEVC encoding method according to claim 6, wherein The prediction mode correction method of the current block is as follows: Where T and T2 are the set thresholds; if the current block is in intra prediction mode, most prediction modes for 64*64 blocks are inter prediction modes, and the residual value of the intra prediction mode is Residual value with inter prediction mode If the difference is less than T2, the prediction mode of the current block is corrected to the inter-frame prediction mode, that is, the inter-frame prediction mode is used as the optimal prediction mode for the current block; if the current block is in the inter-frame prediction mode, most of the prediction modes for the 64*64 block are intra-frame prediction modes, and the residual value of the inter-frame prediction mode is Residual value with inter prediction mode If the difference is less than T2, the prediction mode of the current block is corrected to the intra prediction mode, that is, the intra prediction mode is used as the optimal prediction mode for the current block.
8. The HEVC encoding method according to claim 1, wherein The specific steps of step S5 are: dividing by merging 8*8 blocks upwards in sequence; first determining the prediction mode contained in an 8*8 block, and if there is both an intra-frame prediction mode and an inter-frame prediction mode, no merging is performed; If all four 8*8 blocks are in intra prediction mode, the minimum value ntraIdx_min of the prediction mode of the current four blocks and the maximum value intraIdx_max of the current prediction mode are counted. Among them, intraIdx_min 16 and intraIdx_max 16 Indicates the minimum and maximum values of the prediction mode labels in four 8*8 blocks, where and Indicates the minimum and maximum values of the prediction mode label of the i-th 8*8 block among the four 8*8 blocks. When , 16*16 merging is performed, otherwise no merging is performed; If all four 8*8 blocks are in inter-frame prediction mode, the average value of the motion vectors of the four 8*8 blocks is calculated, and the formula is: Among them, MvMean_x 16 and MvMean_y 16 Respectively represent the mean motion value in the X direction and the mean motion value in the Y direction of the current 16*16 block; and Represents the values of the X direction and Yf direction of the motion vector of the 8*8 block respectively; When the motion directions of the four 8*8 blocks are inconsistent, they are not merged. When the motion directions of the four 8*8 blocks are consistent, the variance MV of the motion vector of the 16*16 block is further calculated. Dsum16 ; Among them, MV Dsum16 represents the variance of the motion vector of the current 16*16 block; when MV Dsum16 < MVD_TH, four 8*8 blocks are merged; MVD_TH is the set threshold.
9. The HEVC encoding method according to claim 1, wherein Obtain the intra-frame prediction mode and inter-frame motion vector information of the current block, obtain the CU block information divided according to the intra-frame prediction mode and inter-frame motion vector information of the current block, and perform encoding.
Citation Information
Patent Citations
Depth prediction method and depth prediction device based on alternative temporal motion vector prediction
CN108347616A
Fast coding method in video coding
CN110351552A
Image encoding / decoding method and device, and recording medium storing bitstream
CN111373755A
Coarse search-based method and device for quickly dividing coding block and prediction block
CN118714326A
Method and apparatus for most probable mode list construction based on decoder-end intra mode derivation in video coding
CN119032569A