WO2020019316A1 - Intra-frame prediction mode searching device, video encoding method and device, and recording medium - Google Patents

Intra-frame prediction mode searching device, video encoding method and device, and recording medium Download PDF

Info

Publication number
WO2020019316A1
WO2020019316A1 PCT/CN2018/097528 CN2018097528W WO2020019316A1 WO 2020019316 A1 WO2020019316 A1 WO 2020019316A1 CN 2018097528 W CN2018097528 W CN 2018097528W WO 2020019316 A1 WO2020019316 A1 WO 2020019316A1
Authority
WO
WIPO (PCT)
Prior art keywords
prediction mode
prediction
intra prediction
pipeline stage
coding block
Prior art date
Application number
PCT/CN2018/097528
Other languages
French (fr)
Chinese (zh)
Inventor
缪泽翔
郑萧桢
李蔚然
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to CN201880017757.8A priority Critical patent/CN110419214A/en
Priority to PCT/CN2018/097528 priority patent/WO2020019316A1/en
Publication of WO2020019316A1 publication Critical patent/WO2020019316A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods 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/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods 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/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

An intra-frame prediction mode searching device, comprising: step 1, on the basis of X object prediction modes, generating X first prediction signals of the current encoding block under the X object prediction modes by using an original pixel of a neighboring block at the periphery of the current encoding block, and calculating a residual between the X first prediction signals and an original pixel value of the encoding block as X first residuals; step 2, calculating a first cost of the X object prediction modes according to the first residual by means of a first cost calculation method, and using Y object prediction modes at one side having the smallest first cost in the object prediction mode as an intermediate prediction mode; step 3, on the basis of the intermediate prediction mode, generating a second prediction signal of the current encoding block under the intermediate prediction mode by using a reconstruction pixel of the neighboring block, and calculating a residue between the second prediction signal and the original pixel value of the encoding block as a second residue; and step 4, calculating a second cost of the intermediate prediction mode according to the second residue by means of a second cost calculation method, and using a prediction mode having the smallest second cost in the intermediate prediction mode as a searched final prediction mode, wherein Y is a natural number less than X.

Description

帧内预测模式搜索方法及装置、视频编码方法及装置以及记录介质Method and device for searching intra prediction mode, method and device for video encoding, and recording medium 技术领域Technical field
本发明实施例涉及视频编码领域,尤其涉及一种帧内预测模式搜索方法及装置、视频编码方法及装置以及记录介质。Embodiments of the present invention relate to the field of video coding, and in particular, to a method and a device for searching an intra prediction mode, a video coding method and device, and a recording medium.
背景技术Background technique
视觉信息是人类获取外界信息的最重要来源之一,但是摄像头采集所得未经压缩的原始视频数据占用的存储空间非常巨大,以分辨率为1920×1080、视频格式为yuv420(8bit)、帧率为30帧每秒、时长10分钟的视频为例,在无压缩的情况下存储该视频需要占用52.14G字节的存储空间。为了减少视频存储和传输所占用的带宽,需要对视频数据进行编码压缩处理。Visual information is one of the most important sources for humans to obtain external information, but the uncompressed raw video data collected by the camera takes up a huge storage space with a resolution of 1920 × 1080, a video format of yuv420 (8bit), and a frame rate As an example, a video of 30 frames per second and 10 minutes in length is used to store the video without compression, which requires 52.14 Gbytes of storage space. In order to reduce the bandwidth occupied by video storage and transmission, the video data needs to be encoded and compressed.
然而在现有技术的编码压缩处理中,进行计算时每个尺寸的编码块均依赖于其左侧及上方的相邻像素重建值用于产生预测值,因此在计算每个编码块(除位于图像边界处的编码块外)的预测值时都必须等待其左侧及上方的编码块先编码完成后才能进行,因此存在很强的依赖性可能会导致编码延迟。However, in the encoding and compression processing of the prior art, when the calculation is performed, the coded blocks of each size depend on the reconstruction values of neighboring pixels on the left and above to generate prediction values. The prediction value of the image boundary (outside of the coding block) must wait for the coding blocks on the left and above of it to be encoded before it can be performed, so there is a strong dependency that may cause coding delay.
特别是在通过芯片进行编码压缩处理时,这一延迟导致的问题更加显著。具体来说,芯片实现算法时通常将算法步骤分成若干个流水级,每个流水级并行处理不同的数据,该做法可以提升处理速度和提高资源利用率。The problem caused by this delay is even more significant when coding compression is performed by the chip. Specifically, when a chip implements an algorithm, the algorithm steps are usually divided into several pipeline stages, and each pipeline stage processes different data in parallel. This approach can improve processing speed and resource utilization.
然而,由于高效率视频编码标准的帧内预测算法进行计算每个尺寸编码块的预测模式时,如上所述,均依赖于其左侧及上方的相邻像素重建值用于产生预测值,计算每个编码块(除位于图像边界处的编码块外)的预测值前都必须等待其左侧及上方的编码块先编码完成。由于编码块对相邻编码块的重建像素存在很强的依赖性,芯片实现该算法时无法在帧内预测算法内部实现并行化,导致最终实现的芯片处理速度及效率不足。However, since the intra prediction algorithm of the high-efficiency video coding standard calculates the prediction mode of each size coded block, as described above, it depends on the reconstruction values of adjacent pixels on the left and above to generate prediction values. The prediction value of each coding block (except the coding block located at the boundary of the image) must wait for the coding blocks on the left and above of it to be encoded first. Because the coding block has a strong dependence on the reconstructed pixels of neighboring coding blocks, the chip cannot implement parallelization within the intra prediction algorithm when implementing the algorithm, resulting in insufficient chip processing speed and efficiency.
发明内容Summary of the Invention
本发明正是针对上述问题提出的,提供一种视频编码方法、视频编码装置以及记录介质,有效降低预测值计算资源和时间开销并降低对相邻编码块的数据依赖性。由其是在以芯片进行编码的情况下,能够取得更为突出的技术效果。The present invention is made in response to the above problems, and provides a video encoding method, a video encoding device, and a recording medium, which effectively reduce prediction value calculation resources and time overhead and reduce data dependence on neighboring encoding blocks. This is because in the case of encoding by a chip, a more prominent technical effect can be obtained.
本发明的第一方面的帧内预测模式搜索方法,包括:A method for searching an intra prediction mode according to a first aspect of the present invention includes:
第1步骤,基于X个对象预测模式,利用当前编码块周边的相邻块的原始像素生成所述当前编码块在所述X个对象预测模式下的X个第1预测信号,并求出所述X个第1预测信号与所述编码块的原始像值的残差作为X个第1残差;In the first step, based on the X object prediction modes, the original pixels of neighboring blocks around the current encoding block are used to generate X first prediction signals of the current encoding block in the X object prediction mode, and obtain all The residuals of the X first prediction signals and the original image values of the coding block are taken as the X first residuals;
第2步骤,根据所述第1残差通过第1代价计算方法计算出所述X个对象预测模式的第1代价,将所述对象预测模式中所述第1代价最小一侧的Y个对象预测模式作为中间预测模式;In a second step, the first cost of the X object prediction modes is calculated by the first cost calculation method according to the first residual, and the Y objects on the least side of the first cost in the object prediction mode are calculated. Prediction mode as an intermediate prediction mode;
第3步骤,基于所述中间预测模式,利用所述相邻块的重建像素生成所述当前编码块在所述中间预测模式下的第2预测信号,并求出所述第2预测信号与所述当前编码块的原始像值的残差作为第2残差;和,In a third step, based on the intermediate prediction mode, a reconstructed pixel of the neighboring block is used to generate a second prediction signal of the current coding block in the intermediate prediction mode, and the second prediction signal and the obtained prediction signal are obtained. State the residual of the original image value of the current coding block as the second residual; and,
第4步骤,根据所述第2残差通过第2代价计算方法计算出所述中间预测模式的第2代价,将所述中间预测模式中所述第2代价最小的预测模式作为搜索出的最终预测模式,In a fourth step, the second cost of the intermediate prediction mode is calculated by the second cost calculation method according to the second residual, and the prediction mode with the smallest second cost in the intermediate prediction mode is used as the searched final Prediction model,
其中,Y是小于X的自然数。Here, Y is a natural number smaller than X.
本发明的第二方面的视频编码方法,包括:A video encoding method according to a second aspect of the present invention includes:
使用上述的帧内预测模式搜索方法搜索出的最终预测模式对视频进行编码。The video is encoded using the final prediction mode searched out by the aforementioned intra prediction mode search method.
本发明的第三方面的帧内预测模式搜索装置,用于执行上述的帧内预测模式搜索的方法,其中,The intra prediction mode search apparatus according to the third aspect of the present invention is configured to perform the foregoing intra prediction mode search method, wherein:
包括:N-2流水级、N-1流水级和N流水级,Including: N-2 pipeline stage, N-1 pipeline stage and N pipeline stage,
所述第1步骤和所述第2步骤由所述N-2流水级执行,The first step and the second step are performed by the N-2 pipeline stage,
所述第3步骤由所述N-1流水级执行,The third step is performed by the N-1 pipeline stage,
所述第4步骤由所述N流水级执行。The fourth step is performed by the N pipeline stage.
本发明的第四方面的帧内预测模式搜索装置,包括:存储器和处理器, 其中,An apparatus for searching an intra prediction mode according to a fourth aspect of the present invention includes: a memory and a processor, where:
所述存储器用于存储程序指令;The memory is used to store program instructions;
所述处理器,调用所述程序指令,当程序指令被执行时,用于执行以下操作:The processor calls the program instruction, and when the program instruction is executed, is used to perform the following operations:
第1步骤,基于X个对象预测模式,利用当前编码块周边的相邻块的原始像素生成所述当前编码块在所述X个对象预测模式下的X个第1预测信号,并求出所述X个第1预测信号与所述编码块的原始像值的残差作为X个第1残差;In the first step, based on the X object prediction modes, the original pixels of neighboring blocks around the current encoding block are used to generate X first prediction signals of the current encoding block in the X object prediction mode, and obtain all The residuals of the X first prediction signals and the original image values of the coding block are taken as the X first residuals;
第2步骤,根据所述第1残差通过第1代价计算方法计算出所述X个对象预测模式的第1代价,将所述对象预测模式中所述第1代价最小一例的Y个对象预测模式作为中间预测模式;In a second step, the first cost of the X object prediction modes is calculated by the first cost calculation method according to the first residual, and the Y object predictions in which the first cost in the object prediction mode is the smallest one are predicted. Mode as an intermediate prediction mode;
第3步骤,基于所述中间预测模式,利用所述相邻块的重建像素生成所述当前编码块在所述中间预测模式下的第2预测信号,并求出所述第2预测信号与所述当前编码块的原始像值的残差作为第2残差;和In a third step, based on the intermediate prediction mode, a reconstructed pixel of the neighboring block is used to generate a second prediction signal of the current coding block in the intermediate prediction mode, and the second prediction signal and the obtained prediction signal are obtained. State the residual of the original image value of the current coding block as the second residual; and
第4步骤,根据所述第2残差通过第2代价计算方法计算出所述中间预测模式的第2代价,将所述中间预测模式中所述第2代价最小的预测模式作为搜索出的最终预测模式,In a fourth step, a second cost of the intermediate prediction mode is calculated by a second cost calculation method according to the second residual, and the prediction mode with the smallest second cost in the intermediate prediction mode is used as the searched final result. Prediction model,
其中,Y是小于X的自然数。Here, Y is a natural number smaller than X.
本发明的第五方面的视频编码装置,包括上述的帧内预测模式搜索装置。A video encoding device according to a fifth aspect of the present invention includes the above-mentioned intra prediction mode search device.
本发明的第六方面的记录介质,存储有使计算机执行如上所述的帧内预测模式搜索方法的程序。A recording medium according to a sixth aspect of the present invention stores a program that causes a computer to execute the intra prediction mode search method as described above.
本发明的第七方面的记录介质,存储有使计算机执行如上所述的视频编码方法的程序。A recording medium according to a seventh aspect of the present invention stores a program for causing a computer to execute the video encoding method as described above.
根据本发明的一个实施例的方案,通过预分析当前编码块的纹理梯度信息减少时需要搜索的帧内预测模式数目降低预测值计算资源和时间开销,并结合使用相邻块的原始像素信息及重建像素信息降低对相邻编码块的依赖性。According to the solution of an embodiment of the present invention, by pre-analyzing the number of intra prediction modes that need to be searched when the texture gradient information of the current coding block is reduced, the prediction value calculation resource and time overhead are reduced, and the original pixel information and Reconstructing pixel information reduces dependence on neighboring coded blocks.
例如,在包含35个预测模式的情况下,对每个编码块至少需进行35 次预测值计算下降至只需对每个编码块进行16次预测值计算,且通过在第一阶段使用相邻像素的原始像素值进行预测值计算,消除了依赖性。For example, in the case of 35 prediction modes, at least 35 prediction value calculations are required for each coding block, which is reduced to only 16 prediction value calculations for each coding block, and by using adjacent in the first stage The original pixel values of the pixels are calculated for prediction, eliminating dependencies.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图进行简单介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present invention more clearly, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present invention. Those skilled in the art can also obtain other drawings according to these drawings without paying creative labor.
图1表示目前流行的混合编码框架结构。Figure 1 shows the current popular hybrid coding framework structure.
图2表示帧内预测模式对应35个预测模式。Fig. 2 shows that the intra prediction mode corresponds to 35 prediction modes.
图3是表示64x64的编码块的划分的一例的示意图。FIG. 3 is a schematic diagram showing an example of division of a 64 × 64 encoding block.
图4是表示本发明的帧内预测模式搜索方法的实施方式的流程图。FIG. 4 is a flowchart showing an embodiment of an intra prediction mode search method according to the present invention.
图5是对本发明的帧内预测模式搜索方法的具体例进行说明的框架流程图。FIG. 5 is a frame flowchart illustrating a specific example of the intra prediction mode search method of the present invention.
图6是对本发明的帧内预测模式搜索方法的具体例进行详细说明的的流程图。FIG. 6 is a flowchart illustrating a specific example of the intra prediction mode search method according to the present invention.
图7是表示本发明的帧内预测模式搜索装置70的结构框图。FIG. 7 is a block diagram showing a configuration of an intra prediction mode search device 70 according to the present invention.
图8是用于说明由帧内预测模式搜索装置70进行的流水级处理的编码块示例的图FIG. 8 is a diagram for explaining an example of a coding block for pipeline processing performed by the intra prediction mode search device 70.
图9是用于基于图5所示的框架流程图说明由帧内预测模式搜索装置70进行的流水级处理的一例的时序图。FIG. 9 is a timing chart for explaining an example of pipeline processing performed by the intra prediction mode search device 70 based on the framework flowchart shown in FIG. 5.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
需要说明的是,当组件被称为“固定于”另一个组件,它可以直接在另一个组件上或者也可以存在居中的组件。当一个组件被认为是“连接”另一个组件,它可以是直接连接到另一个组件或者可能同时存在居中组件。It should be noted that when a component is called "fixed to" another component, it may be directly on another component or a centered component may exist. When a component is considered to be "connected" to another component, it can be directly connected to another component or a centered component may exist at the same time.
除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。本文中在本发明的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本发明。本文所使用的术语“及/或”包括一个或多个相关的所列项目的任意的和所有的组合。Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
以下,对视频编码进行简要说明。一般来说,视频编码过程包括预测、变换、量化和熵编码等步骤,图1表示目前流行的混合编码框架结构。其中预测包括帧内预测和帧间预测两种类型,其目的在于利用预测块信息去除当前待编码图像块的冗余信息。The video encoding is briefly described below. Generally, the video encoding process includes the steps of prediction, transform, quantization, and entropy encoding. Figure 1 shows the current popular hybrid encoding framework structure. The prediction includes two types of intra prediction and inter prediction, and the purpose is to remove redundant information of the current image block to be encoded by using prediction block information.
帧内预测利用本帧图像的信息获得预测块数据,其过程包括将待编码图像块划分成若干个子图像块;然后,针对每个子图像块,利用图像块周边的邻近像素生成当前图像块的预测像素块。Intra prediction uses the information of the frame image to obtain prediction block data, and the process includes dividing the image block to be encoded into several sub-image blocks; then, for each sub-image block, using neighboring pixels around the image block to generate a prediction of the current image block Pixel blocks.
帧间预测利用参考帧的信息获得预测块数据,其过程包括将待编码图像块划分成若干个子图像块;然后,针对每个子图像块,在参考图像中搜索与当前子图像块最匹配的图像块作为预测块。Inter prediction uses the information of the reference frame to obtain prediction block data, and the process includes dividing the image block to be encoded into several sub-image blocks; then, for each sub-image block, searching in the reference image for an image that best matches the current sub-image block The block is used as a prediction block.
在编码中仅使用帧内预测模式的图像帧被称为I帧,同时使用帧内预测及帧间预测的图像帧被称为P或B帧。使用帧内预测或帧间预测获得预测像素块后,将该子图像块与预测块的相应像素值相减得到残差。An image frame that uses only the intra prediction mode in encoding is called an I frame, and an image frame that uses both intra prediction and inter prediction is called a P or B frame. After obtaining a predicted pixel block by using intra prediction or inter prediction, the corresponding pixel values of the sub-image block and the predicted block are subtracted to obtain a residual.
残差可以使用变换矩阵去除图像块的残差的相关性,即去除图像块的冗余信息,以便提高编码效率,图像块中的数据块的变换通常采用二维变换,即在编码端将数据块的残差信息分别与一个NxN的变换矩阵及其转置矩阵相乘,相乘之后得到的是变换系数。变换系数经量化参数量化后可得到量化系数,最后将量化后的系数进行熵编码,最后将熵编码得到的比特流及进行编码后的编码模式信息,如帧内预测模式、运动矢量信息等,进行存储或发送到解码端。The residual can use the transformation matrix to remove the correlation of the residual of the image block, that is, remove the redundant information of the image block in order to improve the coding efficiency. The transformation of the data block in the image block usually uses two-dimensional transformation, that is, the data is encoded at the encoding end. The block residual information is multiplied with an NxN transform matrix and its transpose matrix, and the transform coefficients are obtained after multiplication. Transform coefficients can be quantized by quantizing the quantization parameters. Finally, the quantized coefficients are entropy coded. Finally, the bit stream obtained by entropy coding and the coding mode information after coding, such as intra prediction mode, motion vector information, etc. Store or send to the decoder.
在图像的解码端,首先获得熵编码比特流后进行熵解码,得到相应的残差,根据解码得到的运动矢量或帧内预测等信息图像块对应的预测图像块,根据预测图像块与图像块的残差得到当前子图像块中各像素点的重建值。At the decoding side of the image, the entropy-coded bitstream is first obtained and then the entropy decoding is performed to obtain the corresponding residuals. According to the predicted image block corresponding to the information image block such as the motion vector or intra prediction obtained by the decoding, according to the predicted image block and the image block Residual to get the reconstructed value of each pixel in the current sub-image block.
图2表示帧内预测模式对应的35个预测模式:包括33个方向模式及 DC和Planar模式。在每个图像块进行帧内预测时,分别利用块周围的相邻像素信息按照35个预测模式对应的计算公式算出35个候选的预测像素块,之后再根据最优化原则从35个预测模式中选出最优的预测模式。Figure 2 shows the 35 prediction modes corresponding to the intra prediction mode: including 33 directional modes and DC and Planar modes. When intra prediction is performed for each image block, the neighboring pixel information around the block is used to calculate 35 candidate prediction pixel blocks according to the calculation formula corresponding to the 35 prediction modes, and then from the 35 prediction modes according to the optimization principle Choose the best prediction mode.
作为视频编码的一例,基本编码单位是尺寸为64x64的编码块,帧内预测编码模式下进一步可能划分为1个64x64的编码块或4个32x32的编码块,或者16个16x16的编码块,或者64个8x8的编码块,或者256个4x4的编码块或者若干不同尺寸的块相结合。As an example of video encoding, the basic encoding unit is a 64x64 encoding block. In the intra prediction encoding mode, it may be further divided into one 64x64 encoding block or four 32x32 encoding blocks, or 16 16x16 encoding blocks, or 64 8x8 coded blocks, or 256 4x4 coded blocks or several blocks of different sizes are combined.
图3是表示64x64的编码块的划分的一例的示意图。左侧尺寸为64x64的编码单元在编码后最终划分为1个32x32的编码块、10个16x16的编码块、7个8x8的编码块及4个4x4的编码块。为了得到最优的划分结构,在实际编码时需要首先对所有1+4+16+64+256=341个可能的预测块生成预测像素块的结果,再依次决定最优的结构。由于每个可能的预测块都对应有35种可能的预测模式,因此在编码一个64x64的编码块时需要计算35x341=11935次预测,该种方式对硬件资源及时间的消耗非常巨大。FIG. 3 is a schematic diagram showing an example of division of a 64 × 64 encoding block. The encoding unit with a size of 64x64 on the left is finally divided into one 32x32 encoding block, ten 16x16 encoding blocks, seven 8x8 encoding blocks, and four 4x4 encoding blocks after encoding. In order to obtain the optimal partition structure, it is necessary to first generate the result of predicting pixel blocks for all 1 + 4 + 16 + 64 + 256 = 341 possible prediction blocks in actual coding, and then determine the optimal structure in order. Since each possible prediction block corresponds to 35 possible prediction modes, 35x341 = 11935 predictions need to be calculated when encoding a 64x64 encoded block, which consumes a huge amount of hardware resources and time.
作为本发明的一个实施方式,提出了一种帧内预测模式搜索方法,特别适于由芯片进行编码压缩处理。其中,包括:As an embodiment of the present invention, a method for searching an intra prediction mode is proposed, which is particularly suitable for encoding and compression processing by a chip. These include:
流水级N-2:Pipeline N-2:
基于X个对象预测模式,利用当前编码块周边的相邻块的原始像素生成所述当前编码块在所述X个对象预测模式下的X个第1预测信号,并求出所述X个第1预测信号与所述编码块的原始像值的残差作为X个对象预测模式第1残差;Based on X object prediction modes, using the original pixels of neighboring blocks around the current encoding block to generate X first prediction signals of the current encoding block in the X object prediction modes, and obtaining the X number 1 the residual of the prediction signal and the original image value of the coding block is taken as the first residual of the X object prediction modes;
根据所述第1残差通过第1代价计算方法计算出所述X个对象预测模式的第1代价,将所述对象预测模式中所述第1代价最小一例的Y个作为中间预测模式;Calculate the first costs of the X object prediction modes through the first cost calculation method according to the first residual, and use the Y with the least one example of the first cost in the object prediction mode as the intermediate prediction mode;
流水级N-1:Pipeline N-1:
进一步对所述Y个中间预测模式与所述当前编码块的至少一个相邻块的最终预测模式进行综合处理来将所述中间预测模式调整为Z个,Further performing comprehensive processing on the Y intermediate prediction modes and a final prediction mode of at least one neighboring block of the current coding block to adjust the intermediate prediction modes to Z,
基于所述中间预测模式,利用所述相邻块的重建像素生成所述当前编码块在所述中间预测模式下的第2预测信号,并求出所述第2预测信号与所述当前编码块的原始像值的残差作为第2残差;Based on the intermediate prediction mode, using the reconstructed pixels of the neighboring block to generate a second prediction signal of the current encoding block in the intermediate prediction mode, and obtain the second prediction signal and the current encoding block The residual of the original image value is taken as the second residual;
流水级N:根据所述第2残差通过第2代价计算方法计算出所述中间预测模式的第2代价,将所述中间预测模式中所述第2代价最小的预测模式作为搜索出的最终预测模式。Pipeline stage N: Calculate a second cost of the intermediate prediction mode by a second cost calculation method according to the second residual, and use the prediction mode with the smallest second cost in the intermediate prediction mode as the searched final Forecasting mode.
其中,X,Y,Z是自然数,满足X>Y且X>Z。另外,优选Y≥Z,但并不限定于此。Among them, X, Y, and Z are natural numbers that satisfy X> Y and X> Z. In addition, it is preferable that Y ≧ Z, but it is not limited to this.
下面结合附图,对本发明的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Hereinafter, some embodiments of the present invention will be described in detail with reference to the drawings. In the case of no conflict, the following embodiments and features in the embodiments can be combined with each other.
图4是表示本发明的帧内预测模式搜索方法的实施方式的流程图。FIG. 4 is a flowchart showing an embodiment of an intra prediction mode search method according to the present invention.
【步骤S401】[Step S401]
基于X个对象预测模式,利用当前编码块周边的相邻块的原始像素生成所述当前编码块在所述X个对象预测模式下的X个第1预测信号,并求出所述X个第1预测信号与所述编码块的原始像值的残差作为X个第1残差。Based on X object prediction modes, using the original pixels of neighboring blocks around the current encoding block to generate X first prediction signals of the current encoding block in the X object prediction modes, and obtaining the X number The residuals of the 1 prediction signal and the original image values of the coding block are taken as X first residuals.
对象预测模式,是指作为本发明的帧内预测模式搜索方法的搜索对象的预测模式。例如,如图2所示,X为35个预测模式,其中包括33个方向模式及DC和Planar模式。但并不限定于此,可以根据所应用的编码标准等适宜决定。The object prediction mode refers to a prediction mode that is a search target of the intra prediction mode search method of the present invention. For example, as shown in Figure 2, X is 35 prediction modes, including 33 directional modes and DC and Planar modes. However, it is not limited to this, and may be appropriately determined in accordance with the coding standard and the like to be applied.
可选的,也可以不将编码标准中的全部预测模式作为对象预测模式,例如可以将帧内预测的全部预测模式(例如35个预测模式)分为至少2组,选择其中1组作为所述对象预测模式。Optionally, all prediction modes in the coding standard may not be used as target prediction modes. For example, all prediction modes (for example, 35 prediction modes) in intra prediction may be divided into at least two groups, and one group is selected as the prediction mode. Object prediction mode.
作为分组的依据,可以根据所述对象预测模式的对象预测模式的属性、例如方向或种类等的至少一个进行所述分组。每个所述分组中的预测模式的数量可以相同,也可以不同。各个分组中的预测模式可以包含其他分组中的预测模式,也可以不包含。以图2所示的35个预测模式为例,可以将全部的33个方向模式按照序号相邻的方式分成2、3、4、5、6、7等多个组。以分为3个组为例,具体如下:As a basis for grouping, the grouping may be performed according to at least one of an attribute of an object prediction mode, such as a direction or a category, of the object prediction mode. The number of prediction modes in each of the groups may be the same or different. The prediction modes in each group may or may not include the prediction modes in other groups. Taking the 35 prediction modes shown in FIG. 2 as an example, all the 33 direction modes can be divided into a plurality of groups such as 2, 3, 4, 5, 6, 7, and the like in a manner of adjacent numbers. Take three groups as an example, as follows:
第1组:2、3、4、5、6、7、8、9、10、11、12Group 1: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
第2组:13、14、15、16、17、18、19、20、21、22、23Group 2: 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23
第3组:24、25、26、27、28、29、30、31、32、33、34Group 3: 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34
另外,也可以按照各个组中的方向模式序号不连续的方式进行分组。 以分为3个组为例,具体如下:In addition, the groups may be grouped in such a manner that the direction pattern numbers in the groups are not continuous. Take three groups as an example, as follows:
第1组:2、5、8、11、14、17、20、23、26、29、32Group 1: 2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32
第2组:3、6、9、12、15、18、21、24、27、30、33Group 2: 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33
第3组:4、7、10、13、16、19、22、25、28、31、34Group 3: 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34
在所述预测模式包括方向模式、DC模式(模式1)和Planar模式(模式0)的情况下,可以进一步让每个分组都包括所述DC模式和/或Planar模式。In a case where the prediction mode includes a directional mode, a DC mode (Mode 1), and a Planar mode (Mode 0), each packet may be further included in the DC mode and / or the Planar mode.
可选的,作为选择分组的依据,可以随机进行选择、或者根据当前编码块的各种特征指标来进行选择。例如,根据所述当前编码块在各个预测方向上的方向性指标来选择其中1组作为所述对象预测模式。Optionally, as a basis for selecting a group, the selection may be performed randomly, or according to various characteristic indexes of the current coding block. For example, one group is selected as the target prediction mode according to the directivity index of the current coding block in each prediction direction.
可选的,方向性指标是所述当前编码块在各个预测方向上的梯度信息(Gradient Information)。Optionally, the directionality index is gradient information (Gradient Information) of the current coding block in each prediction direction.
可选的,将所述当前编码块分成多个区域,根据分组中的预测方向确定所述多个区域在所述预测方向上的梯度信息,选择梯度信息为最小值的1组预测模式作为所述对象预测模式。作为划分编码块的具体方式,例如可以将编码块以四宫格、九宫格等的方式从左至右、从右至左或从上至下、从下至上依次进行划分,也可以按照尽可能填满整个区域的方式随机划分区域。划分的各个区域可以彼此相邻、彼此相隔或者彼此重叠。Optionally, the current coding block is divided into a plurality of regions, and gradient information of the plurality of regions in the prediction direction is determined according to a prediction direction in a group, and a set of prediction modes with a minimum gradient information is selected as all The object prediction mode is described. As a specific method of dividing the coding block, for example, the coding block can be divided from left to right, right to left, or from top to bottom, and from bottom to top in four-grid, nine-grid, or the like. Randomly divide the area in such a way that it fills the entire area. The divided areas may be adjacent to each other, separated from each other, or overlapped with each other.
可选的,生成预测模式下的预测信号(第1预测信号)以及求出预测信号与原始像素的残差等,可以通过现有的或者各种视频编码标准中规定的算法进行。Optionally, generating a prediction signal (a first prediction signal) in a prediction mode and obtaining a residual between the prediction signal and the original pixel, etc., may be performed by an existing algorithm or algorithms specified in various video coding standards.
可选的,所述编码块包含NxN个像素块,N是自然数,所述利用当前编码块周边的相邻块的原始像素生成所述当前编码块在所述X个对象预测模式下的第1预测信号,包括:由所述编码块的周围的像素块的参考像素生成当前编码块的预测信号。这里,所述编码块的周围的像素块,可以是与编码块中的各个像素块相邻的像素块,也可以是小于规定距离的像素块,可以根据需要进行设定。Optionally, the coding block includes NxN pixel blocks, N is a natural number, and the original pixels of neighboring blocks around the current coding block are used to generate a first number of the current coding block in the X object prediction mode. The prediction signal includes generating a prediction signal of a current coding block from reference pixels of a surrounding pixel block of the coding block. Here, the pixel blocks around the coding block may be pixel blocks adjacent to each pixel block in the coding block, or pixel blocks smaller than a predetermined distance, and may be set as required.
【步骤S402】[Step S402]
根据所述第1残差通过第1代价计算方法计算出所述X个对象预测模 式的第1代价,将所述对象预测模式中所述第1代价最小一例的Y个对象预测模式作为中间预测模式。其中,X,Y是自然数,满足X>Y。The first cost of the X object prediction modes is calculated by the first cost calculation method according to the first residual, and the Y object prediction mode with the least one example of the first cost in the object prediction mode is used as the intermediate prediction. mode. Among them, X and Y are natural numbers and satisfy X> Y.
这里,作为第1代价计算方法,可以使用现有的任何能够计算预测模式的代价的方法,可以通过现有的或者各种视频编码标准中规定的算法进行。作为一例,可以将残差的平方和或绝对值和作为预测模式的代价。作为另外一例,根据对残差进行二维矩阵变换得到的变换系数和预测模式的比特数来计算预测模式的代价。作为二维矩阵变换的一例,可以是离散正弦/余弦变换,或者是哈达玛变换。Here, as the first cost calculation method, any existing method capable of calculating the cost of the prediction mode may be used, and may be performed by an existing algorithm or algorithms specified in various video coding standards. As an example, the sum of squared or absolute sum of residuals can be used as the cost of the prediction mode. As another example, the cost of the prediction mode is calculated based on the transform coefficients obtained by performing a two-dimensional matrix transformation on the residual and the number of bits of the prediction mode. As an example of a two-dimensional matrix transformation, a discrete sine / cosine transformation or a Hadamard transformation may be used.
可选的,根据上述第1代价计算方法计算出的第1代价,从X个对象预测模式中选择Y个作为中间预测模式,其中Y可以为任何小于X的自然数。例如在X为35的情况下,可取2、3、4、5、6、10、15、20、25、30等。这里Y的取值可以是预先设定的数值,也可以是根据精度和/或效率等因素得到的数值,还可以是根据硬件条件等得到的数值。Optionally, according to the first cost calculated by the first cost calculation method, Y are selected from the X object prediction modes as the intermediate prediction mode, where Y may be any natural number less than X. For example, when X is 35, 2, 3, 4, 5, 6, 10, 15, 20, 25, 30, etc. may be taken. Here, the value of Y can be a preset value, a value obtained according to factors such as accuracy and / or efficiency, or a value obtained according to hardware conditions and the like.
【步骤S403】[Step S403]
基于所述中间预测模式,利用所述相邻块的重建像素生成所述当前编码块在所述中间预测模式下的第2预测信号,并求出所述第2预测信号与所述当前编码块的原始像值的残差作为第2残差。Based on the intermediate prediction mode, using the reconstructed pixels of the neighboring block to generate a second prediction signal of the current encoding block in the intermediate prediction mode, and obtain the second prediction signal and the current encoding block The residual of the original image value is taken as the second residual.
这里,与第1预测信号的生成同样,对于生成某个预测模式下的预测信号(第2预测信号)以及求出预测信号与原始像素的残差等,可以通过现有的或者各种视频编码标准中规定的算法进行。Here, as with the generation of the first prediction signal, the existing or various video encodings can be used to generate the prediction signal (second prediction signal) in a certain prediction mode and to obtain the residuals between the prediction signal and the original pixel. The algorithm specified in the standard is performed.
另外,虽然在上述的说明中,描述的是在第1预测信号的生成时使用相邻块的原始像素,在第2预测信号的生成时使用相邻块的重建像素,但这里的原始像素和重建像素,也包括通过填充而得到的像素。例如在生成所述第1预测信号和/或所述第2预测信号时,可以对相邻块中的至少一部分像素块进行填充(Padding),将填充得到的像素作为所述原始像素和所述重建像素而用于生成所述第1预测信号和/或所述第2预测信号。作为填充的方式,可以使用复制相邻像素值、插值、插入0值等各种方法。In addition, in the above description, it is described that the original pixels of adjacent blocks are used in the generation of the first prediction signal, and the reconstructed pixels of adjacent blocks are used in the generation of the second prediction signal. However, the original pixels and Reconstructed pixels also include pixels obtained by padding. For example, when generating the first prediction signal and / or the second prediction signal, at least a part of pixel blocks in adjacent blocks may be filled (Padding), and the filled pixels are used as the original pixels and the The pixels are reconstructed and used to generate the first prediction signal and / or the second prediction signal. As a method of filling, various methods such as copying adjacent pixel values, interpolation, and inserting 0 values can be used.
作为一个具体例,进行所述填充的像素块,是在生成所述第2预测信号时无法获得重建像素的位置上的像素块。例如,对靠近视频图像边角位 置而不实际并不存在的相邻块、或者因编码块的编码顺序等的原因在生成所述第2预测信号时尚未进行过编码而不存在重建像素的相邻块等。As a specific example, the pixel block to be filled is a pixel block at a position where a reconstructed pixel cannot be obtained when the second prediction signal is generated. For example, the neighboring blocks that are close to the corners of the video image and do not actually exist, or because of the coding order of the coded blocks, etc., have not been encoded when the second prediction signal is generated without the phase of reconstructed pixels Adjacent blocks, etc.
【步骤S404】[Step S404]
根据所述第2残差通过第2代价计算方法计算出所述中间预测模式的第2代价,将所述中间预测模式中所述第2代价最小的预测模式作为搜索出的最终预测模式。A second cost of the intermediate prediction mode is calculated according to a second cost calculation method according to the second residual, and a prediction mode with the smallest second cost in the intermediate prediction mode is used as a searched final prediction mode.
这里,作为第2代价计算方法,也可以使用现有的任何能够计算预测模式的代价的方法,可以通过现有的或者各种视频编码标准中规定的算法进行。作为一例,可以将残差的平方和或绝对值和作为预测模式的代价。作为另外一例,根据对残差进行二维矩阵变换得到的变换系数和预测模式的比特数来计算预测模式的代价。所述第2代价计算方法可以与所述第1代价计算方法相同或者不同。Here, as the second cost calculation method, any existing method capable of calculating the cost of the prediction mode may also be used, and may be performed by an existing algorithm or algorithms specified in various video coding standards. As an example, the sum of squared or absolute sum of residuals can be used as the cost of the prediction mode. As another example, the cost of the prediction mode is calculated based on the transform coefficients obtained by performing a two-dimensional matrix transformation on the residual and the number of bits of the prediction mode. The second cost calculation method may be the same as or different from the first cost calculation method.
再有,在上述的步骤S403中,可以进一步对中间预测模式进行调整。具体来说,可以对在将所述对象预测模式中所述第1代价最小一侧的Y个作为中间预测模式后,进一步对所述Y个中间预测模式与所述当前编码块的至少一个相邻块的最终预测模式进行综合处理来将所述中间预测模式调整为Z个,其中Z为自然数,满足X大于Z。优选所述Z个中间预测模式为5个中间预测模式。In step S403 described above, the intermediate prediction mode may be further adjusted. Specifically, after using the Y on the least cost side of the target prediction mode as the intermediate prediction mode, the Y intermediate prediction modes may be further compared with at least one of the current coding block. The final prediction modes of neighboring blocks are comprehensively processed to adjust the intermediate prediction modes to Z, where Z is a natural number and satisfies that X is greater than Z. Preferably, the Z intermediate prediction modes are 5 intermediate prediction modes.
这里的最终预测模式,可以是至少一个相邻块在帧间编码时使用的预测模式,具体可以是:通过本发明的帧内预测模式搜索方法搜索出的最终预测模式,也可以是例如通过各种视频编码标准中规定的标准算法得到的最终预测模式。The final prediction mode here may be a prediction mode used by at least one neighboring block during inter-coding, and may specifically be the final prediction mode searched by the intra prediction mode search method of the present invention, or may be The final prediction mode obtained by a standard algorithm specified in the video coding standard.
可选的,所述相邻块是临近所述当前编码块的编码块中的像素块,可以是与所述当前编码块相接的编码块中的像素块,也可以是不与所述当前编码块相接而位于其附近的编码块中的像素块。Optionally, the adjacent block is a pixel block in a coding block adjacent to the current coding block, may be a pixel block in a coding block connected to the current coding block, or may be a block that is not related to the current coding block. A block of pixels in which the coded blocks are located next to each other.
可选的,所述综合处理中,可以将所述Y个中间预测模式中的至少一个预测模式与至少一个所述相邻块的最终预测模式一起作为所述中间预测模式。Optionally, in the comprehensive processing, at least one prediction mode among the Y intermediate prediction modes and at least one final prediction mode of the neighboring block may be used as the intermediate prediction mode.
可选的,优选舍弃所述Y个中间预测模式中、与所述相邻块的最终预 测模式不同的至少一部分,而保留全部的所述相邻块的最终预测模式。作为一个方式,舍弃的所述Y个中间预测模式,是第1代价大的那些。换言之,保留的中间预测模式,是与所述相邻块的预测模式不同且所述第1代价最小的一个或多个预测模式。Optionally, it is preferable to discard at least a part of the Y intermediate prediction modes that is different from the final prediction mode of the neighboring block, and retain all the final prediction modes of the neighboring block. As one way, the Y intermediate prediction modes that are discarded are those with the first cost. In other words, the reserved intermediate prediction mode is one or more prediction modes that are different from the prediction mode of the neighboring block and that the first cost is the smallest.
所述综合处理中使用所述当前编码块的左侧、上侧以及左上侧这3个方向的所述相邻块中的至少一个的最终预测模式。In the comprehensive processing, a final prediction mode of at least one of the neighboring blocks in three directions of a left side, an upper side, and an upper left side of the current coding block is used.
为了使得本发明的帧内预测模式搜索方法能够更好理解,以下使用图5,以使用本发明的具体例为例进行详细说明。In order to make the intra prediction mode search method of the present invention better understandable, the following uses FIG. 5 to describe in detail a specific example using the present invention as an example.
图5是对本发明的帧内预测模式搜索方法的具体例进行说明的框架流程图。FIG. 5 is a frame flowchart illustrating a specific example of the intra prediction mode search method of the present invention.
本具体例的整体技术框架如图5所示,分为大的3个阶段:The overall technical framework of this specific example is shown in Figure 5, and is divided into three major phases:
【S501】帧内模式预估(Intra mode estimate)[S501] Intra mode estimation
在该阶段,使用当前编码块的原始像素值从总共35个预测模式中筛选出11个预测模式,再通过当前编码块周围的相邻块的原始像素值产生预测值,并进一步通过对11个预测模式对应的预测残差分别进行哈达玛变换来筛选出代价最小的5个预测模式。At this stage, the original pixel values of the current coded block are used to filter out 11 prediction modes from a total of 35 prediction modes, and then the predicted values are generated from the original pixel values of neighboring blocks around the current coded block, and further to the 11 The prediction residuals corresponding to the prediction mode are respectively subjected to a Hadamard transformation to screen out the five prediction modes with the least cost.
【S502】预测改进(Prediction refine)[S502] Prediction refinement
在该阶段,将由邻近信息推导出的3个预测模式(Most Probable Modes)与S501中筛选得到的5个预测模式结合选出5个预测模式,并用周围的相邻块的重建像素值重新生成预测像素值。At this stage, the three prediction modes (Most Probable Modes) derived from the neighboring information are combined with the five prediction modes obtained in S501 to select five prediction modes, and the reconstructed pixel values of surrounding neighboring blocks are used to regenerate prediction Pixel values.
【S503】最终模式选出(Final mode selection)[S503] Final mode selection
在该阶段,对在S502重新选出的5个预测模式对应的预测残差分别进行哈达玛变换进行筛选,得到代价最小的最终的预测模式。At this stage, the prediction residuals corresponding to the five prediction modes reselected in S502 are respectively subjected to a Hadamard transformation to select the final prediction mode with the least cost.
图6是对本发明的帧内预测模式搜索方法的具体例进行详细说明的的流程图。FIG. 6 is a flowchart illustrating a specific example of the intra prediction mode search method according to the present invention.
S501帧内模式预估(Intra mode estimate)S501 Intra mode estimation
本具体例的帧内模式预估阶段中,包括初步模式确定(Rough Mode Decision)S5011、第1预测(Predict1)S5012、第1哈达玛模式确定(Had  Mode Decision1)S5013的阶段,以下对各个阶段进行具体说明。The intra mode estimation phase of this specific example includes the stages of preliminary mode determination (Rough mode Decision) S5011, first prediction (Predict1) S5012, and first Hadama mode determination (Had mode Decision1) S5013. Be specific.
S5011:初步模式确定S5011: Preliminary mode determination
该阶段通过提取当前编码块原始像素值的梯度信息,从35个帧内预测模式(包括33个方向模式及DC和Planar模式)中筛选出11个预测模式。由于该阶段内不进行真正的预测值生成,故不会增加计算资源消耗。At this stage, by extracting the gradient information of the original pixel value of the current coding block, 11 prediction modes are selected from 35 intra prediction modes (including 33 directional modes and DC and Planar modes). Since no real predicted value is generated in this stage, it will not increase the consumption of computing resources.
首先将图2所示的35个帧内预测模式,针对预测方向中的0°、45°、90°及135°,将所述全部预测模式分为0°、45°、90°及135°所对应的4组,根据所述当前编码块在各个预测方向上的方向性指标来选择其中1组作为所述对象预测模式。First, the 35 intra prediction modes shown in FIG. 2 are divided into 0 °, 45 °, 90 °, and 135 ° for 0 °, 45 °, 90 °, and 135 ° in the prediction direction. The corresponding 4 groups are selected as the target prediction mode according to the directivity index of the current coding block in each prediction direction.
具体来说,按照预测方向分为0°、45°、90°及135°共4组,每组各11个模式,每组都包含模式0(DC模式)和模式1(Planar模式),如式(3-1)~(3-4)所示。Specifically, according to the prediction direction, it is divided into 4 groups of 0 °, 45 °, 90 °, and 135 °, each group has 11 modes, and each group contains mode 0 (DC mode) and mode 1 (Planar mode), such as Formulas (3-1) to (3-4) are shown.
0°={0,1,6,7,8,9,10,11,12,13,14}    (3-1)0 ° = {0,1,6,7,8,9,10,11,12,13,14} (3-1)
45°={0,1,2,3,4,5,30,31,32,33,34}    (3-2)45 ° = {0,1,2,3,4,5,30,31,32,33,34} (3-2)
90°={0,1,22,23,24,25,26,27,28,29,30}    (3-3)90 ° = {0, 1, 22, 23, 24, 25, 26, 27, 28, 29, 30} (3-3)
135°={0,1,14,15,16,17,18,19,20,21,22}    (3-4)135 ° = {0,1,14,15,16,17,18,19,20,21,22} (3-4)
上述的方向性指标,例如是所述当前编码块在各个预测方向上的梯度信息(Gradient Information)。作为一例,可以将所述当前编码块分成多个区域,根据分组中的预测方向确定所述多个区域在所述预测方向上的梯度信息,选择梯度信息为最小值的1组预测模式作为所述对象预测模式。The above-mentioned directionality index is, for example, gradient information (Gradient Information) of the current coding block in each prediction direction. As an example, the current encoding block may be divided into multiple regions, and gradient information of the multiple regions in the prediction direction is determined according to a prediction direction in a group, and a set of prediction modes with a minimum gradient information is selected as all The object prediction mode is described.
例如,首先对当前编码块划分子块。图6是表示本具体例中的子块的划分方式的一例的示意图。如图6所示,按照左上、右上、左下、右下、中心的顺序,将所述当前编码块分成5个大小相等的子块a、b、c、d、e。从当前编码块取出5个子块。接着,分别计算出子块a、b、c、d、e的均值。再用均值按式(3-5)~(3-8)求出对应方向组的梯度信息,选择对应GI1~GI4中值最小的一个模式集合中的11个预测模式(Index值)作为输出。For example, first divide the current coding block into sub-blocks. FIG. 6 is a schematic diagram showing an example of a sub-block division method in this specific example. As shown in FIG. 6, the current coding block is divided into five equally-sized sub-blocks a, b, c, d, and e in the order of upper left, upper right, lower left, lower right, and center. Take 5 sub-blocks from the current coding block. Next, the mean values of the sub-blocks a, b, c, d, and e are calculated, respectively. Then use the mean value to obtain the gradient information of the corresponding direction group according to the equations (3-5) to (3-8), and select 11 prediction modes (Index values) in the mode set corresponding to the smallest median value of GI1 to GI4 as the output.
GI1=|b-a|+|d-c|----0°   (3-5)GI1 = | b-a | + | d-c | ---- 0 ° (3-5)
GI2=|c-e|+|e-b|----45°   (3-6)GI2 = | c-e | + | e-b | ---- 45 ° (3-6)
GI3=|c-a|+|d-b|----90°   (3-7)GI3 = | c-a | + | d-b | ---- 90 ° (3-7)
GI4=|d-e|+|e-a|----135°   (3-8)GI4 = | d-e | + | e-a | ---- 135 ° (3-8)
另外,虽然在本具体例中包含了初步模式确定阶段S5011,但并不限定于此,也可将其省略,直接将35个预测模式作为输入进入后述的第1预测S5012阶段。In addition, although the preliminary mode determination stage S5011 is included in this specific example, it is not limited to this, and it may be omitted, and 35 prediction modes may be directly used as input to the first prediction S5012 stage described later.
S5012:第1预测(Predict1)S5012: Predict1
该阶段的作用是利用周边相邻块的原始像素生成11组(对应初步模式确定阶段输出的11个预测模式)当前编码块的预测信号。按照现有的视频编码标准,该环节的做法应当是用周边相邻块的重建像素生成35组预测信号,这将导致该环节需要等待重建像素的生成从而造成延迟。根据本发明的方案,可大大提高计算并行度及降低计算复杂度。The role of this stage is to use the original pixels of neighboring blocks to generate 11 sets (corresponding to the 11 prediction modes output in the preliminary mode determination stage) of the prediction signals of the current encoding block. According to the existing video coding standards, the practice of this link should be to use the reconstructed pixels of neighboring blocks to generate 35 sets of prediction signals, which will cause the link to wait for the generation of reconstructed pixels and cause delay. According to the scheme of the present invention, the parallelism of calculation can be greatly improved and the calculation complexity can be reduced.
以包含NxN个像素块的编码块为例,在预测时由周围4*N+1个相邻块的参考像素生成当前编码块的预测信号,这里,N是自然数。图7是表示在将编码块设为4x4即N为4的情况下,第1预测中使用的相邻块的分布位置的一例的示意图。在该例中,由所述编码块的左侧、左上侧和上侧的4*N+1即17个像素块的参考像素生成当前编码块的预测信号。Taking a coding block containing NxN pixel blocks as an example, a prediction signal of a current coding block is generated from reference pixels of surrounding 4 * N + 1 neighboring blocks during prediction, where N is a natural number. FIG. 7 is a schematic diagram showing an example of the distribution positions of adjacent blocks used in the first prediction when the coding block is 4 × 4, that is, N is 4. In this example, the prediction signal of the current coding block is generated from 4 * N + 1, that is, reference pixels of 17 pixel blocks, on the left, upper left, and upper sides of the coding block.
第1预测的阶段中,由周围17个相邻块的参考像素生成当前编码块的预测信号。In the first prediction stage, a prediction signal of a current coding block is generated from reference pixels of 17 neighboring blocks.
Prediction i,j=f m(NeighbourPixels)i,j=0...N-1,m=0...34(3-9) Prediction i, j = f m (NeighbourPixels) i, j = 0 ... N-1, m = 0 ... 34 (3-9)
式(3-9)描述了一个由相邻块参考像素生成预测像素的过程,式中f m,m=0...34表示可选的35种预测模式对应的35个不同预测算法,由周边相邻块的参考像素生成当前编码块预测信号的算法为现有的视频编码标准中规定算法,在此不展开叙述。 Equation (3-9) describes a process of generating predicted pixels from reference pixels of neighboring blocks, where f m , m = 0 ... 34 represents 35 different prediction algorithms corresponding to the optional 35 prediction modes. An algorithm for generating a prediction signal of a current coding block by reference pixels of neighboring neighboring blocks is an algorithm specified in an existing video coding standard, and is not described here.
在得到11个预测模式对应的预测像素值后将其分别与当前编码块的原始像素值作差从而得到残差,求得11个预测模式对应的预测残差作为后续的第1哈达玛模式确定阶段的输入。After obtaining the predicted pixel values corresponding to the 11 prediction modes, they are respectively different from the original pixel values of the current coding block to obtain the residuals. The prediction residuals corresponding to the 11 prediction modes are determined as the subsequent first Hadamard mode determination. Phase input.
S5013:第1哈达玛模式确定(Had Mode Decision1)S5013: The first Hadama Mode determination (Had ModeDecision1)
该阶段以第1预测阶段S5012输出的11组残差为输入,对11组残差 分别进行哈达玛变换,将变换系数的绝对值和与表示11个预测模式的比特数结合计算出对应预测模式的代价。表1表示35个模式对应的比特数的一例。In this stage, the 11 sets of residuals output from the first prediction stage S5012 are used as input, and the 11 sets of residuals are respectively subjected to a Hadamard transform. The corresponding prediction mode is calculated by combining the absolute value of the transformation coefficients and the number of bits representing the 11 prediction modes. The price. Table 1 shows an example of the number of bits corresponding to the 35 patterns.
【表1】【Table 1】
Index Index RateRate
模式0Mode 0 1bit 1bit
模式1Mode 1 2bit 2bit
模式26Pattern 26 3bit3bit
其他模式Other modes 5bit5bit
如式(3-10)所示,式中λ为加权系数为按照现有的视频编码方法中的指定算法计算。As shown in equation (3-10), λ is a weighting coefficient calculated according to a specified algorithm in the existing video encoding method.
cost i=Sum(|Hadamard(Resi i)|)+λ*Rate   (3-10) cost i = Sum (| Hadamard (Resi i ) |) + λ * Rate (3-10)
在计算得到11个代价后,从11个代价中选择最小的5个对应的预测模式作为输出。After the 11 costs are calculated, the smallest 5 corresponding prediction modes are selected as the output from the 11 costs.
另外,本具体例中虽然以哈达玛变换为例进行了说明,但并不限定于此,也可以是其他二维矩阵变换。In addition, although the Hadamard transform has been described as an example in this specific example, the present invention is not limited to this, and may be another two-dimensional matrix transform.
S502预测改进(Prediction refine)S502 Prediction refinement
本具体例的预测改进阶段中,包括综合处理(Combine)S5021、第2预测(Predict2)S5022的阶段,以下对各个阶段进行具体说明。The prediction improvement phase of this specific example includes a comprehensive processing (Combine) S5021 and a second prediction (Predict2) S5022. Each phase will be described in detail below.
S5021:综合处理S5021: Comprehensive processing
该阶段对从相邻编码块获得的预测模式和帧内模式预估阶段得到的5个预测模式进行综合处理,将从相邻编码块获得的预测模式与帧内模式预估阶段选出的5个模式比较与结合,进一步得出5个预测模式。In this stage, the prediction modes obtained from the neighboring encoding blocks and the five prediction modes obtained during the intra mode estimation stage are comprehensively processed. The prediction modes obtained from the adjacent encoding blocks and the 5 This model is compared and combined, and 5 prediction modes are obtained.
这里,从相邻编码块获得的预测模式,可以是通过本发明的方法选出的预测模式,或者是按照现有的视频编码方法中的标准算法从相邻编码块推导出的3个预测模式(Most Probable Mode(MPM))。Here, the prediction mode obtained from neighboring coding blocks may be a prediction mode selected by the method of the present invention, or three prediction modes derived from neighboring coding blocks according to a standard algorithm in an existing video coding method. (Most Probable Mode (MPM)).
作为综合处理的一个可选例,可以从帧内模式预估阶段选出的5个模式和从相邻编码块获得的3个预测模式共计8个模式中再选出5个模式:首先保留3个从相邻编码块获得的预测模式,再从5个帧内模式预估阶段 选出的预测模式中选择与3个从相邻编码块获得的预测模式不相同、且代价最小的2个模式,将共计5个预测模式作为综合处理阶段的输出。As an optional example of comprehensive processing, 5 modes can be selected from a total of 8 modes selected from the intra mode estimation stage and 3 prediction modes obtained from adjacent coding blocks: first retain 3 Prediction modes obtained from neighboring coding blocks, and then from the prediction modes selected in the 5 intra-mode estimation stages, 2 prediction modes obtained from neighboring coding blocks that are different from the prediction modes obtained at the least cost are selected , Take a total of 5 prediction modes as the output of the comprehensive processing stage.
另外,虽然在本具体例中包含了综合处理阶段S5021,但并不限定于此,也可将其省略,直接将S5013阶段输出的5个预测模式作为输入进入后述的第2预测S5022阶段。In addition, although the comprehensive processing stage S5021 is included in this specific example, it is not limited to this, and it may be omitted, and the five prediction modes output from the S5013 stage may be directly used as input to the second prediction S5022 stage described later.
S5022:第2预测S5022: Second prediction
该阶段的输入为综合处理S5021输出的5个预测模式,利用周边相邻块的重建像素生成5组当前编码块的预测信号。由周边相邻块的重建像素(参考像素)生成当前编码块预测信号的算法为现有的视频编码方法中的规定算法,在此不展开叙述。The inputs at this stage are the five prediction modes output by S5021, and the reconstructed pixels of neighboring blocks are used to generate the prediction signals of the five groups of currently coded blocks. An algorithm for generating a prediction signal of a current coding block from reconstructed pixels (reference pixels) of neighboring neighboring blocks is a prescribed algorithm in an existing video coding method, and will not be described here.
在得到5个预测模式对应的预测像素值后将其分别与当前编码块的原始像素值作差,求得5个预测模式对应的预测残差作为后续最终模式选出阶段的输入。After obtaining the predicted pixel values corresponding to the five prediction modes, the differences are respectively different from the original pixel values of the current coding block, and the prediction residuals corresponding to the five prediction modes are obtained as the input of the subsequent final mode selection stage.
S503最终模式选出(Final mode selection)S503 Final mode selection
本具体例的最终模式选出阶段中,包括第2哈达玛模式确定(Had Mode Decision2)S5031,以下对各该阶段进行具体说明。The final mode selection stage of this specific example includes the second Hadama Mode Decision 2 (S5031). Each of these stages will be specifically described below.
第2哈达玛模式确定2nd Hadamard Mode Confirmed
该阶段以第2预测阶段S5022输出的5组残差为输入,对5组残差分别进行哈达玛变换,将变换系数的绝对值和与表示5个预测模式的比特数结合计算出对应预测模式的代价。这里的代价计算,采用与第1哈达玛模式确定阶段S5013中的代价计算相同的方式。另外,也并不限定于此,也可采用不同于第1哈达玛模式确定阶段S5013的其他代价计算方式。In this stage, the five groups of residuals output from the second prediction stage S5022 are used as input. The five groups of residuals are respectively subjected to a Hadamard transform. The absolute value of the transform coefficients and the number of bits representing the five prediction modes are combined to calculate the corresponding prediction mode. The price. The cost calculation here adopts the same method as the cost calculation in the first Hadamard mode determination phase S5013. In addition, it is not limited to this, and other cost calculation methods different from the first Hadamard mode determination stage S5013 may also be adopted.
在计算得到5个代价后,从5个代价中选择代价最小的1个对应的预测模式作为最终选择的1个预测模式。在进行视频编码时,将该残差输出进入后续的变换量化及熵编码RDO等阶段。After the 5 costs are calculated, a corresponding prediction mode with the lowest cost is selected from the 5 costs as the finally selected 1 prediction mode. When video coding is performed, the residual output is entered into subsequent stages such as transform quantization and entropy coding RDO.
图7是表示本发明的帧内预测模式搜索装置70的结构框图。本发明的帧内预测模式搜索装置70,例如可以是芯片,包括:N-2流水级701、 N-1流水级702和N流水级703。在用这样的帧内预测模式搜索装置70实现例如图4所示的帧内预测模式搜索方法时,步骤401和步骤402由N-2流水级执行,步骤403由N-1流水级执行,步骤404由N流水级执行。FIG. 7 is a block diagram showing a configuration of an intra prediction mode search device 70 according to the present invention. The intra-prediction mode searching device 70 of the present invention may be, for example, a chip, including: an N-2 pipeline stage 701, an N-1 pipeline stage 702, and an N pipeline stage 703. When such an intra prediction mode search device 70 is used to implement the intra prediction mode search method shown in FIG. 4, for example, steps 401 and 402 are performed by an N-2 pipeline stage, and step 403 is performed by an N-1 pipeline stage. 404 is performed by the N pipeline stage.
在帧内预测模式搜索装置70中,N-2流水级701、N-1流水级702和N流水级703并行工作,使得N流水级703对由N-1流水级702处理过的编码块的处理、N-1流水级702对由N流水级701处理过的编码块的处理、和N-2流水级701对当前编码块的处理并行进行。以下进行具体说明。In the intra-prediction mode search device 70, the N-2 pipeline stage 701, the N-1 pipeline stage 702, and the N pipeline stage 703 work in parallel, so that the N pipeline stage 703 pairs the encoding blocks processed by the N-1 pipeline stage 702. The processing, the N-1 pipeline stage 702 processing of the coding block processed by the N pipeline stage 701, and the N-2 pipeline stage 701 processing of the current coding block are performed in parallel. This will be specifically described below.
图8是用于说明由帧内预测模式搜索装置70进行的流水级处理的编码块示例的图。为了便于说明,这里举例与图3的64x64的编码块同样的编码块。其中,对左上的4个编码块分别标注了0、1、2、3。FIG. 8 is a diagram for explaining an example of a coding block for pipeline processing performed by the intra prediction mode search device 70. For convenience of explanation, the same coding block as the 64 × 64 coding block in FIG. 3 is exemplified here. Among them, the upper left four coding blocks are respectively marked with 0, 1, 2, and 3.
图9是用于基于图5所示的框架流程图说明由帧内预测模式搜索装置70进行的流水级处理的一例的时序图。FIG. 9 is a timing chart for explaining an example of pipeline processing performed by the intra prediction mode search device 70 based on the framework flowchart shown in FIG. 5.
在N-2流水级701,进行与上述S501中的帧内模式预估(Intra mode estimate)同样的处理。In the N-2 pipeline stage 701, the same processing as the intra mode estimation in S501 described above is performed.
即在N-2流水级701中,使用当前编码块的原始像素值从总共35个预测模式中筛选出11个预测模式,再通过当前编码块周围的相邻块的原始像素值产生预测值,并进一步通过对11个预测模式对应的预测残差分别进行哈达玛变换来筛选出代价最小的5个预测模式。That is, in the N-2 pipeline stage 701, the original pixel values of the current encoding block are used to filter out 11 prediction modes from a total of 35 prediction modes, and then the prediction values are generated from the original pixel values of neighboring blocks around the current encoding block. Furthermore, the five prediction modes with the least cost are screened by performing Hadamard transform on the prediction residuals corresponding to the 11 prediction modes.
在N-1流水级702,进行与上述S502中的预测改进(Prediction refine)同样的处理。In the N-1 pipeline stage 702, the same processing as the prediction refinement in S502 described above is performed.
即在N-1流水级702中,将由邻近信息推导出的3个预测模式(Most Probable Modes)与N-2流水级701中筛选得到的5个预测模式结合选出5个预测模式,并用周围的相邻块的重建像素值重新生成预测像素值。That is, in the N-1 pipeline stage 702, the three prediction modes (Most, Probable Modes) derived from the neighboring information are combined with the 5 prediction modes selected in the N-2 pipeline stage 701 to select 5 prediction modes, and use the surrounding The reconstructed pixel values of the neighboring blocks of the image are used to regenerate predicted pixel values.
在N流水级703,进行与上述S503中的最终模式选出(Final mode selection)同样的处理。In the N pipeline stage 703, the same processing as in the final mode selection in S503 described above is performed.
在该阶段,对在N-1流水级702重新选出的5个预测模式对应的预测残差分别进行哈达玛变换进行筛选,得到代价最小的最终的预测模式。At this stage, the prediction residuals corresponding to the five prediction modes reselected in the N-1 pipeline stage 702 are respectively subjected to a Hadamard transformation to screen the final prediction mode with the least cost.
具体来说,在初始时刻t0,由N-2流水级701对编码块0进行处理 (帧内模式预估S501),此时,N-1流水级702和N流水级703为空闲。Specifically, at the initial time t0, the encoding block 0 is processed by the N-2 pipeline stage 701 (intra mode estimation S501). At this time, the N-1 pipeline stage 702 and the N pipeline stage 703 are idle.
接着,在时刻t1,N-2流水级701对新的编码块1进行处理(帧内模式预估S501),N-1流水级702对从N-2流水级701取得的由N-2流水级701处理过的编码块0进行处理(预测改进S502),此时,N流水级703为空闲。Next, at time t1, the N-2 pipeline stage 701 processes the new coded block 1 (intra mode estimation S501), and the N-1 pipeline stage 702 performs the N-2 pipeline process obtained from the N-2 pipeline stage 701. The encoding block 0 processed by the stage 701 is processed (prediction improvement S502). At this time, the N pipeline stage 703 is idle.
再接下来,在时刻t2,N-2流水级701对新的编码块2进行处理(帧内模式预估S501),N-1流水级702对从N-2流水级701取得的由N-2流水级701处理过的编码块1进行处理(预测改进S502),N-2流水级703对从N-1流水级702取得的由N-1流水级702处理过的编码块0进行处理(最终模式选出S503)。Next, at time t2, the N-2 pipeline stage 701 processes the new coded block 2 (intra-frame mode estimation S501), and the N-1 pipeline stage 702 processes the N-pipeline stage 701 obtained from the N-2 pipeline stage 701. 2 The encoding block 1 processed by the pipeline 701 is processed (prediction improvement S502), and the N-2 pipeline 703 processes the encoding block 0 obtained by the N-1 pipeline 702 and processed by the N-1 pipeline 702 ( The final mode is S503).
此后,各个流水级并行进行上述的S501~S503的处理,直到对所有的编码块完成处理。Thereafter, each pipeline stage performs the above-mentioned processing of S501 to S503 in parallel until the processing is completed for all the coding blocks.
通过采取分阶段帧内预测模式搜索算法,将原始像素引入帧内预测模式从而对搜索阶段解除关键依赖性,进而实现将整个帧内预测算法划分为三个流水级以提升并行度,从而如图9所示,从时刻t2开始,各个N-2~N的流水级701~703开始并行地对编码块进行处理,因此能够提高芯片处理速度以及效率。By adopting a staged intra prediction mode search algorithm, the original pixels are introduced into the intra prediction mode to release the key dependency on the search phase, and then the entire intra prediction algorithm is divided into three pipeline stages to improve the parallelism, as shown in the figure As shown in FIG. 9, starting from time t2, each of the N-2 to N pipeline stages 701 to 703 starts processing the coded blocks in parallel, so that the chip processing speed and efficiency can be improved.
另外,由于N-2流水级702不涉及任何数据依赖,因此作为本发明一个可选的方案,可将其拆分出来,例如预先处理图8中所有可能的编码块,将得到的结果存储起来待N-1流水级701取用。In addition, since the N-2 pipeline stage 702 does not involve any data dependency, as an optional solution of the present invention, it can be split out. For example, all possible coding blocks in FIG. 8 are processed in advance, and the obtained results are stored. Wait for N-1 pipeline stage 701 to take.
在本发明所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present invention, it should be understood that the disclosed device and method may be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地 方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware, or in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质或存储器中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above integrated unit implemented in the form of a software functional unit may be stored in a computer-readable storage medium or memory. The software functional unit is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute the methods described in the embodiments of the present invention. Some steps. The aforementioned storage media include: U disks, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks or compact discs, and other media that can store program codes .
本领域技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, only the above-mentioned division of the functional modules is used as an example. In practical applications, the above-mentioned functions can be allocated by different functional modules according to needs, that is, the device The internal structure is divided into different functional modules to complete all or part of the functions described above. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiment, and details are not described herein again.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention, but not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: The technical solutions described in the foregoing embodiments can still be modified, or some or all of the technical features can be equivalently replaced; and these modifications or replacements do not depart from the essence of the corresponding technical solutions of the technical solutions of the embodiments of the present invention. range.

Claims (60)

  1. 一种帧内预测模式搜索方法,包括:A method for searching an intra prediction mode includes:
    第1步骤,基于X个对象预测模式,利用当前编码块周边的相邻块的原始像素生成所述当前编码块在所述X个对象预测模式下的X个第1预测信号,并求出所述X个第1预测信号与所述编码块的原始像值的残差作为X个第1残差;In the first step, based on the X object prediction modes, the original pixels of neighboring blocks around the current encoding block are used to generate X first prediction signals of the current encoding block in the X object prediction mode, and obtain all The residuals of the X first prediction signals and the original image values of the coding block are taken as the X first residuals;
    第2步骤,根据所述第1残差通过第1代价计算方法计算出所述X个对象预测模式的第1代价,将所述对象预测模式中所述第1代价最小一侧的Y个对象预测模式作为中间预测模式;In a second step, the first cost of the X object prediction modes is calculated by the first cost calculation method according to the first residual, and the Y objects on the least side of the first cost in the object prediction mode are calculated. Prediction mode as an intermediate prediction mode;
    第3步骤,基于所述中间预测模式,利用所述相邻块的重建像素生成所述当前编码块在所述中间预测模式下的第2预测信号,并求出所述第2预测信号与所述当前编码块的原始像值的残差作为第2残差;和,In a third step, based on the intermediate prediction mode, a reconstructed pixel of the neighboring block is used to generate a second prediction signal of the current coding block in the intermediate prediction mode, and the second prediction signal and the obtained prediction signal are obtained. State the residual of the original image value of the current coding block as the second residual; and,
    第4步骤,根据所述第2残差通过第2代价计算方法计算出所述中间预测模式的第2代价,将所述中间预测模式中所述第2代价最小的预测模式作为搜索出的最终预测模式,In a fourth step, a second cost of the intermediate prediction mode is calculated by a second cost calculation method according to the second residual, and the prediction mode with the smallest second cost in the intermediate prediction mode is used as the searched final result. Prediction model,
    其中,Y是小于X的自然数。Here, Y is a natural number smaller than X.
  2. 根据权利要求1所述的帧内预测模式搜索方法,其中,The method of searching for an intra prediction mode according to claim 1, wherein:
    在所述第3步骤中,进一步对所述第2步骤得到的所述Y个中间预测模式与所述当前编码块的至少一个相邻块的最终预测模式进行综合处理来将所述中间预测模式调整为Z个,In the third step, the Y intermediate prediction modes obtained in the second step and the final prediction mode of at least one neighboring block of the current coding block are comprehensively processed to integrate the intermediate prediction mode. Adjusted to Z,
    其中,Z是小于X的自然数。Here, Z is a natural number smaller than X.
  3. 根据权利要求2所述的帧内预测模式搜索方法,其中,The method of searching for an intra prediction mode according to claim 2, wherein:
    在所述第3步骤中,所述综合处理中使用所述当前编码块的左侧、上侧以及左上侧这3个方向的所述相邻块中的至少一个的最终预测模式。In the third step, a final prediction mode of at least one of the neighboring blocks in three directions of a left side, an upper side, and an upper left side of the current coding block is used in the comprehensive processing.
  4. 根据权利要求2所述的帧内预测模式搜索方法,其中,The method of searching for an intra prediction mode according to claim 2, wherein:
    在所述第3步骤中,所述综合处理中将所述Y个中间预测模式中的至 少一个预测模式与所述相邻块的最终预测模式一起作为所述中间预测模式。In the third step, at least one prediction mode among the Y intermediate prediction modes is used as the intermediate prediction mode together with the final prediction mode of the neighboring block in the comprehensive processing.
  5. 根据权利要求4所述的帧内预测模式搜索方法,其中,The intra prediction mode search method according to claim 4, wherein:
    所述Y个中间预测模式中的至少一个预测模式,是与所述相邻块的最终预测模式不同且所述第1代价最小一侧的预测模式。At least one prediction mode among the Y intermediate prediction modes is a prediction mode that is different from the final prediction mode of the neighboring block and has the least first cost.
  6. 根据权利要求1所述的帧内预测模式搜索方法,其中,The method of searching for an intra prediction mode according to claim 1, wherein:
    所述X个对象预测模式为35个对象预测模式,所述Y个中间预测模式为5个中间预测模式。The X object prediction modes are 35 object prediction modes, and the Y intermediate prediction modes are 5 intermediate prediction modes.
  7. 根据权利要求2所述的帧内预测模式搜索方法,其中,The method of searching for an intra prediction mode according to claim 2, wherein:
    所述Z个中间预测模式为5个中间预测模式。The Z intermediate prediction modes are 5 intermediate prediction modes.
  8. 根据权利要求1所述的帧内预测模式搜索方法,其中,The method of searching for an intra prediction mode according to claim 1, wherein:
    在所述第1步骤中,将帧内预测的全部预测模式分为至少2组,选择其中1组作为所述对象预测模式。In the first step, all prediction modes of intra prediction are divided into at least two groups, and one group is selected as the target prediction mode.
  9. 根据权利要求8所述的帧内预测模式搜索方法,其中,The method for searching an intra prediction mode according to claim 8, wherein:
    在所述第1步骤中,根据所述对象预测模式的方向或种类的至少一个进行所述分组。In the first step, the grouping is performed based on at least one of a direction or a type of the target prediction mode.
  10. 根据权利要求9所述的帧内预测模式搜索方法,其中,The method of searching for an intra prediction mode according to claim 9, wherein:
    每个所述分组中的预测模式的数量相同。The number of prediction modes in each said group is the same.
  11. 根据权利要求8所述的帧内预测模式搜索方法,其中,The method for searching an intra prediction mode according to claim 8, wherein:
    所述预测模式包括方向模式、DC模式和Planar模式,The prediction mode includes a direction mode, a DC mode, and a Planar mode,
    每个分组都包括所述DC模式和/或Planar模式。Each packet includes the DC mode and / or the Planar mode.
  12. 根据权利要求8所述的帧内预测模式搜索方法,其中,The method for searching an intra prediction mode according to claim 8, wherein:
    在所述第1步骤中,随机或者根据当前编码块的特征指标来进行选择1组预测模式作为所述对象预测模式。In the first step, one set of prediction modes is selected randomly or according to a feature index of a current coding block as the target prediction mode.
  13. 根据权利要求8所述的帧内预测模式搜索方法,其中,The method for searching an intra prediction mode according to claim 8, wherein:
    在所述第1步骤中,针对预测方向中的0°、45°、90°及135°,将所述全部预测模式分为0°、45°、90°及135°所对应的4组,In the first step, the prediction modes are divided into 4 groups corresponding to 0 °, 45 °, 90 °, and 135 ° with respect to 0 °, 45 °, 90 °, and 135 °.
    根据所述当前编码块在各个预测方向上的方向性指标来选择其中1组作为所述对象预测模式。One group is selected as the target prediction mode according to the directivity index of the current coding block in each prediction direction.
  14. 根据权利要求13所述的帧内预测模式搜索方法,其中,The method of searching for an intra prediction mode according to claim 13, wherein:
    所述方向性指标是所述当前编码块在各个预测方向上的梯度信息。The directionality index is gradient information of the current coding block in each prediction direction.
  15. 根据权利要求14所述的帧内预测模式搜索方法,其中,The method for searching an intra prediction mode according to claim 14, wherein:
    在所述第1步骤中,将所述当前编码块分成多个区域,根据分组中的预测方向确定所述多个区域在所述预测方向上的梯度信息,选择梯度信息为最小值的1组预测模式作为所述对象预测模式。In the first step, the current coding block is divided into a plurality of regions, and gradient information of the plurality of regions in the prediction direction is determined according to a prediction direction in a group, and a group of gradient information having a minimum value is selected. A prediction mode is used as the target prediction mode.
  16. 根据权利要求13所述的帧内预测模式搜索方法,其中,The method of searching for an intra prediction mode according to claim 13, wherein:
    在所述第1步骤中,将所述当前编码块按照左上、右上、左下、右下、中心的顺序,分成大小相等的5个子块a、b、c、d、e,分别计算出子块a、b、c、d、e的均值,再用均值按下式求出在0°、45°、90°及135°的梯度信息,In the first step, the current coding block is divided into five sub-blocks a, b, c, d, and e of equal size in the order of upper left, upper right, lower left, lower right, and center, and the sub blocks are calculated respectively The average value of a, b, c, d, e, and then use the average value to find the gradient information at 0 °, 45 °, 90 °, and 135 °.
    0°:GI1=|b-a|+|d-c|0 °: GI1 = | b-a | + | d-c |
    45°:GI2=|c-e|+|e-b|45 °: GI2 = | c-e | + | e-b |
    90°:GI3=|c-a|+|d-b|90 °: GI3 = | c-a | + | d-b |
    135°:GI4=|d-e|+|e-a|135 °: GI4 = | d-e | + | e-a |
    选择GI1~GI4中最小值对应的预测方向的1组预测模式作为所述对象预测模式。One set of prediction modes in the prediction direction corresponding to the minimum value among GI1 to GI4 is selected as the target prediction mode.
  17. 根据权利要求1所述的帧内预测模式搜索方法,其中,The method of searching for an intra prediction mode according to claim 1, wherein:
    所述相邻块是临近所述当前编码块的编码块中的像素块。The neighboring block is a pixel block in a coding block adjacent to the current coding block.
  18. 根据权利要求1所述的帧内预测模式搜索方法,其中,The method of searching for an intra prediction mode according to claim 1, wherein:
    所述原始像素和所述重建像素,包括通过进行填充而得到的像素。The original pixels and the reconstructed pixels include pixels obtained by performing padding.
  19. 根据权利要求18所述的帧内预测模式搜索方法,其中,The method of searching for an intra prediction mode according to claim 18, wherein:
    进行所述填充的像素块,是在生成所述第2预测信号时无法获得重建像素的位置上的像素块。The pixel block to be filled is a pixel block at a position where a reconstructed pixel cannot be obtained when the second prediction signal is generated.
  20. 根据权利要求1所述的帧内预测模式搜索方法,其中,The method of searching for an intra prediction mode according to claim 1, wherein:
    所述编码块包含NxN个像素块,N是自然数,The coding block includes NxN pixel blocks, where N is a natural number,
    所述利用所述当前编码块周边的相邻块的原始像素生成所述当前编码块在所述X个对象预测模式下的第1预测信号,包括:由所述编码块的左侧、左上侧和上侧的4*N+1个像素块的参考像素生成当前编码块的预测信号。The generating a first prediction signal of the current coding block under the X object prediction modes by using the original pixels of neighboring blocks around the current coding block includes: the left side, the upper left side of the coding block And the reference pixels of the 4 * N + 1 pixel blocks on the upper side generate a prediction signal of the current coding block.
  21. 根据权利要求1所述的帧内预测模式搜索方法,其中,The method of searching for an intra prediction mode according to claim 1, wherein:
    所述第1代价计算方法和/或所述第2代价计算方法中,将残差的平方和或绝对值和作为预测模式的代价。In the first cost calculation method and / or the second cost calculation method, a sum of squares or absolute values of residuals is used as a cost of the prediction mode.
  22. 根据权利要求1所述的帧内预测模式搜索方法,其中,The method of searching for an intra prediction mode according to claim 1, wherein:
    所述第1代价计算方法和/或所述第2代价计算方法中,根据对残差进行二维矩阵变换得到的变换系数和预测模式的比特数来计算预测模式的代价。In the first cost calculation method and / or the second cost calculation method, the cost of the prediction mode is calculated according to the transform coefficient and the number of bits of the prediction mode obtained by performing a two-dimensional matrix transformation on the residual.
  23. 根据权利要求21所述的帧内预测模式搜索方法,其中,The intra prediction mode search method according to claim 21, wherein:
    所述二维矩阵变换是离散正弦/余弦变换。The two-dimensional matrix transformation is a discrete sine / cosine transformation.
  24. 根据权利要求21所述的帧内预测模式搜索方法,其中,The intra prediction mode search method according to claim 21, wherein:
    所述二维矩阵变换是哈达玛变换。The two-dimensional matrix transformation is a Hadamard transformation.
  25. 根据权利要求1所述的帧内预测模式搜索方法,其中,The method of searching for an intra prediction mode according to claim 1, wherein:
    所述第1代价计算方法与所述第2代价计算方法相同或者不同。The first cost calculation method is the same as or different from the second cost calculation method.
  26. 根据权利要求1所述的帧内预测模式搜索方法,其中,The method of searching for an intra prediction mode according to claim 1, wherein:
    所述帧内预测模式搜索方法由包括N-2流水级、N-1流水级和N流水级的芯片执行,The intra prediction mode search method is executed by a chip including an N-2 pipeline stage, an N-1 pipeline stage, and an N pipeline stage,
    所述第1步骤和所述第2步骤由N-2流水级执行,The first step and the second step are performed by an N-2 pipeline stage,
    所述第3步骤由N-1流水级执行,The third step is performed by an N-1 pipeline stage,
    所述第4步骤由N流水级执行。The fourth step is performed by an N pipeline stage.
  27. 根据权利要求26所述的帧内预测模式搜索方法,其中,The method of searching for an intra prediction mode according to claim 26, wherein:
    所述N-2流水级对所有编码块进行预先处理,并将处理的结果存储起来供所述N-1流水级调用。The N-2 pipeline stage performs pre-processing on all coding blocks, and stores the processed results for the N-1 pipeline stage to call.
  28. 根据权利要求26所述的帧内预测模式搜索方法,其中,The method of searching for an intra prediction mode according to claim 26, wherein:
    所述N-2流水级、所述N-1流水级和所述N流水级并行工作,使得所述N流水级对由所述N-1流水级处理过的编码块的处理、所述N-1流水级对由所述N流水级处理过的编码块的处理、和所述N-2流水级对当前编码块的处理并行进行。The N-2 pipeline stage, the N-1 pipeline stage, and the N pipeline stage work in parallel, so that the N pipeline stage processes the coding blocks processed by the N-1 pipeline stage, the N The -1 pipeline stage processes the encoding blocks processed by the N pipeline stage in parallel with the N-2 pipeline stage processes the current encoding blocks in parallel.
  29. 一种视频编码方法,包括:A video encoding method includes:
    使用权利要求1~28的任一项所述的帧内预测模式搜索方法搜索出的最终预测模式对视频进行编码。The video is encoded using the final prediction mode searched by the intra prediction mode search method according to any one of claims 1 to 28.
  30. 一种帧内预测模式搜索装置,用于执行权利要求1~25的任一项所述的帧内预测模式搜索方法,其中,An intra prediction mode search device for performing the intra prediction mode search method according to any one of claims 1 to 25, wherein:
    包括:N-2流水级、N-1流水级和N流水级,Including: N-2 pipeline stage, N-1 pipeline stage and N pipeline stage,
    所述第1步骤和所述第2步骤由所述N-2流水级执行,The first step and the second step are performed by the N-2 pipeline stage,
    所述第3步骤由所述N-1流水级执行,The third step is performed by the N-1 pipeline stage,
    所述第4步骤由所述N流水级执行。The fourth step is performed by the N pipeline stage.
  31. 根据权利要求30所述的帧内预测模式搜索方法,其中,The intra prediction mode search method according to claim 30, wherein:
    所述N-2流水级对所有编码块进行预先处理,并将处理的结果存储起来供所述N-1流水级调用。The N-2 pipeline stage performs pre-processing on all coding blocks, and stores the processed results for the N-1 pipeline stage to call.
  32. 根据权利要求30所述的帧内预测模式搜索方法,其中,The intra prediction mode search method according to claim 30, wherein:
    所述N-2流水级、所述N-1流水级和所述N流水级并行工作,使得所述N流水级对由所述N-1流水级处理过的编码块的处理、所述N-1流水级对由所述N流水级处理过的编码块的处理、和所述N-2流水级对当前编码块的处理并行进行。The N-2 pipeline stage, the N-1 pipeline stage, and the N pipeline stage work in parallel, so that the N pipeline stage processes the coding blocks processed by the N-1 pipeline stage, the N The -1 pipeline stage processes the encoding blocks processed by the N pipeline stage in parallel with the N-2 pipeline stage processes the current encoding blocks in parallel.
  33. 一种帧内预测模式搜索装置,包括:存储器和处理器,其中,An intra prediction mode search device includes: a memory and a processor, wherein:
    所述存储器用于存储程序指令;The memory is used to store program instructions;
    所述处理器,调用所述程序指令,当程序指令被执行时,用于执行以下操作:The processor calls the program instruction, and when the program instruction is executed, is used to perform the following operations:
    第1步骤,基于X个对象预测模式,利用当前编码块周边的相邻块的原始像素生成所述当前编码块在所述X个对象预测模式下的X个第1预测信号,并求出所述X个第1预测信号与所述编码块的原始像值的残差作为X个第1残差;In the first step, based on the X object prediction modes, the original pixels of neighboring blocks around the current encoding block are used to generate X first prediction signals of the current encoding block in the X object prediction mode, and obtain all The residuals of the X first prediction signals and the original image values of the coding block are taken as the X first residuals;
    第2步骤,根据所述第1残差通过第1代价计算方法计算出所述X个对象预测模式的第1代价,将所述对象预测模式中所述第1代价最小一侧的Y个对象预测模式作为中间预测模式;In a second step, the first cost of the X object prediction modes is calculated by the first cost calculation method according to the first residual, and the Y objects on the least side of the first cost in the object prediction mode are calculated. Prediction mode as an intermediate prediction mode;
    第3步骤,基于所述中间预测模式,利用所述相邻块的重建像素生成所述当前编码块在所述中间预测模式下的第2预测信号,并求出所述第2预测信号与所述当前编码块的原始像值的残差作为第2残差;和In a third step, based on the intermediate prediction mode, a reconstructed pixel of the neighboring block is used to generate a second prediction signal of the current coding block in the intermediate prediction mode, and the second prediction signal and the obtained prediction signal are obtained. State the residual of the original image value of the current coding block as the second residual; and
    第4步骤,根据所述第2残差通过第2代价计算方法计算出所述中间预测模式的第2代价,将所述中间预测模式中所述第2代价最小的预测模式作为搜索出的最终预测模式,In a fourth step, a second cost of the intermediate prediction mode is calculated by a second cost calculation method according to the second residual, and the prediction mode with the smallest second cost in the intermediate prediction mode is used as the searched final result. Prediction model,
    其中,Y是小于X的自然数。Here, Y is a natural number smaller than X.
  34. 根据权利要求33所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 33, wherein:
    在所述第3步骤中,进一步对所述第2步骤得到的所述Y个中间预测模式与所述当前编码块的至少一个相邻块的最终预测模式进行综合处理来将所述中间预测模式调整为Z个,In the third step, the Y intermediate prediction modes obtained in the second step and the final prediction mode of at least one neighboring block of the current coding block are comprehensively processed to integrate the intermediate prediction mode. Adjusted to Z,
    其中,Z是小于X的自然数。Here, Z is a natural number smaller than X.
  35. 根据权利要求34所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 34, wherein:
    在所述第3步骤中,所述综合处理中使用所述当前编码块的左侧、上侧以及左上侧这3个方向的所述相邻块中的至少一个的最终预测模式。In the third step, a final prediction mode of at least one of the neighboring blocks in three directions of a left side, an upper side, and an upper left side of the current coding block is used in the comprehensive processing.
  36. 根据权利要求34所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 34, wherein:
    在所述第3步骤中,所述综合处理中,将所述Y个中间预测模式中的至少一个预测模式与所述相邻块的最终预测模式一起作为所述中间预测模式。In the third step, in the comprehensive processing, at least one prediction mode among the Y intermediate prediction modes is used as the intermediate prediction mode together with a final prediction mode of the neighboring block.
  37. 根据权利要求36所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 36, wherein:
    所述Y个中间预测模式中的至少一个预测模式,是与所述相邻块的最终预测模式不同且所述第1代价最小一侧的预测模式。At least one prediction mode among the Y intermediate prediction modes is a prediction mode that is different from the final prediction mode of the neighboring block and has the least first cost.
  38. 根据权利要求33所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 33, wherein:
    所述X个对象预测模式为35个对象预测模式,所述Y个中间预测模式为5个中间预测模式。The X object prediction modes are 35 object prediction modes, and the Y intermediate prediction modes are 5 intermediate prediction modes.
  39. 根据权利要求34所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 34, wherein:
    所述Z个中间预测模式为5个中间预测模式。The Z intermediate prediction modes are 5 intermediate prediction modes.
  40. 根据权利要求33所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 33, wherein:
    在所述第1步骤中,将帧内预测的全部预测模式分为至少2组,选择 其中1组作为所述对象预测模式。In the first step, all prediction modes of intra prediction are divided into at least two groups, and one group is selected as the target prediction mode.
  41. 根据权利要求40所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 40, wherein:
    根据所述对象预测模式的方向或种类的至少一个进行所述分组。The grouping is performed according to at least one of a direction or a kind of the target prediction mode.
  42. 根据权利要求41所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 41, wherein:
    每个所述分组中的预测模式的数量相同。The number of prediction modes in each said group is the same.
  43. 根据权利要求40所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 40, wherein:
    所述预测模式包括方向模式、DC模式和Planar模式,The prediction mode includes a direction mode, a DC mode, and a Planar mode,
    每个分组都包括所述DC模式和/或Planar模式。Each packet includes the DC mode and / or the Planar mode.
  44. 根据权利要求40所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 40, wherein:
    在所述第1步骤中,随机或者根据当前编码块的特征指标来进行选择1组预测模式作为所述对象预测模式。In the first step, one set of prediction modes is selected randomly or according to a feature index of a current coding block as the target prediction mode.
  45. 根据权利要求40所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 40, wherein:
    在所述第1步骤中,针对预测方向中的0°、45°、90°及135°,将所述全部预测模式分为0°、45°、90°及135°所对应的4组,In the first step, the prediction modes are divided into 4 groups corresponding to 0 °, 45 °, 90 °, and 135 ° with respect to 0 °, 45 °, 90 °, and 135 °.
    根据所述当前编码块在各个预测方向上的方向性指标来选择其中1组作为所述对象预测模式。One group is selected as the target prediction mode according to the directivity index of the current coding block in each prediction direction.
  46. 根据权利要求45所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 45, wherein:
    所述方向性指标是所述当前编码块在各个预测方向上的梯度信息。The directionality index is gradient information of the current coding block in each prediction direction.
  47. 根据权利要求46所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 46, wherein:
    在所述第1步骤中,将所述当前编码块分成多个区域,根据分组中的预测方向确定所述多个区域在所述预测方向上的梯度信息,选择梯度信息为最小值的1组预测模式作为所述对象预测模式。In the first step, the current coding block is divided into a plurality of regions, and gradient information of the plurality of regions in the prediction direction is determined according to a prediction direction in a group, and a group of gradient information having a minimum value is selected. A prediction mode is used as the target prediction mode.
  48. 根据权利要求45所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 45, wherein:
    在所述第1步骤中,将所述当前编码块按照左上、右上、左下、右下、中心的顺序,分成大小相等的5个子块a、b、c、d、e,分别计算出子块a、b、c、d、e的均值,再用均值按下式求出在0°、45°、90°及135°的梯度信息,In the first step, the current coding block is divided into five sub-blocks a, b, c, d, and e of equal size in the order of upper left, upper right, lower left, lower right, and center, and the sub blocks are calculated respectively The average value of a, b, c, d, e, and then use the average value to find the gradient information at 0 °, 45 °, 90 °, and 135 °.
    0°:GI1=|b-a|+|d-c|0 °: GI1 = | b-a | + | d-c |
    45°:GI2=|c-e|+|e-b|45 °: GI2 = | c-e | + | e-b |
    90°:GI3=|c-a|+|d-b|90 °: GI3 = | c-a | + | d-b |
    135°:GI4=|d-e|+|e-a|135 °: GI4 = | d-e | + | e-a |
    选择GI1~GI4中最小值对应的预测方向的1组预测模式作为所述对象预测模式。One set of prediction modes in the prediction direction corresponding to the minimum value among GI1 to GI4 is selected as the target prediction mode.
  49. 根据权利要求33所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 33, wherein:
    所述相邻块是临近所述当前编码块的编码块中的像素块。The neighboring block is a pixel block in a coding block adjacent to the current coding block.
  50. 根据权利要求33所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 33, wherein:
    所述原始像素和所述重建像素,包括通过进行填充而得到的像素。The original pixels and the reconstructed pixels include pixels obtained by performing padding.
  51. 根据权利要求50所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 50, wherein:
    进行所述填充的像素块,是在生成所述第2预测信号时无法获得重建像素的位置上的像素块。The pixel block to be filled is a pixel block at a position where a reconstructed pixel cannot be obtained when the second prediction signal is generated.
  52. 根据权利要求33所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 33, wherein:
    所述编码块包含NxN个像素块,N是自然数,The coding block includes NxN pixel blocks, where N is a natural number,
    所述利用所述当前编码块周边的相邻块的原始像素生成所述当前编码块在所述X个对象预测模式下的第1预测信号,包括:由所述编码块的左侧、左上侧和上侧的4*N+1个像素块的参考像素生成当前编码块的预测信号。The generating a first prediction signal of the current coding block under the X object prediction modes by using the original pixels of neighboring blocks around the current coding block includes: the left side, the upper left side of the coding block And the reference pixels of the 4 * N + 1 pixel blocks on the upper side generate a prediction signal of the current coding block.
  53. 根据权利要求33所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 33, wherein:
    所述第1代价计算方法和/或所述第2代价计算方法中,将残差的平方和或绝对值和作为预测模式的代价。In the first cost calculation method and / or the second cost calculation method, a sum of squares or absolute values of residuals is used as a cost of the prediction mode.
  54. 根据权利要求33所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 33, wherein:
    所述第1代价计算方法和/或所述第2代价计算方法中,根据对残差进行二维矩阵变换得到的变换系数和预测模式的比特数来计算预测模式的代价。In the first cost calculation method and / or the second cost calculation method, the cost of the prediction mode is calculated according to the transform coefficient and the number of bits of the prediction mode obtained by performing a two-dimensional matrix transformation on the residual.
  55. 根据权利要求53所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 53, wherein:
    所述二维矩阵变换是离散正弦/余弦变换。The two-dimensional matrix transformation is a discrete sine / cosine transformation.
  56. 根据权利要求53所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 53, wherein:
    所述二维矩阵变换是哈达玛变换。The two-dimensional matrix transformation is a Hadamard transformation.
  57. 根据权利要求33所述的帧内预测模式搜索装置,其中,The intra prediction mode search device according to claim 33, wherein:
    所述第1代价计算方法与所述第2代价计算方法相同或者不同。The first cost calculation method is the same as or different from the second cost calculation method.
  58. 一种视频编码装置,包括权利要求30~57的任一项所述的帧内预测模式搜索装置。A video encoding device includes the intra prediction mode search device according to any one of claims 30 to 57.
  59. 一种记录介质,存储有使计算机执行如权利要求1~28所述的帧内预测模式搜索方法的程序。A recording medium storing a program for causing a computer to execute the method for searching an intra prediction mode according to claims 1 to 28.
  60. 一种记录介质,存储有使计算机执行如权利要求29所述的视频编码方法的程序。A recording medium storing a program that causes a computer to execute the video encoding method according to claim 29.
PCT/CN2018/097528 2018-07-27 2018-07-27 Intra-frame prediction mode searching device, video encoding method and device, and recording medium WO2020019316A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880017757.8A CN110419214A (en) 2018-07-27 2018-07-27 Intra prediction mode searching method and device, method for video coding and device and recording medium
PCT/CN2018/097528 WO2020019316A1 (en) 2018-07-27 2018-07-27 Intra-frame prediction mode searching device, video encoding method and device, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/097528 WO2020019316A1 (en) 2018-07-27 2018-07-27 Intra-frame prediction mode searching device, video encoding method and device, and recording medium

Publications (1)

Publication Number Publication Date
WO2020019316A1 true WO2020019316A1 (en) 2020-01-30

Family

ID=68357869

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/097528 WO2020019316A1 (en) 2018-07-27 2018-07-27 Intra-frame prediction mode searching device, video encoding method and device, and recording medium

Country Status (2)

Country Link
CN (1) CN110419214A (en)
WO (1) WO2020019316A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110881125B (en) * 2019-12-10 2021-10-29 中国科学院深圳先进技术研究院 Intra-frame prediction method, video coding method, video decoding method and related equipment
CN112087634B (en) * 2020-08-11 2022-03-08 北京博雅慧视智能技术研究院有限公司 Optimal angle judgment method and system
WO2022061563A1 (en) * 2020-09-23 2022-03-31 深圳市大疆创新科技有限公司 Video coding method and device, and computer readable storage medium
CN117837142A (en) * 2021-10-27 2024-04-05 深圳市大疆创新科技有限公司 Video encoding method, apparatus and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060165171A1 (en) * 2005-01-25 2006-07-27 Samsung Electronics Co., Ltd. Method of effectively predicting multi-layer based video frame, and video coding method and apparatus using the same
CN102077598A (en) * 2008-04-30 2011-05-25 豪威科技有限公司 Apparatus and method for computationally efficient intra prediction in a video coder
CN103327325A (en) * 2013-05-13 2013-09-25 西安电子科技大学 Intra-frame prediction mode rapid self-adaptation selection method based on HEVC standard
CN104796701A (en) * 2015-03-27 2015-07-22 北京君正集成电路股份有限公司 Predication mode determination method and device based on HEVC (High Efficiency Video Coding)
CN106028047A (en) * 2016-05-24 2016-10-12 西安电子科技大学 Hadamard transform-based fast intra-prediction mode selection and PU partition method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006080779A1 (en) * 2005-01-25 2006-08-03 Samsung Electronics Co., Ltd. Method of effectively predicting multi-layer based video frame, and video coding method and apparatus using the same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060165171A1 (en) * 2005-01-25 2006-07-27 Samsung Electronics Co., Ltd. Method of effectively predicting multi-layer based video frame, and video coding method and apparatus using the same
CN102077598A (en) * 2008-04-30 2011-05-25 豪威科技有限公司 Apparatus and method for computationally efficient intra prediction in a video coder
CN103327325A (en) * 2013-05-13 2013-09-25 西安电子科技大学 Intra-frame prediction mode rapid self-adaptation selection method based on HEVC standard
CN104796701A (en) * 2015-03-27 2015-07-22 北京君正集成电路股份有限公司 Predication mode determination method and device based on HEVC (High Efficiency Video Coding)
CN106028047A (en) * 2016-05-24 2016-10-12 西安电子科技大学 Hadamard transform-based fast intra-prediction mode selection and PU partition method

Also Published As

Publication number Publication date
CN110419214A (en) 2019-11-05

Similar Documents

Publication Publication Date Title
KR102026855B1 (en) Method for predicting motion vectors in a video codec that allows multiple referencing, motion vector encoding/decoding apparatus using the same
WO2020019316A1 (en) Intra-frame prediction mode searching device, video encoding method and device, and recording medium
CN104735452B (en) By the method and apparatus using big converter unit image to be encoded and decodes
WO2018010492A1 (en) Rapid decision making method for intra-frame prediction mode in video coding
CN104244007B (en) Image coding method and device and decoding method and device
CN104067619B (en) The recording medium of Video Decoder, video encoding/decoding method and video decoding program
CN103248895B (en) A kind of quick mode method of estimation for HEVC intraframe coding
KR100636225B1 (en) Integer transform matrix selection method in video coding and related integer transform method
WO2014190468A1 (en) Video encoder for images
CN102740077B (en) H.264/AVC standard-based intra-frame prediction mode selection method
CN108777794B (en) Image encoding method and apparatus, storage medium, and electronic apparatus
CN103414895A (en) Encoder intra-frame prediction device and method applicable to HEVC standards
CN104702959A (en) Intra-frame prediction method and system of video coding
JP6962193B2 (en) A recording medium that stores a moving image coding device, a moving image coding method, and a moving image coding program.
KR101205017B1 (en) Methods for encoding/decoding of video using common merging candidate set of asymmetric partitions
KR20130057385A (en) Methods for encoding/decoding of video using common merging candidate set
CN109889838A (en) A kind of HEVC fast encoding method based on ROI region
CN109168000B (en) HEVC intra-frame prediction rapid algorithm based on RC prediction
CN104602026B (en) A kind of reconstruction loop structure being multiplexed entirely encoder under HEVC standard
CN102420989A (en) Intra-frame prediction method and device
JP7147145B2 (en) Video encoding device, video encoding method, and video encoding program
CN113055670B (en) HEVC/H.265-based video coding method and system
WO2023070388A1 (en) Video encoding method and apparatus, and computer-readable storage medium
CN113674372A (en) Preprocessing algorithm for encoding and decoding remote sensing image
KR20120023234A (en) Motion estimation method and apparatus for video encoding

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: 18927578

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18927578

Country of ref document: EP

Kind code of ref document: A1