WO2016107468A1 - 视频帧内预测模式的快速选择方法及其装置 - Google Patents
视频帧内预测模式的快速选择方法及其装置 Download PDFInfo
- Publication number
- WO2016107468A1 WO2016107468A1 PCT/CN2015/098261 CN2015098261W WO2016107468A1 WO 2016107468 A1 WO2016107468 A1 WO 2016107468A1 CN 2015098261 W CN2015098261 W CN 2015098261W WO 2016107468 A1 WO2016107468 A1 WO 2016107468A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- angle
- prediction block
- prediction
- prediction mode
- gradient
- 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/593—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/103—Selection of coding mode or of prediction mode
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/103—Selection of coding mode or of prediction mode
- H04N19/11—Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/136—Incoming video signal characteristics or properties
- H04N19/14—Coding unit complexity, e.g. amount of activity or edge presence estimation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/182—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
Definitions
- the present application relates to the field of video processing, and in particular to a fast selection technique for a video intra prediction mode.
- the HEVC High Efficiency Video Coding
- the encoder will not be able to bear all prediction directions for RDO. The amount of calculation cannot be judged by the best mode.
- HEVC adopts a "Rough-to-Fine" mode selection scheme, but under this scheme, the selection of the best prediction mode in the frame still occupies the entire encoding process. Most of the workload. Therefore, there is a need for a method that can ensure the quality of the encoding and improve the efficiency of the selection of the intra prediction mode.
- the purpose of the present application is to provide a fast selection method and a device for a video intra prediction mode to improve the computational efficiency of intra prediction mode selection.
- an embodiment of the present application discloses a method for quickly selecting a video intra prediction mode, including the following steps:
- the texture smoothness of the prediction block is greater than the first predetermined threshold, determining that the prediction block is a first type of prediction block, and setting a prediction mode of the first type of prediction block to include only a DC prediction mode and a planar prediction mode;
- the texture smoothness of the prediction block is less than a second predetermined threshold, determining that the prediction block is a second type of prediction block, and setting an angle prediction mode of the second type of prediction block to include a maximum peak corresponding in the gradient angle histogram Angle prediction mode;
- the first predetermined threshold is greater than the second predetermined threshold.
- An embodiment of the present application further discloses a fast selection device for a video intra prediction mode, including:
- An obtaining unit configured to obtain a gradient amplitude and a gradient angle of each element in the prediction block
- a first setting unit configured to determine that the prediction block is a first type of prediction block when the texture smoothness of the prediction block is greater than a first predetermined threshold, and set a prediction mode of the first type of prediction block to include only DC prediction Mode and plane prediction mode;
- a second setting unit configured to: when the texture smoothness of the prediction block is less than a second predetermined threshold, determine that the prediction block is a second type of prediction block, and set an angle prediction mode of the second type of prediction block to include a gradient angle An angle prediction mode corresponding to the maximum peak in the histogram;
- the first predetermined threshold is greater than the second predetermined threshold.
- the prediction block Based on the texture content and characteristics of the prediction block itself, the prediction block is classified, and different numbers of prediction modes are set for different types of prediction blocks, which can effectively reduce the number of candidates for RDO (the calculation of RDO is very complicated and time consuming), thereby reducing Calculate the amount and increase the calculation efficiency.
- the number of angle prediction modes of different size prediction blocks is adaptive. Adjustment, that is, selecting a smaller angle prediction mode for a large-sized prediction block, and selecting a larger number of angle prediction modes for a small-sized prediction block, can improve the accuracy of determining the prediction mode.
- the element is a pixel
- the gradient amplitude and the gradient angle of all the pixels are calculated in advance, and the prediction block of different sizes can be directly used in the selection process of the subsequent prediction mode, and each time the prediction block size is converted, each is performed. Compared with the calculation of pixel parameters, it can effectively avoid unnecessary double counting and greatly improve the calculation efficiency.
- FIG. 1 is a schematic flowchart of a method for quickly selecting a video intra prediction mode in a first embodiment of the present application
- FIG. 2 is a schematic flowchart of a method for quickly selecting a video intra prediction mode in a second embodiment of the present application
- FIG. 3 is a schematic diagram of angles of 33 angle prediction modes of the HEVC in the prior art
- FIG. 5 is a schematic diagram of an image of three prediction blocks in a second embodiment of the present application.
- FIG. 6 is a schematic structural diagram of a fast selection apparatus for a video intra prediction mode in a third embodiment of the present application.
- the first embodiment of the present application relates to a fast selection method of a video intra prediction mode, and is particularly suitable for selection of a video intra prediction mode of an HEVC coding standard.
- FIG. 1 is a schematic flow chart of a method for quickly selecting a video intra prediction mode.
- the embodiments of the present application relate to a fast selection method of an HEVC intra prediction mode.
- the fast selection method of the video intra prediction mode includes the following steps:
- the gradient amplitude and gradient angle of each element in the prediction block are obtained.
- the element of the prediction block may be one pixel, or may be a set of pixels smaller than the total number of pixels of the prediction block. For example, for a 32 ⁇ 32 prediction block, the element may be a single pixel, or may be 4 ⁇ 4, 2 ⁇ 2, or A collection of 8 x 8 pixel sizes.
- Step 102 Perform statistics on the gradient angle to generate a gradient angle histogram of the prediction block.
- the abscissa in the gradient angle histogram may be the gradient angle of each element, or may be the predicted angle of each element, wherein the predicted angle of each element refers to the angle of the 33 predicted angles The angle closest to the angle, the angle prediction mode corresponding to the predicted angle is also the most relevant angle prediction mode for the element.
- the ordinate in the gradient angle histogram may be the number of pixels in an angle prediction mode or a gradient angle, or may be an accumulated value of a pixel gradient amplitude in an angle prediction mode or a gradient angle.
- Step 103 Calculate texture smoothness of the prediction block, and determine a size relationship between texture smoothness of the prediction block and a first predetermined threshold and a second predetermined threshold. Wherein the first predetermined threshold is greater than the second predetermined threshold.
- the texture smoothness indicates the degree of gradual change between elements in the prediction block, that is, the greater the texture smoothness, the less texture of the prediction block, the smaller the texture smoothness, the more texture the prediction block has, and the direction of the texture. The stronger the sex.
- the texture smoothness of the prediction block is based on the maximum gradient amplitude in the prediction block element gradient amplitude or the maximum peak value in the gradient angle histogram. Fixed.
- the determination of the smoothness of the texture may be performed based on other factors, which is not limited herein.
- step 104 If the texture smoothness of the prediction block is greater than the first predetermined threshold, proceed to step 104, and then end the process; if the texture smoothness of the prediction block is less than the second predetermined threshold, proceed to step 105, and thereafter end the process; If the texture smoothness of the block is greater than the second predetermined threshold and less than the first predetermined threshold, then the process proceeds to step 106, and the process ends thereafter.
- the prediction block is determined to be a first type of prediction block, and the prediction mode of the first type of prediction block is set to include only a direct current (DC) prediction mode and a planar (Planar) prediction mode.
- DC direct current
- Planar planar
- the prediction block is determined to be a second type of prediction block, and the angle prediction mode of the second type of prediction block is set to include an angle prediction mode corresponding to a maximum peak in the gradient angle histogram.
- the prediction block is determined to be a third type of prediction block, and the angle prediction mode of the third type of prediction block is set to include an angle prediction mode corresponding to at least two peaks in the gradient angle histogram.
- the prediction modes of the second type of prediction block and the third type of prediction block include an angle prediction mode and a non-angle prediction mode, that is, The angle prediction mode determined above is also a DC prediction mode and a plane prediction mode.
- the first type of prediction block that is, the flat block texture is small
- the change between the elements inside the block is very gradual or almost unchanged
- Recalculating its angle prediction mode can effectively reduce the amount of calculation.
- the second type of prediction block that is, the strong direction texture block has a strong texture, and the texture direction is clear. Therefore, in order to reduce the calculation amount, only a small amount of the angle prediction mode needs to be fixed to achieve the prediction effect.
- the angle prediction mode of the second type of prediction block may further include other angle prediction modes.
- the angle prediction mode of the second type of prediction block further includes and The peak corresponding angle prediction mode is adjacent to the N angle prediction modes, where N ⁇ 1.
- the angle prediction mode of the second type of prediction block may be: a set including an angle prediction mode corresponding to a maximum peak in the gradient angle histogram, and an angle prediction mode in the set The corresponding angle is continuous. For example, if the angle prediction mode corresponding to the maximum peak is 26, the angle prediction mode 26-29 is included in the set, or the angle prediction mode 24-29 is included, or the angle prediction mode 22-26 is included. Wait.
- the number of angle prediction modes of different size prediction blocks is adaptively adjusted, that is, for a larger size prediction block.
- a lesser angle prediction mode, and a larger number of angle prediction modes for a smaller size prediction block can improve the accuracy of determining the prediction mode. Therefore, in a preferred example of the present application, the larger the size of the second type prediction block or the third type prediction block, the smaller the number of angle prediction modes.
- the peaks in the gradient angle histogram may be arranged in descending order. According to the size of the prediction block, the angle prediction mode corresponding to the first M peaks is taken as the angle prediction mode of the prediction block.
- the number of peaks may also be determined according to other manners, for example, determining an angle prediction mode of the third type of prediction block by acquiring an angle prediction mode corresponding to a peak value greater than a certain peak threshold, and predicting a block The larger the size, the larger the peak threshold, so that for a large size prediction block, the number of angle prediction modes is still smaller than that of the small size prediction block.
- the prediction block Based on the texture content and characteristics of the prediction block itself, the prediction block is classified, and different numbers of prediction modes are set for different types of prediction blocks, which can effectively reduce the number of candidates for RDO (the calculation of RDO is very complicated and time consuming), thereby reducing Calculate the amount and increase the calculation efficiency.
- the second embodiment of the present application relates to a fast selection method of a video intra prediction mode.
- 2 is a schematic flow chart of a method for quickly selecting a video intra prediction mode.
- the second embodiment is improved on the basis of the first embodiment, and the main improvement is that the elements in the prediction block are pixels, and the gradient amplitude and the gradient angle of all the pixels are calculated in advance. Degree, in the selection process of the subsequent prediction mode, for the prediction block of different sizes to be directly used, compared with the calculation of each pixel parameter after each transformation of the prediction block size, the unnecessary repeated calculation can be effectively avoided, greatly Improve calculation efficiency.
- the elements in the foregoing prediction block are pixels.
- the fast selection method of the video intra prediction mode includes the following steps:
- step 201 a gradient amplitude and a gradient angle of all pixels in the current frame image of the prediction block are calculated.
- the calculation process of the gradient amplitude and the gradient angle of each pixel in the current frame image is as follows:
- Dy p(x-1,y-1)+2*p(x-1,y)+p(x-1,y+1)-p(x+1,y-1)-2*p( x+1, y) - p(x+1, y+1).
- Dx -p(x-1,y-1)+p(x-1,y+1)-p(x,y-1)+p(x,y+1)-p(x+1,y -1) +p(x+1, y+1);
- Dy p(x-1,y-1)+p(x-1,y)+p(x-1,y+1)-p(x+1,y-1)-p(x+1, y) -p(x+1, y+1).
- Dx -p(x-1,y-1)+p(x-1,y)-p(x,y-1)+p(x,y);
- Dy p(x-1, y-1)+p(x-1, y)-p(x+1, y-1)-p(x+1, y).
- p(x, y) is the pixel value of the current pixel.
- the abscissa is a prediction mode (33 angle prediction mode + DC prediction mode + Player prediction mode), and the ordinate is an accumulated value of gradient amplitudes of all pixels in each prediction mode.
- the specific generation process of the histogram is as follows:
- Figure 3 shows the 33 angle prediction modes or directions of HEVC (2, 3, 4, ..., 10, ..., 34). Use the table to indicate the following (just the change in the order form is to simplify the calculation):
- Mode33 [18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,...17,16,15,14,13, 12,11,10,9,8,7,6,5,4,3,2];
- the corresponding gradient angles can be calculated in advance, as shown in the following table:
- GradAng33 is the GradAng value (dy/dx) corresponding to these 33 angle prediction modes;
- the maximum gradient amplitude in each prediction block can be calculated, that is, the ladder with the largest value is selected from the gradient amplitudes of the pixels included in the prediction block. Degree amplitude.
- all the most relevant angle prediction modes are accumulated by the gradient amplitude values of the pixels of the angle prediction mode, and a histogram of the angle prediction mode is obtained; and then all the angle prediction modes are 33 angle prediction modes), get the histogram of the angle prediction mode, and finally get the total gradient angle histogram (as shown in Figure 4).
- the abscissas 2, 3, ... 34 represent 33 kinds of angle prediction modes (the predicted angles correspond to the gradient angles).
- the ordinate is the accumulated value of the gradient amplitude in the corresponding angle prediction mode.
- the gradient angle histogram whether it is a peak and a number of peaks is determined according to the ordinate value, that is, the accumulated value of the gradient amplitude, for example, the first peak (ie, the maximum peak) has its gradient amplitude accumulated value 1022.
- the prediction mode ie, the predicted angular direction 17
- the second peak has its gradient amplitude accumulated value 624 indicating the prediction mode (ie, the predicted angular direction) 19
- the third peak has its gradient amplitude accumulated value 422, indicating The prediction mode (that is, the predicted angular direction) 18
- the fourth peak whose gradient amplitude accumulated value 396 indicates the prediction mode (that is, the predicted angular direction) 16 .
- step 203 the texture smoothness of the prediction block is calculated, and the prediction block is classified according to the size relationship between the texture smoothness of the prediction block and the first predetermined threshold and the second predetermined threshold.
- the prediction block is a first type of prediction block (ie, a smooth flat block) and is not a first type of prediction block (ie, a non-smooth flat block). Specifically, it is judged by the judgment condition that the texture gradient of the prediction block is small (that is, whether the texture smoothness is large); if the condition is satisfied, it is a smooth flat block; otherwise, it is not a smooth flat block.
- the judgment condition of whether the texture gradient is small is specifically measured by the following features:
- Th_GradAmp, Th_Peak is the set threshold.
- the maximum amplitude of the pixel in the prediction block or the maximum peak value in the gradient angle histogram is smaller.
- the texture is smoother.
- the maximum gradient amplitude of the prediction block and the maximum peak value of the gradient direction histogram of the prediction block have been calculated previously.
- the prediction block is a non-first type prediction block, it is judged whether it belongs to the second type prediction block (ie, strong texture direction block) or the third type prediction block (ie, general block). Specifically, it is determined whether the maximum peak value of the gradient angle histogram of the prediction block occupies a dominant position: if the maximum peak value in the gradient angle histogram of the prediction block occupies a dominant position, it is a strong texture direction block, otherwise it is a general Piece. Whether the maximum peak value of the gradient angle histogram of the prediction block is dominant is measured by the following specific characteristics:
- the maximum peak value in the gradient angle histogram >k* (the second largest peak of the gradient angle histogram + the third largest peak of the gradient angle histogram), or
- k is a parameter, such as 0.9; Th_percent is a set threshold, such as 60%.
- FIGS. 5a-c respectively show a flat block (a first type of prediction block), a general block (a third type of prediction block), and a strong texture direction block (a second type of prediction block) in a specific application.
- step 204 an angle prediction mode of the prediction block is set.
- the prediction block is a first type of prediction block, setting a prediction mode of the prediction block to include only two non-angle prediction modes: a DC prediction mode and a Planar prediction mode;
- setting the prediction mode of the prediction block includes three angle prediction modes (the angle prediction mode corresponding to the maximum peak in the gradient angle histogram is adjacent to the angle prediction mode) Two angle prediction modes) and two non-angle prediction modes (DC prediction mode and Planar prediction mode);
- setting the prediction mode of the prediction block includes M angle prediction modes and two non-angle prediction modes (DC prediction mode and Planar prediction mode).
- the M angle prediction modes are angle prediction modes corresponding to the largest M peaks in the predicted block gradient angle histogram, wherein the M is different according to the size of the prediction block, and the larger the size of the prediction block, the more M Small, the smaller the size of the prediction block, the larger M, for example, N is 2 for a 64x64 prediction block, 2 for a 32x32 prediction block, 4 for a 16x16 prediction block, and 4 for a 8x8 prediction block. , N takes 6; for a 4x4 prediction block, N takes 8.
- pre-classifying the prediction block is that it can reduce the number of candidates for subsequent RDO calculations for certain specific blocks (smooth flat blocks, strong directional texture blocks), thereby reducing the amount of computation. For example, for a 16x16 prediction block, if the most primitive method is used, RDO calculations are required for a complete 35 (33 angles + 2 non-angle: DC, Planar) candidate prediction modes; if image block based gradients If the direction histogram determines the approximate direction (ie, the best prediction mode), then it is not necessary to exhaust 33 angles. For the general block, only 4 angle prediction modes need to be added with another 2 non-angle prediction modes (DC and Planar).
- the instruction code can be stored in any type of computer-accessible memory (eg, permanent or modifiable, volatile or non-volatile, solid state Or non-solid, fixed or replaceable media, etc.).
- the memory may be, for example, a programmable array logic (Prograxable Array Logic, hereinafter referred to as "PAL"), a random access memory (Random Access Memory (RAM), or a programmable read only memory (Prograxable Read Only Memory). "), Read-Only Memory (“ROM”), Electrically Erasable Programmable Read-Only Memory (EEPROM), Disk, Optical Disc, Digital Versatile Disc (Digital Versatile Disc) DVD”) and so on.
- PAL programmable array logic
- RAM Random Access Memory
- EEPROM Electrically Erasable Programmable Read-Only Memory
- Disk Optical Disc, Digital Versatile Disc (Digital Versatile Disc) DVD" and so on.
- FIG. 6 is a schematic structural diagram of a fast selection device of the video intra prediction mode.
- the fast selection device of the video intra prediction mode includes:
- An acquisition unit for obtaining a gradient amplitude and a gradient angle of each element in the prediction block.
- a statistical unit for performing statistics on the gradient angle to generate a gradient angle histogram of the prediction block is
- a determining unit configured to calculate texture smoothness of the predicted block, and determine a size relationship between the texture smoothness of the predicted block and the first predetermined threshold and the second predetermined threshold. Wherein the first predetermined threshold is greater than the second predetermined threshold.
- a first setting unit configured to determine that the prediction block is a first type of prediction block when the texture smoothness of the prediction block is greater than a first predetermined threshold, and set a prediction mode of the first type of prediction block to include only DC prediction Mode and plane prediction mode.
- a second setting unit configured to: when the texture smoothness of the prediction block is less than a second predetermined threshold, determine that the prediction block is a second type of prediction block, and set an angle prediction mode of the second type of prediction block to include a gradient angle The angle prediction mode corresponding to the maximum peak in the histogram.
- a third setting unit configured to: when the texture smoothness of the prediction block is greater than a second predetermined threshold and less than a first predetermined threshold, determine that the prediction block is a third type of prediction block, and set an angle prediction of the third type of prediction block
- the mode is an angle prediction mode corresponding to at least two peaks in the gradient angle histogram.
- the angle prediction mode of the second type of prediction block further includes other angle prediction modes.
- the second setting unit is configured to set a second type of prediction block.
- the second type of angle prediction mode is further set to include N angle prediction modes adjacent to the angle prediction mode angle corresponding to the maximum peak, where N ⁇ 1.
- the number of angle prediction modes of different size prediction blocks is adaptively adjusted, that is, for a larger size prediction block.
- a small angle prediction mode is used, and a larger number of angle prediction modes are selected for a large size prediction block, which can improve the accuracy of determining the prediction mode. Therefore, in a preferred example of the present application, when the third setting module sets the angle prediction mode of the third type of prediction block, the larger the size of the third type of prediction block, the smaller the number of angle prediction modes.
- the first embodiment is a method embodiment corresponding to the present embodiment, and the present embodiment can be implemented in cooperation with the first embodiment.
- the related technical details mentioned in the first embodiment are still effective in the present embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related art details mentioned in the present embodiment can also be applied to the first embodiment.
- the fourth embodiment of the present application relates to a fast selection device for a video intra prediction mode.
- the fourth embodiment is improved on the basis of the third embodiment, and the main improvement is that the elements in the prediction block are pixels, and the gradient prediction amplitude and the gradient angle of all the pixels can be calculated in advance, and the subsequent prediction mode can be selected.
- the prediction blocks for different sizes are directly used, and the calculation of each pixel parameter is performed after each transformation of the prediction block size, thereby effectively avoiding unnecessary repeated calculations and greatly improving the calculation efficiency.
- the element in the above prediction block is a pixel
- the fast selection device of the video intra prediction mode further includes the following units:
- a calculating unit configured to calculate a gradient amplitude and a gradient angle of all pixels in the current frame image of the prediction block.
- the second embodiment is a method embodiment corresponding to the present embodiment, and the present embodiment can be implemented in cooperation with the second embodiment.
- the related technical details mentioned in the second embodiment are still effective in the present embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related art details mentioned in the present embodiment can also be applied to the second embodiment.
- each unit mentioned in the implementation manner of each device in this application is a logical unit.
- a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units.
- the physical implementation of these logical units is not the most important.
- the combination of the functions implemented is the key to solving the technical problems raised by the present application.
- the foregoing device implementation manners of the present application do not introduce units that are not closely related to solving the technical problems raised by the present application, which does not indicate that the above device implementation manner does not exist in other embodiments. unit.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本申请涉及视频处理领域,公开了一种视频帧内预测模式的快速选择方法及其装置。本申请中的选择方法包括以下步骤:获取预测块中每个元素的梯度振幅和梯度角度;对梯度角度进行统计,生成预测块的梯度角度直方图;如果该预测块的纹理平滑度大于第一预定阈值,则确定该预测块为第一类预测块,并设定该第一类预测块的预测模式为仅包括直流预测模式和平面预测模式;如果该预测块的纹理平滑度小于第二预定阈值,则确定该预测块为第二类预测块,并设定该第二类预测块的角度预测模式为包括梯度角度直方图中的最大峰值对应的角度预测模式。本申请可有效减少进行RDO的候选数目(RDO的计算非常复杂耗时),从而减少计算量,提高计算效率。
Description
本申请涉及视频处理领域,特别涉及视频帧内预测模式的快速选择技术。
为了使帧内预测更加精确,更高效地减少冗余,HEVC(High Efficiency Video Coding,高效视频编码)标准采用35种帧内预测(intra predication)模式。但是,在进行帧内编码时,如果依次对35种帧内预测模式使用率失真优化(Rate-Distortion optimization,RDO)以判断出最佳预测模式,则编码器将不能承受将所有预测方向进行RDO的运算量,无法实现最佳模式的判断。为此,HEVC采用了一种“先粗选后细选(Rough-to-Fine)”的模式选择方案,但是,在这种方案下,对于帧内最佳预测模式的选择依然占用整个编码过程的大部分的工作量。因此,亟需一种既能保证编码质量,又能提升帧内预测模式选择效率的方法。
申请内容
本申请的目的在于提供一种视频帧内预测模式的快速选择方法及其装置,以提升帧内预测模式选择的计算效率。
为解决上述技术问题,本申请的实施方式公开了一种视频帧内预测模式的快速选择方法,包括以下步骤:
获取预测块中每个元素的梯度振幅和梯度角度;
对梯度角度进行统计,生成预测块的梯度角度直方图;
如果该预测块的纹理平滑度大于第一预定阈值,则确定该预测块为第一类预测块,并设定该第一类预测块的预测模式为仅包括直流预测模式和平面预测模式;
如果该预测块的纹理平滑度小于第二预定阈值,则确定该预测块为第二类预测块,并设定该第二类预测块的角度预测模式为包括梯度角度直方图中的最大峰值对应的角度预测模式;
其中,第一预定阈值大于第二预定阈值。
本申请的实施方式还公开了一种视频帧内预测模式的快速选择装置,包括:
获取单元,用于获取预测块中每个元素的梯度振幅和梯度角度;
统计单元,用于对梯度角度进行统计,生成预测块的梯度角度直方图;
第一设定单元,用于在预测块的纹理平滑度大于第一预定阈值时,确定该预测块为第一类预测块,并设定该第一类预测块的预测模式为仅包括直流预测模式和平面预测模式;
第二设定单元,用于在预测块的纹理平滑度小于第二预定阈值时,确定该预测块为第二类预测块,并设定该第二类预测块的角度预测模式为包括梯度角度直方图中的最大峰值对应的角度预测模式;
其中,第一预定阈值大于第二预定阈值。
本申请实施方式与现有技术相比,主要区别及其效果在于:
基于预测块本身的纹理内容和特性,将预测块进行分类,对于不同类型的预测块设定不同数目的预测模式,可有效减少进行RDO的候选数目(RDO的计算非常复杂耗时),从而减少计算量,提高计算效率。
进一步地,随着预测块尺寸的减少,预测块的统计特性变弱,容易受噪声等因素的影响,因此,对不同尺寸预测块的角度预测模式数目进行自适应
调整,即对于尺寸大的预测块选取较少的角度预测模式,而对于尺寸小的预测块选取数目较多的角度预测模式,可提高确定预测模式的准确性。
进一步地,如果元素为像素,预先计算好所有像素的梯度振幅和梯度角度,可在后续预测模式的选择过程中,供不同尺寸的预测块直接使用,与每次变换预测块尺寸后再进行各像素参数的计算相比,能有效避免不必要的重复计算,极大地提高计算效率。
图1是本申请第一实施方式中一种视频帧内预测模式的快速选择方法的流程示意图;
图2是本申请第二实施方式中一种视频帧内预测模式的快速选择方法的流程示意图;
图3是本现有技术中的HEVC的33个角度预测模式角度示意图;
图4是本申请第二实施方式中一预测块的梯度角度直方图;
图5是本申请第二实施方式中三种预测块的图像示意图;
图6是本申请第三实施方式中一种视频帧内预测模式的快速选择装置的结构示意图。
在以下的叙述中,为了使读者更好地理解本申请而提出了许多技术细节。但是,本领域的普通技术人员可以理解,即使没有这些技术细节和基于以下各实施方式的种种变化和修改,也可以实现本申请各权利要求所要求保护的技术方案。
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请的实施方式作进一步地详细描述。
本申请第一实施方式涉及一种视频帧内预测模式的快速选择方法,尤其适用于HEVC编码标准的视频帧内预测模式的选择。图1是该视频帧内预测模式的快速选择方法的流程示意图。
具体地,本申请实施方式涉及的是HEVC帧内预测模式的快速选择方法。如图1所示,该视频帧内预测模式的快速选择方法包括以下步骤:
在步骤101中,获取预测块中每个元素的梯度振幅和梯度角度。其中,预测块的元素可以是一个像素,也可以是小于预测块像素总数目的像素集合,例如对于32×32的预测块,其元素可以是单个像素,也可以是4×4、2×2或者8×8大小的像素集合。
步骤102,对梯度角度进行统计,生成预测块的梯度角度直方图。
在本实施方式中,梯度角度直方图中的横坐标可以每个元素的梯度角度,也可以是每个元素的预测角度,其中,每个元素的预测角度是指33个预测角度中与其梯度角度数值最接近的角度,该预测角度对应的角度预测模式也是与该元素的最相关角度预测模式。梯度角度直方图中的纵坐标可以是某个角度预测模式或梯度角度下的像素数目,也可以是某个角度预测模式或梯度角度下的像素梯度振幅的累加值。
步骤103,计算该预测块的纹理平滑度,并确定该预测块的纹理平滑度与第一预定阈值和第二预定阈值之间的大小关系。其中,第一预定阈值大于第二预定阈值。
上述纹理平滑度表示预测块内部元素之间变化的平缓程度,即纹理平滑度越大,则预测块的纹理越少,纹理平滑度越小,预测块的具有的纹理越多,且纹理的方向性越强烈。在本申请的一优选例中,预测块的纹理平滑度是基于预测块元素梯度振幅中的最大梯度振幅或梯度角度直方图中的最大峰值确
定的。此外,可以理解,在本申请的其他实施方式中,也可以基于其他因素进行文理平滑度的确定,在此不做限定。
如果该预测块的纹理平滑度大于第一预定阈值,则进入步骤104,此后结束本流程;如果该预测块的纹理平滑度小于第二预定阈值,则进入步骤105,此后结束本流程;如果预测块的纹理平滑度大于第二预定阈值且小于第一预定阈值,则进入步骤106,此后结束本流程。
在步骤104中,确定该预测块为第一类预测块,并设定该第一类预测块的预测模式为仅包括直流(DC)预测模式和平面(Planar)预测模式。
在步骤105中,确定该预测块为第二类预测块,并设定该第二类预测块的角度预测模式为包括梯度角度直方图中的最大峰值对应的角度预测模式。
在步骤106中,确定预测块为第三类预测块,并设定该第三类预测块的角度预测模式为包括梯度角度直方图中的至少两个峰值所对应的角度预测模式。
上述仅仅确定了第二类预测块和第三类预测块的角度预测模式,根据HEVC标准,第二类预测块和第三类预测块的预测模式包括角度预测模式和非角度预测模式,即除了上述确定的角度预测模式,还直流预测模式和平面预测模式。此外,可以理解,第一类预测块,即平坦块纹理很少,块内部元素间的变化很平缓或几乎没有变化,其仅考虑DC和Planar两种非角度预测模式即可达到预测效果,不再计算其角度预测模式,可有效减少计算量。第二类预测块,即强方向纹理块具有很强的纹理,且纹理方向明确,因此,为了减少计算量仅需固定少量的角度预测模式即可达到预测效果。
为了提高预测块的预测精度,上述第二类预测块的角度预测模式还可以包括其他角度预测模式,例如,在本申请的一优选例中,第二类预测块的角度预测模式还包括与最大峰值对应的角度预测模式角度上相邻的N个角度预测模式,其中,N≥1。
此外,在本申请的另一优选例中,上述第二类预测块的角度预测模式的组成可以为:包含梯度角度直方图中最大峰值对应的角度预测模式的一个集合,集合中的角度预测模式对应的角度是连续的,例如,如果最大峰值对应的角度预测模式为26,则集合中包括角度预测模式26-29,或包括角度预测模式24-29,或包括角度预测模式22-26,等等。
随着预测块尺寸的减少,预测块的统计特性变弱,容易受噪声等因素的影响,因此,对不同尺寸预测块的角度预测模式数目进行自适应调整,即对于尺寸大的预测块选取较少的角度预测模式,而对于尺寸小的预测块选取数目较多的角度预测模式,可提高确定预测模式的准确性。因此,在本申请的一优选例中,上述第二类预测块或第三类预测块的尺寸越大,其角度预测模式的数目越少。例如,在步骤106中,第三类预测块的尺寸越大,角度预测模式的数目越少。实际应用中,可将梯度角度直方图中的峰值按照由大到小的次序排列,根据预测块的大小,取前M个峰值对应的角度预测模式作为该预测块的角度预测模式。
在本申请的其他实施方式中,也可以根据其他方式确定峰值的数目,例如,通过获取大于某一峰值阈值的峰值对应的角度预测模式来确定第三类预测块的角度预测模式,预测块的尺寸越大,峰值阈值越大,这样,对于尺寸大的预测块,其角度预测模式的数目还是少于尺寸小的预测块的。
基于预测块本身的纹理内容和特性,将预测块进行分类,对于不同类型的预测块设定不同数目的预测模式,可有效减少进行RDO的候选数目(RDO的计算非常复杂耗时),从而减少计算量,提高计算效率。
本申请第二实施方式涉及一种视频帧内预测模式的快速选择方法。图2是该视频帧内预测模式的快速选择方法的流程示意图。
第二实施方式在第一实施方式的基础上进行了改进,主要改进之处在于:预测块中的元素为像素,通过预先计算好所有像素的梯度振幅和梯度角
度,可在后续预测模式的选择过程中,供不同尺寸的预测块直接使用,与每次变换预测块尺寸后再进行各像素参数的计算相比,能有效避免不必要的重复计算,极大地提高计算效率。
具体地说,上述预测块中的元素为像素,如图2所示,该视频帧内预测模式的快速选择方法包括以下步骤:
在步骤201中,计算所述预测块所在当前帧图像中所有像素的梯度振幅和梯度角度。例如,在本申请的一实际应用中,当前帧图像中每个像素的梯度振幅和梯度角度的计算过程如下:
a)计算每个像素的梯度:Grad(x,y)={dx,dy},该式中的
dx=-p(x-1,y-1)+p(x-1,y+1)-2*p(x,y-1)+2*p(x,
y+1)-p(x+1,y-1)+p(x+1,y+1);
dy=p(x-1,y-1)+2*p(x-1,y)+p(x-1,y+1)-p(x+1,y-1)-2*p(x+1,y)-p(x+1,y+1)。
或者:
dx=-p(x-1,y-1)+p(x-1,y+1)-p(x,y-1)+p(x,y+1)-p(x+1,y-1)+p(x+1,y+1);
dy=p(x-1,y-1)+p(x-1,y)+p(x-1,y+1)-p(x+1,y-1)-p(x+1,y)-p(x+1,y+1)。
或者:
dx=-p(x-1,y-1)+p(x-1,y)-p(x,y-1)+p(x,y);
dy=p(x-1,y-1)+p(x-1,y)-p(x+1,y-1)-p(x+1,y)。
其中,p(x,y)为当前像素点的像素值。
b)梯度振幅GradAmp=abs(dx)+abs(dy)(abs表示取绝对值)
c)梯度角度GradAng=arctan(dy/dx)或者GradAng=dy/dx
此后进入步骤202中,对梯度角度进行统计,生成预测块的梯度角度直
方图。在本实施方式的梯度角度直方图中,横坐标为预测模式(33个角度预测模式+DC预测模式+Player预测模式),纵坐标为每个预测模式下的所有像素的梯度振幅的累加值。直方图的具体生成过程如下:
a)计算每个像素的最相关角度预测模式
图3为HEVC的33个角度预测模式或方向(2,3,4,…,10,…,34)。用表格表示如下(只是顺序形式上的变化,是为了计算简化):
mode33=[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,...17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2];
对应这33个角度预测模式或方向,可以预先计算出其对应的梯度角度,如下表:
GradAng33=[-1.000000,-1.230769,-1.523810,-1.882353,-2.461538,-3.555556,-6.400000,-16.000000,9999,16.000000,6.400000,3.555556,2.461538,1.882353,1.523810,1.230769,1.000000,-0.812500,-0.656250,-0.531250,-0.406250,-0.281250,-0.156250,-0.062500,0.000000,0.062500,0.156250,0.281250,0.406250,0.531250,0.656250,0.812500,1.000000];
GradAng33是对应这33种角度预测模式的GradAng值(dy/dx);
对于图像输入进来的每一个像素,根据上面计算得到了dy/dx的值,梯度角度GradAng=arctan(dy/dx)或者GradAng=dy/dx。然后在GradAng33表格中查找最接近的值,比如我们找到了第i个值最接近,而GradAng33的第i个值,对应于mode33表格中的第i个值,则mode33表格中的第i个值就是该像素最相关的角度预测模式;至此,得到了每个像素最相关的角度预测模式。
此处,如果后续会用到预测块的最大梯度振幅,则可计算每个预测块中的最大梯度振幅,即从该预测块包括的像素的梯度振幅中选择出值最大的梯
度振幅。
b)生成预测块的梯度角度直方图
在一实例中,对某一个角度预测模式,把所有最相关角度预测模式是该角度预测模式的像素的梯度振幅值累加,则得到该角度预测模式的直方图;再对所有的角度预测模式(33个角度预测模式),得到其角度预测模式直方图,最后得到总的梯度角度直方图(如图4所示)。在该梯度角度直方图中,横坐标2,3,…34表示33种角度预测模式(其预测角度对应于梯度角度)。纵坐标是相应角度预测模式下梯度振幅的累加值。在该梯度角度直方图中,是不是峰值以及是第几峰值,是根据纵坐标值,也就是其梯度振幅的累加值决定的,例如,第一峰值(即最大峰值)其梯度振幅累加值1022,指示的是预测模式(也就是预测角度方向)17;第二峰值其梯度振幅累加值624,指示的是预测模式(也就是预测角度方向)19;第三峰值其梯度振幅累加值422,指示的是预测模式(也就是预测角度方向)18;第四峰值其梯度振幅累加值396,指示的是预测模式(也就是预测角度方向)16。
此后进入步骤203中,计算该预测块的纹理平滑度,并根据该预测块的纹理平滑度与第一预定阈值和第二预定阈值之间的大小关系,对该预测块进行分类。本申请的一具体实现过程如下:
a)先对于预测块是第一类预测块(即光滑平坦块)还非第一类预测块(即非光滑平坦块)进行判断。具体用该预测块的纹理梯度是否很小(即纹理平滑度是否很大)的判断条件来判断;如果满足条件,则是光滑平坦块;否则,不是光滑平坦块。纹理梯度是否很小的判断条件具体用如下特征来衡量:
该预测块中像素的最大振幅<Th_GradAmp,或者该预测块的梯度角度直方图的最大峰值<Th_Peak,其中,Th_GradAmp,Th_Peak是设定的阈值。此处,预测块中像素的最大振幅或梯度角度直方图中的最大峰值越小,
其纹理平滑度越大。
该预测块的最大梯度振幅、该预测块的梯度方向直方图的最大峰值,在前面已经计算得到。
b)如果该预测块是非第一类预测块,则判断其是属于第二类预测块(即强纹理方向块)还是第三类预测块(即一般块)。具体地,用该预测块的梯度角度直方图的最大峰值是否占主要地位来进行判断:如果该预测块的梯度角度直方图中的最大峰值占主要地位,则是强纹理方向块,否则是一般块。该预测块的梯度角度直方图的最大峰值是否占主要地位用如下具体特征来进行衡量:
梯度角度直方图中的最大峰值>k*(梯度角度直方图的第二大峰值+梯度角度直方图的第三大峰值),或者
梯度角度直方图的最大峰值>Th_percent*梯度角度直方图的总能量
上述判断条件中,k为参数,比如0.9;Th_percent是设定的阈值,比如60%。
至此,就完成了对预测块的预分类。如图5所示,图5a-c分别表示一具体应用中的平坦块(第一类预测块)、一般块(第三类预测块)和强纹理方向块(第二类预测块)。
此后进入步骤204,设定该预测块的角度预测模式。
如果该预测块是第一类预测块,则设定该预测块的预测模式为仅包括DC预测模式和Planar预测模式两种非角度预测模式;
如果该预测块是第二类预测块,则设定该预测块的预测模式包括3个角度预测模式(梯度角度直方图中最大峰值对应的角度预测模式和与该角度预测模式在角度上相邻的两个角度预测模式)和两个非角度预测模式(DC预测模式和Planar预测模式);
如果该预测块是第三类预测块,则设定该预测块的预测模式包括M个角度预测模式和两个非角度预测模式(DC预测模式和Planar预测模式)。其中,M个角度预测模式为该预测块梯度角度直方图中最大的M个峰值对应的角度预测模式,其中,该M根据预测块的尺寸的不同而不同,预测块的尺寸越大,M越小,预测块的尺寸越小,M越大,比如,对于64x64的预测块,N取2;对于32x32的预测块,N取2;对于16x16的预测块,N取4;对于8x8的预测块,N取6;对于4x4的预测块,N取8。
此后结束本流程。
对预测块进行预分类的好处是:可以减少某些特定块(光滑平坦块、强方向纹理块)进行后续RDO计算的候选数目,从而减少计算量。例如,对于16x16的预测块,如果用最原始的方法,则需要对完整的35(33个角度+2个非角度:DC,Planar)个候选预测模式进行RDO的计算;如果基于图像块的梯度方向直方图判断出大致的方向(即最佳预测模式),则不需要穷尽33个角度,对于一般块只需要对4个角度预测模式加上另外2个非角度预测模式(DC和Planar),进行RDO的计算;对于平坦块,仅需要对两种非角度预测模式(DC和Planar)进行RDO的计算;对于强纹理方向块,仅需要3个角度预测模式加两个非角度预测模式进行RDO的计算。总体上,可有效将RDO计算的模式数目减少。
本申请的各方法实施方式均可以以软件、硬件、固件等方式实现。不管本申请是以软件、硬件、还是固件方式实现,指令代码都可以存储在任何类型的计算机可访问的存储器中(例如永久的或者可修改的,易失性的或者非易失性的,固态的或者非固态的,固定的或者可更换的介质等等)。同样,存储器可以例如是可编程阵列逻辑(Prograxable Array Logic,简称“PAL”)、随机存取存储器(Random Access Memory,简称“RAM”)、可编程只读存储器(Prograxable Read Only Memory,简称“PROM”)、
只读存储器(Read-Only Memory,简称“ROM”)、电可擦除可编程只读存储器(Electrically Erasable Prograxable ROM,简称“EEPROM”)、磁盘、光盘、数字通用光盘(Digital Versatile Disc,简称“DVD”)等等。
本申请第三实施方式涉及一种视频帧内预测模式的快速选择装置。图6是该视频帧内预测模式的快速选择装置的结构示意图。
具体地,如图6所示,该视频帧内预测模式的快速选择装置包括:
获取单元,用于获取预测块中每个元素的梯度振幅和梯度角度。
统计单元,用于对梯度角度进行统计,生成预测块的梯度角度直方图。
确定单元,用于计算该预测块的纹理平滑度,并确定该预测块的纹理平滑度与第一预定阈值和第二预定阈值之间的大小关系。其中,第一预定阈值大于第二预定阈值。
第一设定单元,用于在预测块的纹理平滑度大于第一预定阈值时,确定该预测块为第一类预测块,并设定该第一类预测块的预测模式为仅包括直流预测模式和平面预测模式。
第二设定单元,用于在预测块的纹理平滑度小于第二预定阈值时,确定该预测块为第二类预测块,并设定该第二类预测块的角度预测模式为包括梯度角度直方图中的最大峰值对应的角度预测模式。
第三设定单元,用于当预测块的纹理平滑度大于第二预定阈值且小于第一预定阈值时,确定预测块为第三类预测块,并设定该第三类预测块的角度预测模式为包括梯度角度直方图中的至少两个峰值所对应的角度预测模式。
为了提高预测块的预测精度,上述第二类预测块的角度预测模式还包括其他角度预测模式,例如,在本申请的一优选例中,上述第二设定单元在设定第二类预测块的角度预测模式时,还设定该第二类角度预测模式还包括与最大峰值对应的角度预测模式角度上相邻的N个角度预测模式,其中,N≥1。
随着预测块尺寸的减少,预测块的统计特性变弱,容易受噪声等因素的影响,因此,对不同尺寸预测块的角度预测模式数目进行自适应调整,即对于尺寸大的预测块选取较少的角度预测模式,而对于尺寸大的预测块选取数目较多的角度预测模式,可提高确定预测模式的准确性。因此,在本申请的一优选例中,在第三设定模块设定第三类预测块的角度预测模式时,第三类预测块的尺寸越大,角度预测模式的数目越少。
第一实施方式是与本实施方式相对应的方法实施方式,本实施方式可与第一实施方式互相配合实施。第一实施方式中提到的相关技术细节在本实施方式中依然有效,为了减少重复,这里不再赘述。相应地,本实施方式中提到的相关技术细节也可应用在第一实施方式中。
本申请第四实施方式涉及一种视频帧内预测模式的快速选择装置。
第四实施方式在第三实施方式的基础上进行了改进,主要改进之处在于:预测块中的元素为像素,通过预先计算好所有像素的梯度振幅和梯度角度,可在后续预测模式的选择过程中,供不同尺寸的预测块直接使用,与每次变换预测块尺寸后再进行各像素参数的计算相比,能有效避免不必要的重复计算,极大地提高计算效率。
具体地说。上述预测块中的元素为像素,且该视频帧内预测模式的快速选择装置还包括以下单元:
计算单元,用于计算所述预测块所在当前帧图像中所有像素的梯度振幅和梯度角度。
第二实施方式是与本实施方式相对应的方法实施方式,本实施方式可与第二实施方式互相配合实施。第二实施方式中提到的相关技术细节在本实施方式中依然有效,为了减少重复,这里不再赘述。相应地,本实施方式中提到的相关技术细节也可应用在第二实施方式中。
需要说明的是,本申请各设备实施方式中提到的各单元都是逻辑单元,
在物理上,一个逻辑单元可以是一个物理单元,也可以是一个物理单元的一部分,还可以以多个物理单元的组合实现,这些逻辑单元本身的物理实现方式并不是最重要的,这些逻辑单元所实现的功能的组合才是解决本申请所提出的技术问题的关键。此外,为了突出本申请的创新部分,本申请上述各设备实施方式并没有将与解决本申请所提出的技术问题关系不太密切的单元引入,这并不表明上述设备实施方式并不存在其它的单元。
需要说明的是,在本专利的权利要求和说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
虽然通过参照本申请的某些优选实施方式,已经对本申请进行了图示和描述,但本领域的普通技术人员应该明白,可以在形式上和细节上对其作各种改变,而不偏离本申请的精神和范围。
Claims (11)
- 一种视频帧内预测模式的快速选择方法,其特征在于,包括以下步骤:获取预测块中每个元素的梯度振幅和梯度角度;对梯度角度进行统计,生成所述预测块的梯度角度直方图;如果该预测块的纹理平滑度大于第一预定阈值,则确定该预测块为第一类预测块,并设定该第一类预测块的预测模式为仅包括直流预测模式和平面预测模式;如果该预测块的纹理平滑度小于第二预定阈值,则确定该预测块为第二类预测块,并设定该第二类预测块的角度预测模式为包括所述梯度角度直方图中的最大峰值对应的角度预测模式;其中,第一预定阈值大于第二预定阈值。
- 根据权利要求1所述的视频帧内预测模式的快速选择方法,其特征在于,所述第二类预测块的角度预测模式还包括与所述最大峰值对应的角度预测模式角度上相邻的N个角度预测模式,其中,N≥1。
- 根据权利要求1所述的视频帧内预测模式的快速选择方法,其特征在于,还包括以下步骤:如果所述预测块的纹理平滑度大于第二预定阈值且小于第一预定阈值,则确定所述预测块为第三类预测块,并设定该第三类预测块的角度预测模式为包括所述梯度角度直方图中的至少两个峰值所对应的角度预测模式。
- 根据权利要求3所述的视频帧内预测模式的快速选择方法,其特征在于,在所述"设定该第三类预测块的角度预测模式为包括所述梯度角度直方图中的至少两个峰值所对应的角度预测模式"的步骤中,所述第三类预测块的 尺寸越小,所述角度预测模式的数目越多;所述第三类预测块的尺寸越大,所述角度预测模式的数目越少。
- 根据权利要求1至4中任一项所述的视频帧内预测模式的快速选择方法,其特征在于,所述预测块的纹理平滑度是基于所述预测块元素梯度振幅中的最大梯度振幅或梯度角度直方图中的最大峰值确定的。
- 根据权利要求1至4中任一项所述的视频帧内预测模式的快速选择方法,其特征在于,所述元素为像素,且在所述步骤“获取预测块中每个元素的梯度振幅和梯度角度”的步骤之前,还包括以下步骤:计算所述预测块所在当前帧图像中所有像素的梯度振幅和梯度角度。
- 一种视频帧内预测模式的快速选择装置,其特征在于,包括:获取单元,用于获取预测块中每个元素的梯度振幅和梯度角度;统计单元,用于对梯度角度进行统计,生成所述预测块的梯度角度直方图;第一设定单元,用于在所述预测块的纹理平滑度大于第一预定阈值时,确定该预测块为第一类预测块,并设定该第一类预测块的预测模式为仅包括直流预测模式和平面预测模式;第二设定单元,用于在所述预测块的纹理平滑度小于第二预定阈值时,确定该预测块为第二类预测块,并设定该第二类预测块的角度预测模式为包括所述梯度角度直方图中的最大峰值对应的角度预测模式;其中,第一预定阈值大于第二预定阈值。
- 根据权利要求7所述的视频帧内预测模式的快速选择装置,其特征在于,所述第二类预测块的角度预测模式还包括与所述最大峰值对应的角度预测模式角度上相邻的N个角度预测模式,其中,N≥1。
- 根据权利要求7所述的视频帧内预测模式的快速选择装置,其特征 在于,还包括以下单元:第三设定单元,用于当所述预测块的纹理平滑度大于第二预定阈值且小于第一预定阈值时,确定所述预测块为第三类预测块,并设定该第三类预测块的角度预测模式为包括所述梯度角度直方图中的至少两个峰值所对应的角度预测模式。
- 根据权利要求9所述的视频帧内预测模式的快速选择装置,其特征在于,在所述第三设定模块设定所述第三类预测块的角度预测模式时,所述第三类预测块的尺寸越小,所述角度预测模式的数目越多;预测块的尺寸越大,所述角度预测模式的数目越少。
- 根据权利要求7至10中任一项所述的视频帧内预测模式的快速选择装置,其特征在于,所述元素为像素,且该选择装置还包括以下单元:计算单元,用于计算所述预测块所在当前帧图像中所有像素的梯度振幅和梯度角度。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US15/640,328 US10440390B2 (en) | 2014-12-31 | 2017-06-30 | Rapid selection method for video intra prediction mode and apparatus thereof |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410855651.9 | 2014-12-31 | ||
| CN201410855651.9A CN105812799B (zh) | 2014-12-31 | 2014-12-31 | 视频帧内预测模式的快速选择方法及其装置 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US15/640,328 Continuation US10440390B2 (en) | 2014-12-31 | 2017-06-30 | Rapid selection method for video intra prediction mode and apparatus thereof |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2016107468A1 true WO2016107468A1 (zh) | 2016-07-07 |
Family
ID=56284246
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2015/098261 Ceased WO2016107468A1 (zh) | 2014-12-31 | 2015-12-22 | 视频帧内预测模式的快速选择方法及其装置 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US10440390B2 (zh) |
| CN (1) | CN105812799B (zh) |
| WO (1) | WO2016107468A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10440390B2 (en) | 2014-12-31 | 2019-10-08 | Alibaba Group Holding Limited | Rapid selection method for video intra prediction mode and apparatus thereof |
Families Citing this family (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106961606B (zh) * | 2017-01-26 | 2020-04-07 | 浙江工业大学 | 基于纹理划分特征的hevc帧内编码模式选择方法 |
| CN109274965B (zh) * | 2018-11-27 | 2021-07-20 | 广东工业大学 | Hevc中基于像素值统计特性的快速预测模式选择方法 |
| US11051013B2 (en) * | 2019-11-12 | 2021-06-29 | Realtek Semiconductor Corp. | Device and method of selecting an intra mode of a coding unit |
| US11507836B1 (en) * | 2019-12-20 | 2022-11-22 | Apple Inc. | Federated learning using local ground truth estimation |
| CN115883833B (zh) * | 2021-09-28 | 2025-07-22 | 维沃移动通信有限公司 | 帧内预测方法及装置 |
| EP4496307A4 (en) * | 2022-03-15 | 2026-03-04 | Kt Corp | METHOD AND DEVICE FOR IMAGE ENCODING/DECODING |
| CN114885161B (zh) * | 2022-04-22 | 2024-08-09 | 复旦大学 | 一种适用于vvc标准的帧内预测的模式选择的快速算法 |
| CN119698832A (zh) | 2022-06-13 | 2025-03-25 | 联发科技股份有限公司 | 电子设备和视讯编译码的方法 |
| CN119366180A (zh) * | 2022-06-13 | 2025-01-24 | 联发科技股份有限公司 | 电子设备和视讯编译码的方法 |
| US12457325B2 (en) * | 2022-07-04 | 2025-10-28 | Alibaba (China) Co., Ltd. | On planar intra prediction mode |
| CN119052483B (zh) * | 2024-08-06 | 2025-11-04 | 咪咕视讯科技有限公司 | 一种帧内预测模式的确定方法、装置及电子设备 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1795680A (zh) * | 2003-03-03 | 2006-06-28 | 新加坡科技研究局 | 用于高级视频编码帧内预测的快速判定算法 |
| CN101964906A (zh) * | 2009-07-22 | 2011-02-02 | 北京工业大学 | 基于纹理特性的快速帧内预测方法和装置 |
| CN102724509A (zh) * | 2012-06-19 | 2012-10-10 | 清华大学 | 视频序列的最优帧内编码模式选择方法及装置 |
| US20130121401A1 (en) * | 2011-11-16 | 2013-05-16 | Alexander Zheludkov | Video compression for high efficiency video coding |
| CN103297781A (zh) * | 2013-06-07 | 2013-09-11 | 安科智慧城市技术(中国)有限公司 | 一种基于纹理方向的hevc帧内编码方法、装置和系统 |
| CN104125473A (zh) * | 2014-07-31 | 2014-10-29 | 南京理工大学 | 一种3d视频深度图像帧内预测模式选择方法及系统 |
Family Cites Families (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8774550B2 (en) * | 2010-06-04 | 2014-07-08 | Panasonic Corporation | Picture processing device, picture processing method, integrated circuit, and program |
| US8422782B1 (en) * | 2010-09-30 | 2013-04-16 | A9.Com, Inc. | Contour detection and image classification |
| IL210427A0 (en) * | 2011-01-02 | 2011-06-30 | Agent Video Intelligence Ltd | Calibration device and method for use in a surveillance system for event detection |
| CN102364950B (zh) * | 2011-11-17 | 2014-09-10 | 武汉天喻信息产业股份有限公司 | 基于h.264/avc标准的帧内预测模式快速选择方法及装置 |
| KR101654446B1 (ko) * | 2012-01-13 | 2016-09-05 | 샤프 가부시키가이샤 | 화상 복호 장치, 화상 부호화 장치 및 부호화 데이터의 데이터 구조 |
| CN102843559B (zh) * | 2012-09-12 | 2014-12-31 | 清华大学 | 基于纹理特性的hevc帧内预测模式的快速选择方法及装置 |
| CN103517069B (zh) * | 2013-09-25 | 2016-10-26 | 北京航空航天大学 | 一种基于纹理分析的hevc帧内预测快速模式选择方法 |
| US9294764B2 (en) * | 2014-01-07 | 2016-03-22 | Vixs Systems, Inc. | Video encoder with intra-prediction candidate screening and methods for use therewith |
| KR102330322B1 (ko) * | 2014-09-16 | 2021-11-24 | 삼성전자주식회사 | 영상 특징 추출 방법 및 장치 |
| CN105812799B (zh) | 2014-12-31 | 2019-03-08 | 阿里巴巴集团控股有限公司 | 视频帧内预测模式的快速选择方法及其装置 |
-
2014
- 2014-12-31 CN CN201410855651.9A patent/CN105812799B/zh active Active
-
2015
- 2015-12-22 WO PCT/CN2015/098261 patent/WO2016107468A1/zh not_active Ceased
-
2017
- 2017-06-30 US US15/640,328 patent/US10440390B2/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1795680A (zh) * | 2003-03-03 | 2006-06-28 | 新加坡科技研究局 | 用于高级视频编码帧内预测的快速判定算法 |
| CN101964906A (zh) * | 2009-07-22 | 2011-02-02 | 北京工业大学 | 基于纹理特性的快速帧内预测方法和装置 |
| US20130121401A1 (en) * | 2011-11-16 | 2013-05-16 | Alexander Zheludkov | Video compression for high efficiency video coding |
| CN102724509A (zh) * | 2012-06-19 | 2012-10-10 | 清华大学 | 视频序列的最优帧内编码模式选择方法及装置 |
| CN103297781A (zh) * | 2013-06-07 | 2013-09-11 | 安科智慧城市技术(中国)有限公司 | 一种基于纹理方向的hevc帧内编码方法、装置和系统 |
| CN104125473A (zh) * | 2014-07-31 | 2014-10-29 | 南京理工大学 | 一种3d视频深度图像帧内预测模式选择方法及系统 |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10440390B2 (en) | 2014-12-31 | 2019-10-08 | Alibaba Group Holding Limited | Rapid selection method for video intra prediction mode and apparatus thereof |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105812799A (zh) | 2016-07-27 |
| US10440390B2 (en) | 2019-10-08 |
| CN105812799B (zh) | 2019-03-08 |
| US20170302962A1 (en) | 2017-10-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2016107468A1 (zh) | 视频帧内预测模式的快速选择方法及其装置 | |
| CN104427337B (zh) | 基于目标检测的感兴趣区域视频编码方法及其装置 | |
| CN105120292B (zh) | 一种基于图像纹理特征的视频编码帧内预测方法 | |
| CN108184115B (zh) | Hevc帧内cu划分和pu预测模式选择方法及系统 | |
| WO2018010492A1 (zh) | 视频编码中帧内预测模式的快速决策方法 | |
| CN102984523B (zh) | 一种多方向的帧内预测编解码方法及装置 | |
| CN104052994A (zh) | 分级自适应的hevc帧内预测模式快速决策方法 | |
| CN100580694C (zh) | 一种用于灰度图像快速多阈值分割的方法 | |
| CN107810632A (zh) | 具有降低代价的块分割和细化的帧内模式选择的帧内预测处理器 | |
| JP2007208989A (ja) | イントラ予測モード決定方法及び装置 | |
| CN105608708A (zh) | 基于分块平面拟合的图像二值化方法及装置 | |
| WO2020207162A1 (zh) | 帧内预测编码方法、装置、电子设备及计算机存储介质 | |
| CN103337073B (zh) | 一种基于三维熵的二维图像阈值分割方法 | |
| WO2022061563A1 (zh) | 视频编码方法、装置及计算机可读存储介质 | |
| CN110650342A (zh) | 基于编码单元多特征分析的快速编码方法 | |
| CN103702131A (zh) | 一种基于模式预处理的帧内编码优化方法和系统 | |
| TWI487381B (zh) | Predictive Coding Method for Multimedia Image Texture | |
| CN101902642B (zh) | 一种h.264帧间skip模式快速判定方法 | |
| CN114666592B (zh) | 基于avs3编码历史信息的cu块划分方法、装置及介质 | |
| CN106034238B (zh) | 计算编码失真度和编码模式控制的方法及其系统 | |
| CN116095320A (zh) | 量化参数调整方法、装置、设备及存储介质 | |
| CN107682699B (zh) | 一种近无损图像压缩方法 | |
| CN105263026A (zh) | 基于概率统计与图像梯度信息的全局矢量获取方法 | |
| CN103905818B (zh) | 基于霍夫变换的hevc标准中帧内预测模式快速确定方法 | |
| CN103533348A (zh) | 基于视觉感知的多视点快速模式选择方法 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15875146 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| NENP | Non-entry into the national phase |
Ref country code: JP |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 15875146 Country of ref document: EP Kind code of ref document: A1 |