CN103517069B - A kind of HEVC intra-frame prediction quick mode selection method based on texture analysis - Google Patents
A kind of HEVC intra-frame prediction quick mode selection method based on texture analysis Download PDFInfo
- Publication number
- CN103517069B CN103517069B CN201310445775.5A CN201310445775A CN103517069B CN 103517069 B CN103517069 B CN 103517069B CN 201310445775 A CN201310445775 A CN 201310445775A CN 103517069 B CN103517069 B CN 103517069B
- Authority
- CN
- China
- Prior art keywords
- unit
- prediction
- coding
- texture
- hevc
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本发明公布了一种基于纹理分析的HEVC帧内预测快速模式选择方法,该方法在对编码树单元进行帧内预测之前,根据水平、垂直、左下、右下等四个方向上的梯度绝对值和确定编码树单元中每一个4×4单元的主纹理方向和纹理复杂度,并根据纹理平滑区域采用较大编码单元,纹理复杂区域采用较小编码单元的原则确定当前编码树单元的划分。在预测时,根据预测单元的主纹理方向,排除掉最不可能的若干预测模式,然后按照HEVC编码标准进行粗略模式选择和率失真优化模式选择。本发明所提出的基于纹理分析的HEVC帧内预测快速模式选择方法能够在保证编码质量的前提下,显著提高编码速度。
The present invention discloses a fast mode selection method for HEVC intra-frame prediction based on texture analysis. Before performing intra-frame prediction on the coding tree unit, the method uses the absolute value of the gradient in the four directions of horizontal, vertical, left-bottom, and right-bottom. and determine the main texture direction and texture complexity of each 4×4 unit in the coding tree unit, and determine the division of the current coding tree unit according to the principle that a larger coding unit is used in the texture smooth area and a smaller coding unit is used in the texture complex area. When predicting, according to the main texture direction of the prediction unit, several least likely prediction modes are excluded, and then rough mode selection and rate-distortion optimization mode selection are performed according to the HEVC coding standard. The fast mode selection method for HEVC intra-frame prediction based on texture analysis proposed by the present invention can significantly improve the encoding speed under the premise of ensuring the encoding quality.
Description
技术领域technical field
本发明属于多媒体编码领域,具体涉及一种针对HEVC视频编码标准的帧内预测快速模式选择方法,是一种根据图像纹理分析进行编码单元划分和预测方向快速模式选择的方法。The invention belongs to the field of multimedia coding, and in particular relates to a fast mode selection method for intra-frame prediction aimed at the HEVC video coding standard, which is a method for dividing coding units and fast mode selection for prediction directions according to image texture analysis.
背景技术Background technique
随着新一代视频编码标准HEVC(High Efficiency Video Coding)的发布,视频的编码效率进一步提升。相比于以前的视频编码标准H.264/AVC,在相同编码质量的情况下,可以节省近一半的码率,然而这是以牺牲编码复杂度为代价的。如何在不改变码流结构和保持原有码率的前提下,最大程度的降低算法复杂度,显著提高编码速度,是HEVC大规模推广与应用的关键所在。With the release of the next-generation video coding standard HEVC (High Efficiency Video Coding), video coding efficiency has been further improved. Compared with the previous video coding standard H.264/AVC, under the same coding quality, it can save nearly half of the code rate, but this is at the expense of coding complexity. How to minimize the complexity of the algorithm and significantly improve the encoding speed without changing the code stream structure and maintaining the original code rate is the key to the large-scale promotion and application of HEVC.
帧内编码可以为帧间编码提供参考信息,并且可以阻止由误码引起的错误漂移,因此在视频编码中帧内编码是必不可少的。影响HEVC帧内编码耗时的主要有两个部分:编码单元的划分和预测方向的选择。Intra-frame coding can provide reference information for inter-frame coding, and can prevent error drift caused by bit errors, so intra-frame coding is essential in video coding. There are mainly two parts that affect the time-consuming of HEVC intra-frame encoding: the division of coding units and the selection of prediction directions.
针对编码单元的快速划分主要有两种方法,一是根据已编码单元的率失真代价利用贝叶斯等统计学习的方法确定编码单元的划分,然而离线的学习结果不能很好的通用于所有的视频序列,在线的学习方式又会引入额外的计算复杂度;二是根据当前编码单元的图像内容复杂度确定编码单元的划分,这种方法的关键在于计算图像复杂度以及选择合适的阈值。There are mainly two methods for fast division of coding units. One is to use Bayesian and other statistical learning methods to determine the division of coding units according to the rate-distortion cost of the coded units. However, the off-line learning results cannot be used well for all For video sequences, the online learning method will introduce additional computational complexity; the second is to determine the division of the coding unit according to the image content complexity of the current coding unit. The key to this method is to calculate the image complexity and select an appropriate threshold.
针对预测方向的快速模式选择主要有三种方法,一是根据相邻区域或者相邻帧间具有较强的相关性,利用周围编码单元的信息减少当前编码单元的预测方向候选集,然而实际应用中,经常出现场景切换或纹理丰富的视频,这种情况下时空相关性较弱,导致编码性能明显下降;二是利用最佳的预测方向与编码单元的纹理方向间较高的相关性,减少候选预测方向的数量;三是通过一种低复杂度的方式估计每一种预测模式的码率和失真降低率失真代价的计算复杂度,这种方法保留了所有的预测方向,并且没有增加额外的计算复杂度,但是由于自然图像视频序列的随机性较强,很难构造一个适用于所有视频序列的率失真估计模型,相比于第二种方法,这种方法的编码性能下降比较明显。There are three main methods for fast mode selection of the prediction direction. One is to use the information of the surrounding coding units to reduce the prediction direction candidate set of the current coding unit according to the strong correlation between adjacent regions or adjacent frames. However, in practical applications , there are often scene switching or texture-rich videos. In this case, the spatio-temporal correlation is weak, resulting in a significant drop in coding performance; the second is to use the high correlation between the best prediction direction and the texture direction of the coding unit to reduce candidate The number of prediction directions; the third is to estimate the code rate and distortion of each prediction mode in a low-complexity way to reduce the computational complexity of the rate-distortion cost. This method retains all prediction directions and does not add additional Computational complexity, but due to the strong randomness of natural image video sequences, it is difficult to construct a rate-distortion estimation model suitable for all video sequences. Compared with the second method, the coding performance of this method has dropped significantly.
在新一代视频编码标准中,HEVC引入了新的编码树单元(Coding Tree Unit,CTU)概念,用于替代现有视频编码标准中的宏块概念,另外还有编码单元、预测单元、变换单元等概念。编码树单元是一个递归的四叉树结构,深度可以从0到3,即编码单元的大小可以从64×64到8×8。对于最小的编码单元来说,HEVC的帧内编码又可以将其划分为4×4的预测单元,预测单元的大小可以从64×64到4×4。而对于帧内预测来说,HEVC对每一个预测单元都提供了35种预测模式。相比于现有视频编码标准H.264/AVC,编码单元划分和预测方向选择的优化问题更为复杂。本发明根据纹理分析构造当前编码树单元的图像复杂度描述,并据此快速确定编码单元的划分;利用纹理分析获得的纹理方向与预测方向间较强的相关性,减少预测模式的数量。In the new generation of video coding standards, HEVC introduces a new coding tree unit (Coding Tree Unit, CTU) concept, which is used to replace the concept of macroblocks in existing video coding standards. In addition, there are coding units, prediction units, and transformation units. and other concepts. The coding tree unit is a recursive quadtree structure, and the depth can range from 0 to 3, that is, the size of the coding unit can be from 64×64 to 8×8. For the smallest coding unit, HEVC intra-frame coding can divide it into 4×4 prediction units, and the size of the prediction unit can range from 64×64 to 4×4. For intra prediction, HEVC provides 35 prediction modes for each prediction unit. Compared with the existing video coding standard H.264/AVC, the optimization problems of coding unit division and prediction direction selection are more complicated. The invention constructs the image complexity description of the current coding tree unit according to the texture analysis, and quickly determines the division of the coding unit according to the texture analysis; utilizes the strong correlation between the texture direction obtained by the texture analysis and the prediction direction, and reduces the number of prediction modes.
发明内容Contents of the invention
为了克服现有技术的上述缺陷,本发明提出了一种基于纹理分析的HEVC帧内预测快速模式选择方法,该方法根据视频内容的复杂度确定编码树单元的划分,并根据图像的纹理方向减小预测方向的候选集。实验证明本方法能够很好的适应高清视频图像的实时压缩应用,大大提高了编码速度。In order to overcome the above-mentioned defects of the prior art, the present invention proposes a fast mode selection method for HEVC intra prediction based on texture analysis, which determines the division of coding tree units according to the complexity of the video content, and reduces Candidate set for small prediction directions. Experiments prove that this method can well adapt to the real-time compression application of high-definition video images, and greatly improves the encoding speed.
为实现上述目的,本发明采用的技术方案为:To achieve the above object, the technical solution adopted in the present invention is:
一种基于纹理分析的HEVC帧内预测快速模式选择方法,该方法步骤如下:A fast mode selection method for HEVC intra-frame prediction based on texture analysis, the method steps are as follows:
步骤(1)、对当前编码树单元,计算每个可能的编码单元的图像复杂度和主纹理方向;Step (1), for the current coding tree unit, calculate the image complexity and main texture direction of each possible coding unit;
步骤(2)、对当前编码树单元,按照Z扫描顺序从上往下重复执行步骤(3)至步骤(6),直至扫描完当前编码树单元;Step (2), for the current coding tree unit, repeat step (3) to step (6) from top to bottom according to the Z scanning order until the current coding tree unit is scanned;
步骤(3)、若当前编码单元的图像复杂度小于或等于阈值,则判定该编码单元为平滑单元,否则判定为复杂单元;Step (3), if the image complexity of the current coding unit is less than or equal to the threshold, it is determined that the coding unit is a smooth unit, otherwise it is determined as a complex unit;
步骤(4)、对于平滑的编码单元,利用步骤(5)计算当前编码单元的率失真代价;Step (4), for a smooth coding unit, use step (5) to calculate the rate-distortion cost of the current coding unit;
步骤(5)、对于当前编码单元中的每一个预测单元,保留该单元主纹理方向周围的8个预测方向以及planar预测和DC预测模式,按照HEVC视频编码标准进行粗略模式选择和率失真优化选择;Step (5), for each prediction unit in the current coding unit, retain the 8 prediction directions around the main texture direction of the unit, planar prediction and DC prediction mode, and perform rough mode selection and rate-distortion optimization selection according to the HEVC video coding standard ;
步骤(6)、对于复杂的编码单元,按照步骤(3)至步骤(6)依次递归扫描四个子单元,若四个子单元都判定为平滑单元,则利用步骤(5)计算当前编码单元的率失真代价,并根据率失真代价最小原则判定当前编码单元是否划分,同时更新阈值。Step (6), for complex coding units, follow steps (3) to (6) to recursively scan four sub-units in sequence, and if all four sub-units are determined to be smooth units, use step (5) to calculate the rate of the current coding unit Distortion cost, and determine whether the current coding unit is divided according to the principle of minimum rate-distortion cost, and update the threshold at the same time.
所述步骤(1)具体包括如下步骤:The step (1) specifically includes the following steps:
步骤(11)、对当前编码树单元中的每一个4×4的单元,分别沿水平、垂直、左下、右下四个方向计算梯度并计算梯度的绝对值和SAG;Step (11), for each 4×4 unit in the current coding tree unit, calculate the gradient along the horizontal, vertical, lower left, and lower right directions and calculate the absolute value of the gradient and SAG;
步骤(12)、将最小梯度绝对值和的梯度方向作为该单元的主纹理方向,所述主纹理方向是指该单元大部分像素的纹理方向;Step (12), taking the gradient direction of the minimum gradient absolute value sum as the main texture direction of the unit, and the main texture direction refers to the texture direction of most pixels of the unit;
步骤(13)、将主纹理方向与其正交方向上SAG差的绝对值定义为该单元的纹理复杂度,并利用量化步长与该单元大小的乘积作为初始阈值。Step (13), define the absolute value of the SAG difference between the main texture direction and its orthogonal direction as the texture complexity of the unit, and use the product of the quantization step size and the unit size as the initial threshold.
所述步骤(5)具体包括如下步骤:The step (5) specifically includes the following steps:
步骤(51)、定义一个候选预测模式数组;Step (51), defining an array of candidate prediction modes;
步骤(52)、根据步骤(1)获取当前预测单元的主纹理方向,并将主纹理方向及其周围的8个预测方向作为候选预测方向;Step (52), obtain the main texture direction of the current prediction unit according to step (1), and use the main texture direction and eight surrounding prediction directions as candidate prediction directions;
步骤(53)、将候选预测方向映射到HEVC编码标准中的角度预测模式,并将选择的角度预测模式和planar以及DC模式添加到候选预测模式数组;Step (53), mapping the candidate prediction direction to the angle prediction mode in the HEVC coding standard, and adding the selected angle prediction mode, planar and DC mode to the candidate prediction mode array;
步骤(54)、对候选预测模式数组中的每一个预测模式,按照HEVC编码标准进行粗略模式选择和率失真优化模式选择。Step (54), for each prediction mode in the candidate prediction mode array, perform rough mode selection and rate-distortion optimization mode selection according to the HEVC coding standard.
所述步骤(6)具体包括如下步骤:The step (6) specifically includes the following steps:
步骤(61)、按照步骤(3)至步骤(6)依次递归扫描四个子单元,若四个子单元都判定为平滑单元,则利用步骤(5)计算当前编码单元的率失真代价Costcoarse,否则继续递归扫描下一层次的子单元;Step (61), recursively scan the four sub-units according to step (3) to step (6), if all four sub-units are determined to be smooth units, use step (5) to calculate the rate-distortion cost Cost coarse of the current coding unit, otherwise Continue to recursively scan the subunits of the next level;
步骤(62)、若当前编码单元的率失真代价Costcoarse小于或等于四个子单元的率失真代价和Costfine,则将阈值调大,否则将阈值调小。Step (62): If the rate-distortion cost Cost coarse of the current coding unit is less than or equal to the rate-distortion cost and Cost fine of the four sub-units, increase the threshold; otherwise, decrease the threshold.
所述步骤(62)中阈值调大的更新策略为:The update strategy for increasing the threshold value in the step (62) is:
TH′=TH+α×(Costfine-Costcoarse)/2TH'=TH+α×(Cost fine -Cost coarse )/2
式中TH为更新前的阈值,TH′为更新后的阈值,α为纹理复杂度与率失真代价间的线性模型的乘法因子。where TH is the threshold before updating, TH' is the threshold after updating, and α is the multiplication factor of the linear model between texture complexity and rate-distortion cost.
所述步骤(62)中阈值调小的更新策略为:The update strategy for reducing the threshold value in the step (62) is:
TH′=TH-aTH'=TH-a
式中TH为更新前的阈值,TH′为更新后的阈值,a为常数。In the formula, TH is the threshold before updating, TH' is the threshold after updating, and a is a constant.
本发明与现有技术相比的优点在于:The advantage of the present invention compared with prior art is:
1、本发明从纹理分析的角度出发,将编码树单元的划分与预测方向的选择结合考虑,利用梯度既能够提取纹理复杂度又可以提取纹理的方向,在保证编码质量的前提下,可以节省更多的编码时间。1. From the perspective of texture analysis, the present invention considers the division of coding tree units and the selection of prediction direction, and uses the gradient to extract both texture complexity and texture direction. On the premise of ensuring the coding quality, it can save More coding time.
2、本发明根据最终的率失真代价及时更新决定编码单元是否划分的阈值,能够充分利用编码树单元内相邻区域的强相关性,以减弱阈值选取对编码质量的影响。2. The present invention timely updates the threshold for determining whether to divide a coding unit according to the final rate-distortion cost, and can make full use of the strong correlation of adjacent regions in the coding tree unit to weaken the influence of threshold selection on coding quality.
附图说明Description of drawings
图1为基于纹理分析的HEVC帧内预测快速模式选择方法流程图;Fig. 1 is the flow chart of HEVC intra prediction fast mode selection method based on texture analysis;
图2为HEVC视频编码标准中的编码树单元划分结构图;FIG. 2 is a structural diagram of coding tree unit division in the HEVC video coding standard;
图3为方向梯度计算方法示意图;Fig. 3 is a schematic diagram of the method for calculating the direction gradient;
图4为基于梯度的编码单元快速划分详细流程图。FIG. 4 is a detailed flow chart of gradient-based fast division of coding units.
具体实施方式detailed description
下面结合附图和具体实施方式对本发明作进一步的说明。The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
为了满足高清视频图像的实时压缩应用需求,提高HEVC视频编码器的编码速度,本发明提出了一种基于纹理分析的HEVC帧内预测快速模式选择方法。该方法主要包括两部分:基于纹理复杂度的编码单元快速划分和基于纹理方向的预测模式快速选择,编码单元的快速划分涉及发明内容中的步骤(1)至步骤(4)以及步骤(6),预测模式的快速选择涉及发明内容中的步骤(5)。首先利用梯度算子计算当前编码树单元中各子单元的复杂度,确定一个较细的编码单元划分,再根据该划分确定一个较粗的编码单元划分,最终根据后续帧内预测的率失真代价确定最终的编码单元划分;在选择最佳预测方向的过程中,排除掉与主纹理方向相差较远的预测模式,以节省帧内预测的时间。下面展开具体说明。In order to meet the real-time compression application requirements of high-definition video images and improve the encoding speed of HEVC video encoders, the present invention proposes a fast mode selection method for HEVC intra-frame prediction based on texture analysis. The method mainly includes two parts: fast partitioning of coding units based on texture complexity and fast selection of prediction mode based on texture direction. The fast partitioning of coding units involves steps (1) to (4) and (6) in the summary of the invention. , the quick selection of the prediction mode involves step (5) in the summary of the invention. First, use the gradient operator to calculate the complexity of each sub-unit in the current coding tree unit, determine a finer coding unit division, and then determine a coarser coding unit division according to the division, and finally according to the rate-distortion cost of the subsequent intra-frame prediction Determine the final coding unit division; in the process of selecting the best prediction direction, exclude the prediction modes that are far from the main texture direction, so as to save the time of intra prediction. The following is a detailed description.
1.基于纹理复杂度的编码单元快速划分1. Fast division of coding units based on texture complexity
新一代视频编码标准HEVC引入了编码树单元(Coding Tree Unit,CTU)概念,一帧视频由多个互不重叠的编码树单元组成。默认情况下,编码树单元的大小为64×64。编码树单元是一个四叉树形式的递归结构,它可以灵活的划分为多个层次的编码单元,如图1所示。编码单元的大小可以从64×64到8×8。在HEVC标准的参考编码器中,利用率失真优化选择的方法对每一种可能的划分都进行一次预测、变换、量化、熵编码、反量化、反变换、重建等过程,相比于H.264/AVC,编码复杂度大幅提升,严重制约了HEVC的实际应用。The new-generation video coding standard HEVC introduces the concept of Coding Tree Unit (CTU). A frame of video consists of multiple non-overlapping coding tree units. By default, the size of the coding tree unit is 64×64. The coding tree unit is a recursive structure in the form of a quadtree, which can be flexibly divided into multiple levels of coding units, as shown in FIG. 1 . The size of a coding unit can range from 64×64 to 8×8. In the reference encoder of the HEVC standard, the method of using rate-distortion optimization selection performs a process of prediction, transformation, quantization, entropy coding, inverse quantization, inverse transformation, and reconstruction for each possible division. Compared with H. 264/AVC, the coding complexity is greatly increased, which seriously restricts the practical application of HEVC.
通过实验统计发现,编码单元的大小与图像内容的纹理复杂度密切相关。纹理简单的区域采用较大的编码单元,而纹理复杂的区域采用较小的编码单元。纹理复杂度的度量方式有多种,如方差、梯度、熵等。梯度不仅包含图像的纹理复杂度信息,还包含了图像的纹理方向信息,可以协助快速确定预测单元的预测模式。基于此,本发明提出一种基于梯度的编码单元快速划分方法。Through experimental statistics, it is found that the size of the coding unit is closely related to the texture complexity of the image content. Regions with simple textures adopt larger coding units, while regions with complex textures adopt smaller coding units. There are many ways to measure texture complexity, such as variance, gradient, entropy, etc. The gradient contains not only the texture complexity information of the image, but also the texture direction information of the image, which can help to quickly determine the prediction mode of the prediction unit. Based on this, the present invention proposes a gradient-based fast coding unit division method.
在介绍编码单元快速划分的实施方式之前,首先给出本发明中所使用的梯度的计算方法以及主纹理方向、纹理复杂度的定义。本发明中的梯度是指像素亮度值沿水平、垂直、左下、右下等方向获得的方向导数,如图3所示。计算公式如(1)—(4)式所示。Before introducing the implementation of fast division of coding units, the calculation method of gradient used in the present invention and the definition of main texture direction and texture complexity are firstly given. The gradient in the present invention refers to the directional derivative of the pixel brightness value obtained along the horizontal, vertical, lower left, lower right directions, etc., as shown in FIG. 3 . The calculation formula is shown in formula (1)-(4).
式中gh(·)、gv(·)、gld(·)、grd(·)分别表示水平、垂直、左下、右下方向上的梯度滤波器,p(·)表示当前编码树单元中的亮度分量像素值,(x,y)表示每个4×4单元左上角像素的坐标。本发明中利用SAG表示沿某一方向的梯度绝对值和,计算公式如(5)式所示。where g h ( ), g v ( ), g ld ( ), and g rd ( ) represent the gradient filters in the horizontal, vertical, lower-left, and lower-right directions, respectively, and p( ) represents the current coding tree unit The pixel value of the luminance component in , (x, y) represents the coordinates of the upper left corner pixel of each 4×4 unit. In the present invention, SAG is used to represent the absolute sum of gradients along a certain direction, and the calculation formula is shown in formula (5).
SAGdir=∑|gdir(x,y)|,dir∈{h,v,ld,rd} (5)SAG dir =∑|g dir (x,y)|,dir∈{h,v,ld,rd} (5)
将最小梯度绝对值和的方向作为主纹理方向,主纹理方向的梯度绝对值和记作SAGmin,其正交方向的梯度绝对值和记作SAGorg。纹理复杂度complexity定义为SAGorg与SAGmin间的差值,即:The direction of the minimum gradient absolute value sum is taken as the main texture direction, the gradient absolute value sum of the main texture direction is denoted as SAG min , and the gradient absolute value sum of its orthogonal direction is denoted as SAG org . The texture complexity complexity is defined as the difference between SAG org and SAG min , namely:
complexity=SAGorg-SAGmin (6)complexity = SAG org - SAG min (6)
划分的详细流程如图4所示。对每一个编码树单元,首先将其划分为N×N个4×4的单元,对每一个单元分别计算水平、垂直、左下、右下方向上的梯度值。然后对编码树单元从64×64到8×8递归的计算各编码单元的纹理复杂度以及划分,最终确定整个编码树单元的划分。递归过程描述如下:The detailed process of partitioning is shown in Figure 4. For each coding tree unit, it is firstly divided into N×N 4×4 units, and the gradient values in the horizontal, vertical, lower left, and lower right directions are calculated for each unit. Then recursively calculate the texture complexity and division of each coding tree unit from 64×64 to 8×8, and finally determine the division of the entire coding tree unit. The recursive process is described as follows:
(1)对当前编码单元,利用(5)式分别计算四个方向上的梯度绝对值和SAGh、SAGv、SAGld、SAGrd,并获取当前编码单元的主纹理方向和纹理复杂度complexity。(1) For the current coding unit, use formula (5) to calculate the absolute value of the gradient in the four directions and SAG h , SAG v , SAG ld , SAG rd , and obtain the main texture direction and texture complexity complexity of the current coding unit .
(2)若当前编码单元的纹理复杂度complexity小于阈值TH,直接将当前编码单元设置为平滑区域,并计算率失真代价,不再进行划分,返回上一层递归。(2) If the texture complexity complexity of the current coding unit is less than the threshold TH, directly set the current coding unit as a smooth area, and calculate the rate-distortion cost, no longer divide, and return to the previous layer of recursion.
(3)否则,检查当前编码单元是否可以划分,若不可以划分,则计算率失真代价并返回上一层递归。(3) Otherwise, check whether the current coding unit can be divided, if not, calculate the rate-distortion cost and return to the previous layer of recursion.
(4)否则,将当前编码单元划分为四个子单元,依次进入下一层递归。(4) Otherwise, divide the current coding unit into four subunits, and enter the next layer of recursion in turn.
(5)检查四个子单元是否都被确定为平滑区域,如是平滑区域则计算当前编码单元的率失真代价,否则转步骤(8)。(5) Check whether all four sub-units are determined to be smooth areas, if they are smooth areas, calculate the rate-distortion cost of the current coding unit, otherwise go to step (8).
(6)若当前编码单元的率失真代价小于或等于四个子单元的率失真代价和,则当前编码单元不划分,同时将阈值TH调大。(6) If the rate-distortion cost of the current coding unit is less than or equal to the sum of the rate-distortion costs of the four sub-units, the current coding unit is not divided, and the threshold TH is increased.
(7)若当前编码单元的率失真代价大于四个子单元的率失真代价和,则当前编码单元划分,同时将阈值TH微调小。(7) If the rate-distortion cost of the current coding unit is greater than the sum of the rate-distortion costs of the four sub-units, the current coding unit is divided, and the threshold TH is fine-tuned at the same time.
(8)检测是否有未编码单元,若有则返回上一层递归,否则退出递归。(8) Detect whether there are unencoded units, if so, return to the previous level of recursion, otherwise exit the recursion.
一般说来,现有视频编码标准所对应的编码器产生的失真主要是由量化引起的,若相邻像素间的差异小于量化步长,则说明这一差异经过量化后就不存在了。因此可以通过量化步长设定纹理复杂度的阈值,然而视频编码标准中的量化步长是针对变换域的。本发明根据空域和变换域间的能量守恒定律,将递归过程中的初始阈值定义为当前编码单元的大小与量化步长的乘积,即TH=CUsize×QPstep。Generally speaking, the distortion produced by the encoder corresponding to the existing video coding standards is mainly caused by quantization. If the difference between adjacent pixels is smaller than the quantization step size, it means that the difference will not exist after quantization. Therefore, the threshold of texture complexity can be set through the quantization step size, but the quantization step size in the video coding standard is for the transform domain. According to the law of energy conservation between space domain and transform domain, the present invention defines the initial threshold in the recursive process as the product of the size of the current coding unit and the quantization step, ie TH=CUsize×QPstep.
阈值TH调大的更新策略为:TH′=TH+α×(Costfine-Costcoarse)/2,这里的α为纹理复杂度与率失真代价间的线性模型的乘法因子。The update strategy for increasing the threshold TH is: TH′=TH+α×(Cost fine -Cost coarse )/2, where α is the multiplication factor of the linear model between the texture complexity and the rate-distortion cost.
阈值TH微调小的更新策略为:TH′为TH′=TH-a,这里的a为常数。The update strategy for fine-tuning the threshold TH is as follows: TH' is TH'=TH-a, where a is a constant.
这样就可以根据纹理复杂度以及率失真代价获得编码树单元的划分。In this way, the division of coding tree units can be obtained according to texture complexity and rate-distortion cost.
2.基于纹理方向的预测模式快速选择2. Fast selection of prediction mode based on texture direction
相比于H.264/AVC,新一代视频编码标准HEVC引入了预测单元(Prediction Unit,PU)的概念。对于帧内预测来说,预测单元有两种划分方式。对于最小的编码单元,预测单元可以与编码单元相同,也可以在编码单元基础上进一步四叉分;而对于其余的编码单元,预测单元只能与编码单元相同。同时HEVC还提供了更为精细的预测方向,每一个预测单元都有35种预测模式,大大增加了编码复杂度。Compared with H.264/AVC, HEVC, a new generation of video coding standard, introduces the concept of prediction unit (Prediction Unit, PU). For intra prediction, there are two ways to divide the prediction unit. For the smallest coding unit, the prediction unit can be the same as the coding unit, or can be further divided into four branches on the basis of the coding unit; while for the remaining coding units, the prediction unit can only be the same as the coding unit. At the same time, HEVC also provides a more refined prediction direction. Each prediction unit has 35 prediction modes, which greatly increases the coding complexity.
提高编码效率的根本在于在保证编码质量的前提下,尽量减少候选预测模式。通常情况下,最终选择的预测模式与纹理方向相近。表1给出了各种预测单元中最佳预测模式与纹理方向相近的概率。从表中可以看出,最佳预测模式与纹理方向相近的概率可以达到80%以上。另外,在本发明的第一步编码单元的快速划分中,已经获得了每一个编码单元的主纹理方向。因此,可以利用这一中间结果尽量减少候选预测模式的数量,从而提高编码效率。需要说明的是,对于所有的预测单元,HEVC所提供的planar和DC预测模式都保留,本发明只考虑减少角度预测的候选预测方向。The root of improving the coding efficiency is to minimize the number of candidate prediction modes under the premise of ensuring the coding quality. Usually, the final selected prediction mode is close to the texture direction. Table 1 gives the probability that the best prediction mode is close to the texture direction in various prediction units. It can be seen from the table that the probability that the best prediction mode is similar to the texture direction can reach more than 80%. In addition, in the first step of fast division of coding units in the present invention, the main texture direction of each coding unit has been obtained. Therefore, this intermediate result can be used to minimize the number of candidate prediction modes, thereby improving coding efficiency. It should be noted that, for all prediction units, the planar and DC prediction modes provided by HEVC are reserved, and the present invention only considers the candidate prediction directions of reduced angle prediction.
表1 各预测单元在不同量化步长下最佳预测模式与纹理方向相近的概率Table 1 The probability that the best prediction mode of each prediction unit is similar to the texture direction under different quantization steps
由于最佳预测模式与纹理方向相近的概率较高,本发明利用主纹理方向周围的几个预测方向进行角度预测。具体实施方式如下:Since the probability that the best prediction mode is close to the texture direction is high, the present invention uses several prediction directions around the main texture direction for angle prediction. The specific implementation is as follows:
(1)定义一个大小为11的候选预测模式数组,用于存储筛选的候选预测模式,其中包括planar模式、DC模式、主纹理方向以及主纹理方向周围的若干预测方向。在本发明的具体实施中,在主纹理方向两侧各取了4个预测方向。(1) Define an array of candidate prediction modes with a size of 11, which is used to store the selected candidate prediction modes, including planar mode, DC mode, main texture direction and several prediction directions around the main texture direction. In the specific implementation of the present invention, four prediction directions are taken on both sides of the main texture direction.
(2)获取当前预测单元的主纹理方向所对应的预测模式编号modetexture,并利用公式(7)计算出角度预测范围[modeleft,moderight]。(2) Obtain the prediction mode number mode texture corresponding to the main texture direction of the current prediction unit, and use the formula (7) to calculate the angle prediction range [mode left t, mode right ].
(3)利用公式(8)获取主纹理方向左侧的预测模式。(3) Use formula (8) to obtain the prediction mode on the left side of the main texture direction.
(4)利用公式(9)获取主纹理方向右侧的预测模式。(4) Use formula (9) to obtain the prediction mode on the right side of the main texture direction.
(5)对筛选的候选预测模式集合{modeIdx},存储到候选预测模式数组中。按照HEVC标准中的粗略模式选择和率失真优化选择从中选取最佳的预测模式。(5) Store the filtered candidate prediction mode set {modeIdx} in the candidate prediction mode array. Select the best prediction mode according to the coarse mode selection and rate-distortion optimization selection in the HEVC standard.
以上公开的仅为本发明的具体实施例。根据本发明提供的技术思想,本领域的技术人员所能思及的变化,都应落入本发明的保护范围内。The above disclosures are only specific embodiments of the present invention. According to the technical ideas provided by the present invention, all changes conceivable by those skilled in the art shall fall within the protection scope of the present invention.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310445775.5A CN103517069B (en) | 2013-09-25 | 2013-09-25 | A kind of HEVC intra-frame prediction quick mode selection method based on texture analysis |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310445775.5A CN103517069B (en) | 2013-09-25 | 2013-09-25 | A kind of HEVC intra-frame prediction quick mode selection method based on texture analysis |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103517069A CN103517069A (en) | 2014-01-15 |
CN103517069B true CN103517069B (en) | 2016-10-26 |
Family
ID=49898986
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310445775.5A Expired - Fee Related CN103517069B (en) | 2013-09-25 | 2013-09-25 | A kind of HEVC intra-frame prediction quick mode selection method based on texture analysis |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103517069B (en) |
Families Citing this family (52)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103888762B (en) * | 2014-02-24 | 2017-01-11 | 西南交通大学 | Video coding framework based on HEVC standard |
CN103957415B (en) * | 2014-03-14 | 2017-07-11 | 北方工业大学 | CU dividing methods and device based on screen content video |
CN104954800B (en) * | 2014-03-28 | 2018-01-16 | 炬芯(珠海)科技有限公司 | A kind of fast determination method and device of the intra prediction mode of Video coding |
CN103957414A (en) * | 2014-04-16 | 2014-07-30 | 安科智慧城市技术(中国)有限公司 | HEVC intra-frame prediction coding method and system |
CN103997645B (en) * | 2014-04-29 | 2017-02-15 | 长沙理工大学 | Quick HEVC intra-frame coding unit and pattern decision method |
CN104363450B (en) * | 2014-11-27 | 2017-10-27 | 北京奇艺世纪科技有限公司 | A kind of intra-frame encoding mode decision-making technique and device |
CN104883565A (en) * | 2014-12-31 | 2015-09-02 | 乐视网信息技术(北京)股份有限公司 | Decision-making method and device for intra-frame prediction mode of high efficiency video coding |
CN105812799B (en) | 2014-12-31 | 2019-03-08 | 阿里巴巴集团控股有限公司 | The fast selecting method and its device of video intra-frame prediction mode |
CN104683804B (en) * | 2015-02-14 | 2017-12-29 | 北京航空航天大学 | Parameter adaptive multidimensional bit rate control method based on video content features |
CN104639940B (en) * | 2015-03-06 | 2017-10-10 | 宁波大学 | A kind of quick HEVC method for choosing frame inner forecast mode |
CN106162167B (en) * | 2015-03-26 | 2019-05-17 | 中国科学院深圳先进技术研究院 | Efficient video coding method based on study |
CN104796701B (en) * | 2015-03-27 | 2018-02-16 | 北京君正集成电路股份有限公司 | Predictive mode based on HEVC determines method and device |
CN104811730B (en) * | 2015-04-29 | 2017-09-26 | 武汉光发科技有限公司 | A kind of texture analysis of video image intraframe coding unit and coding unit system of selection |
CN104902276B (en) * | 2015-05-15 | 2018-07-06 | 腾讯科技(北京)有限公司 | Converter unit partitioning method and device |
CN104883566B (en) * | 2015-05-27 | 2018-06-12 | 复旦大学 | The fast algorithm that a kind of intra prediction block size suitable for HEVC standard divides |
CN105208387B (en) * | 2015-10-16 | 2018-03-13 | 浙江工业大学 | A kind of HEVC Adaptive Mode Selection Method for Intra-Prediction |
CN105391999B (en) * | 2015-10-30 | 2018-08-17 | 北京奇艺世纪科技有限公司 | A kind of coding mode judgment method and device |
CN107211133B (en) * | 2015-11-06 | 2020-04-03 | 华为技术有限公司 | Method, device and decoding device for inverse quantization transform coefficient |
CN105491385A (en) * | 2015-12-02 | 2016-04-13 | 同济大学 | Quick deciding method for division of HEVC intraframe coding units |
CN105847838B (en) * | 2016-05-13 | 2018-09-14 | 南京信息工程大学 | A kind of HEVC intra-frame prediction methods |
CN108259918B (en) * | 2016-12-29 | 2020-12-25 | 北京金山云网络技术有限公司 | Coding unit mode decision method and device |
CN107071416B (en) * | 2017-01-06 | 2020-04-07 | 华南理工大学 | HEVC intra-frame prediction mode rapid selection method |
CN106973292B (en) * | 2017-02-27 | 2019-07-09 | 华侨大学 | 3D-HEVC inter-prediction fast schema selection method based on texture features |
CN107071496B (en) * | 2017-05-14 | 2020-01-17 | 北京工业大学 | A method for fast selection of H.265/HEVC inter-coding unit depth |
CN109587491B (en) | 2017-09-28 | 2022-09-23 | 腾讯科技(深圳)有限公司 | Intra-frame prediction method, device and storage medium |
CN109963151B (en) * | 2017-12-14 | 2020-10-20 | 腾讯科技(深圳)有限公司 | Coding unit division determining method and device, terminal device and readable storage medium |
CN108322743B (en) * | 2018-02-28 | 2020-01-31 | 中南大学 | A fast method for intra-frame selection of inseparable quadratic transformation modes based on mode-dependent properties |
CN108881908B (en) * | 2018-05-28 | 2022-07-01 | 北方工业大学 | Fast Blocking Based on Coding Unit Texture Complexity in Video Coding |
CN108881904A (en) * | 2018-06-25 | 2018-11-23 | 中山大学 | Quick decision method, device and storage medium in frame based on Sobel operator |
CN109089114B (en) * | 2018-09-28 | 2022-01-28 | 河海大学 | Complexity-adaptive screen content coding method for virtual reality equipment |
CN109462758B (en) * | 2018-10-09 | 2021-04-06 | 深圳市网心科技有限公司 | Intra-frame prediction mode determination method, electronic device, system and storage medium |
CN109510995B (en) * | 2018-10-26 | 2020-12-18 | 宁波镇海昕龙网络科技有限公司 | Prediction method based on video compression |
CN109361922B (en) * | 2018-10-26 | 2020-10-30 | 西安科锐盛创新科技有限公司 | Predictive quantization coding method |
CN109587481B (en) * | 2018-10-26 | 2020-07-10 | 江苏怀业信息技术股份有限公司 | Video encoding method and apparatus |
CN109561303B (en) * | 2018-10-26 | 2020-12-15 | 广东弘视数字传媒有限公司 | Prediction method based on video compression |
CN109587494B (en) * | 2018-10-26 | 2020-07-10 | 江苏怀业信息技术股份有限公司 | Prediction method for video compression |
CN109561307B (en) * | 2018-10-26 | 2021-08-06 | 上海九吾尊易信息科技有限公司 | Multidirectional prediction method for skip block scanning in bandwidth compression |
CN109413421B (en) * | 2018-10-26 | 2021-01-19 | 张豪 | Video encoding method, video encoding apparatus, video decoding method, and video decoding apparatus |
WO2020181471A1 (en) * | 2019-03-11 | 2020-09-17 | Oppo广东移动通信有限公司 | Intra-frame prediction method and apparatus, and computer storage medium |
CN109982079B (en) * | 2019-04-03 | 2021-04-02 | 北京电子工程总体研究所 | Intra-frame prediction mode selection method combined with texture space correlation |
CN110113601B (en) * | 2019-04-11 | 2023-01-06 | 中南大学 | HEVC intra-frame rapid algorithm selection method based on video picture texture features |
EP3973708A4 (en) | 2019-06-25 | 2023-02-22 | Zhejiang Dahua Technology Co., Ltd. | Systems and methods for inter-frame prediction |
CN110213588B (en) * | 2019-06-25 | 2021-07-13 | 浙江大华技术股份有限公司 | Spatial domain candidate motion information acquisition method and device, coder-decoder and storage device |
CN110446044B (en) | 2019-08-21 | 2022-08-09 | 浙江大华技术股份有限公司 | Linear model prediction method, device, encoder and storage device |
CN110708546B (en) * | 2019-09-20 | 2021-12-07 | 中山大学 | Intra-frame mode selection and division method, system and storage medium for multifunctional video coding |
CN111107359A (en) * | 2019-12-16 | 2020-05-05 | 暨南大学 | Intra-frame prediction coding unit dividing method suitable for HEVC standard |
CN111885382B (en) * | 2020-06-23 | 2023-04-18 | 北京工业职业技术学院 | Intra Chroma Prediction Mode Quick Selection |
CN112383774B (en) * | 2020-10-30 | 2023-10-03 | 网宿科技股份有限公司 | Encoding method, encoder and server |
CN112689146B (en) * | 2020-12-18 | 2022-07-22 | 重庆邮电大学 | Heuristic learning-based VVC intra-frame prediction rapid mode selection method |
CN113079374B (en) * | 2021-03-03 | 2023-01-10 | 北京银河信通科技有限公司 | Image encoding method and apparatus |
CN113194311B (en) * | 2021-04-27 | 2022-12-27 | 北京京东方技术开发有限公司 | Image processing method, image processor, and storage medium |
CN115550645A (en) * | 2022-12-02 | 2022-12-30 | 杭州未名信科科技有限公司 | Method and device for determining intra-frame prediction mode, storage medium and electronic equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1662066A (en) * | 2004-02-26 | 2005-08-31 | 中国科学院计算技术研究所 | A method for selecting an intra-frame prediction mode |
CN101325707A (en) * | 2007-06-12 | 2008-12-17 | 浙江大学 | System for encoding and decoding texture self-adaption video |
CN103297781A (en) * | 2013-06-07 | 2013-09-11 | 安科智慧城市技术(中国)有限公司 | High efficiency video coding (HEVC) intraframe coding method, device and system based on texture direction |
-
2013
- 2013-09-25 CN CN201310445775.5A patent/CN103517069B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1662066A (en) * | 2004-02-26 | 2005-08-31 | 中国科学院计算技术研究所 | A method for selecting an intra-frame prediction mode |
CN101325707A (en) * | 2007-06-12 | 2008-12-17 | 浙江大学 | System for encoding and decoding texture self-adaption video |
CN103297781A (en) * | 2013-06-07 | 2013-09-11 | 安科智慧城市技术(中国)有限公司 | High efficiency video coding (HEVC) intraframe coding method, device and system based on texture direction |
Non-Patent Citations (1)
Title |
---|
Gradient-based fast decision for intra prediction in HEVC;Yongfei Zhang;Zhe Li;Bo Li;《Visual Communication and Image Processing》;20121130;第42卷(第4期);论文第4页左栏第1-36行 * |
Also Published As
Publication number | Publication date |
---|---|
CN103517069A (en) | 2014-01-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103517069B (en) | A kind of HEVC intra-frame prediction quick mode selection method based on texture analysis | |
CN106961606B (en) | HEVC intra-frame coding mode selection method based on texture division characteristics | |
CN107147911B (en) | Method and device for fast inter-frame coding mode selection based on local luminance compensation LIC | |
CN104539962B (en) | It is a kind of merge visually-perceptible feature can scalable video coding method | |
CN102984521B (en) | High-efficiency video coding inter-frame mode judging method based on temporal relativity | |
CN106507116B (en) | A 3D-HEVC Coding Method Based on 3D Saliency Information and View Synthesis Prediction | |
CN104796694B (en) | Optimization intraframe video coding method based on video texture information | |
CN105208387B (en) | A kind of HEVC Adaptive Mode Selection Method for Intra-Prediction | |
WO2018010492A1 (en) | Rapid decision making method for intra-frame prediction mode in video coding | |
CN108712648B (en) | Rapid intra-frame coding method for depth video | |
CN104639940B (en) | A kind of quick HEVC method for choosing frame inner forecast mode | |
CN105898332B (en) | For the fast deep figure frame mode decision method of 3D-HEVC coding standards | |
CN110446052B (en) | 3D-HEVC intra-frame depth map rapid CU depth selection method | |
CN104702958A (en) | HEVC intraframe coding method and system based on spatial correlation | |
CN105120290B (en) | A kind of deep video fast encoding method | |
CN103533355B (en) | A kind of HEVC fast encoding method | |
CN105721865A (en) | Fast decision algorithm for dividing HEVC inter-frame coding unit | |
CN109587503A (en) | A kind of 3D-HEVC depth map intra-frame encoding mode high-speed decision method based on edge detection | |
CN102075757B (en) | Video foreground object coding method by taking boundary detection as motion estimation reference | |
CN109151467B (en) | Fast selection of inter-frame mode for screen content coding based on image block activity | |
CN103702131B (en) | Pattern-preprocessing-based intraframe coding optimization method and system | |
Li et al. | Fast depth intra coding based on spatial correlation and rate distortion cost in 3D-HEVC | |
CN116489333A (en) | An edge classification model construction method for depth map coding unit division | |
CN102592130B (en) | Target identification system aimed at underwater microscopic video and video coding method thereof | |
CN105704497B (en) | Coding unit size fast selection algorithm towards 3D-HEVC |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20190417 Address after: 100080 Yishengyuan Business Apartment, No. 331 East Zhongguancun Road, Haidian District, Beijing, 5 doors 106 Patentee after: BEIJING CKLEADER SOFTWARE TECHNOLOGY Co.,Ltd. Address before: 100191 Xueyuan Road, Haidian District, Beijing, No. 37 Patentee before: Beihang University |
|
TR01 | Transfer of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20161026 |
|
CF01 | Termination of patent right due to non-payment of annual fee |