A fast frame size determination method and device for H.265 encoding
By combining the spatial correlation and image texture characteristics, predicting the prediction depth value of the CTU and calculating the texture complexity, determining the encoding size, solving the problem of not reducing the intra-frame coding complexity in the prior art, and achieving a significant reduction in the encoding complexity and the acceleration of the encoding process.
Patent Information
- Application Number
- CN202211271003.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-17
- Publication Date
- 2025-02-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the intra-coding complexity has not been sufficiently reduced, resulting in the complexity of the HEVC encoding process being too high and it is difficult to be practical in real-time application scenarios.
By combining the airspace correlation and image texture characteristics, the predicted depth value of the current CTU is predicted, and the texture complexity is calculated using the Robert gradient operator, and the preliminary coded size range is determined in combination with the predicted depth value and texture complexity, and finally according to the cost of rate distortion and edges Features determine the encoding size of the CU.
It effectively narrows the depth traversal range, significantly reduces the encoding complexity, and accelerates the HEVC encoding process.
Smart Images

Figure CN115695797B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video encoding, and in particular to a fast intra-frame size determination method and device for H.265 encoding. Background Art
[0002] As a new generation of video coding standard, H.265 / HEVC has doubled the compression efficiency compared to the previous generation video coding standard H.264 / AVC, but at the same time, the coding complexity has also increased greatly. This is mainly due to the introduction of some new technologies in HEVC (high efficiency video coding), such as large-size quadtree segmentation, higher prediction accuracy, 35 intra-frame prediction modes, RDO (rate distortion optimization) technology and SAO (sample adaptive offset) technology. The RDO process needs to calculate the coding cost of each coding size and prediction unit, and select the one with the lowest cost as the optimal size and prediction mode. Therefore, the RDO process is the most computationally intensive part of the encoder encoding process. HEVC divides the image into multiple CTUs (coding tree units). Each CTU block is recursively divided using a quadtree structure. A CTU can contain one or be cut into multiple CUs (coding units). A CU is a leaf node of a coding tree and is also the basic unit for prediction, transformation, quantization and entropy coding.
[0003] Due to the new technology introduced in HEVC, the encoding complexity is extremely high, which is not practical for real-time application scenarios such as video conferencing.
[0004] In order to reduce the complexity of video coding in the prior art, most of them only consider the correlation from the perspective of time and space domains or do not fully utilize the combination of image texture features and spatial domain correlation, which leads to that the complexity of intra-frame coding is still not fully reduced. For example, in the "A method and device for predicting depth division range based on HEVC" with application number 201910655001.2, the technical solution disclosed in the patent application mainly estimates the depth prediction range of the current CTU from the perspective of time and space domain correlation, but does not consider the texture features of the current CTU block itself. In the "HEVC intra-frame fast algorithm selection method based on video picture texture features" with application number 201910287565.5, the technical solution disclosed in the patent application uses CU image texture features to adopt different fast algorithms for mode selection and early termination, but does not fully exploit the spatial domain correlation of CU and combine image texture features with spatial domain correlation. Therefore, the above two comparison schemes have limitations in reducing coding complexity. Summary of the invention
[0005] The embodiments of the present invention provide a method and device for fast intra-frame size determination for H.265 encoding, which can effectively solve the problem that the complexity of intra-frame encoding in the prior art is still not sufficiently reduced, further narrow the depth traversal range, and greatly reduce the encoding complexity.
[0006] An embodiment of the present invention provides a fast intra-frame size determination method for H.265 encoding, which specifically includes:
[0007] Predicting a predicted depth value of a current CTU according to a coding depth of a first CTU; wherein the first CTU is a spatially adjacent coded CTU of the current CTU;
[0008] Calculating an average gradient value of the current CTU, and determining a texture complexity of the current CTU according to the average gradient value of the current CTU;
[0009] Determine a preliminary encoding size range of the current CTU by combining the predicted depth value and texture complexity of the current CTU;
[0010] According to the rate-distortion cost of the first CTU and the edge feature of the current CU, the coding size of the current CU is determined within a preliminary coding size range of the current CTU.
[0011] The embodiment of the present invention firstly estimates the predicted depth value of the current CTU by using spatial correlation, calculates the texture complexity of the current CTU by using the Robert gradient operator, estimates the preliminary depth traversal range of the current CTU block by combining the predicted depth value and the texture complexity, and finally determines the coding size of the current CU according to the rate-distortion cost of the first CTU and the edge features of the current CU, thereby further reducing the depth traversal range, accelerating the HEVC coding process and greatly reducing the coding complexity.
[0012] Further, predicting a predicted depth value of a current CTU according to a coding depth of the first CTU specifically includes:
[0013] Determine the number of the first CTUs according to the spatial domain correlation of the current CTU, and determine a weight factor of each first CTU according to the spatial domain correlation between each first CTU and the current CTU;
[0014] A coded depth value of each first CTU is obtained, and a predicted depth value of a current CTU is determined according to the coded depth value of each first CTU and a weight factor.
[0015] As a preferred solution, the predicted depth value of the current CTU is determined according to the coded depth value and the weight factor of each first CTU, specifically:
[0016] The predicted depth value of the current CTU is calculated according to the following formula:
[0017]
[0018] Among them, Depth pre is the predicted depth value of the current CTU, N is the number of the first CTU, ω i is the weight factor of the first CTU, level i is the coded depth value of the first CTU, the weight factor ω i The setting is performed according to the correlation between the current CTU and each first CTU.
[0019] As a preferred solution, obtaining the coding depth value of each first CTU specifically includes:
[0020] The depth value of the left CTU is replaced by the average depth value of its right half CTU block, the depth value of the upper CTU is replaced by the average depth value of its lower half CTU block, and the depth values of the upper left CTU and the upper right CTU are replaced by the depth value of the CU most adjacent to the current CTU block.
[0021] The present invention uses spatially adjacent encoded CTU blocks to predict the depth value of the current CTU block, which can effectively speed up the encoding speed and reduce the encoding complexity.
[0022] Further, the calculating an average gradient value of the current CTU, and determining the texture complexity of the current CTU according to the average gradient value of the current CTU, specifically includes:
[0023] When the average gradient value of the CTU is equal to the first threshold, the current CTU is determined to be an absolutely flat texture block; when the average gradient value of the CTU is between the first threshold and the second threshold, the current CTU is determined to be a flat texture block; when the average gradient value of the CTU is between the second threshold and the third threshold, the current CTU is determined to be a normal texture block; when the average gradient value of the CTU is greater than the third threshold, the current CTU is determined to be a complex texture block.
[0024] As a preferred solution, the combining of the predicted depth value and texture complexity of the current CTU to determine the preliminary encoding size range of the current CTU specifically includes:
[0025] When the predicted depth value of the current CTU is within the range from the starting threshold to the preset lower threshold, if the current CTU is a complex texture block, the preliminary coding size range of the current CTU is determined to be: 32×32, 16×16, 8×8; if the current CTU is an absolutely flat texture block, the preliminary coding size range of the current CTU is determined to be: 32×32; otherwise, the preliminary coding size range of the current CTU is determined to be: 32×32, 16×16;
[0026] When the predicted depth value of the current CTU is within the range from a preset lower threshold to a preset upper threshold, if the current CTU is a complex texture block, the preliminary coding size range of the current CTU is determined to be: 16×16, 8×8; if the current CTU is a flat texture block, the preliminary coding size range of the current CTU is determined to be: 32×32, 16×16; if the current CTU is a normal texture block, the preliminary coding size range of the current CTU is determined to be: 32×32, 16×16, 8×8;
[0027] When the predicted depth value of the current CTU is greater than a preset upper threshold, if the current CTU is a complex texture block, the preliminary encoding size range of the current CTU is determined to be: 8×8; if the current CTU is a flat texture block or a normal texture block, the preliminary encoding size range of the current CTU is determined to be: 16×16, 8×8.
[0028] The predicted depth value and texture complexity data of the CTU block obtained in the previous step are combined and classified, and the initial depth traversal range is estimated according to the principle of skipping small-size encoding for flat texture blocks and skipping large-size encoding for complex texture blocks, which can effectively reduce the complexity of the encoding process.
[0029] Further, determining the coding size of the current CU from within the preliminary coding size range of the current CTU according to the rate-distortion cost of the first CTU and the edge feature of the current CU specifically includes:
[0030] Obtaining the average rate-distortion cost of the encoded CU in the current CTU and the encoded CU in each first CTU;
[0031] Calculating a rate-distortion cost threshold according to an average rate-distortion cost of an encoded CU in the current CTU and an average rate-distortion cost of an encoded CU in each first CTU;
[0032] If the minimum rate-distortion cost of the current CU is less than the rate-distortion cost threshold, the current CU is encoded using a 16×16 size;
[0033] If the minimum rate-distortion cost of the current CU is greater than the rate-distortion cost threshold, judging whether the coding size of the current CU can be determined according to the edge features of the current CU, and if it can be determined, directly determining the coding size of the current CU;
[0034] If the coding size of the current CU still cannot be determined according to the edge features of the current CU, the rate-distortion cost of the current CU under each coding size is calculated, and after comparison, the size with the smallest rate-distortion cost is adopted as the coding size of the current CU.
[0035] Using the optimal rate-distortion cost of spatially adjacent CTUs and the edge features of the current CU to achieve CU-level early termination can further reduce the depth traversal range and accelerate the HEVC encoding process.
[0036] As a preferred solution, determining the encoding size of the current CU according to the edge features of the current CU specifically includes:
[0037] If the current CU does not contain an edge and the CTU in which it is located is a texture flat block, the current CU is encoded using a 16×16 size;
[0038] If the current CU contains an edge and all its sub-CUs contain edges, the current CU is encoded using an 8×8 size.
[0039] As a preferred solution, the step of acquiring the edge features of the current CU specifically includes:
[0040] Calculate the edge map of the downsampled image of the current image and threshold it;
[0041] Establish an edge quadtree for the edge graph by recursively partitioning the edge graph into quadtrees;
[0042] According to the position mapping relationship from the downsampled image to the full-resolution image, the edge features of the currently encoded CU and its sub-CUs are obtained.
[0043] Based on the above method embodiment, the present invention provides a corresponding device embodiment.
[0044] Another embodiment of the present invention provides a fast intra-frame size determination device for H.265 encoding, including: a depth value prediction module, a texture complexity calculation module, a preliminary depth traversal range estimation module, and a CU encoding size selection module;
[0045] The depth value prediction module is used to predict the predicted depth value of the current CTU according to the coded depth of the first CTU; wherein the first CTU is a spatially adjacent coded CTU of the current CTU;
[0046] The texture complexity calculation module is used to calculate the average gradient value of the current CTU, and determine the texture complexity of the current CTU according to the average gradient value of the current CTU;
[0047] The preliminary depth traversal range estimation module is used to determine the preliminary coding size range of the current CTU by combining the predicted depth value and texture complexity of the current CTU;
[0048] The CU encoding size selection module is used to determine the encoding size of the current CU from within the preliminary encoding size range of the current CTU according to the rate-distortion cost of the first CTU and the edge characteristics of the current CU.
[0049] Compared with the prior art, the fast intra-frame size determination device for H.265 encoding disclosed in the embodiment of the present invention estimates the preliminary depth traversal range of the current CTU block by jointly predicting the depth value and texture complexity, and then determines the coding size of the current CU according to the rate-distortion cost of the first CTU and the edge features of the current CU, thereby accelerating the HEVC encoding process and greatly reducing the encoding complexity. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a flowchart of a method for selecting an encoding size for H.265 encoding provided by an embodiment of the present invention.
[0051] Figure 2 It is a structural schematic diagram of a coding size selection device for H.265 coding provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] As a new generation of video coding standard, H.265 / HEVC has doubled the compression efficiency compared to the previous generation video coding standard H.264 / AVC, but at the same time, the coding complexity has also increased greatly. This is mainly due to the introduction of some new technologies in HEVC (high efficiency video coding), such as large-size quadtree segmentation, higher prediction accuracy, 35 intra-frame prediction modes, RDO (rate distortion optimization) technology and SAO (sample adaptive offset) technology. The RDO process needs to calculate the coding cost of each coding size and prediction unit, and select the one with the lowest cost as the optimal size and prediction mode. Therefore, the RDO process is the most computationally intensive part of the encoder encoding process. HEVC divides the image into multiple CTUs (coding tree units). Each CTU block is recursively divided using a quadtree structure. A CTU can contain one or be cut into multiple CUs (coding units). A CU is a leaf node of a coding tree and is also the basic unit for prediction, transformation, quantization and entropy coding.
[0054] See also Figure 1 , is a flow chart of a method for selecting a coding size for H.265 coding provided by an embodiment of the present invention, including:
[0055] S101: predicting a predicted depth value of a current CTU according to a coding depth of a first CTU; wherein the first CTU is a spatially adjacent coded CTU of the current CTU;
[0056] S102: Calculate an average gradient value of the current CTU, and determine the texture complexity of the current CTU according to the average gradient value of the current CTU;
[0057] S103: Determine a preliminary coding size range of the current CTU by combining the predicted depth value and texture complexity of the current CTU;
[0058] S104: Determine a coding size of the current CU from within a preliminary coding size range of the current CTU according to the rate-distortion cost of the first CTU and edge features of the current CU.
[0059] Compared with the prior art which only considers the temporal and spatial domain correlation or does not fully utilize the combination of image texture features and spatial domain correlation, the embodiment of the present invention utilizes spatial domain correlation to estimate the predicted depth value of the current CTU, and utilizes the Robert gradient operator to calculate the texture complexity of the current CTU, and jointly estimates the preliminary depth traversal range of the current CTU block with the predicted depth value and texture complexity, and finally determines the coding size of the current CU according to the rate-distortion cost of the first CTU and the edge features of the current CU, thereby further reducing the depth traversal range, accelerating the HEVC coding process and greatly reducing the coding complexity.
[0060] For step S101, specifically, the number of the first CTUs is determined according to the spatial correlation of the current CTU, and the weight factor of each first CTU is determined according to the spatial correlation between each first CTU and the current CTU. The coded depth value of each first CTU is obtained, and the predicted depth value of the current CTU is determined according to the coded depth value and the weight factor of each first CTU.
[0061] In a preferred embodiment, the predicted depth value of the current CTU is calculated according to the following formula:
[0062]
[0063] Among them, Depth pre is the predicted depth value of the current CTU, N is the number of the first CTU, ω i is the weight factor of the first CTU, level i is the coded depth value of the first CTU, the weight factor ω i The weight factor is set according to the correlation between the current CTU and each first CTU. In an example of setting the weight factor, since the left CTU and the upper CTU have a greater correlation with the current CTU, ω i are set to 0.3 respectively; the upper left CTU and the upper right CTU have a smaller correlation with the current CTU, ω i Set to 0.2 respectively.
[0064] In a preferred embodiment, the depth value of the left CTU is replaced by the average depth value of its right half CTU block, the depth value of the upper CTU is replaced by the average depth value of its lower half CTU block, and the depth values of the upper left CTU and the upper right CTU are replaced by the depth value of the CU most adjacent to the current CTU block.
[0065] Step S101 uses the spatially adjacent encoded CTU blocks to predict the depth value of the current CTU block, which can effectively speed up the encoding speed and reduce the encoding complexity.
[0066] For step S102, specifically, when the average gradient value of the CTU is equal to the first threshold, the current CTU is determined to be an absolutely flat texture block; when the average gradient value of the CTU is between the first threshold and the second threshold, the current CTU is determined to be a flat texture block; when the average gradient value of the CTU is between the second threshold and the third threshold, the current CTU is determined to be a normal texture block; when the average gradient value of the CTU is greater than the third threshold, the current CTU is determined to be a complex texture block. In this embodiment, the first threshold is 0, the second threshold is 5, and the third threshold is 10.
[0067] In a preferred embodiment, the Roberts gradient operator is used to measure the texture complexity of the CTU block. The specific calculation formula is as follows:
[0068] The calculation method of Roberts gradient operator is:
[0069] g x =f(x+1,y)-f(x,y)
[0070] g y =f(x,y+1)-f(x,y)
[0071] G(x,y)=|g x +g y |
[0072]
[0073] Among them, f(x,y) represents the pixel value at the position (x,y), g x Represents the horizontal gradient of (x, y), g y represents the vertical gradient of (x, y), G(x, y) represents the gradient at (x, y), G avg Indicates the average gradient value of the current CTU.
[0074] For step S103, specifically:
[0075] When the predicted depth value of the current CTU is within the range from the starting threshold to the preset lower threshold, if the current CTU is a complex texture block, the preliminary coding size range of the current CTU is determined to be: 32×32, 16×16, 8×8; if the current CTU is an absolutely flat texture block, the preliminary coding size range of the current CTU is determined to be: 32×32; otherwise, the preliminary coding size range of the current CTU is determined to be: 32×32, 16×16;
[0076] When the predicted depth value of the current CTU is within the range from a preset lower threshold to a preset upper threshold, if the current CTU is a complex texture block, the preliminary coding size range of the current CTU is determined to be: 16×16, 8×8; if the current CTU is a flat texture block, the preliminary coding size range of the current CTU is determined to be: 32×32, 16×16; if the current CTU is a normal texture block, the preliminary coding size range of the current CTU is determined to be: 32×32, 16×16, 8×8;
[0077] When the predicted depth value of the current CTU is greater than a preset upper threshold, if the current CTU is a complex texture block, the preliminary encoding size range of the current CTU is determined to be: 8×8; if the current CTU is a flat texture block or a normal texture block, the preliminary encoding size range of the current CTU is determined to be: 16×16, 8×8.
[0078] In a preferred embodiment, the starting threshold is 0, the preset lower threshold is 0.5, and the preset upper threshold is 2.5.
[0079] The predicted depth value and texture complexity data of the CTU block obtained in the previous step are combined and classified, and the initial depth traversal range is estimated according to the principle of skipping small-size encoding for flat texture blocks and skipping large-size encoding for complex texture blocks, which can effectively reduce the complexity of the encoding process.
[0080] For step S104, specifically:
[0081] Obtain the average rate-distortion cost of the encoded 16×16 CU in the current CTU and the encoded 16×16 CU in each first CTU, which are recorded as RDcost1 and RDcost2 respectively;
[0082] Calculate the rate distortion cost threshold THR according to the RDcost1 and RDcost2, and the specific calculation formula is THR=RDcost1*0.6+RDcost2*0.4;
[0083] If the minimum rate-distortion cost of the current 16×16 CU is less than the rate-distortion cost threshold, the current CU is encoded using a 16×16 size;
[0084] If the minimum rate-distortion cost of the current CU is greater than the rate-distortion cost threshold, judging whether the coding size of the current CU can be determined according to the edge features of the current CU, and if it can be determined, directly determining the coding size of the current CU;
[0085] If the coding size of the current CU still cannot be determined according to the edge features of the current CU, the rate-distortion cost of the current CU under each coding size is calculated, and after comparison, the size with the smallest rate-distortion cost is adopted as the coding size of the current CU.
[0086] Using the optimal rate-distortion cost of spatially adjacent CTUs and the edge features of the current CU to achieve CU-level early termination can further reduce the depth traversal range and accelerate the HEVC encoding process.
[0087] In a preferred embodiment, determining the encoding size of the current CU according to the edge features of the current CU specifically includes:
[0088] If the current 16×16 CU does not contain an edge and the CTU in which it is located is a texture flat block, the current CU is encoded in 16×16 size;
[0089] If the current 16×16 CU contains an edge and its four sub-CUs all contain edges, the current CU is encoded using an 8×8 size.
[0090] The step of obtaining the edge features of the current CU specifically includes:
[0091] The Sobel operator is used to calculate the edge map of the 1 / 4 downsampled image of the current image, and the OTSU method is used to threshold it;
[0092] The edge graph is recursively divided into quadtrees from 32x32 to 4x4 to create edge quadtrees;
[0093] According to the position mapping relationship from the 1 / 4 down-sampled image to the full-resolution image, the edge features of the currently encoded 16×16 CU and its four sub-CUs are obtained.
[0094] Based on the above method embodiment, the present invention provides a corresponding device embodiment;
[0095] See also Figure 2 , is a schematic structural diagram of a coding size selection device for H.265 coding provided by an embodiment of the present invention, comprising: a depth value prediction module 201, a texture complexity calculation module 202, a preliminary depth traversal range estimation module 203, and a CU coding size selection module 204;
[0096] The depth value prediction module 201 is used to predict the predicted depth value of the current CTU according to the coded depth of the first CTU; wherein the first CTU is a spatially adjacent coded CTU of the current CTU;
[0097] The texture complexity calculation module 202 is used to calculate the average gradient value of the current CTU, and determine the texture complexity of the current CTU according to the average gradient value of the current CTU;
[0098] The preliminary depth traversal range estimation module 203 is used to determine the preliminary coding size range of the current CTU by combining the predicted depth value and texture complexity of the current CTU;
[0099] The CU coding size selection module 204 is used to determine the coding size of the current CU from within the preliminary coding size range of the current CTU according to the rate-distortion cost of the first CTU and the edge characteristics of the current CU.
[0100] Compared with the prior art, the fast intra-frame size determination device for H.265 encoding disclosed in the embodiment of the present invention estimates the preliminary depth traversal range of the current CTU block by jointly predicting the depth value and texture complexity, and then determines the coding size of the current CU according to the rate-distortion cost of the first CTU and the edge features of the current CU, thereby accelerating the HEVC encoding process and greatly reducing the encoding complexity.
[0101] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0102] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A coding size selection method for H.265 coding, characterized in that: The following steps are involved: Predicting a predicted depth value of a current CTU according to a coding depth of a first CTU; wherein the first CTU is a spatially adjacent coded CTU of the current CTU; and the CTU is a coding tree unit; Calculating an average gradient value of the current CTU, and determining a texture complexity of the current CTU according to the average gradient value of the current CTU; Determine a preliminary encoding size range of the current CTU by combining the predicted depth value and texture complexity of the current CTU; Determine, according to the rate-distortion cost of the first CTU and the edge feature of the current CU, a coding size of the current CU within a preliminary coding size range of the current CTU; the CU is a coding unit; The determining, according to the rate-distortion cost of the first CTU and the edge feature of the current CU, the coding size of the current CU from within the preliminary coding size range of the current CTU specifically includes: Obtaining the average rate-distortion cost of the encoded CU in the current CTU and the encoded CU in each first CTU; Calculating a rate-distortion cost threshold according to an average rate-distortion cost of an encoded CU in the current CTU and an average rate-distortion cost of an encoded CU in each first CTU; If the minimum rate-distortion cost of the current 16×16 CU is less than the rate-distortion cost threshold, the current CU is encoded using a 16×16 size; If the minimum rate-distortion cost of the current 16×16 CU is greater than the rate-distortion cost threshold, it is determined whether the coding size of the current 16×16 CU can be determined according to the edge features of the current 16×16 CU; wherein, if the current 16×16 CU does not contain an edge and the CTU in which it is located is a texture flat block, the current CU is encoded with a 16×16 size; if the current 16×16 CU contains an edge and its four sub-CUs all contain edges, the current CU is encoded with an 8×8 size; if the edge features of the current 16×16 CU are different from the above, the rate-distortion costs of the current 16×16 CU under each coding size are calculated, and after comparison, the size with the minimum rate-distortion cost is adopted as the coding size of the current CU.
2. A method for selecting a coding size for H.265 coding as claimed in claim 1, characterized in that: The predicting the predicted depth value of the current CTU according to the coded depth of the first CTU specifically includes: Determine the number of the first CTUs according to the spatial domain correlation of the current CTU, and determine a weight factor of each first CTU according to the spatial domain correlation between each first CTU and the current CTU; A coded depth value of each first CTU is obtained, and a predicted depth value of a current CTU is determined according to the coded depth value of each first CTU and a weight factor.
3. A method for selecting a coding size for H.265 coding as claimed in claim 2, characterized in that: The step of determining the predicted depth value of the current CTU according to the coded depth value of each first CTU and the weight factor is specifically as follows: The predicted depth value of the current CTU is calculated according to the following formula: in, is the predicted depth value of the current CTU, N is the number of the first CTU, is the weight factor of the first CTU, is the coded depth value of the first CTU, the weight factor The setting is performed according to the correlation between the current CTU and each first CTU.
4. A method for selecting a coding size for H.265 coding as claimed in claim 2, characterized in that: The obtaining of the coding depth value of each first CTU specifically includes: The depth value of the left CTU is replaced by the average depth value of its right half CTU block, the depth value of the upper CTU is replaced by the average depth value of its lower half CTU block, and the depth values of the upper left CTU and the upper right CTU are replaced by the depth value of the CU most adjacent to the current CTU block.
5. The method for selecting a coding size for H.265 coding according to claim 1, wherein: The calculating the average gradient value of the current CTU, and determining the texture complexity of the current CTU according to the average gradient value of the current CTU, specifically includes: When the average gradient value of the CTU is equal to the first threshold, the current CTU is determined to be an absolutely flat texture block; when the average gradient value of the CTU is between the first threshold and the second threshold, the current CTU is determined to be a flat texture block; when the average gradient value of the CTU is between the second threshold and the third threshold, the current CTU is determined to be a normal texture block; when the average gradient value of the CTU is greater than the third threshold, the current CTU is determined to be a complex texture block.
6. A method for selecting a coding size for H.265 coding as claimed in claim 5, characterized in that: The combining the predicted depth value and texture complexity of the current CTU to determine the preliminary encoding size range of the current CTU specifically includes: When the predicted depth value of the current CTU is within the range from the starting threshold to the preset lower threshold, if the current CTU is a complex texture block, the preliminary coding size range of the current CTU is determined to be: 32×32, 16×16, 8×8; if the current CTU is an absolutely flat texture block, the preliminary coding size range of the current CTU is determined to be: 32×32; otherwise, the preliminary coding size range of the current CTU is determined to be: 32×32, 16×16; When the predicted depth value of the current CTU is within the range from a preset lower threshold to a preset upper threshold, if the current CTU is a complex texture block, the preliminary coding size range of the current CTU is determined to be: 16×16, 8×8; if the current CTU is a flat texture block, the preliminary coding size range of the current CTU is determined to be: 32×32, 16×16; if the current CTU is a normal texture block, the preliminary coding size range of the current CTU is determined to be: 32×32, 16×16, 8×8; When the predicted depth value of the current CTU is greater than a preset upper threshold, if the current CTU is a complex texture block, the preliminary encoding size range of the current CTU is determined to be: 8×8; if the current CTU is a flat texture block or a normal texture block, the preliminary encoding size range of the current CTU is determined to be: 16×16, 8×8.
7. A method for selecting a coding size for H.265 coding as claimed in claim 1, characterized in that: The step of acquiring the edge features of the current CU specifically includes: Calculate the edge map of the downsampled image of the current image and threshold it; Establish an edge quadtree for the edge graph by recursively partitioning the edge graph into quadtrees; According to the position mapping relationship from the downsampled image to the full-resolution image, the edge features of the currently encoded CU and its sub-CUs are obtained.
8. A coding size selection device for H.265 coding, characterized in that: include: Depth value prediction module, texture complexity calculation module, preliminary depth traversal range estimation module, CU encoding size selection module; The depth value prediction module is used to predict the predicted depth value of the current CTU according to the coding depth of the first CTU; wherein the first CTU is a spatially adjacent coded CTU of the current CTU; and the CTU is a coding tree unit; The texture complexity calculation module is used to calculate the average gradient value of the current CTU, and determine the texture complexity of the current CTU according to the average gradient value of the current CTU; The preliminary depth traversal range estimation module is used to determine the preliminary coding size range of the current CTU by combining the predicted depth value and texture complexity of the current CTU; The CU coding size selection module is used to determine the coding size of the current CU from the preliminary coding size range of the current CTU according to the rate-distortion cost of the first CTU and the edge characteristics of the current CU; the CU is a coding unit; The CU coding size selection module determines the coding size of the current CU from within the preliminary coding size range of the current CTU according to the rate-distortion cost of the first CTU and the edge feature of the current CU, specifically including: The CU encoding size selection module obtains the average rate-distortion cost of the encoded CU in the current CTU and the encoded CU in each first CTU; Calculating a rate-distortion cost threshold according to an average rate-distortion cost of an encoded CU in the current CTU and an average rate-distortion cost of an encoded CU in each first CTU; If the minimum rate-distortion cost of the current 16×16 CU is less than the rate-distortion cost threshold, the current CU is encoded using a 16×16 size; If the minimum rate-distortion cost of the current 16×16 CU is greater than the rate-distortion cost threshold, the CU encoding size selection module determines whether the encoding size of the current 16×16 CU can be determined according to the edge features of the current 16×16 CU; wherein, if the current 16×16 CU does not contain an edge and the CTU in which it is located is a texture flat block, the current CU is encoded in a 16×16 size; if the current 16×16 CU contains an edge and its four sub-CUs all contain edges, the current CU is encoded in an 8×8 size; if the edge features of the current 16×16 CU are different from the above, the rate-distortion costs of the current 16×16 CU under each encoding size are calculated, and after comparison, the size with the minimum rate-distortion cost is adopted as the encoding size of the current CU.
Citation Information
Patent Citations
A Fast Intra-Frame Selection Algorithm for HEVC Based on Video Image Texture Features
CN110113601B
Method and device for predicting depth division range based on HEVC
CN110381312A
HEVC intra-frame prediction coding method and system
CN103957414A
HEVC interframe coding quick mode selection method
CN105141954A