HK1234555B - Image encoding device and method, image decoding device and method and storage medium - Google Patents
Image encoding device and method, image decoding device and method and storage medium Download PDFInfo
- Publication number
- HK1234555B HK1234555B HK17108037.9A HK17108037A HK1234555B HK 1234555 B HK1234555 B HK 1234555B HK 17108037 A HK17108037 A HK 17108037A HK 1234555 B HK1234555 B HK 1234555B
- Authority
- HK
- Hong Kong
- Prior art keywords
- prediction
- block
- intra
- image
- value
- Prior art date
Links
Description
本申请是申请号为201280021843.9(PCT/JP2012/003555)、申请日为2012年5月30日(递交日为2013年11月5日)、发明名称为“运动图像编码装置、运动图像解码装置、运动图像编码方法以及运动图像解码方法”的发明专利申请的分案申请。This application is a divisional application of the invention patent application with application number 201280021843.9 (PCT/JP2012/003555), application date May 30, 2012 (submission date November 5, 2013), and invention name "Motion image encoding device, motion image decoding device, motion image encoding method and motion image decoding method".
技术领域Technical Field
本发明涉及高效地对图像进行编码的图像编码装置以及图像编码方法、对高效地编码了的图像进行解码的图像解码装置以及图像解码方法、和图像预测装置。The present invention relates to an image encoding device and an image encoding method for efficiently encoding an image, an image decoding device and an image decoding method for decoding an efficiently encoded image, and an image prediction device.
背景技术Background Art
例如,在MPEG(Moving Picture Experts Group,运动图像专家组)、“ITU-TH.26x”等国际标准影像编码方式中,将输入影像帧分割为矩形的块(编码块),并对该编码块实施使用已编码的图像信号的预测处理从而生成预测图像,将作为该编码块与预测图像的差分的预测误差信号按照块单位进行正交变换、量化处理,从而进行信息压缩。For example, in international standard image coding methods such as MPEG (Moving Picture Experts Group) and "ITU-TH.26x", the input image frame is divided into rectangular blocks (coding blocks), and the coding blocks are subjected to prediction processing using the encoded image signals to generate predicted images. The prediction error signal, which is the difference between the coding block and the predicted image, is orthogonally transformed and quantized in block units to perform information compression.
例如,在作为国际标准方式的MPEG-4 AVC/H.264(ISO/IEC 14496-10|ITU-TH.264)中,根据已编码的附近像素进行帧内部(Intra)预测处理或者邻近帧间的运动补偿预测处理(例如,参照非专利文献1)。For example, in MPEG-4 AVC/H.264 (ISO/IEC 14496-10 | ITU-T H.264), which is an international standard, intra-frame prediction processing or motion compensation prediction processing between adjacent frames is performed based on coded nearby pixels (for example, see Non-Patent Document 1).
在MPEG-4 AVC/H.264中,在亮度的帧内部预测模式中,能够按照块单位,从多个预测模式中选择1个预测模式。In MPEG-4 AVC/H.264, in the intra prediction mode of luma, one prediction mode can be selected from a plurality of prediction modes in units of blocks.
图14是示出亮度的块尺寸是4×4像素的情况的帧内部预测模式的说明图。FIG. 14 is an explanatory diagram showing the intra prediction mode in a case where the block size of luminance is 4×4 pixels.
在图14中,块内的白圈表示编码对象的像素,黑圈表示作为预测中使用的像素的已编码的像素。在亮度的块尺寸是4×4像素的情况下,规定了模式0至模式8这9个帧内部预测模式。In Figure 14, white circles within a block represent pixels to be coded, and black circles represent already coded pixels used for prediction. When the luma block size is 4×4 pixels, nine intra-frame prediction modes, Mode 0 to Mode 8, are defined.
在图14中,模式2是进行平均值预测的模式,利用块的上面和左面的邻接像素的平均值,预测块内的像素。In FIG14 , mode 2 is a mode for performing average value prediction, in which pixels within a block are predicted using the average value of adjacent pixels above and to the left of the block.
模式2以外的模式是进行方向性预测的模式。模式0是垂直方向预测,通过在垂直方向上重复块的上面的邻接像素从而生成预测图像。例如,在竖条纹花纹时选择模式0。Modes other than Mode 2 perform directional prediction. Mode 0 is vertical prediction, generating a predicted image by vertically repeating adjacent pixels above a block. For example, when using a vertical stripe pattern, select Mode 0.
模式1是水平方向预测,通过在水平方向上重复块的左面的邻接像素从而生成预测图像。例如,在横条纹花纹时选择模式1。Mode 1 is horizontal prediction, which generates a predicted image by repeating the adjacent pixels to the left of the block in the horizontal direction. For example, mode 1 is selected when a horizontal stripe pattern is used.
在模式3至模式8中,使用块的上面或者左面的已编码的像素,在规定的方向(箭头表示的方向)上生成插值像素来生成预测图像。In Modes 3 to 8, already coded pixels above or to the left of a block are used to generate interpolated pixels in a predetermined direction (direction indicated by an arrow) to generate a predicted image.
此处,应用帧内部预测的亮度的块尺寸能够从4×4像素、8×8像素、16×16像素中选择,在8×8像素的情况下,与4×4像素同样地规定了9个帧内部预测模式。但是,关于预测中使用的像素,并非是已编码的像素自身,而是使用针对这些像素实施滤波处理而得到的像素。Here, the luma block size for intra-frame prediction can be selected from 4×4 pixels, 8×8 pixels, and 16×16 pixels. In the case of 8×8 pixels, nine intra-frame prediction modes are defined, similar to 4×4 pixels. However, the pixels used for prediction are not the coded pixels themselves, but rather pixels obtained by applying filtering to these pixels.
相对于此,在16×16像素的情况下,除了与平均值预测、垂直方向预测以及水平方向预测有关的帧内部预测模式以外,还规定了被称为Plane预测的4个帧内部预测模式。On the other hand, in the case of 16×16 pixels, in addition to the intra prediction modes related to average value prediction, vertical prediction, and horizontal prediction, four intra prediction modes called Plane prediction are defined.
与Plane预测有关的帧内部预测模式是将针对块的上面和左面的已编码的邻接像素在倾斜方向上进行内插插值而生成的像素作为预测值的模式。The intra prediction mode related to Plane prediction is a mode in which pixels generated by interpolating already coded adjacent pixels above and to the left of a block in an oblique direction are used as prediction values.
另外,在方向性预测模式中,通过在预定的方向(预测方向)上重复块的邻接像素或者根据邻接像素生成的插值像素从而生成预测值,所以在图15所示那样的预测对象块内的目标的边界(边缘)的方向与预测方向一致、并且块内的信号值沿着预测方向而恒定的情况下,预测效率变高而能够削减符号量。In addition, in the directional prediction mode, the prediction value is generated by repeating the adjacent pixels of the block in a predetermined direction (prediction direction) or interpolated pixels generated based on the adjacent pixels. Therefore, when the direction of the boundary (edge) of the target within the prediction object block is consistent with the prediction direction as shown in Figure 15, and the signal value within the block is constant along the prediction direction, the prediction efficiency becomes high and the symbol amount can be reduced.
非专利文献1:MPEG-4 AVC(ISO/IEC 14496-10)/ITU-T H.264标准Non-Patent Document 1: MPEG-4 AVC (ISO/IEC 14496-10)/ITU-T H.264 Standard
发明内容Summary of the Invention
以往的运动图像编码装置如以上那样构成,所以如果预测对象块内的目标的边界(边缘)的方向与预测方向一致、并且预测对象块内的信号值沿着该预测方向而恒定,则能够通过使用方向性预测来高精度地进行预测。但是,存在如下课题:即便预测对象块内的目标的边界(边缘)的方向与预测方向一致,在如图16所示,在信号值沿着该预测方向而变化的情况下,预测误差也会变大。Conventional moving picture coding devices are configured as described above. If the direction of the boundary (edge) of an object within a prediction block coincides with the prediction direction and the signal value within the prediction block is constant along the prediction direction, high-precision prediction can be achieved by using directional prediction. However, even if the direction of the boundary (edge) of an object within a prediction block coincides with the prediction direction, prediction errors can increase if the signal value varies along the prediction direction, as shown in FIG16 .
本发明是为了解决上述那样的课题而完成的,其目的在于得到一种图像编码装置、图像解码装置、图像编码方法、图像解码方法以及图像预测装置,即使在信号值沿着预测方向而变化的情况下,也能够实现高精度的预测来提高图像质量。The present invention is completed to solve the above-mentioned problems, and its purpose is to obtain an image encoding device, an image decoding device, an image encoding method, an image decoding method and an image prediction device, which can achieve high-precision prediction to improve image quality even when the signal value changes along the prediction direction.
在本发明的图像编码装置中,帧内部预测单元在帧内部预测参数表示水平方向预测处理的情况下,对成为编码块的预测处理的单位的各块的左面所邻接的像素的亮度值相加与块的上面所邻接的像素的水平方向的亮度值变化量成比例的值,将该相加后的值作为预测图像的预测值,在帧内部预测参数表示垂直方向预测处理的情况下,对块的上面所邻接的像素的亮度值相加与块的左面所邻接的像素的垂直方向的亮度值变化量成比例的值,将该相加后的值作为预测图像的预测值。In the image encoding device of the present invention, when the intra-frame prediction parameter indicates horizontal prediction processing, the intra-frame prediction unit adds a value proportional to the change in the horizontal brightness value of the pixel adjacent to the top of the block to the brightness value of the pixel adjacent to the left of each block serving as the unit of prediction processing for the coding block, and uses the added value as the prediction value of the predicted image. When the intra-frame prediction parameter indicates vertical prediction processing, the intra-frame prediction unit adds a value proportional to the change in the vertical brightness value of the pixel adjacent to the top of the block to the brightness value of the pixel adjacent to the left of the block, and uses the added value as the prediction value of the predicted image.
根据本发明,帧内部预测单元构成为在帧内部预测参数表示水平方向预测处理的情况下,对块的左面所邻接的像素的亮度值相加与块的上面所邻接的像素的水平方向的亮度值变化量成比例的值,将该相加后的值作为预测图像的预测值,在帧内部预测参数表示垂直方向预测处理的情况下,对块的上面所邻接的像素的亮度值相加与块的左面所邻接的像素的垂直方向的亮度值变化量成比例的值,将该相加后的值作为预测图像的预测值,所以具有即使在信号值沿着预测方向而变化的情况下也能够实现高精度的预测来提高图像质量的效果。According to the present invention, the intra-frame prediction unit is constructed to add a value proportional to the amount of change in the horizontal brightness value of the pixel adjacent to the upper side of the block to the brightness value of the pixel adjacent to the left side of the block when the intra-frame prediction parameter indicates horizontal prediction processing, and to use the added value as the prediction value of the predicted image when the intra-frame prediction parameter indicates vertical prediction processing, and to add a value proportional to the amount of change in the vertical brightness value of the pixel adjacent to the left side of the block to the brightness value of the pixel adjacent to the upper side of the block, and use the added value as the prediction value of the predicted image. Therefore, it has the effect of improving image quality by achieving high-precision prediction even when the signal value changes along the prediction direction.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是示出本发明的实施方式1的运动图像编码装置的结构图。FIG1 is a diagram showing the structure of a moving picture encoding apparatus according to Embodiment 1 of the present invention.
图2是示出本发明的实施方式1的运动图像编码装置的处理内容(运动图像编码方法)的流程图。FIG2 is a flowchart showing the processing contents (moving picture encoding method) of the moving picture encoding apparatus according to Embodiment 1 of the present invention.
图3是示出本发明的实施方式1的运动图像解码装置的结构图。FIG3 is a diagram showing the configuration of the moving picture decoding apparatus according to Embodiment 1 of the present invention.
图4是示出本发明的实施方式1的运动图像解码装置的处理内容(运动图像解码方法)的流程图。FIG4 is a flowchart showing the processing contents (moving picture decoding method) of the moving picture decoding device according to Embodiment 1 of the present invention.
图5是示出最大编码块被层次性地分割为多个编码块的例子的说明图。FIG5 is an explanatory diagram showing an example in which a maximum coding block is hierarchically divided into a plurality of coding blocks.
图6的(a)是示出分割后的编码块以及预测块的分布的说明图,(b)是示出通过层次分割而分配了编码模式m(Bn)的状况的说明图。FIG6(a) is an explanatory diagram showing the distribution of coding blocks and prediction blocks after division, and FIG6(b) is an explanatory diagram showing the state of allocation of coding mode m( Bn ) by hierarchical division.
图7是示出编码块Bn内的各预测块Pi n可选择的帧内部预测参数(帧内部预测模式)的一个例子的说明图。FIG7 is an explanatory diagram showing an example of intra-frame prediction parameters (intra-frame prediction modes) selectable by each prediction block P in the coding block Bn .
图8是示出在li n=mi n=4的情况下生成预测块Pi n内的像素的预测值时使用的像素的一个例子的说明图。 FIG8 is an explanatory diagram showing an example of pixels used when generating predicted values of pixels in a prediction block Pin when lin = min = 4 .
图9是示出以预测块Pi n内的左上像素为原点的相对坐标的说明图。Figure 9 is an explanatory diagram showing relative coordinates with the upper left pixel in the prediction block Pin as the origin.
图10是示出垂直方向预测中的以往的为了计算对预测值相加的亮度值变化量而参照的左面的预测块的邻接像素的一个例子的说明图。FIG. 10 is an explanatory diagram showing an example of adjacent pixels of a left prediction block that are referred to in order to calculate the amount of change in luminance value added to a prediction value in conventional vertical prediction.
图11是示出垂直方向预测中的以往的对预测值相加的亮度值变化量的缩放值的一个例子的说明图。FIG. 11 is an explanatory diagram showing an example of a scaling value of a luminance value variation added to a prediction value in a conventional vertical prediction.
图12是示出水平方向预测中的以往的为了计算对预测值相加的亮度值变化量而参照的上面的预测块的邻接像素的一个例子的说明图。FIG. 12 is an explanatory diagram showing an example of adjacent pixels of an upper prediction block that are referred to in order to calculate the amount of change in luminance value added to a prediction value in conventional horizontal prediction.
图13是示出水平方向预测中的以往的对预测值相加的亮度值变化量的缩放值的一个例子的说明图。FIG. 13 is an explanatory diagram showing an example of a scaling value of a luminance value variation added to a prediction value in a conventional method of horizontal prediction.
图14是示出亮度的块尺寸是4×4像素的情况的帧内部预测模式的说明图。FIG. 14 is an explanatory diagram showing the intra prediction mode in a case where the block size of luminance is 4×4 pixels.
图15是示出通过水平方向预测而高精度地预测的预测图像的一个例子的说明图。FIG. 15 is an explanatory diagram showing an example of a predicted image predicted with high accuracy by horizontal prediction.
图16是示出在通过水平方向预测进行了预测时发生大的预测误差的一个例子的说明图。FIG. 16 is an explanatory diagram showing an example in which a large prediction error occurs when prediction is performed using horizontal prediction.
图17是示出编码块Bn内的各预测块Pi n可选择的帧内部预测参数(帧内部预测模式)的一个例子的说明图。FIG17 is an explanatory diagram showing an example of intra-frame prediction parameters (intra-frame prediction modes) selectable by each prediction block P in the coding block Bn .
(符号说明)(Explanation of Symbols)
1:块分割部(块分割单元);2:编码控制部(编码控制单元);3:切换开关;4:帧内部预测部(帧内部预测单元);5:运动补偿预测部(运动补偿预测单元);6:减法部(量化单元);7:变换/量化部(量化单元);8:逆量化/逆变换部;9:加法部;10:帧内部预测用存储器(帧内部预测单元);11:环路滤波器部;12:运动补偿预测帧存储器(运动补偿预测单元);13:可变长编码部(可变长编码单元);31:可变长解码部(可变长解码单元);32:逆量化/逆变换部(逆量化单元);33:切换开关;34:帧内部预测部(帧内部预测单元);35:运动补偿部(运动补偿预测单元);36:加法部;37:帧内部预测用存储器(帧内部预测单元);38:环路滤波器部;39:运动补偿预测帧存储器(运动补偿预测单元)。1: Block division unit (block division unit); 2: Coding control unit (coding control unit); 3: Switch; 4: Intra-frame prediction unit (intra-frame prediction unit); 5: Motion compensation prediction unit (motion compensation prediction unit); 6: Subtraction unit (quantization unit); 7: Transformation/quantization unit (quantization unit); 8: Inverse quantization/inverse transformation unit; 9: Addition unit; 10: Intra-frame prediction memory (intra-frame prediction unit); 11: Loop filter unit; 12: Motion compensation prediction frame memory (motion compensation prediction unit); Detection unit); 13: variable length coding unit (variable length coding unit); 31: variable length decoding unit (variable length decoding unit); 32: inverse quantization/inverse transform unit (inverse quantization unit); 33: switching switch; 34: intra-frame prediction unit (intra-frame prediction unit); 35: motion compensation unit (motion compensation prediction unit); 36: addition unit; 37: memory for intra-frame prediction (intra-frame prediction unit); 38: loop filter unit; 39: motion compensation prediction frame memory (motion compensation prediction unit).
具体实施方式DETAILED DESCRIPTION
以下,为了更详细地说明本发明,依照附图来说明用于实施本发明的方式。Hereinafter, in order to explain the present invention in more detail, embodiments of the present invention will be described with reference to the accompanying drawings.
实施方式1.Implementation method 1.
图1是示出本发明的实施方式1的运动图像编码装置的结构图。FIG1 is a diagram showing the structure of a moving picture encoding apparatus according to Embodiment 1 of the present invention.
在图1中,块分割部1实施如下处理:如果输入了表示输入图像的影像信号,则将该输入图像分割为由编码控制部2决定的最大尺寸的编码块即最大编码块,并且直至达到由编码控制部2决定的上限的层次数为止,将该最大编码块层次性地分割为各编码块。In Figure 1, the block division unit 1 performs the following processing: if an image signal representing an input image is input, the input image is divided into coding blocks of the maximum size determined by the coding control unit 2, that is, the maximum coding block, and until the upper limit of the number of levels determined by the coding control unit 2 is reached, the maximum coding block is hierarchically divided into each coding block.
即,块分割部1实施如下处理:根据由编码控制部2决定的分割而将输入图像分割为各编码块,并输出该编码块。另外,各编码块被分割为成为预测处理单位的一个或多个预测块。Specifically, the block division unit 1 divides the input image into coding blocks according to the division determined by the coding control unit 2 and outputs the coding blocks. Each coding block is divided into one or more prediction blocks serving as prediction processing units.
另外,块分割部1构成了块分割单元。In addition, the block division section 1 constitutes a block division unit.
编码控制部2实施如下处理:决定成为实施预测处理时的处理单位的编码块的最大尺寸,并且决定最大尺寸的编码块被层次性地分割时的上限的层次数,从而决定各个编码块的尺寸。The encoding control unit 2 determines the maximum size of a coding block that serves as a processing unit when performing prediction processing and determines the upper limit number of hierarchical divisions of the maximum-sized coding block, thereby determining the size of each coding block.
另外,编码控制部2实施如下处理:从可选择的1个以上的编码模式(1个以上的帧内部编码模式、1个以上的帧间编码模式)中,选择针对从块分割部1输出的编码块的编码效率最高的编码模式。Furthermore, the encoding control unit 2 performs processing for selecting a coding mode with the highest coding efficiency for the coding blocks output from the block division unit 1 from one or more selectable coding modes (one or more intra-frame coding modes and one or more inter-frame coding modes).
另外,编码控制部2实施如下处理:在编码效率最高的编码模式是帧内部编码模式的情况下,针对作为预测处理单位的每个预测块,决定在以该帧内部编码模式实施针对编码块的帧内部预测处理时所使用的帧内部预测参数,在编码效率最高的编码模式是帧间编码模式的情况下,针对作为预测处理单位的每个预测块,决定在以该帧间编码模式实施针对编码块的帧间预测处理时所使用的帧间预测参数。In addition, the coding control unit 2 implements the following processing: when the coding mode with the highest coding efficiency is the intra-frame coding mode, for each prediction block as the prediction processing unit, the frame intra prediction parameters used when the intra-frame prediction processing is implemented for the coding block in the intra-frame coding mode are determined; when the coding mode with the highest coding efficiency is the inter-frame coding mode, for each prediction block as the prediction processing unit, the frame inter prediction parameters used when the inter-frame prediction processing is implemented for the coding block in the inter-frame coding mode are determined.
而且,编码控制部2实施如下处理:决定对变换/量化部7以及逆量化/逆变换部8提供的预测差分编码参数。Furthermore, the encoding control unit 2 performs processing for determining prediction difference encoding parameters to be supplied to the transform/quantization unit 7 and the inverse quantization/inverse transform unit 8 .
另外,编码控制部2构成了编码控制单元。In addition, the encoding control unit 2 constitutes an encoding control unit.
切换开关3实施如下处理:如果由编码控制部2决定的编码模式是帧内部编码模式,则将从块分割部1输出的编码块输出到帧内部预测部4,如果由编码控制部2决定的编码模式是帧间编码模式,则将从块分割部1输出的编码块输出到运动补偿预测部5。The switching switch 3 implements the following processing: if the coding mode determined by the coding control unit 2 is the intra-frame coding mode, the coding block output from the block division unit 1 is output to the intra-frame prediction unit 4; if the coding mode determined by the coding control unit 2 is the inter-frame coding mode, the coding block output from the block division unit 1 is output to the motion compensation prediction unit 5.
帧内部预测部4实施如下处理:针对从切换开关3输出的编码块,按照作为预测处理单位的每个预测块,一边参照帧内部预测用存储器10中储存的局部解码图像,一边实施使用了由编码控制部2决定的帧内部预测参数的帧内部预测处理(帧内预测处理)来生成帧内部预测图像。The intra-frame prediction unit 4 performs the following processing: for the coding block output from the switching switch 3, according to each prediction block as the prediction processing unit, while referring to the local decoded image stored in the memory 10 for intra-frame prediction, an intra-frame prediction process (intra-frame prediction process) using the intra-frame prediction parameters determined by the encoding control unit 2 is performed to generate an intra-frame prediction image.
另外,帧内部预测部4在生成预测图像时的帧内预测处理是水平方向预测处理的情况下,对预测块的左面所邻接的像素的亮度值相加与预测块的上面所邻接的像素的水平方向的亮度值变化量成比例的值,将该相加后的值决定为预测图像的预测值,在生成预测图像时的帧内预测处理是垂直方向预测处理的情况下,对预测块的上面所邻接的像素的亮度值相加与预测块的左面所邻接的像素的垂直方向的亮度值变化量成比例的值,将该相加后的值决定为预测图像的预测值。In addition, when the intra-frame prediction processing when generating the predicted image is a horizontal prediction processing, the intra-frame prediction unit 4 adds a value proportional to the change in the horizontal brightness value of the pixel adjacent to the upper side of the prediction block to the brightness value of the pixel adjacent to the prediction block, and determines the added value as the predicted value of the predicted image. When the intra-frame prediction processing when generating the predicted image is a vertical prediction processing, the intra-frame prediction unit 4 adds a value proportional to the change in the vertical brightness value of the pixel adjacent to the upper side of the prediction block to the brightness value of the pixel adjacent to the prediction block, and determines the added value as the predicted value of the predicted image.
由帧内部预测部4以及帧内部预测用存储器10构成了帧内部预测单元。The intra prediction unit 4 and the intra prediction memory 10 constitute an intra prediction unit.
运动补偿预测部5实施如下处理:按照作为预测处理单位的预测块单位,比较从切换开关3输出的编码块和储存在运动补偿预测帧存储器12中的1帧以上的局部解码图像,来搜索运动矢量,并使用该运动矢量和由编码控制部2决定的帧间预测参数,按照预测块单位实施针对该编码块的帧间预测处理(运动补偿预测处理)而生成帧间预测图像。The motion compensation prediction unit 5 performs the following processing: according to the prediction block unit as the prediction processing unit, it compares the coding block output from the switching switch 3 and the local decoded image of more than one frame stored in the motion compensation prediction frame memory 12 to search for the motion vector, and uses the motion vector and the inter-frame prediction parameter determined by the encoding control unit 2 to perform inter-frame prediction processing (motion compensation prediction processing) on the coding block according to the prediction block unit to generate an inter-frame prediction image.
减法部6实施如下处理:从由块分割部1输出的编码块减去由帧内部预测部4生成的帧内部预测图像或者由运动补偿预测部5生成的帧间预测图像,将作为其相减结果的预测差分信号(差分图像)输出到变换/量化部7。The subtraction unit 6 performs the following processing: subtracts the intra-frame prediction image generated by the intra-frame prediction unit 4 or the inter-frame prediction image generated by the motion compensation prediction unit 5 from the coding block output by the block division unit 1, and outputs the predicted differential signal (differential image) as the subtraction result to the transformation/quantization unit 7.
变换/量化部7实施如下处理:参照由编码控制部2决定的预测差分编码参数,实施针对从减法部6输出的预测差分信号的正交变换处理(例如,DCT(离散余弦变换)、预先对特定的学习序列进行基底设计的KL变换等正交变换处理)来计算变换系数,并且参照该预测差分编码参数,对该变换系数进行量化,将作为量化后的变换系数的压缩数据输出到逆量化/逆变换部8以及可变长编码部13。The transform/quantization unit 7 performs the following processing: referring to the predicted differential coding parameters determined by the coding control unit 2, an orthogonal transform processing (for example, DCT (discrete cosine transform), orthogonal transform processing such as KL transform with a basis designed in advance for a specific learning sequence) is performed on the predicted differential signal output from the subtraction unit 6 to calculate the transform coefficient, and referring to the predicted differential coding parameters, the transform coefficient is quantized, and the compressed data as the quantized transform coefficient is output to the inverse quantization/inverse transform unit 8 and the variable length coding unit 13.
另外,由减法部6以及变换/量化部7构成了量化单元。Furthermore, the subtraction unit 6 and the transform/quantization unit 7 constitute a quantization unit.
逆量化/逆变换部8实施如下处理:参照由编码控制部2决定的预测差分编码参数,对从变换/量化部7输出的压缩数据进行逆量化,并且参照该预测差分编码参数,实施针对作为逆量化后的压缩数据的变换系数的逆正交变换处理,计算与从减法部6输出的预测差分信号相当的局部解码预测差分信号。The inverse quantization/inverse transform unit 8 performs the following processing: referring to the predicted differential coding parameters determined by the coding control unit 2, the compressed data output from the transform/quantization unit 7 is inversely quantized, and referring to the predicted differential coding parameters, an inverse orthogonal transform is performed on the transform coefficients of the compressed data after inverse quantization, and a local decoded predicted differential signal equivalent to the predicted differential signal output from the subtraction unit 6 is calculated.
加法部9实施如下处理:将由逆量化/逆变换部8计算出的局部解码预测差分信号、与由帧内部预测部4生成的帧内部预测图像或者由运动补偿预测部5生成的帧间预测图像进行相加,来计算与从块分割部1输出的编码块相当的局部解码图像。The addition unit 9 performs the following processing: adding the local decoded prediction differential signal calculated by the inverse quantization/inverse transform unit 8 and the intra-frame prediction image generated by the intra-frame prediction unit 4 or the inter-frame prediction image generated by the motion compensation prediction unit 5 to calculate a local decoded image equivalent to the coding block output from the block division unit 1.
帧内部预测用存储器10是储存由加法部9计算出的局部解码图像的记录介质。The intra-frame prediction memory 10 is a recording medium that stores the local decoded image calculated by the adding unit 9 .
环路滤波器部11实施如下处理:对由加法部9计算出的局部解码图像实施规定的滤波处理,输出滤波处理后的局部解码图像。The loop filter unit 11 performs a predetermined filtering process on the local decoded image calculated by the adder unit 9 and outputs the filtered local decoded image.
运动补偿预测帧存储器12是储存滤波处理后的局部解码图像的记录介质。The motion-compensated prediction frame memory 12 is a recording medium that stores the local decoded image after the filtering process.
可变长编码部13实施如下处理:对从变换/量化部7输出的压缩数据、编码控制部2的输出信号(最大编码块内的块分割信息、编码模式、预测差分编码参数、帧内部预测参数或者帧间预测参数)、以及从运动补偿预测部5输出的运动矢量(编码模式是帧间编码模式的情况)进行可变长编码,而生成比特流。The variable length coding unit 13 performs the following processing: variable length coding is performed on the compressed data output from the transform/quantization unit 7, the output signal of the coding control unit 2 (block segmentation information within the maximum coding block, coding mode, prediction differential coding parameters, intra-frame prediction parameters or inter-frame prediction parameters), and the motion vector output from the motion compensation prediction unit 5 (when the coding mode is the inter-frame coding mode) to generate a bit stream.
另外,可变长编码部13构成了可变长编码单元。In addition, the variable length coding unit 13 constitutes a variable length coding unit.
在图1的例子中,设想作为运动图像编码装置的构成要素的块分割部1、编码控制部2、切换开关3、帧内部预测部4、运动补偿预测部5、减法部6、变换/量化部7、逆量化/逆变换部8、加法部9、帧内部预测用存储器10、环路滤波器部11、运动补偿预测帧存储器12以及可变长编码部13的各个由专用的硬件(例如,安装了CPU的半导体集成电路、单片式微型计算机等)构成的例子,但在运动图像编码装置由计算机构成的情况下,也可以将记述了块分割部1、编码控制部2、切换开关3、帧内部预测部4、运动补偿预测部5、减法部6、变换/量化部7、逆量化/逆变换部8、加法部9、环路滤波器部11以及可变长编码部13的处理内容的程序储存到计算机的存储器中,并由该计算机的CPU执行该存储器中储存的程序。In the example of FIG. 1 , it is assumed that the block division unit 1, encoding control unit 2, switch 3, intra-frame prediction unit 4, motion-compensated prediction unit 5, subtraction unit 6, transform/quantization unit 7, inverse quantization/inverse transform unit 8, addition unit 9, intra-frame prediction memory 10, loop filter unit 11, motion-compensated prediction frame memory 12, and variable-length coding unit 13, which are components of the moving picture coding apparatus, are each configured by dedicated hardware (e.g., a semiconductor integrated circuit or a single-chip microcomputer having a CPU mounted thereon). However, if the moving picture coding apparatus is configured by a computer, a program describing the processing details of the block division unit 1, encoding control unit 2, switch 3, intra-frame prediction unit 4, motion-compensated prediction unit 5, subtraction unit 6, transform/quantization unit 7, inverse quantization/inverse transform unit 8, addition unit 9, loop filter unit 11, and variable-length coding unit 13 may be stored in a memory of the computer, and the program stored in the memory may be executed by the CPU of the computer.
图2是示出本发明的实施方式1的运动图像编码装置的处理内容(运动图像编码方法)的流程图。FIG2 is a flowchart showing the processing contents (moving picture encoding method) of the moving picture encoding apparatus according to Embodiment 1 of the present invention.
图3是示出本发明的实施方式1的运动图像解码装置的结构图。FIG3 is a diagram showing the configuration of the moving picture decoding apparatus according to Embodiment 1 of the present invention.
在图3中,可变长解码部31实施如下处理:如果输入了由图1的运动图像编码装置生成的比特流,则从该比特流,对压缩数据、块分割信息、编码模式、帧内部预测参数(编码模式是帧内部编码模式的情况)、帧间预测参数(编码模式是帧间编码模式的情况)、预测差分编码参数以及运动矢量(编码模式是帧间编码模式的情况)进行可变长解码。In Figure 3, the variable length decoding unit 31 implements the following processing: if the bit stream generated by the motion image encoding device of Figure 1 is input, the compressed data, block division information, coding mode, intra-frame prediction parameters (when the coding mode is intra-frame coding mode), inter-frame prediction parameters (when the coding mode is inter-frame coding mode), predicted differential coding parameters and motion vectors (when the coding mode is inter-frame coding mode) are variable-length decoded from the bit stream.
另外,可变长解码部31构成了可变长解码单元。In addition, the variable length decoding unit 31 constitutes a variable length decoding means.
逆量化/逆变换部32实施如下处理:参照由可变长解码部31可变长解码了的预测差分编码参数,对由可变长解码部31可变长解码了的压缩数据进行逆量化,并且参照该预测差分编码参数来实施针对作为逆量化后的压缩数据的变换系数的逆正交变换处理,计算与从图1的逆量化/逆变换部8输出的局部解码预测差分信号相同的解码预测差分信号。The inverse quantization/inverse transform unit 32 performs the following processing: referring to the prediction differential coding parameters variable-length decoded by the variable-length decoding unit 31, inverse quantizing the compressed data variable-length decoded by the variable-length decoding unit 31, and performing inverse orthogonal transform processing on the transform coefficients of the compressed data after inverse quantization with reference to the prediction differential coding parameters, and calculating a decoded prediction differential signal that is the same as the locally decoded prediction differential signal output from the inverse quantization/inverse transform unit 8 of Figure 1.
另外,逆量化/逆变换部32构成了逆量化单元。In addition, the inverse quantization/inverse transformation unit 32 constitutes an inverse quantization unit.
切换开关33实施如下处理:如果由可变长解码部31可变长解码了的编码模式是帧内部编码模式,则将由可变长解码部31可变长解码了的帧内部预测参数输出到帧内部预测部34,如果由可变长解码部31可变长解码了的编码模式是帧间编码模式,则将由可变长解码部31可变长解码了的帧间预测参数以及运动矢量输出到运动补偿部35。The switching switch 33 implements the following processing: if the coding mode variable-length decoded by the variable length decoding unit 31 is the intra-frame coding mode, the intra-frame prediction parameters variable-length decoded by the variable length decoding unit 31 are output to the intra-frame prediction unit 34; if the coding mode variable-length decoded by the variable length decoding unit 31 is the inter-frame coding mode, the inter-frame prediction parameters and motion vector variable-length decoded by the variable length decoding unit 31 are output to the motion compensation unit 35.
帧内部预测部34实施如下处理:针对根据由可变长解码部31可变长解码了的块分割信息以及编码模式而确定的解码块(与图1的运动图像编码装置的“编码块”相当的块),按照作为预测处理单位的每个预测块,一边参照帧内部预测用存储器37中储存的解码图像,一边实施使用了从切换开关33输出的帧内部预测参数的帧内部预测处理(帧内预测处理)而生成帧内部预测图像。The intra-frame prediction unit 34 performs the following processing: for the decoding block (a block equivalent to the "coding block" of the motion image encoding device in Figure 1) determined based on the block segmentation information and the encoding mode variable-length decoded by the variable-length decoding unit 31, for each prediction block as a prediction processing unit, while referring to the decoded image stored in the intra-frame prediction memory 37, an intra-frame prediction process (intra-frame prediction process) using the intra-frame prediction parameters output from the switching switch 33 is performed to generate an intra-frame prediction image.
另外,帧内部预测部34在生成预测图像时的帧内预测处理是水平方向预测处理的情况下,对预测块的左面所邻接的像素的亮度值相加与预测块的上面所邻接的像素的水平方向的亮度值变化量成比例的值,将该相加后的值决定为预测图像的预测值,在生成预测图像时的帧内预测处理是垂直方向预测处理的情况下,对预测块的上面所邻接的像素的亮度值相加与预测块的左面所邻接的像素的垂直方向的亮度值变化量成比例的值,将该相加后的值决定为预测图像的预测值。In addition, when the intra-frame prediction processing when generating the predicted image is a horizontal prediction processing, the intra-frame prediction unit 34 adds a value proportional to the change in the horizontal brightness value of the pixel adjacent to the upper side of the prediction block to the brightness value of the pixel adjacent to the left of the prediction block, and determines the added value as the predicted value of the predicted image. When the intra-frame prediction processing when generating the predicted image is a vertical prediction processing, the intra-frame prediction unit 34 adds a value proportional to the change in the vertical brightness value of the pixel adjacent to the upper side of the prediction block to the brightness value of the pixel adjacent to the left of the prediction block, and determines the added value as the predicted value of the predicted image.
由帧内部预测部34以及帧内部预测用存储器37构成了帧内部预测单元。The intra prediction unit 34 and the intra prediction memory 37 constitute an intra prediction unit.
运动补偿部35实施如下处理:针对根据由可变长解码部31可变长解码了的块分割信息以及编码模式而确定的解码块,按照作为预测处理单位的每个预测块,一边参照运动补偿预测帧存储器39中储存的解码图像,一边实施使用了从切换开关33输出的运动矢量和帧间预测参数的帧间预测处理(运动补偿预测处理)而生成帧间预测图像。The motion compensation unit 35 performs the following processing: for the decoded blocks determined based on the block segmentation information and the encoding mode variable-length decoded by the variable-length decoding unit 31, according to each prediction block as a prediction processing unit, while referring to the decoded image stored in the motion compensation prediction frame memory 39, an inter-frame prediction process (motion compensation prediction process) using the motion vector and inter-frame prediction parameters output from the switching switch 33 is performed to generate an inter-frame prediction image.
加法部36实施如下处理:将由逆量化/逆变换部32计算出的解码预测差分信号、与由帧内部预测部34生成的帧内部预测图像或者由运动补偿部35生成的帧间预测图像进行相加,计算与从图1的加法部9输出的局部解码图像相同的解码图像。The addition unit 36 performs the following processing: adding the decoded prediction differential signal calculated by the inverse quantization/inverse transformation unit 32 and the intra-frame prediction image generated by the intra-frame prediction unit 34 or the inter-frame prediction image generated by the motion compensation unit 35 to calculate a decoded image that is the same as the local decoded image output from the addition unit 9 in Figure 1.
帧内部预测用存储器37是储存由加法部36计算出的解码图像的记录介质。The intra-frame prediction memory 37 is a recording medium that stores the decoded image calculated by the adder 36 .
环路滤波器部38实施如下处理:对由加法部36计算出的解码图像实施规定的滤波处理,输出滤波处理后的解码图像。The loop filter unit 38 performs a predetermined filtering process on the decoded image calculated by the adder unit 36 and outputs the decoded image after the filtering process.
运动补偿预测帧存储器39是储存滤波处理后的解码图像的记录介质。The motion compensation prediction frame memory 39 is a recording medium that stores decoded images after filtering.
在图3的例子中,设想作为运动图像解码装置的构成要素的可变长解码部31、逆量化/逆变换部32、切换开关33、帧内部预测部34、运动补偿部35、加法部36、帧内部预测用存储器37、环路滤波器部38以及运动补偿预测帧存储器39的各个由专用的硬件(例如,安装了CPU的半导体集成电路、单片式微型计算机等)构成的例子,但在运动图像解码装置由计算机构成的情况下,也可以将记述了可变长解码部31、逆量化/逆变换部32、切换开关33、帧内部预测部34、运动补偿部35、加法部36以及环路滤波器部38的处理内容的程序储存到计算机的存储器中,并由该计算机的CPU执行该存储器中储存的程序。In the example of FIG. 3 , it is assumed that the variable length decoding unit 31, the inverse quantization/inverse transform unit 32, the switch 33, the intra-frame prediction unit 34, the motion compensation unit 35, the addition unit 36, the intra-frame prediction memory 37, the loop filter unit 38, and the motion-compensated prediction frame memory 39, which are components of the moving picture decoding device, are each configured by dedicated hardware (e.g., a semiconductor integrated circuit or a single-chip microcomputer having a CPU mounted thereon). However, if the moving picture decoding device is configured by a computer, a program describing the processing contents of the variable length decoding unit 31, the inverse quantization/inverse transform unit 32, the switch 33, the intra-frame prediction unit 34, the motion compensation unit 35, the addition unit 36, and the loop filter unit 38 may be stored in a memory of the computer, and the program stored in the memory may be executed by the CPU of the computer.
图4是示出本发明的实施方式1的运动图像解码装置的处理内容(运动图像解码方法)的流程图。FIG4 is a flowchart showing the processing contents (moving picture decoding method) of the moving picture decoding device according to Embodiment 1 of the present invention.
接下来,说明动作。Next, the operation will be explained.
在该实施方式1中,说明运动图像编码装置和运动图像解码装置,其中,所述运动图像编码装置将影像的各帧图像作为输入图像,实施基于已编码的附近像素的帧内部预测或者邻近帧间的运动补偿预测,针对所得到的预测差分信号实施基于正交变换/量化的压缩处理,之后进行可变长编码来生成比特流,所述运动图像解码装置对从该运动图像编码装置输出的比特流进行解码。In this embodiment 1, a motion image encoding device and a motion image decoding device are described, wherein the motion image encoding device takes each frame image of the image as an input image, implements intra-frame prediction based on encoded nearby pixels or motion compensation prediction between adjacent frames, implements compression processing based on orthogonal transform/quantization on the obtained prediction differential signal, and then performs variable-length encoding to generate a bit stream, and the motion image decoding device decodes the bit stream output from the motion image encoding device.
图1的运动图像编码装置的特征在于,适应于影像信号的空间/时间方向的局部性的变化,将影像信号分割为各种尺寸的块,来进行帧内/帧间自适应编码。The moving picture encoding apparatus of FIG. 1 is characterized in that it divides the video signal into blocks of various sizes and performs intra-frame/inter-frame adaptive encoding in response to local changes in the spatial and temporal directions of the video signal.
一般,影像信号具有信号的复杂度在空间/时间上局部地变化的特性。在空间上观察时,有时在某个影像帧上,例如既有在天空、壁等那样的比较宽的图像区域中具有均匀的信号特性的图样,也混合存在人物或包含细微的纹理的绘画等在小的图像区域内具有复杂的纹理图案的图样。In general, image signals have the characteristic of locally varying signal complexity in space and time. When viewed spatially, within a given image frame, there may be patterns with uniform signal characteristics across relatively wide image regions, such as the sky or a wall, but also patterns with complex texture patterns within smaller image regions, such as figures or paintings with subtle textures.
即使在时间上观察,虽然关于天空、壁,局部性地时间方向的图样的变化小,但关于活动的人物、物体,由于其轮廓在时间上进行刚体/非刚体的运动,所以时间上的变化大。Even when observing over time, although the local changes in the time direction of the pattern of the sky and the wall are small, the changes over time of moving people and objects are large because their outlines undergo rigid/non-rigid motion over time.
在编码处理中,进行通过时间/空间上的预测来生成信号功率或熵小的预测差分信号从而削减整体的符号量的处理,但只要能够将预测中使用的参数均匀地应用于尽可能大的图像信号区域,就能够减小该参数的符号量。In the encoding process, a prediction differential signal with low signal power or entropy is generated through temporal/spatial prediction to reduce the overall symbol amount. However, as long as the parameters used in the prediction can be evenly applied to the largest possible image signal area, the symbol amount of the parameter can be reduced.
另一方面,如果针对时间上/空间上变化大的图像信号图案,将同一预测参数应用于大的图像区域,则预测的错误增加,所以预测差分信号的符号量增加。On the other hand, if the same prediction parameters are applied to a large image area for an image signal pattern that varies greatly temporally and spatially, prediction errors increase, and thus the code amount of the prediction difference signal increases.
因此,在时间上/空间上变化大的区域中,优选减小应用同一预测参数来进行预测处理的块尺寸,增加预测中使用的参数的数据量,降低预测差分信号的功率/熵。Therefore, in areas with large temporal/spatial variations, it is preferable to reduce the block size for prediction processing using the same prediction parameters, increase the amount of data of the parameters used in the prediction, and reduce the power/entropy of the prediction differential signal.
在该实施方式1中,为了进行与这样的影像信号的一般的性质适应的编码,采用如下结构:最初从规定的最大块尺寸开始预测处理等,层次性地分割影像信号的区域,针对所分割的每个区域,使预测处理、其预测差分的编码处理自适应化。In this embodiment 1, in order to perform encoding that is adapted to the general properties of such image signals, the following structure is adopted: the prediction processing is initially started from a specified maximum block size, the image signal area is hierarchically divided, and for each divided area, the prediction processing and the encoding processing of its prediction difference are adapted.
关于图1的运动图像编码装置设为处理对象的影像信号格式,除了由亮度信号和2个色差信号构成的YUV信号、从数字摄像元件输出的RGB信号等任意的颜色空间的彩色影像信号以外,还设为单色图像信号、红外线图像信号等影像帧由水平和垂直二维的数字采样(像素)列构成的任意的影像信号。Regarding the motion image encoding device in Figure 1, the image signal format of the processing object is set to be, in addition to color image signals of arbitrary color spaces such as YUV signals composed of a luminance signal and two color difference signals, RGB signals output from a digital camera element, etc., it is also set to arbitrary image signals such as monochrome image signals and infrared image signals whose image frames are composed of horizontal and vertical two-dimensional digital sampling (pixel) columns.
其中,各像素的灰度既可以是8比特,也可以是10比特、12比特等灰度。The grayscale of each pixel can be 8 bits, 10 bits, 12 bits, etc.
在以下的说明中,为了方便,只要没有特别说明,就说明设为输入图像的影像信号是YUV信号、并且处理2个色差分量U、V相对亮度分量Y被子采样了的4:2:0格式的信号的情况。For convenience, in the following description, unless otherwise specified, it is assumed that the video signal of the input image is a YUV signal, and a 4:2:0 format signal in which the two color difference components U and V are subsampled relative to the luminance component Y is processed.
另外,将与影像信号的各帧对应的处理数据单位称为“图片”。In addition, a processing data unit corresponding to each frame of a video signal is referred to as a "picture".
在该实施方式1中,将“图片”设为依次扫描(逐行扫描)了的影像帧信号而进行说明,但在影像信号是隔行扫描信号的情况下,“图片”也可以是作为构成影像帧的单位的场图像信号。In this first embodiment, the "picture" is described as an image frame signal scanned sequentially (progressive scanning), but when the image signal is an interlaced scanning signal, the "picture" can also be a field image signal that is a unit constituting an image frame.
最初,说明图1的运动图像编码装置的处理内容。First, the processing contents of the moving picture encoding apparatus in FIG. 1 will be described.
首先,编码控制部2决定成为编码对象的图片(当前图片)的编码中使用的最大编码块的尺寸、和对最大编码块进行层次分割的层次数的上限(图2的步骤ST1)。First, the encoding control unit 2 determines the size of the maximum coding block used for encoding the picture to be encoded (current picture) and the upper limit of the number of hierarchical divisions of the maximum coding block (step ST1 in FIG. 2 ).
作为最大编码块的尺寸的决定方法,例如既可以根据输入图像的影像信号的分辨率而对所有图片决定同一尺寸,也可以将输入图像的影像信号的局部性的运动的复杂度的差异作为参数而进行定量化,对于运动剧烈的图片决定小的尺寸,另一方面对于运动少的图片决定大的尺寸。As a method for determining the size of the maximum coding block, for example, the same size can be determined for all pictures based on the resolution of the image signal of the input image, or the difference in the complexity of the local motion of the image signal of the input image can be quantified as a parameter, and a small size can be determined for pictures with intense motion, and a large size can be determined for pictures with less motion.
作为分割层次数的上限的决定方法,例如有根据输入图像的影像信号的分辨率针对所有图片决定同一层次数的方法、或在输入图像的影像信号的运动剧烈的情况下设定为增大层次数而能够检测更细微的运动且在运动少的情况下设定为抑制层次数的方法等。As a method for determining the upper limit of the number of segmentation levels, there is a method of determining the same number of levels for all pictures based on the resolution of the image signal of the input image, or a method of setting the number of levels to be increased when the motion of the image signal of the input image is intense so as to be able to detect more subtle motion, and setting the number of levels to be suppressed when the motion is small.
另外,编码控制部2从可利用的1个以上的编码模式中选择与层次性地分割的各个编码块对应的编码模式(步骤ST2)。Furthermore, the encoding control unit 2 selects an encoding mode corresponding to each hierarchically divided encoding block from one or more available encoding modes (step ST2 ).
即,编码控制部2针对最大编码块尺寸的每个图像区域,直至达到预先决定的分割层次数的上限为止,层次性地分割为具有编码块尺寸的编码块,决定针对各个编码块的编码模式。That is, the encoding control unit 2 hierarchically divides each image region of the maximum encoding block size into encoding blocks having the encoding block size until the upper limit of the number of division levels determined in advance is reached, and determines the encoding mode for each encoding block.
在编码模式中有一个或多个帧内部编码模式(总称为“INTRA”)、和一个或多个帧间编码模式(总称为“INTER”),编码控制部2从在该图片中可利用的所有编码模式或者其子集中,选择与各个编码块对应的编码模式。Among the coding modes, there are one or more intra-frame coding modes (collectively referred to as "INTRA") and one or more inter-frame coding modes (collectively referred to as "INTER"). The coding control unit 2 selects the coding mode corresponding to each coding block from all coding modes available in the picture or a subset thereof.
其中,由后述块分割部1层次性地分割的各个编码块被进一步分割为作为进行预测处理的单位的一个或多个预测块,预测块的分割状态也作为信息而被包含于编码模式中。Each coding block hierarchically divided by a block division unit 1 described later is further divided into one or more prediction blocks as units for performing prediction processing, and the division status of the prediction blocks is also included as information in the coding mode.
编码控制部2的编码模式的选择方法是公知的技术,所以省略详细的说明,例如有如下方法等:使用可利用的任意的编码模式来实施针对编码块的编码处理而验证编码效率,在可利用的多个编码模式中选择编码效率最佳的编码模式。The method for selecting the coding mode of the coding control unit 2 is a well-known technology, so detailed description is omitted. For example, there are the following methods: use any available coding mode to implement coding processing for the coding block to verify the coding efficiency, and select the coding mode with the best coding efficiency from multiple available coding modes.
另外,编码控制部2针对各个编码块的每一个,决定在压缩差分图像时使用的量化参数以及变换块尺寸,并且决定在实施预测处理时使用的预测参数(帧内部预测参数或者帧间预测参数)。Furthermore, the encoding control unit 2 determines, for each encoding block, a quantization parameter and a transform block size used when compressing a differential image, and determines prediction parameters (intra-frame prediction parameters or inter-frame prediction parameters) used when performing a prediction process.
其中,在编码块进一步被分割为进行预测处理的预测块单位的情况下,能够针对每个预测块选择预测参数(帧内部预测参数或者帧间预测参数)。When the coding block is further divided into prediction block units for performing prediction processing, prediction parameters (intra-frame prediction parameters or inter-frame prediction parameters) can be selected for each prediction block.
进而,在编码模式是帧内部编码模式的编码块中,由于在如后所述那样进行帧内部预测处理时使用与预测块邻接的已编码的像素,所以需要按照预测块单位进行编码,所以可选择的变换块尺寸被限制为预测块的尺寸以下。Furthermore, in a coding block whose coding mode is the intra-frame coding mode, since the encoded pixels adjacent to the prediction block are used when performing intra-frame prediction processing as described later, encoding needs to be performed in units of prediction blocks, so the selectable transform block size is limited to be less than the size of the prediction block.
编码控制部2将包括量化参数以及变换块尺寸的预测差分编码参数输出到变换/量化部7、逆量化/逆变换部8以及可变长编码部13。The encoding control unit 2 outputs the prediction difference encoding parameters including the quantization parameter and the transform block size to the transform/quantization unit 7 , the inverse quantization/inverse transform unit 8 , and the variable length encoding unit 13 .
另外,编码控制部2将帧内部预测参数根据需要而输出到帧内部预测部4。Furthermore, the encoding control unit 2 outputs the intra prediction parameters to the intra prediction unit 4 as needed.
另外,编码控制部2将帧间预测参数根据需要而输出到运动补偿预测部5。Furthermore, the encoding control unit 2 outputs the inter-frame prediction parameters to the motion compensation prediction unit 5 as needed.
如果输入了输入图像的影像信号,则块分割部1将该输入图像的影像信号分割为由编码控制部2决定的最大编码块尺寸,进而将分割了的最大编码块层次性地分割为由编码控制部2决定的编码块,并输出该编码块。If the image signal of the input image is input, the block division unit 1 divides the image signal of the input image into the maximum coding block size determined by the coding control unit 2, and further hierarchically divides the divided maximum coding block into coding blocks determined by the coding control unit 2, and outputs the coding blocks.
此处,图5是示出最大编码块被层次性地分割为多个编码块的例子的说明图。Here, FIG5 is an explanatory diagram showing an example in which a maximum coding block is hierarchically divided into a plurality of coding blocks.
在图5中,最大编码块是被记载为“第0层次”的亮度分量具有(L0,M0)的尺寸的编码块。In FIG5 , the largest coding block is a coding block having a size of (L 0 , M 0 ) for the luminance component described as “layer 0”.
将最大编码块设为出发点,直至利用四叉树构造另行决定的规定的深度为止,层次性地进行分割,从而得到编码块。The largest coding block is used as a starting point, and coding blocks are obtained by hierarchically dividing the block up to a predetermined depth determined separately using a quadtree structure.
在深度n中,编码块是尺寸(Ln,Mn)的图像区域。At depth n, a coding block is an image region of size ( Ln , Mn ).
其中,Ln和Mn既可以相同,也可以不同,但在图5中示出了Ln=Mn的情形。 Ln and Mn may be the same or different, but FIG. 5 shows the case where Ln = Mn .
以后,将由编码控制部2决定的编码块尺寸定义为编码块的亮度分量中的尺寸(Ln,Mn)。Hereinafter, the coding block size determined by the coding control unit 2 is defined as the size (L n , M n ) of the luminance component of the coding block.
由于进行四叉树分割,所以(Ln+1,Mn+1)=(Ln/2,Mn/2)始终成立。Since quadtree partitioning is performed, (Ln +1 , Mn +1 ) = ( Ln /2, Mn /2) always holds.
另外,在RGB信号等所有颜色分量具有同一采样数的彩色影像信号(4:4:4格式)中,所有颜色分量的尺寸成为(Ln,Mn),但在处理4:2:0格式的情况下,所对应的色差分量的编码块尺寸成为(Ln/2,Mn/2)。Furthermore, in a color video signal (4:4:4 format) such as an RGB signal where all color components have the same number of samples, the size of all color components is ( Ln , Mn ). However, when processing the 4:2:0 format, the encoding block size of the corresponding color difference component is ( Ln /2, Mn /2).
以后,设为用Bn来表示第n层次的编码块,用m(Bn)来表示在编码块Bn中可选择的编码模式。Hereinafter, it is assumed that Bn represents the coding block of the nth layer, and m( Bn ) represents the coding mode selectable in the coding block Bn .
在由多个颜色分量构成的彩色影像信号的情况下,编码模式m(Bn)既可以构成为针对每个颜色分量分别使用单独的模式,也可以构成为针对所有颜色分量使用共同的模式。以后,只要没有特别说明,就指与YUV信号、4:2:0格式的编码块的亮度分量对应的编码模式而进行说明。In the case of a color video signal composed of multiple color components, the coding mode m(B n ) can be configured to use a separate mode for each color component or a common mode for all color components. Unless otherwise specified, the following description refers to the coding mode corresponding to the luma component of a YUV signal and a coding block in the 4:2:0 format.
编码块Bn如图6所示,通过块分割部1而被分割为表示预测处理单位的一个或多个预测块。As shown in FIG6 , the coding block Bn is divided by the block division unit 1 into one or more prediction blocks representing prediction processing units.
以后,将属于编码块Bn的预测块记载为Pi n(i是第n层次中的预测块编号)。图5示出P0 0和P1 0的一个例子。Hereinafter, the prediction block belonging to the coding block Bn will be referred to as P in (i is the prediction block number in the nth layer). FIG5 shows an example of P00 and P10 .
在编码模式m(Bn)中作为信息而包含有如何进行编码块Bn的预测块分割。Coding mode m(B n ) includes information on how to perform prediction block division of coding block B n .
关于预测块Pi n,全部依照编码模式m(Bn)进行预测处理,但能够针对每个预测块Pi n,选择单独的预测参数(帧内部预测参数或者帧间预测参数)。Regarding all prediction blocks Pin , prediction processing is performed according to the coding mode m( Bn ), but individual prediction parameters (intra-frame prediction parameters or inter-frame prediction parameters) can be selected for each prediction block Pin .
编码控制部2针对最大编码块,例如生成图6所示那样的块分割状态来确定编码块。The encoding control unit 2 generates a block division state as shown in FIG. 6 , for example, for the largest encoding block, and determines the encoding blocks.
图6(a)的虚线所包围的矩形表示各编码块,各编码块内存在的用斜线涂覆的块表示各预测块的分割状态。The rectangles surrounded by dotted lines in FIG6(a) represent coding blocks, and the blocks filled with diagonal lines within each coding block represent the division status of each prediction block.
图6(b)是关于图6(a)的例子利用四叉树图形表示了通过层次分割来分配编码模式m(Bn)的状况的图。图6(b)的□所包围的节点是分配了编码模式m(Bn)的节点(编码块)。Fig. 6(b) shows the allocation of coding mode m( Bn ) by hierarchical partitioning using a quadtree graph in the example of Fig. 6(a). Nodes surrounded by squares in Fig. 6(b) are nodes (coding blocks) to which coding mode m( Bn ) is allocated.
该四叉树图形的信息与编码模式m(Bn)一起从编码控制部2输出到可变长编码部13而被复用到比特流。The information on the quadtree pattern is output from the encoding control unit 2 to the variable-length encoding unit 13 together with the encoding mode m(B n ) and multiplexed into the bit stream.
切换开关3在由编码控制部2决定的编码模式m(Bn)是帧内部编码模式的情况(m(Bn)∈INTRA的情况)下,将从块分割部1输出的编码块Bn输出到帧内部预测部4。When the coding mode m(B n ) determined by the coding control unit 2 is the intra coding mode (m(B n )∈INTRA), the switch 3 outputs the coding block B n output from the block division unit 1 to the intra prediction unit 4 .
另一方面,在由编码控制部2决定的编码模式m(Bn)是帧间编码模式的情况(m(Bn)∈INTER的情况)下,将从块分割部1输出的编码块Bn输出到运动补偿预测部5。On the other hand, when the coding mode m(B n ) determined by the coding control unit 2 is the inter-coding mode (m(B n )∈INTER), the coding block B n output from the block division unit 1 is output to the motion compensation prediction unit 5 .
在帧内部预测部4中,如果由编码控制部2决定的编码模式m(Bn)是帧内部编码模式(m(Bn)∈INTRA的情况),且从切换开关3接收到编码块Bn(步骤ST3),则一边参照帧内部预测用存储器10中储存的局部解码图像,一边使用由编码控制部2决定的帧内部预测参数,来实施针对该编码块Bn内的各预测块Pi n的帧内部预测处理而生成帧内部预测图像PINTRAi n(步骤ST4)。In the intra-frame prediction unit 4, if the coding mode m( Bn ) determined by the coding control unit 2 is the intra-frame coding mode (in the case where m( Bn )∈INTRA) and the coding block Bn is received from the switch 3 (step ST3), the intra-frame prediction unit 4 performs intra-frame prediction processing on each prediction block P in the coding block Bn using the intra-frame prediction parameters determined by the coding control unit 2 while referring to the local decoded image stored in the intra- frame prediction memory 10 , thereby generating an intra-frame prediction image P INTRAi n (step ST4).
另外,运动图像解码装置需要生成与帧内部预测图像PINTRAi n完全相同的帧内部预测图像,所以帧内部预测图像PINTRAi n的生成中使用的帧内部预测参数从编码控制部2输出到可变长编码部13而被复用到比特流。In addition, the motion picture decoding device needs to generate an intra-frame prediction image that is completely identical to the intra-frame prediction image P INTRAi n , so the intra-frame prediction parameters used in generating the intra-frame prediction image P INTRAi n are output from the encoding control unit 2 to the variable length encoding unit 13 and multiplexed into the bit stream.
在后面详细叙述帧内部预测部4的处理内容。The details of the processing performed by the intra-frame prediction unit 4 will be described later.
在运动补偿预测部5中,如果由编码控制部2决定的编码模式m(Bn)是帧间编码模式(m(Bn)∈INTER的情况),且从切换开关3接收到编码块Bn(步骤ST3),则比较该编码块Bn内的各预测块Pi n和运动补偿预测帧存储器12中储存的滤波处理后的局部解码图像来搜索运动矢量,使用该运动矢量和由编码控制部2决定的帧间预测参数,实施针对该编码块Bn内的各预测块Pi n的帧间预测处理,生成帧间预测图像PINTERi n(步骤ST5)。In the motion-compensated prediction unit 5, if the coding mode m( Bn ) determined by the coding control unit 2 is the inter-frame coding mode (in the case where m( Bn )∈INTER), and the coding block Bn is received from the switching switch 3 (step ST3), each prediction block P in the coding block Bn is compared with the filtered local decoded image stored in the motion-compensated prediction frame memory 12 to search for a motion vector. Then, using the motion vector and the inter-frame prediction parameters determined by the coding control unit 2, inter-frame prediction processing is performed on each prediction block P in the coding block Bn to generate an inter-frame prediction image PINTERi n (step ST5).
另外,运动图像解码装置需要生成与帧间预测图像PINTERi n完全相同的帧间预测图像,所以帧间预测图像PINTERi n的生成中使用的帧间预测参数从编码控制部2输出到可变长编码部13而被复用到比特流。Furthermore, the moving picture decoding apparatus needs to generate an inter-frame prediction image identical to the inter-frame prediction image PINTERi n , so the inter-frame prediction parameters used in generating the inter-frame prediction image PINTERi n are output from the encoding control unit 2 to the variable-length encoding unit 13 and multiplexed into the bitstream.
另外,由运动补偿预测部5搜索到的运动矢量也输出到可变长编码部13而被复用到比特流。In addition, the motion vector searched by the motion compensation prediction unit 5 is also output to the variable length coding unit 13 and multiplexed into the bit stream.
减法部6如果从块分割部1接收到编码块Bn,则从该编码块Bn内的预测块Pi n减去由帧内部预测部4生成的帧内部预测图像PINTRAi n或者由运动补偿预测部5生成的帧间预测图像PINTERi n中的某一方,将作为其相减结果的预测差分信号ei n输出到变换/量化部7(步骤ST6)。Upon receiving the coding block Bn from the block partitioning unit 1, the subtraction unit 6 subtracts either the intra- frame prediction image P INTRAi n generated by the intra-frame prediction unit 4 or the inter-frame prediction image P INTERi n generated by the motion-compensated prediction unit 5 from the prediction block P in the coding block Bn , and outputs a prediction difference signal e in which the subtraction result is obtained to the transform/quantization unit 7 (step ST6).
变换/量化部7如果从减法部6接收到预测差分信号ei n,则参照由编码控制部2决定的预测差分编码参数,实施针对该预测差分信号ei n的正交变换处理(例如,DCT(离散余弦变换)、对预先确定的学习序列进行了基底设计的KL变换等正交变换处理),计算变换系数。Upon receiving the prediction differential signal e in from the subtraction unit 6, the transform/quantization unit 7 performs an orthogonal transform process (e.g., DCT (discrete cosine transform), KL transform with a basis design performed on a predetermined learning sequence, or other orthogonal transform process) on the prediction differential signal e in reference to the prediction differential coding parameters determined by the coding control unit 2, and calculates the transform coefficients.
另外,变换/量化部7参照该预测差分编码参数,对该变换系数进行量化,将作为量化后的变换系数的压缩数据输出到逆量化/逆变换部8以及可变长编码部13(步骤ST7)。Furthermore, the transform/quantization unit 7 quantizes the transform coefficients with reference to the prediction difference coding parameters, and outputs the compressed data of the quantized transform coefficients to the inverse quantization/inverse transform unit 8 and the variable length coding unit 13 (step ST7).
逆量化/逆变换部8如果从变换/量化部7接收到压缩数据,则参照由编码控制部2决定的预测差分编码参数,对该压缩数据进行逆量化。Upon receiving the compressed data from the transform/quantization unit 7 , the inverse quantization/inverse transform unit 8 inversely quantizes the compressed data with reference to the prediction difference encoding parameter determined by the encoding control unit 2 .
另外,逆量化/逆变换部8参照该预测差分编码参数,实施针对作为逆量化后的压缩数据的变换系数的逆正交变换处理(例如,逆DCT、逆KL变换等),计算与从减法部6输出的预测差分信号ei n相当的局部解码预测差分信号并输出到加法部9(步骤ST8)。In addition, the inverse quantization/inverse transform unit 8 refers to the predicted differential coding parameters, performs inverse orthogonal transform processing (for example, inverse DCT, inverse KL transform, etc.) on the transform coefficients of the compressed data after inverse quantization, calculates the local decoded predicted differential signal equivalent to the predicted differential signal e i n output from the subtraction unit 6, and outputs it to the addition unit 9 (step ST8).
加法部9如果从逆量化/逆变换部8接收到局部解码预测差分信号,则将该局部解码预测差分信号、与由帧内部预测部4生成的帧内部预测图像PINTRAi n和由运动补偿预测部5生成的帧间预测图像PINTERi n中的某一方进行相加,从而计算局部解码图像(步骤ST9)。If the adding unit 9 receives the local decoded prediction differential signal from the inverse quantization/inverse transform unit 8, it adds the local decoded prediction differential signal to one of the intra-frame prediction image P INTRAi n generated by the intra-frame prediction unit 4 and the inter-frame prediction image P INTERi n generated by the motion compensation prediction unit 5, thereby calculating the local decoded image (step ST9).
另外,加法部9将该局部解码图像输出到环路滤波器部11,并且将该局部解码图像储存到帧内部预测用存储器10中。Furthermore, the adding unit 9 outputs the local decoded image to the loop filtering unit 11 and stores the local decoded image in the intra-frame prediction memory 10 .
该局部解码图像成为在以后的帧内部预测处理时使用的已编码的图像信号。This locally decoded image becomes an encoded image signal used in subsequent intra-frame prediction processing.
环路滤波器部11如果从加法部9接收到局部解码图像,则对该局部解码图像实施规定的滤波处理,将滤波处理后的局部解码图像储存到运动补偿预测帧存储器12中(步骤ST10)。Upon receiving the local decoded image from the adder 9 , the loop filter unit 11 performs a predetermined filtering process on the local decoded image and stores the filtered local decoded image in the motion-compensated prediction frame memory 12 (step ST10 ).
另外,关于由环路滤波器部11执行的滤波处理,既可以以所输入的局部解码图像的最大编码块或者各个编码块为单位进行,也可以在输入了1个图片量的局部解码图像之后集中1个图片量来进行。The filtering process performed by the loop filter unit 11 may be performed in units of the largest coding block or each coding block of the input local decoded image, or may be performed collectively for one picture after one picture of local decoded images is input.
另外,作为规定的滤波处理的例子,可以举出以使编码块边界的不连续性(块噪声)不会变得显著的方式对块边界进行滤波的处理、以使作为输入图像的图1的影像信号与局部解码图像之间的误差成为最小的方式对局部解码图像的失真进行补偿的滤波处理等。In addition, as examples of prescribed filtering processing, there can be cited processing that filters block boundaries in a manner that prevents discontinuity (block noise) at the coding block boundaries from becoming noticeable, filtering processing that compensates for distortion of a local decoded image in a manner that minimizes the error between the image signal of Figure 1 as the input image and the local decoded image, and the like.
但是,在进行以使作为输入图像的图1的影像信号与局部解码图像之间的误差成为最小的方式对局部解码图像的失真进行补偿的滤波处理的情况下,需要在环路滤波器部11中参照影像信号,所以需要变更图1的运动图像编码装置使得对环路滤波器部11输入影像信号。However, when performing filtering processing to compensate for the distortion of the local decoded image in a manner that minimizes the error between the image signal of Figure 1 as the input image and the local decoded image, it is necessary to refer to the image signal in the loop filter unit 11, so it is necessary to change the motion image encoding device of Figure 1 so that the image signal is input to the loop filter unit 11.
直至针对层次性地分割了的所有编码块Bn的处理完成为止重复实施步骤ST3~ST9的处理,如果针对所有编码块Bn的处理完成,则转移到步骤ST13的处理(步骤ST11、ST12)。The processes of steps ST3 to ST9 are repeatedly performed until the processes of all the hierarchically divided coding blocks Bn are completed. When the processes of all the coding blocks Bn are completed, the process proceeds to step ST13 (steps ST11 and ST12).
可变长编码部13对从变换/量化部7输出的压缩数据、从编码控制部2输出的最大编码块内的块分割信息(以图6(b)为例子的四叉树信息)、编码模式m(Bn)以及预测差分编码参数、从编码控制部2输出的帧内部预测参数(编码模式是帧内部编码模式的情况)或者帧间预测参数(编码模式是帧间编码模式的情况)、以及从运动补偿预测部5输出的运动矢量(编码模式是帧间编码模式的情况)进行可变长编码,生成表示这些编码结果的比特流(步骤ST13)。The variable-length coding unit 13 performs variable-length coding on the compressed data output from the transform/quantization unit 7, the block division information within the largest coding block output from the coding control unit 2 (quadtree information in FIG. 6B ), the coding mode m (B n ) and the prediction difference coding parameters, the intra-frame prediction parameters (when the coding mode is the intra-frame coding mode) or inter-frame prediction parameters (when the coding mode is the inter-frame coding mode) output from the coding control unit 2, and the motion vector (when the coding mode is the inter-frame coding mode) output from the motion compensation prediction unit 5, and generates a bitstream representing these coding results (step ST13).
接下来,详细说明帧内部预测部4的处理内容。Next, the processing contents of the intra prediction unit 4 will be described in detail.
图7是示出编码块Bn内的各预测块Pi n可选择的帧内部预测参数(帧内部预测模式)的一个例子的说明图。FIG7 is an explanatory diagram showing an example of intra-frame prediction parameters (intra-frame prediction modes) selectable by each prediction block P in the coding block Bn .
在图7中,示出帧内部预测模式和该帧内部预测模式所表示的预测方向矢量,在图7的例子中,进行设计使得随着可选择的帧内部预测模式的个数增加而使预测方向矢量彼此的相对角度变小。FIG7 shows an intra-frame prediction mode and a prediction direction vector represented by the intra-frame prediction mode. In the example of FIG7 , the design is such that the relative angles between the prediction direction vectors decrease as the number of selectable intra-frame prediction modes increases.
帧内部预测部4如上述那样参照预测块Pi n的帧内部预测参数,实施针对该预测块Pi n的帧内部预测处理,生成帧内部预测图像PINTRAi n,但此处说明生成亮度信号中的预测块Pi n的帧内部预测信号的帧内部处理。As described above, the intra - frame prediction unit 4 refers to the intra-frame prediction parameters of the prediction block Pin , performs intra-frame prediction processing on the prediction block Pin , and generates an intra-frame prediction image Pintran . However, the intra-frame processing for generating an intra- frame prediction signal of the prediction block Pin in the luminance signal is described here.
将预测块Pi n的尺寸设为li n×mi n像素。The size of the prediction block Pin is set to lin × min pixels .
图8是示出生成li n=mi n=4的情况的预测块Pi n内的像素的预测值时使用的像素的一个例子的说明图。FIG8 is an explanatory diagram showing an example of pixels used when generating predicted values of pixels in a prediction block Pin in the case of lin = min = 4 .
在图8中,将预测块Pi n的上面的已编码的像素(2×li n+1)个、和左面的已编码的像素(2×mi n)个设为预测中使用的像素,但预测中使用的像素既可以多于图8所示的像素也可以少于图8所示的像素。In FIG8 , the coded pixels ( 2 × lin +1) above and the coded pixels ( 2× min ) to the left of the prediction block Pin are used as pixels for prediction. However, the number of pixels used for prediction may be more or less than the number of pixels shown in FIG8 .
另外,在图8中,将预测块Pi n的附近的1行或者1列量的像素用于预测,但也可以将2行或2列、或者其以上的像素用于预测。In addition, in Figure 8, one row or one column of pixels near the prediction block Pin is used for prediction, but two rows or two columns, or more than two rows of pixels may be used for prediction.
在针对预测块Pi n的帧内部预测模式的索引值是0(垂直方向预测)的情况下,根据下述式(1)而计算预测块Pi n内的像素的预测值,生成预测图像。When the index value of the intra-frame prediction mode for the prediction block Pin is 0 (vertical prediction), the prediction value of the pixel in the prediction block Pin is calculated according to the following formula (1) to generate a predicted image.
S′(x,y)=S(x,-1)+(S(-1,y)-S(-1,-1))/t (t)S'(x, y)=S(x,-1)+(S(-1, y)-S(-1,-1))/t (t)
其中,坐标(x,y)是以预测块Pi n内的左上像素为原点的相对坐标(参照图9),S’(x,y)是坐标(x,y)中的预测值,S(x,y)是坐标(x,y)中的已编码的像素的亮度值(解码了的亮度值)。Among them, the coordinates (x, y) are relative coordinates with the upper left pixel in the prediction block P i n as the origin (refer to Figure 9), S'(x, y) is the predicted value at the coordinates (x, y), and S(x, y) is the brightness value (decoded brightness value) of the encoded pixel at the coordinates (x, y).
这样,对作为以往(MPEG-4AVC/H.264)的垂直方向预测的预测值的预测块Pi n的上面所邻接的已编码的像素的亮度值S(x,-1),相加与预测块Pi n的左面所邻接的已编码的像素(图10的粗框所包围的像素)的表示垂直方向的亮度值的变化量的S(-1,y)-S(-1,-1)成比例的值(将表示垂直方向的亮度值的变化量的S(-1,y)-S(-1,-1)缩放为1/t而得到的值),将该相加后的值决定为预测图像的预测值,从而能够实现追随向预测方向的亮度值的变化的垂直方向预测。In this way, a value proportional to S(-1, y)-S(-1, -1) representing the amount of change in the vertical brightness value of the coded pixel adjacent to the left of the prediction block Pin (the pixel surrounded by the thick frame in Figure 10) is added to the brightness value S(x, -1) of the coded pixel above the prediction block Pin, which is the prediction value of the vertical prediction in the previous (MPEG-4AVC/H.264) method (a value obtained by scaling S(-1, y)-S(-1, -1) representing the amount of change in the vertical brightness value to 1/t) is added, and the added value is determined as the prediction value of the predicted image, thereby realizing vertical prediction that follows the change in the brightness value in the prediction direction.
但是,在上述预测值未收敛于亮度值可取的值的范围内的情况下,对值进行舍入使得收敛于该范围内。However, if the predicted value does not fall within the range of possible values for the luminance value, the value is rounded off so as to fall within the range.
另外,上述1/t也可以设为固定值,但还可以设为根据坐标(x,y)而变化的变量。In addition, the above-mentioned 1/t may be set as a fixed value, or may be set as a variable that changes according to the coordinates (x, y).
例如,如果设为t=2x+1,则如图11所示,缩放值从左端的列起依次如1/2、1/4、1/8、1/16那样变小,所以从预测块Pi n的左面所邻接的已编码的像素起的距离越远,相加的垂直方向的亮度值的变化量越小。For example, if t=2x +1 , as shown in FIG11 , the scaling value decreases in order from the left column, such as 1/2, 1/4, 1/8, and 1/16. Therefore, the greater the distance from the left adjacent coded pixel of the prediction block Pin , the smaller the change in the added vertical brightness value.
由此,越是与预测块Pi n的左面所邻接的已编码的像素之间的距离远而相关变低的预测对象像素,越能够使预测块Pi n的左面所邻接的已编码的像素的影响变小,所以能够进行和与预测块Pi n的左面所邻接的已编码的像素之间的相关对应的高精度的预测。Therefore, the farther the prediction target pixel is from the already encoded pixel adjacent to the left of the prediction block Pin and the lower the correlation becomes, the smaller the influence of the already encoded pixel adjacent to the left of the prediction block Pin can be. Therefore, a high-precision prediction corresponding to the correlation between the already encoded pixels adjacent to the left of the prediction block Pin can be performed.
进而,也可以限定进行式(1)的预测处理的预测块Pi n的块尺寸。一般在大的块尺寸中,在块内易于包含各种信号变化,能够使用方向性预测而高精度地进行预测的情形少,所以例如在16×16像素以上的块尺寸的预测块Pi n中不应用式(1)而设为以往的垂直方向预测的预测值(预测块Pi n的上面所邻接的已编码的像素的亮度值S(x,-1)),仅在比16×16像素小的块中应用式(1),从而相比于以往的垂直方向预测,能够提高预测性能,并且抑制运算量的增加。Furthermore, the block size of the prediction block P in which the prediction process of equation (1) is performed may be limited. Generally, with large block sizes, various signal variations are easily included within the block, making it less likely that directional prediction can be used to perform high-precision prediction. Therefore, for example, equation (1) is not applied to prediction blocks P in block sizes of 16×16 pixels or larger, and the prediction value of the conventional vertical prediction (the luminance value S(x, -1) of the coded pixel adjacent to the top of the prediction block P ) is used. Equation (1) is applied only to blocks smaller than 16×16 pixels. This improves prediction performance compared to conventional vertical prediction and suppresses an increase in the amount of computation.
另外,在针对预测块Pi n的帧内部预测模式的索引值是1(水平方向预测)的情况下,根据下述式(2)而计算预测块Pi n内的像素的预测值,生成预测图像。In addition, when the index value of the intra- frame prediction mode for the prediction block Pin is 1 (horizontal prediction), the prediction value of the pixel in the prediction block Pin is calculated according to the following formula (2) to generate a predicted image.
S′(x,y)=S(-1,y)+(S(x,-1)-S(-1,-1))/u (2)S'(x, y)=S(-1, y)+(S(x,-1)-S(-1,-1))/u (2)
其中,坐标(x,y)是以预测块Pi n内的左上像素为原点的相对坐标(参照图9),S’(x,y)是坐标(x,y)中的预测值,S(x,y)是坐标(x,y)中的已编码的像素的亮度值(解码了的亮度值)。Among them, the coordinates (x, y) are relative coordinates with the upper left pixel in the prediction block P i n as the origin (refer to Figure 9), S'(x, y) is the predicted value at the coordinates (x, y), and S(x, y) is the brightness value (decoded brightness value) of the encoded pixel at the coordinates (x, y).
这样,对作为以往(MPEG-4AVC/H.264)的水平方向预测的预测值的预测块Pi n的左面所邻接的已编码的像素的亮度值S(-1,y),相加与预测块Pi n的上面所邻接的已编码的像素(图12的粗框所包围的像素)的表示水平方向的亮度值的变化量的S(x,-1)-S(-1,-1)成比例的值(将表示水平方向的亮度值的变化量的S(x,-1)-S(-1,-1)缩放为1/u而得到的值),并将该相加后的值决定为预测图像的预测值,从而能够实现追随向预测方向的亮度值的变化的水平方向预测。In this way, a value proportional to S(x, -1)-S(-1, -1) representing the amount of change in the horizontal brightness value of the coded pixel adjacent to the top of the prediction block Pin (the pixel surrounded by the thick frame in Figure 12) is added to the brightness value S(-1, y) of the coded pixel adjacent to the left of the prediction block Pin, which is the prediction value of the horizontal prediction in the previous (MPEG-4AVC/H.264) (a value obtained by scaling S(x, -1)-S(-1, -1) representing the amount of change in the horizontal brightness value to 1/u) and the added value is determined as the prediction value of the predicted image, thereby realizing horizontal prediction that follows the change in the brightness value in the prediction direction.
但是,在上述预测值未收敛于亮度值可取的值的范围内的情况下,对值进行舍入使得收敛于该范围内。However, if the predicted value does not fall within the range of possible values for the luminance value, the value is rounded off so as to fall within the range.
另外,上述1/u也可以设为固定值,但还可以设为随着坐标(x,y)而变化的变量。In addition, the above-mentioned 1/u may be set as a fixed value, or may be set as a variable that changes with the coordinates (x, y).
例如,如果设为u=2y+1,则如图13所示,缩放值从上端的行起依次如1/2、1/4、1/8、1/16那样变小,所以从预测块Pi n的上面所邻接的已编码的像素起的距离越远,相加的水平方向的亮度值的变化量越小。For example, if u=2y +1 , as shown in FIG13, the scaling value decreases from the top row in the order of 1/2, 1/4, 1/8, and 1/16, so the greater the distance from the adjacent encoded pixel above the prediction block P in , the smaller the change in the added horizontal brightness value.
由此,越是与预测块Pi n的上面所邻接的已编码的像素之间的距离远而相关变低的像素,越能够使预测块Pi n的上面所邻接的已编码的像素的影响变小,所以能够进行和与预测块Pi n的上面所邻接的已编码的像素之间的相关对应的高精度的预测。Therefore, the farther the distance from the already-encoded pixels adjacent to the prediction block Pin is , and the lower the correlation is, the smaller the influence of the already-encoded pixels adjacent to the prediction block Pin is . Therefore, a high-precision prediction corresponding to the correlation between the already-encoded pixels adjacent to the prediction block Pin can be performed.
进而,也可以限定进行式(2)的预测处理的预测块Pi n的块尺寸。一般在大的块尺寸中,在块内易于包含各种信号变化,能够使用方向性预测而高精度地进行预测的情形少,所以例如在16×16像素以上的块尺寸的预测块Pi n中不应用式(2)而设为以往的水平方向预测的预测值(预测块Pi n的左面所邻接的已编码的像素的亮度值S(-1,y)),仅在比16×16像素小的块中应用式(2),从而相比于以往的水平方向预测,能够提高预测性能,并且抑制运算量的增加。Furthermore, the block size of the prediction block P in which the prediction processing of equation (2) is performed may be limited. Generally, with large block sizes, various signal variations are more likely to be included within the block, making it less likely that directional prediction can be performed with high accuracy. Therefore, for example, equation (2) is not applied to prediction blocks P in block sizes of 16×16 pixels or larger, and the prediction value of conventional horizontal prediction (the luminance value S(-1, y) of the already coded pixel adjacent to the left of the prediction block P) is used. Equation (2) is applied only to blocks smaller than 16×16 pixels. This improves prediction performance compared to conventional horizontal prediction and suppresses an increase in the amount of computation.
另外,在针对预测块Pi n的帧内部预测模式的索引值是2(平均值预测)的情况下,将预测块Pi n的上面所邻接的已编码的像素和预测块Pi n的左面所邻接的已编码的像素的平均值作为预测块Pi n内的像素的预测值而生成预测图像。In addition, when the index value of the intra-frame prediction mode for the prediction block Pin is 2 (average value prediction), the average value of the coded pixels adjacent to the top of the prediction block Pin and the coded pixels adjacent to the left of the prediction block Pin is used as the prediction value of the pixel in the prediction block Pin to generate a predicted image.
在帧内部预测模式的索引值是0(垂直方向预测)、1(水平方向预测)、2(平均值预测)以外的情况下,根据索引值表示的预测方向矢量υp=(dx,dy),生成预测块Pi n内的像素的预测值。When the index value of the intra-frame prediction mode is other than 0 (vertical prediction), 1 (horizontal prediction), or 2 (average prediction), the predicted value of the pixel in the prediction block Pin is generated based on the prediction direction vector υp = ( dx , dy) represented by the index value.
如图9所示,如果以预测块Pi n的左上像素为原点而将预测块Pi n内的相对坐标设定为(x,y),则预测中使用的参照像素的位置成为下述L和邻接像素的交点。As shown in FIG9 , if the upper left pixel of the prediction block Pin is set as the origin and the relative coordinates within the prediction block Pin are set to (x, y), the position of the reference pixel used in the prediction becomes the intersection of the following L and the adjacent pixel.
其中,k是负的标量值。Here, k is a negative scalar value.
在参照像素处于整数像素位置的情况下,将该整数像素设为预测对象像素的预测值,在参照像素不处于整数像素位置的情况下,将根据与参照像素邻接的整数像素而生成的插值像素设为预测值。When the reference pixel is at an integer pixel position, the integer pixel is used as the predicted value of the prediction target pixel. When the reference pixel is not at an integer pixel position, an interpolated pixel generated from integer pixels adjacent to the reference pixel is used as the predicted value.
在图8的例子中,参照像素不处于整数像素位置,所以将根据与参照像素邻接的2个像素进行内插而得到的结果作为预测值。另外,并非仅根据邻接的2个像素,而也可以根据邻接的2个像素以上的像素来生成插值像素作为预测值。In the example of FIG8 , since the reference pixel is not located at an integer pixel position, the prediction value is generated by interpolating two pixels adjacent to the reference pixel. Furthermore, the prediction value may be generated by interpolating pixels based on two or more adjacent pixels, rather than just two adjacent pixels.
通过增加插值处理中使用的像素,具有提高插值像素的插值精度的效果,另一方面,由于插值处理所需的运算的复杂度增加,所以在即使运算负荷大但仍要求高编码性能的运动图像编码装置的情况下,优选根据更多的像素来生成插值像素。By increasing the number of pixels used in the interpolation process, the interpolation accuracy of the interpolated pixels is improved. On the other hand, since the complexity of the operations required for the interpolation process increases, in the case of a motion picture encoding device that requires high encoding performance even though the computational load is large, it is preferable to generate interpolated pixels based on more pixels.
通过同样的步骤,生成与预测块Pi n内的亮度信号的所有像素对应的预测像素而输出帧内部预测图像PINTRAi n。Through the same steps, predicted pixels corresponding to all pixels of the luminance signal in the prediction block Pin are generated, and an intra-frame predicted image Pintran is output.
另外,关于帧内部预测图像PINTRAi n的生成中使用的帧内部预测参数,为了复用到比特流而被输出到可变长编码部13。In addition, the intra-frame prediction parameters used for generating the intra -frame prediction image PINTRAin are output to the variable-length coding unit 13 in order to be multiplexed into the bit stream.
另外,与之前说明的MPEG-4 AVC/H.264中的8×8像素的块的帧内部预测同样地,关于在进行帧内部预测时使用的像素,也可以并非使用已编码的邻接块内的像素自身,而是使用对这些像素实施滤波处理而得到的结果。In addition, similar to the intra-frame prediction of 8×8 pixel blocks in MPEG-4 AVC/H.264 described above, the pixels used for intra-frame prediction may not be the pixels in the encoded adjacent blocks themselves, but the results of filtering these pixels may be used.
针对预测块Pi n的色差信号,也通过与亮度信号同样的步骤,实施基于帧内部预测参数(帧内部预测模式)的帧内部预测处理,将帧内部预测图像的生成中使用的帧内部预测参数输出到可变长编码部13。For the color difference signal of the prediction block Pin , the same steps as the luminance signal are used to implement intra-frame prediction processing based on intra-frame prediction parameters (intra-frame prediction mode), and the intra-frame prediction parameters used in generating the intra-frame prediction image are output to the variable length coding unit 13.
其中,在色差信号中可选择的帧内部预测参数(帧内部预测模式)无需与亮度信号相同,另外,关于垂直方向预测以及水平方向预测,也可以是以往(MPEG-4 AVC/H.264)的预测方法。The intra-frame prediction parameters (intra-frame prediction modes) selectable in the color difference signal do not need to be the same as those in the luminance signal. In addition, the vertical prediction and horizontal prediction may also be the conventional (MPEG-4 AVC/H.264) prediction methods.
例如,在YUV信号4:2:0格式的情况下,色差信号(U、V信号)是相对亮度信号(Y信号)将分辨率在水平方向、垂直方向上都缩小为1/2而得到的信号,相比于亮度信号,图像信号的复杂性低且预测容易,所以可选择的帧内部预测参数(帧内部预测模式)的数量比亮度信号少,关于垂直方向预测以及水平方向预测也设为以往的简易的预测方法,从而几乎不会降低预测效率而能够实现对帧内部预测参数(帧内部预测模式)进行编码所需的符号量的削减、预测处理的低运算化。For example, in the case of a YUV signal in 4:2:0 format, the color difference signals (U and V signals) are signals obtained by reducing the resolution of the luminance signal (Y signal) to 1/2 in both the horizontal and vertical directions. Compared with the luminance signal, the image signal has low complexity and is easier to predict, so the number of selectable intra-frame prediction parameters (intra-frame prediction modes) is less than that of the luminance signal, and the vertical and horizontal predictions are also set to the previous simple prediction methods, thereby almost without reducing the prediction efficiency and achieving a reduction in the amount of symbols required to encode the intra-frame prediction parameters (intra-frame prediction modes) and low computational complexity in the prediction processing.
另外,关于作为垂直方向预测中使用的缩放值的1/t、和作为水平方向预测中使用的缩放值的1/u,也可以预先在运动图像编码装置以及运动图像解码装置之间约定,但也可以由运动图像编码装置的帧内部预测部4按照序列单位或者图片单位,将t、u输出到可变长编码部13,可变长编码部13对t、u进行可变长编码而包含到比特流中,运动图像解码装置从比特流对t、u进行可变长解码来使用。In addition, the scaling value 1/t used for vertical prediction and the scaling value 1/u used for horizontal prediction can also be agreed upon in advance between the motion image encoding device and the motion image decoding device, but the intra-frame prediction unit 4 of the motion image encoding device can output t and u to the variable length encoding unit 13 according to sequence units or picture units, and the variable length encoding unit 13 can perform variable length encoding on t and u and include them in the bit stream, and the motion image decoding device can perform variable length decoding on t and u from the bit stream for use.
这样能够按照序列单位或者图片单位对t、u进行自适应控制,从而能够实现进一步与输入图像的影像信号的特性对应的预测处理。In this way, t and u can be adaptively controlled in sequence units or picture units, thereby achieving prediction processing that further corresponds to the characteristics of the video signal of the input image.
另外,关于使用式(1)的垂直方向预测、式(2)的水平方向预测的块尺寸,也可以预先在运动图像编码装置以及运动图像解码装置之间约定,但也可以由运动图像编码装置的帧内部预测部4按照序列单位或者图片单位,将表示使用式(1)的垂直方向预测、式(2)的水平方向预测的块尺寸的每个块尺寸的ON(开)/OFF(关)标志输出到可变长编码部13,可变长编码部13对上述ON/OFF标志进行可变长编码而包含到比特流中,运动图像解码装置从比特流对上述ON/OFF标志进行可变长解码而使用。In addition, the block size for the vertical prediction using formula (1) and the horizontal prediction using formula (2) can also be agreed upon in advance between the motion image encoding device and the motion image decoding device, but the intra-frame prediction unit 4 of the motion image encoding device can also output the ON/OFF flag of each block size representing the block size for the vertical prediction using formula (1) and the horizontal prediction using formula (2) to the variable length encoding unit 13 according to the sequence unit or the picture unit. The variable length encoding unit 13 performs variable length encoding on the above-mentioned ON/OFF flag and includes it in the bit stream, and the motion image decoding device performs variable length decoding on the above-mentioned ON/OFF flag from the bit stream for use.
这样能够按照序列单位或者图片单位对使用式(1)的垂直方向预测、式(2)的水平方向预测的块尺寸进行自适应控制,从而能够实现进一步与输入图像的影像信号的特性对应的预测处理。In this way, the block size of the vertical prediction using equation (1) and the horizontal prediction using equation (2) can be adaptively controlled in sequence units or picture units, thereby enabling prediction processing that further corresponds to the characteristics of the image signal of the input image.
接下来,具体说明图3的运动图像解码装置的处理内容。Next, the processing contents of the moving picture decoding device in FIG. 3 will be described in detail.
可变长解码部31如果输入了由图1的运动图像编码装置生成的比特流,则实施针对该比特流的可变长解码处理(图4的步骤ST21),按照由1帧以上的图片构成的序列单位、或者图片单位,对帧尺寸的信息进行解码。If the variable length decoding unit 31 inputs the bit stream generated by the motion image encoding device in Figure 1, it implements variable length decoding processing on the bit stream (step ST21 in Figure 4) and decodes the frame size information according to the sequence unit composed of more than one frame of pictures or the picture unit.
此时,在垂直方向预测中使用的缩放值的参数t、水平方向预测中使用的缩放值的参数u、表示使用式(1)的垂直方向预测、式(2)的水平方向预测的块尺寸的每个块尺寸的ON/OFF标志中,只要任意一个被可变长编码并被复用到比特流的情况下,就按照由图1的运动图像编码装置编码了的单位(序列单位或者图片单位)进行解码。At this time, among the parameter t of the scaling value used in the vertical prediction, the parameter u of the scaling value used in the horizontal prediction, and the ON/OFF flag of each block size indicating the block size of the vertical prediction using formula (1) and the horizontal prediction using formula (2), as long as any one of them is variable-length encoded and multiplexed into the bit stream, it is decoded according to the unit (sequence unit or picture unit) encoded by the motion image encoding device of Figure 1.
可变长解码部31通过与运动图像编码装置同样的步骤,决定由图1的运动图像编码装置的编码控制部2决定的最大编码块尺寸以及分割层次数的上限(步骤ST22)。The variable length decoding unit 31 determines the maximum coding block size and the upper limit of the number of division hierarchies determined by the encoding control unit 2 of the moving picture encoding device of FIG. 1 through the same steps as the moving picture encoding device (step ST22 ).
例如,在根据影像信号的分辨率决定了最大编码块尺寸、分割层次数上限的情况下,根据所解码的帧尺寸信息,通过与运动图像编码装置同样的步骤来决定最大编码块尺寸。For example, when the maximum coding block size and the upper limit of the number of division levels are determined based on the resolution of the video signal, the maximum coding block size is determined based on the decoded frame size information using the same procedure as that of the moving picture encoding device.
最大编码块尺寸以及分割层次数上限在运动图像编码装置侧被复用到比特流中的情况下,使用从比特流解码得到的值。When the maximum coding block size and the upper limit of the number of division layers are multiplexed into the bitstream on the moving picture coding device side, the values obtained by decoding the bitstream are used.
以后,在运动图像解码装置中,将上述最大编码块尺寸称为最大解码块尺寸,将最大编码块称为最大解码块。Hereinafter, in the moving picture decoding apparatus, the maximum coding block size is referred to as the maximum decoding block size, and the maximum coding block is referred to as the maximum decoding block.
可变长解码部31按照所决定的最大解码块单位,对图6所示那样的最大解码块的分割状态进行解码。根据所解码的分割状态,层次性地确定解码块(与图1的运动图像编码装置的“编码块”相当的块)(步骤ST23)。The variable length decoding unit 31 decodes the division state of the maximum decoding block as shown in FIG6 in units of the determined maximum decoding block. Based on the decoded division state, the decoding blocks (blocks corresponding to the "coding blocks" in the moving image encoding device of FIG1) are hierarchically determined (step ST23).
接下来,可变长解码部31解码对解码块分配的编码模式。根据所解码的编码模式中包含的信息,将解码块进一步分割为一个或多个预测处理单位即预测块,解码对预测块单位分配的预测参数(步骤ST24)。Next, the variable length decoding unit 31 decodes the coding mode assigned to the decoding block. Based on the information included in the decoded coding mode, the decoding block is further divided into one or more prediction processing units, namely prediction blocks, and prediction parameters assigned to the prediction block units are decoded (step ST24).
在对解码块分配的编码模式是帧内部编码模式的情况下,可变长解码部31针对包含在解码块中且成为预测处理单位的一个以上的预测块的每一个,对帧内部预测参数进行解码。When the coding mode assigned to the decoding block is the intra coding mode, the variable length decoding unit 31 decodes the intra prediction parameters for each of one or more prediction blocks included in the decoding block and serving as a prediction processing unit.
进而,可变长解码部31根据预测差分编码参数中包含的变换块尺寸的信息,将解码块分割为成为变换处理单位的一个或多个变换块,针对每个变换块,对压缩数据(变换/量化后的变换系数)进行解码(步骤ST24)。Furthermore, the variable length decoding unit 31 divides the decoding block into one or more transform blocks serving as transform processing units based on the transform block size information included in the predicted differential coding parameters, and decodes the compressed data (transformed/quantized transform coefficients) for each transform block (step ST24).
在切换开关33中,如果由可变长解码部31可变长解码了的编码模式m(Bn)是帧内部编码模式(m(Bn)∈INTRA的情况),则将由可变长解码部31可变长解码了的预测块单位的帧内部预测参数输出到帧内部预测部34。In the switching switch 33, if the coding mode m( Bn ) variable-length-decoded by the variable-length decoding unit 31 is an intra-frame coding mode (in the case of m( Bn )∈INTRA), the intra-frame prediction parameters of the prediction block units variable-length-decoded by the variable-length decoding unit 31 are output to the intra-frame prediction unit 34.
另一方面,如果由可变长解码部31可变长解码了的编码模式m(Bn)是帧间编码模式(m(Bn)∈INTER的情况),则将由可变长解码部31可变长解码了的预测块单位的帧间预测参数以及运动矢量输出到运动补偿部35。On the other hand, if the coding mode m(B n ) variable-length-decoded by the variable-length decoding unit 31 is an inter-frame coding mode (in the case of m(B n )∈INTER), the inter-frame prediction parameters and motion vectors of the prediction block units variable-length-decoded by the variable-length decoding unit 31 are output to the motion compensation unit 35.
帧内部预测部34在由可变长解码部31可变长解码了的编码模式m(Bn)是帧内部编码模式(m(Bn)∈INTRA)的情况下(步骤ST25),接收从切换开关33输出的预测块单位的帧内部预测参数,通过与图1的帧内部预测部4同样的步骤,一边参照帧内部预测用存储器37中储存的解码图像,一边实施使用了上述帧内部预测参数的针对解码块Bn内的各预测块Pi n的帧内部预测处理,生成帧内部预测图像PINTRAi n(步骤ST26)。When the coding mode m( Bn ) variable-length-decoded by the variable-length decoding unit 31 is the intra coding mode (m( Bn )∈INTRA) (step ST25), the intra prediction unit 34 receives the intra prediction parameters for the prediction block output from the switch 33, and performs intra prediction processing on each prediction block P in the decoded block Bn using the intra prediction parameters through the same steps as those of the intra prediction unit 4 in FIG. 1 while referring to the decoded image stored in the intra prediction memory 37 , thereby generating an intra prediction image P INTRAi n (step ST26).
即,帧内部预测部34在针对预测块Pi n的帧内部预测模式的索引值是0(垂直方向预测)的情况下,根据上述式(1)计算预测块Pi n内的像素的预测值,生成帧内部预测图像PINTRAi n。That is, when the index value of the intra prediction mode for the prediction block Pin is 0 (vertical prediction), the intra prediction unit 34 calculates the prediction value of the pixels in the prediction block Pin according to the above equation (1) to generate the intra prediction image Pintran .
另外,在针对预测块Pi n的帧内部预测模式的索引值是1(水平方向预测)的情况下,根据上述式(2)计算预测块Pi n内的像素的预测值,生成帧内部预测图像PINTRAi n。Furthermore, when the index value of the intra prediction mode for the prediction block Pin is 1 (horizontal prediction), the prediction values of the pixels in the prediction block Pin are calculated according to the above equation (2) to generate the intra prediction image Pintrain .
但是,在使用式(1)的垂直方向预测、式(2)的水平方向预测的块尺寸被限制了的情况下,在使用式(1)的垂直方向预测、式(2)的水平方向预测的块尺寸以外的尺寸的预测块Pi n中通过以往(MPEG-4AVC/H.264)的垂直方向预测及水平方向预测进行帧内部预测处理。However, when the block size of the vertical prediction using formula (1) and the horizontal prediction using formula (2) is limited, intra-frame prediction processing is performed in the prediction block Pin of a size other than the block size of the vertical prediction using formula (1) and the horizontal prediction using formula (2) using the previous (MPEG-4AVC/H.264) vertical prediction and horizontal prediction.
运动补偿部35在由可变长解码部31可变长解码了的编码模式m(Bn)是帧间编码模式(m(Bn)∈INTER)的情况下(步骤ST25),接收从切换开关33输出的预测块单位的运动矢量和帧间预测参数,一边参照运动补偿预测帧存储器39中储存的滤波处理后的解码图像,一边实施使用了上述运动矢量和帧间预测参数的针对解码块内的各预测块Pi n的帧间预测处理来生成帧间预测图像PINTERi n(步骤ST27)。When the coding mode m( Bn ) variable-length-decoded by the variable-length decoding unit 31 is an inter-frame coding mode (m( Bn )∈INTER) (step ST25), the motion compensation unit 35 receives the motion vector and inter-frame prediction parameters of the prediction block unit output from the switch 33, and performs inter-frame prediction processing on each prediction block P in the decoded block using the motion vector and inter-frame prediction parameters while referring to the filtered decoded image stored in the motion- compensated prediction frame memory 39 , thereby generating an inter-frame prediction image PINTERi n (step ST27).
逆量化/逆变换部32如果从可变长解码部31接收到压缩数据以及预测差分编码参数,则通过与图1的逆量化/逆变换部8同样的步骤,参照该预测差分编码参数,对该压缩数据进行逆量化,并且参照该预测差分编码参数,实施针对作为逆量化后的压缩数据的变换系数的逆正交变换处理,计算与从图1的逆量化/逆变换部8输出的局部解码预测差分信号相同的解码预测差分信号(步骤ST28)。If the inverse quantization/inverse transform unit 32 receives compressed data and predicted differential coding parameters from the variable length decoding unit 31, it performs inverse quantization on the compressed data with reference to the predicted differential coding parameters through the same steps as the inverse quantization/inverse transform unit 8 in Figure 1, and performs inverse orthogonal transform processing on the transform coefficients of the inverse quantized compressed data with reference to the predicted differential coding parameters, and calculates a decoded predicted differential signal that is the same as the locally decoded predicted differential signal output from the inverse quantization/inverse transform unit 8 in Figure 1 (step ST28).
加法部36将由逆量化/逆变换部32计算出的解码预测差分信号、与由帧内部预测部34生成的帧内部预测图像PINTRAi n和由运动补偿部35生成的帧间预测图像PINTERi n中的某一方进行相加而计算出解码图像,并输出到环路滤波器部38,并且将该解码图像储存到帧内部预测用存储器37中(步骤ST29)。The addition unit 36 adds the decoded prediction differential signal calculated by the inverse quantization/inverse transform unit 32 to either the intra-frame prediction image P INTRAi n generated by the intra-frame prediction unit 34 or the inter-frame prediction image P INTERi n generated by the motion compensation unit 35 to calculate a decoded image, outputs it to the loop filter unit 38, and stores the decoded image in the intra-frame prediction memory 37 (step ST29).
该解码图像成为在以后的帧内部预测处理时使用的已解码的图像信号。This decoded image becomes a decoded image signal used in subsequent intra-frame prediction processing.
在环路滤波器部38中,如果针对所有解码块Bn的步骤ST23~ST29的处理完成(步骤ST30),则对从加法部36输出的解码图像实施规定的滤波处理,将滤波处理后的解码图像储存到运动补偿预测帧存储器39中(步骤ST31)。In the loop filter unit 38, if the processing of steps ST23 to ST29 for all decoding blocks Bn is completed (step ST30), the prescribed filtering processing is performed on the decoded image output from the addition unit 36, and the decoded image after filtering is stored in the motion compensation prediction frame memory 39 (step ST31).
另外,关于环路滤波器部38的滤波处理,即可以以所输入的解码图像的最大解码块或者各个解码块为单位来进行,也可以在输入了1个图片量的解码图像之后集中1个图片量来进行。The filtering process of the loop filter unit 38 may be performed in units of the largest decoded block or each decoded block of the input decoded image, or may be performed collectively for one picture after one picture of decoded images is input.
另外,作为规定的滤波处理的例子,可以举出以使编码块边界的不连续性(块噪声)不会变得显著的方式对块边界进行滤波的处理、对解码图像的失真进行补偿的滤波处理等。Examples of the predetermined filtering process include filtering of block boundaries to prevent discontinuity (block noise) at the coding block boundaries from becoming noticeable and filtering to compensate for distortion of a decoded image.
该解码图像成为运动补偿预测用的参照图像,并且成为再生图像。This decoded image becomes a reference image for motion compensation prediction and also becomes a reconstructed image.
根据以上可知,根据该实施方式1,运动图像编码装置的帧内部预测部4构成为在生成预测图像时的帧内预测处理是水平方向预测处理的情况下,对预测块的左面所邻接的像素的亮度值相加与预测块的上面所邻接的像素的水平方向的亮度值变化量成比例的值,将该相加后的值决定为预测图像的预测值,在生成预测图像时的帧内预测处理是垂直方向预测处理的情况下,对预测块的上面所邻接的像素的亮度值相加与预测块的左面所邻接的像素的垂直方向的亮度值变化量成比例的值,将该相加后的值决定为预测图像的预测值,所以起到即使在信号值沿着预测方向而变化的情况下也能够实现高精度的预测来提高图像质量的效果。As can be seen from the above, according to this embodiment 1, the intra-frame prediction unit 4 of the motion image encoding device is constructed to add a value proportional to the amount of change in the horizontal brightness value of the pixel adjacent to the upper side of the prediction block to the brightness value of the pixel adjacent to the left of the prediction block when the intra-frame prediction processing when generating the prediction image is a horizontal prediction processing, and to determine the added value as the prediction value of the prediction image; when the intra-frame prediction processing when generating the prediction image is a vertical prediction processing, add a value proportional to the amount of change in the vertical brightness value of the pixel adjacent to the left of the prediction block to the brightness value of the pixel adjacent to the upper side of the prediction block, and determine the added value as the prediction value of the prediction image, thereby achieving the effect of improving image quality by achieving high-precision prediction even when the signal value changes along the prediction direction.
另外,根据该实施方式1,运动图像解码装置的帧内部预测部34构成为在生成预测图像时的帧内预测处理是水平方向预测处理的情况下,对预测块的左面所邻接的像素的亮度值相加与预测块的上面所邻接的像素的水平方向的亮度值变化量成比例的值,将该相加后的值决定为预测图像的预测值,在生成预测图像时的帧内预测处理是垂直方向预测处理的情况下,对预测块的上面所邻接的像素的亮度值相加与预测块的左面所邻接的像素的垂直方向的亮度值变化量成比例的值,将该相加后的值决定为预测图像的预测值,所以起到即使在信号值沿着预测方向而变化的情况下也能够实现高精度的预测来提高图像质量的效果。In addition, according to the first embodiment, the intra-frame prediction unit 34 of the motion image decoding device is configured to, when the intra-frame prediction processing when generating the predicted image is a horizontal prediction processing, add a value proportional to the amount of change in the horizontal brightness value of the pixel adjacent to the upper side of the prediction block to the brightness value of the pixel adjacent to the left of the prediction block, and determine the added value as the predicted value of the predicted image; when the intra-frame prediction processing when generating the predicted image is a vertical prediction processing, add a value proportional to the amount of change in the vertical brightness value of the pixel adjacent to the left of the prediction block to the brightness value of the pixel adjacent to the upper side of the prediction block, and determine the added value as the predicted value of the predicted image. This has the effect of achieving high-precision prediction even when the signal value changes along the prediction direction, thereby improving image quality.
根据该实施方式1,关于由帧内部预测部4、34实施水平方向预测处理时所使用的缩放值即1/u,构成为越是与从预测块的上面所邻接的像素起距离远的行有关的缩放值,设定为越小的值,所以越是与预测块的上面所邻接的像素之间的距离远而相关变低的像素,越能够使预测块的上面所邻接的像素的影响变小,其结果,起到能够高精度地进行预测的效果。According to this embodiment 1, the scaling value 1/u used when the frame internal prediction units 4 and 34 perform horizontal prediction processing is configured such that the scaling value related to the row farther from the pixel adjacent to the top of the prediction block is set to a smaller value. Therefore, the farther the distance between the pixels adjacent to the top of the prediction block and the lower the correlation, the smaller the influence of the pixels adjacent to the top of the prediction block can be. As a result, the effect of high-precision prediction can be achieved.
另外,关于由帧内部预测部4、34实施垂直方向预测处理时所使用的缩放值即1/t,构成为越是与从预测块的左面所邻接的像素起距离远的列有关的缩放值,设定为越小的值,所以越是与预测块的左面所邻接的像素之间的距离远而相关变低的像素,越能够使预测块的左面所邻接的像素的影响变小,其结果,起到能够高精度地进行预测的效果。In addition, regarding the scaling value 1/t used when the frame internal prediction units 4 and 34 implement vertical prediction processing, the scaling value related to the column that is farther away from the pixel adjacent to the left of the prediction block is set to a smaller value. Therefore, the farther the distance between the pixels adjacent to the left of the prediction block is, the lower the correlation becomes. The smaller the influence of the pixels adjacent to the left of the prediction block can be. As a result, the effect of high-precision prediction can be achieved.
另外,在该实施方式1中,示出了由帧内部预测部4、34实施水平方向预测处理时的预测块内的第N行(从预测块的上端起第N行)的缩放值是1/2N+1(=1/2,1/4,1/8,1/16,···)、由帧内部预测部4、34实施垂直方向预测处理时的预测块内的第M列(从预测块的左端起第M列)的缩放值是1/2M+1(=1/2,1/4,1/8,1/16,···)的例子,但这只是一个例子,只要由帧内部预测部4、34实施水平方向预测处理时越是从预测块的上端远离的行的缩放值越小、并且由帧内部预测部4、34实施垂直方向预测处理时越是从预测块的左端远离的列的缩放值越小,就可以是任意值。In addition, in this embodiment 1, an example is shown in which the scaling value of the Nth row (the Nth row from the top of the prediction block) in the prediction block when the intra-frame prediction unit 4, 34 performs horizontal prediction processing is 1/ 2N+1 (=1/2, 1/4, 1/8, 1/16,...), and the scaling value of the Mth column (the Mth column from the left end of the prediction block) in the prediction block when the intra-frame prediction unit 4, 34 performs vertical prediction processing is 1/ 2M+1 (=1/2, 1/4, 1/8, 1/16,...). However, this is only an example, and any value may be used as long as the scaling value of the row farther from the top of the prediction block when the intra-frame prediction unit 4, 34 performs horizontal prediction processing is smaller, and the scaling value of the column farther from the left end of the prediction block when the intra-frame prediction unit 4, 34 performs vertical prediction processing is smaller.
实施方式2.Implementation method 2.
在上述实施方式1中,帧内部预测部4、34在生成预测图像时的帧内预测处理是垂直方向预测处理的情况下,对预测块的上面所邻接的像素的亮度值,相加对该预测块的左面所邻接的像素的垂直方向的亮度值变化量乘以针对预测块内的每列设定的缩放值而得到的值,将该相加后的值决定为预测图像的预测值,但为了实现低运算的处理,也可以关于从预测块内的左端起的规定的几列,对该预测块的上面所邻接的像素的亮度值,相加与该预测块的左面所邻接的像素的垂直方向的亮度值变化量成比例的值,将该相加后的值决定为预测图像的预测值,但关于该预测块内的剩余的列,将该预测块的上面所邻接的像素的亮度值决定为预测图像的预测值。In the above-mentioned embodiment 1, when the intra-frame prediction processing when generating a predicted image is a vertical prediction processing, the intra-frame prediction units 4 and 34 add, to the luminance values of the pixels adjacent to the upper side of the prediction block, a value obtained by multiplying the vertical luminance value change of the pixels adjacent to the left of the prediction block by a scaling value set for each column in the prediction block, and determine the added value as the predicted value of the predicted image. However, in order to achieve low-calculation processing, it is also possible to add, to the luminance values of the pixels adjacent to the upper side of the prediction block for a predetermined number of columns starting from the left end of the prediction block, a value proportional to the vertical luminance value change of the pixels adjacent to the left of the prediction block, and determine the added value as the predicted value of the predicted image. However, for the remaining columns in the prediction block, the luminance values of the pixels adjacent to the upper side of the prediction block are determined as the predicted value of the predicted image.
另外,根据同样的理由,在生成预测图像时的帧内预测处理是水平方向预测处理的情况下,也可以关于从预测块内的上端起的规定的几行,对该预测块的左面所邻接的像素的亮度值,相加对该预测块的上面所邻接的像素的水平方向的亮度值变化量乘以针对预测块内的每行设定的缩放值而得到的值,将该相加后的值决定为预测图像的预测值,但关于该预测块内的剩余的行,将该预测块的左面所邻接的像素的亮度值决定为预测图像的预测值。In addition, for the same reason, when the intra-frame prediction processing when generating the predicted image is a horizontal prediction processing, the brightness values of the pixels adjacent to the left of the prediction block for a specified number of rows starting from the upper end of the prediction block can be added with the value obtained by multiplying the horizontal brightness value change of the pixels adjacent to the top of the prediction block by the scaling value set for each row in the prediction block, and the added value is determined as the predicted value of the predicted image, but for the remaining rows in the prediction block, the brightness values of the pixels adjacent to the left of the prediction block are determined as the predicted value of the predicted image.
以下,具体说明帧内部预测部4、34的处理内容。The following describes in detail the processing contents of the intra prediction units 4 and 34.
帧内部预测部4、34在针对预测块Pi n的帧内部预测模式的索引值是0(垂直方向预测)的情况下,根据下述式(4)计算预测块Pi n内的像素的预测值来生成预测图像。When the index value of the intra prediction mode for the prediction block Pin is 0 (vertical prediction), the intra prediction units 4 and 34 calculate the predicted values of the pixels in the prediction block Pin according to the following equation (4) to generate a predicted image.
其中,B是0以上的整数,在应用式(4)的上式的x<B时,在所计算出的预测值超过亮度值可取的值的范围的情况下,以使预测值收敛于该范围内的方式对值进行舍入。Here, B is an integer greater than 0. When x<B in the above formula of formula (4) is applied, if the calculated predicted value exceeds the range of values that the brightness value can take, the value is rounded so that the predicted value converges to the range.
使B的值越小,能够实现越低运算的处理,在B=0的情况下,与仅使用预测块Pi n的上面所邻接的已编码(已解码)像素的亮度值S(x,-1)的以往(MPEG-4AVC/H.264)的垂直方向预测一致。The smaller the value of B, the lower the computational effort can be. When B = 0, this is consistent with the previous (MPEG-4AVC/H.264) vertical prediction that uses only the luminance value S(x, -1) of the coded (decoded) pixel adjacent to the prediction block P in .
B的值也可以根据预测块Pi n的块尺寸而变更。一般,如果所预测的块尺寸变大,则在块内易于包含各种信号变化,难以在单一的方向上进行预测,所以能够利用方向性预测高精度地进行预测的情形减少。The value of B can also be changed according to the block size of the prediction block P in . Generally, as the predicted block size increases, various signal variations are more likely to be included within the block, making it difficult to predict in a single direction. Therefore, the situation where directional prediction can be used to achieve high-precision prediction decreases.
因此,仅在预测块Pi n的块尺寸小于规定尺寸的情况下设定为B≥1,如果预测块Pi n的块尺寸是规定尺寸以上,则设为B=0。Therefore, B ≥ 1 is set only when the block size of the prediction block Pin is smaller than a predetermined size, and B = 0 is set when the block size of the prediction block Pin is larger than the predetermined size.
例如,如果规定尺寸是16×16像素,则在16×16像素以上的块尺寸的预测块Pi n中成为B=0,所以与以往的垂直方向预测相同,能够抑制运算处理的增加。即,在B=0的块尺寸中,属于x<B或x≥B中的哪一个的条件判定处理变得不需要,所以始终不进行上述条件判定处理而进行以往的垂直方向预测,从而不会发生任何由以往的垂直方向预测处理所致的运算处理的增加。For example, if the specified size is 16×16 pixels, then B = 0 in prediction blocks Pin with block sizes larger than 16×16 pixels. This allows for the same reduction in computational processing as with conventional vertical prediction. Specifically, in block sizes with B = 0, the conditional determination process of whether x < B or x ≥ B is unnecessary. Therefore, conventional vertical prediction is performed without performing this conditional determination process, eliminating any increase in computational processing associated with conventional vertical prediction.
另一方面,在4×4像素、8×8像素等比16×16像素小的块尺寸的预测块Pi n中,成为B≥1,所以相比于以往的垂直方向预测,能够提高预测性能。On the other hand, in a prediction block Pin having a block size smaller than 16×16 pixels, such as 4×4 pixels and 8×8 pixels, B≥1 is satisfied, and thus prediction performance can be improved compared to conventional vertical prediction.
例如,在4×4像素的块尺寸的预测块Pi n中,在是B=1的情况下,针对预测块Pi n内的最左边的列,应用式(4)的上式,相加与预测块的左面所邻接的像素的垂直方向的亮度值变化量成比例的值。For example, in a prediction block Pin with a block size of 4×4 pixels, when B=1, the above formula (4) is applied to the leftmost column in the prediction block Pin , and a value proportional to the change in the vertical brightness value of the pixel adjacent to the left of the prediction block is added.
另一方面,针对预测块Pi n内的从左端起的第2~第4列,应用式(4)的下式,不相加与预测块的左面所邻接的像素的垂直方向的亮度值变化量成比例的值。On the other hand, for the 2nd to 4th columns from the left end in the prediction block Pin , the following equation (4) is applied without adding a value proportional to the vertical luminance value change of the left adjacent pixel of the prediction block.
通过这样将B的值设定为小的值,能够大幅抑制运算量的增加。By setting the value of B to a small value in this manner, an increase in the amount of calculation can be significantly suppressed.
另外,作为实际的装置,也可以如上述式(4)所示,在x<B的位置的像素和x≥B的位置的像素中,区分地构成预测值的计算式,还可以构成为针对预测块Pi n内的所有像素,在拷贝了作为以往的垂直方向预测的预测值的预测块Pi n的上面所邻接的已编码(已解码)像素的亮度值S(x,-1)之后,仅对x<B的位置的像素相加将S(-1,y)-S(-1,-1)缩放为1/t而得到的值等,只要能够计算与上述式等价的预测值,则可以任意地构成。In addition, as an actual device, as shown in the above formula (4), the calculation formula of the prediction value can be separately constructed for the pixels at the position of x<B and the pixels at the position of x≥B. It can also be constructed so that for all pixels in the prediction block P i n , after copying the luminance value S(x, -1) of the adjacent coded (decoded) pixel above the prediction block P i n as the prediction value of the previous vertical prediction, the value obtained by scaling S(-1, y)-S(-1, -1) to 1/t is added only to the pixels at the position of x<B, etc. As long as the prediction value equivalent to the above formula can be calculated, it can be constructed arbitrarily.
另外,帧内部预测部4、34在针对预测块Pi n的帧内部预测模式的索引值是1(水平方向预测)的情况下,根据下述式(5)计算预测块Pi n内的像素的预测值来生成预测图像。In addition, when the index value of the intra-frame prediction mode for the prediction block Pin is 1 (horizontal prediction), the intra-frame prediction unit 4, 34 calculates the prediction value of the pixel in the prediction block Pin according to the following formula ( 5 ) to generate a predicted image.
其中,C是0以上的整数,在应用式(5)的上式的x<C时,在所计算出的预测值超过亮度值可取的值的范围的情况下,以使预测值收敛于该范围内的方式对值进行舍入。Here, C is an integer greater than 0. When x<C in the above formula of formula (5) is applied, if the calculated predicted value exceeds the range of values that the brightness value can take, the value is rounded so that the predicted value converges within the range.
使C的值越小,能够实现越低运算的处理,在C=0的情况下,与仅使用预测块Pi n的左面所邻接的已编码(已解码)像素的亮度值S(-1,y)的以往(MPEG-4AVC/H.264)的水平方向预测一致。The smaller the value of C, the lower the computational effort can be. When C = 0, it is consistent with the previous (MPEG-4AVC/H.264) horizontal prediction that uses only the luminance value S(-1, y) of the encoded (decoded) pixel adjacent to the left of the prediction block Pin .
C的值也可以根据预测块Pi n的块尺寸而变更。一般,如果所预测的块尺寸变大,则在块内易于包含各种信号变化,难以在单一的方向上进行预测,所以能够通过方向性预测来高精度地进行预测的情形减少。The value of C can also be changed according to the block size of the prediction block Pin . Generally, as the predicted block size increases, various signal variations are more likely to be included within the block, making it difficult to predict in a single direction. Therefore, the situation where high-precision prediction can be performed using directional prediction decreases.
因此,仅在预测块Pi n的块尺寸比规定尺寸小的情况下设定为C≥1,如果预测块Pi n的块尺寸是规定尺寸以上,则设为C=0。Therefore, C ≥ 1 is set only when the block size of the prediction block Pin is smaller than a predetermined size, and C = 0 is set when the block size of the prediction block Pin is greater than or equal to the predetermined size.
例如,如果规定尺寸是16×16像素,则在16×16像素以上的块尺寸的预测块Pi n中,成为C=0,所以与以往的水平方向预测相同,能够抑制运算处理的增加。即,在C=0的块尺寸中,属于y<C或y≥C中的哪一个的条件判定处理变得不需要,所以始终不进行上述条件判定处理而进行以往的水平方向预测,从而不会发生任何由以往的水平方向预测处理所致的运算处理的增加。For example, if the specified size is 16×16 pixels, then C = 0 in prediction blocks Pin with block sizes larger than 16×16 pixels. This allows the reduction of computational processing, similar to conventional horizontal prediction. Specifically , in block sizes with C = 0, the conditional determination process of whether y < C or y ≥ C is unnecessary. Therefore, conventional horizontal prediction is performed without performing this conditional determination process, eliminating any increase in computational processing associated with conventional horizontal prediction.
另一方面,在4×4像素、8×8像素等比16×16像素小的块尺寸的预测块Pi n中,成为C≥1,所以相比于以往的水平方向预测,能够提高预测性能,并且大幅抑制运算量的增加。On the other hand, in prediction blocks Pin with a block size smaller than 16×16 pixels, such as 4×4 pixels and 8× 8 pixels, C≥1, so the prediction performance can be improved compared to conventional horizontal prediction, and the increase in the amount of calculation can be greatly suppressed.
例如,在4×4像素的块尺寸的预测块Pi n中,在是C=1的情况下,针对预测块Pi n内的最上面的行,应用式(5)的上式,相加与预测块的上面所邻接的像素的水平方向的亮度值变化量成比例的值。For example, in a prediction block Pin with a block size of 4×4 pixels, when C=1, the above formula (5) is applied to the top row in the prediction block Pin , and a value proportional to the change in the horizontal brightness value of the pixels adjacent to the top of the prediction block is added.
另一方面,针对预测块Pi n内的从上端起的第2~第4行,应用式(5)的下式,不相加与预测块的上面所邻接的像素的水平方向的亮度值变化量成比例的值。On the other hand, for the 2nd to 4th rows from the top in the prediction block Pin , the following equation (5) is applied without adding a value proportional to the amount of change in the horizontal luminance value of the upper adjacent pixels of the prediction block.
通过这样将C的值设定为小的值,能够大幅抑制运算量的增加。By setting the value of C to a small value in this manner, an increase in the amount of calculation can be significantly suppressed.
另外,作为实际的装置,也可以如上述式(5)所示,在y<C的位置的像素和y≥C的位置的像素中,区分地构成预测值的计算式,还可以构成为针对预测块Pi n内的所有像素,在拷贝了作为以往的水平方向预测的预测值的预测块Pi n的左面所邻接的已编码(已解码)像素的亮度值S(-1,y)之后,仅对y<C的位置的像素相加将S(x,-1)-S(-1,-1)缩放为1/u而得到的值等,只要能够计算与上述式等价的预测值,就可以任意地构成。In addition, as an actual device, as shown in the above formula (5), the calculation formula of the prediction value can be constructed separately for pixels at the position y<C and pixels at the position y≥C. It can also be constructed so that for all pixels in the prediction block P i n , after copying the luminance value S(-1, y) of the encoded (decoded) pixel adjacent to the left of the prediction block P i n as the previous horizontal prediction prediction value, the value obtained by scaling S(x, -1)-S(-1, -1) to 1/u is added only to the pixels at the position y<C, etc. As long as the prediction value equivalent to the above formula can be calculated, it can be constructed arbitrarily.
另外,关于作为在垂直方向预测中使用的缩放值的1/t、B(对预测块的上面所邻接的像素的亮度值相加与编码块的左面所邻接的像素的垂直方向的亮度值变化量成比例的值的表示预测块内的列的块内信息)、和作为在水平方向预测中使用的缩放值的1/u、C(对预测块的左面所邻接的像素的亮度值相加与预测块的上面所邻接的像素的水平方向的亮度值变化量成比例的值的表示预测块内的行的块内信息),也可以预先在运动图像编码装置以及运动图像解码装置之间约定,但也可以由运动图像编码装置的帧内部预测部4按照序列单位或者图片单位,将t、u、B、C输出到可变长编码部13,由可变长编码部13对t、u、B、C进行可变长编码而包含到比特流中,并由运动图像解码装置从比特流对t、u、B、C进行可变长解码来使用。In addition, regarding 1/t, B as the scaling value used in vertical prediction (intra-block information representing the column within the prediction block, in which the luminance value of the pixel adjacent to the upper side of the prediction block is added with a value proportional to the vertical luminance value change of the pixel adjacent to the left side of the coding block), and 1/u, C as the scaling value used in horizontal prediction (intra-block information representing the row within the prediction block, in which the luminance value of the pixel adjacent to the left side of the prediction block is added with a value proportional to the horizontal luminance value change of the pixel adjacent to the upper side of the prediction block), it is also possible to pre-agreed between the motion image encoding device and the motion image decoding device, but the frame intra prediction unit 4 of the motion image encoding device may output t, u, B, C to the variable length coding unit 13 in sequence units or picture units, and the variable length coding unit 13 may perform variable length encoding on t, u, B, C and include them in the bit stream, and the motion image decoding device may perform variable length decoding on t, u, B, C from the bit stream for use.
这样按照序列单位或者图片单位,能够自适应地控制t、u、B、C,从而能够实现进一步与输入图像的影像信号的特性对应的预测处理。In this way, t, u, B, and C can be adaptively controlled in sequence units or picture units, thereby enabling prediction processing that further corresponds to the characteristics of the video signal of the input image.
另外,关于使用式(4)的垂直方向预测、式(5)的水平方向预测的块尺寸,也可以预先在运动图像编码装置以及运动图像解码装置之间约定,但也可以由运动图像编码装置的帧内部预测部4按照序列单位或者图片单位,将表示使用式(4)的垂直方向预测、式(5)的水平方向预测的块尺寸的每个块尺寸的ON/OFF标志输出到可变长编码部13,由可变长编码部13对上述ON/OFF标志进行可变长编码而包含到比特流中,并由运动图像解码装置从比特流对上述ON/OFF标志进行可变长解码来使用。In addition, the block size for the vertical prediction using equation (4) and the horizontal prediction using equation (5) may be agreed upon in advance between the motion image encoding device and the motion image decoding device, but the intra-frame prediction unit 4 of the motion image encoding device may output an ON/OFF flag for each block size representing the block size for the vertical prediction using equation (4) and the horizontal prediction using equation (5) to the variable length encoding unit 13 according to a sequence unit or a picture unit, and the variable length encoding unit 13 may perform variable length encoding on the ON/OFF flag and include it in the bit stream, and the motion image decoding device may perform variable length decoding on the ON/OFF flag from the bit stream for use.
这样按照序列单位或者图片单位,能够自适应地控制使用式(4)的垂直方向预测、式(5)的水平方向预测的块尺寸,从而能够实现进一步与输入图像的影像信号的特性对应的预测处理。In this way, the block size of the vertical prediction using equation (4) and the horizontal prediction using equation (5) can be adaptively controlled in sequence units or picture units, thereby enabling prediction processing that further corresponds to the characteristics of the image signal of the input image.
通过以上可知,根据该实施方式2,帧内部预测部4、34构成为在生成预测图像时的帧内预测处理是水平方向预测处理的情况下,关于从预测块内的上端起的规定的几行,对该预测块的左面所邻接的像素的亮度值,相加与该预测块的上面所邻接的像素的水平方向的亮度值变化量成比例的值,将该相加后的值决定为预测图像的预测值,但关于该预测块内的剩余的行,将该预测块的左面所邻接的像素的亮度值决定为预测图像的预测值,所以起到能够抑制运算量的增加并且改善水平方向预测的预测效率的效果。As can be seen from the above, according to this embodiment 2, the intra-frame prediction units 4 and 34 are configured to, when the intra-frame prediction processing when generating the predicted image is the horizontal prediction processing, add a value proportional to the horizontal brightness value change of the pixel adjacent to the top of the prediction block to the brightness values of the pixels adjacent to the left of the prediction block for a specified number of rows starting from the upper end of the prediction block, and determine the added value as the predicted value of the predicted image, but determine the brightness value of the pixel adjacent to the left of the prediction block as the predicted value of the predicted image for the remaining rows in the prediction block, thereby suppressing the increase in the amount of calculation and improving the prediction efficiency of the horizontal prediction.
另外,帧内部预测部4、34构成为在生成预测图像时的帧内预测处理是垂直方向预测处理的情况下,关于从预测块内的左端起的规定的几列,对该预测块的上面所邻接的像素的亮度值,相加与该预测块的左面所邻接的像素的垂直方向的亮度值变化量成比例的值,将该相加后的值决定为预测图像的预测值,但关于该预测块内的剩余的列,将该预测块的上面所邻接的像素的亮度值决定为预测图像的预测值,所以起到能够抑制运算量的增加并且改善垂直方向预测的预测效率的效果。In addition, the intra-frame prediction units 4 and 34 are configured to, when the intra-frame prediction processing when generating a predicted image is a vertical prediction processing, add a value proportional to the vertical brightness value change of the pixel adjacent to the left of the prediction block to the brightness values of the pixels adjacent to the upper side of the prediction block for a predetermined number of columns starting from the left end of the prediction block, and determine the added value as the predicted value of the predicted image, but determine the brightness value of the pixel adjacent to the upper side of the prediction block as the predicted value of the predicted image for the remaining columns within the prediction block, thereby suppressing the increase in the amount of calculation and improving the prediction efficiency of the vertical prediction.
实施方式3.Implementation method 3.
该实施方式3中的运动图像编码装置的结构图与上述实施方式1中示出的图1相同,该实施方式3中的运动图像解码装置的结构图与上述实施方式1中示出的图3相同。The structural diagram of the moving picture encoding device in this embodiment 3 is the same as FIG. 1 shown in the above-mentioned embodiment 1, and the structural diagram of the moving picture decoding device in this embodiment 3 is the same as FIG. 3 shown in the above-mentioned embodiment 1.
接下来,说明动作。Next, the operation will be explained.
在该实施方式3中,说明如下的运动图像编码装置和运动图像解码装置,其中,该运动图像编码装置将影像的各帧图像作为输入图像,实施从已编码的附近像素进行的帧内部预测或者邻近帧间的运动补偿预测,针对所得到的预测差分信号实施基于正交变换/量化的压缩处理,之后进行可变长编码来生成比特流,该运动图像解码装置对从该运动图像编码装置输出的比特流进行解码。In this embodiment 3, the following motion image encoding device and motion image decoding device are described, wherein the motion image encoding device takes each frame image of the image as an input image, implements intra-frame prediction from encoded nearby pixels or motion compensation prediction between adjacent frames, implements compression processing based on orthogonal transform/quantization on the obtained prediction differential signal, and then performs variable-length encoding to generate a bit stream, and the motion image decoding device decodes the bit stream output from the motion image encoding device.
图1的运动图像编码装置的特征在于,适应于影像信号的空间/时间方向的局部性的变化,而将影像信号分割为各种尺寸的块,来进行帧内/帧间自适应编码。The moving picture encoding apparatus of FIG. 1 is characterized in that it divides the video signal into blocks of various sizes and performs intra-frame/inter-frame adaptive encoding in accordance with local variations of the video signal in the spatial and temporal directions.
一般,影像信号具有在空间/时间上信号的复杂度局部地变化的特性。在空间上观察时,有时在某个影像帧上,例如既有在天空、壁等那样的比较宽的图像区域中具有均匀的信号特性的图样,也混合存在人物或包含细微的纹理的绘画等在小的图像区域内具有复杂的纹理图案的图样。In general, image signals have the characteristic of locally varying signal complexity in space and time. When viewed spatially, within a given image frame, there may be patterns with uniform signal characteristics across relatively wide image regions, such as the sky or a wall, but also patterns with complex texture patterns within smaller image regions, such as figures or paintings with subtle textures.
即使在时间上观察,虽然关于天空、壁,局部性地时间方向的图样的变化小,但关于活动的人物、物体,由于其轮廓在时间上进行刚体/非刚体的运动,所以时间上的变化大。Even when observing over time, although the local changes in the time direction of the pattern of the sky and the wall are small, the changes over time of moving people and objects are large because their outlines undergo rigid/non-rigid motion over time.
在编码处理中,进行通过时间/空间上的预测来生成信号功率或熵小的预测差分信号从而削减整体的符号量的处理,但只要能够将预测中使用的参数均匀地应用于尽可能大的图像信号区域,就能够减小该参数的符号量。In the encoding process, a prediction differential signal with low signal power or entropy is generated through temporal/spatial prediction to reduce the overall symbol amount. However, as long as the parameters used in the prediction can be evenly applied to the largest possible image signal area, the symbol amount of the parameter can be reduced.
另一方面,如果针对时间上/空间上变化大的图像信号图案,将同一预测参数应用于大的图像区域,则预测的错误增加,所以预测差分信号的符号量增加。On the other hand, if the same prediction parameters are applied to a large image area for an image signal pattern that varies greatly temporally and spatially, prediction errors increase, and thus the code amount of the prediction difference signal increases.
因此,在时间上/空间上变化大的区域中,优选减小应用同一预测参数来进行预测处理的块尺寸,增加预测中使用的参数的数据量,降低预测差分信号的功率/熵。Therefore, in areas with large temporal/spatial variations, it is preferable to reduce the block size for prediction processing using the same prediction parameters, increase the amount of data of the parameters used in the prediction, and reduce the power/entropy of the prediction differential signal.
在该实施方式3中,为了进行与这样的影像信号的一般的性质适应的编码,采用如下结构:最初从规定的最大块尺寸开始预测处理等,层次性地分割影像信号的区域,针对所分割的每个区域,使预测处理、其预测差分的编码处理自适应化。In this embodiment 3, in order to perform encoding that is adapted to the general properties of such image signals, the following structure is adopted: the prediction processing is initially started from a specified maximum block size, the image signal area is hierarchically divided, and for each divided area, the prediction processing and the encoding processing of its prediction difference are adapted.
关于图1的运动图像编码装置设为处理对象的影像信号格式,除了由亮度信号和2个色差信号构成的YUV信号、从数字摄像元件输出的RGB信号等任意的颜色空间的彩色影像信号以外,还设为单色图像信号、红外线图像信号等影像帧由水平和垂直二维的数字采样(像素)列构成的任意的影像信号。Regarding the motion image encoding device in Figure 1, the image signal format of the processing object is set to be, in addition to color image signals of arbitrary color spaces such as YUV signals composed of a luminance signal and two color difference signals, RGB signals output from a digital camera element, etc., it is also set to arbitrary image signals such as monochrome image signals and infrared image signals whose image frames are composed of horizontal and vertical two-dimensional digital sampling (pixel) columns.
其中,各像素的灰度既可以是8比特,也可以是10比特、12比特等灰度。The grayscale of each pixel can be 8 bits, 10 bits, 12 bits, etc.
在以下的说明中,为了方便,只要没有特别说明,就说明设为输入图像的影像信号是YUV信号、并且处理2个色差分量U、V相对亮度分量Y被子采样了的4:2:0格式的信号的情况。For convenience, in the following description, unless otherwise specified, it is assumed that the video signal of the input image is a YUV signal, and a 4:2:0 format signal in which the two color difference components U and V are subsampled relative to the luminance component Y is processed.
另外,将与影像信号的各帧对应的处理数据单位称为“图片”。In addition, a processing data unit corresponding to each frame of a video signal is referred to as a "picture".
在该实施方式3中,将“图片”设为依次扫描(逐行扫描)了的影像帧信号而进行说明,但在影像信号是隔行扫描信号的情况下,“图片”也可以是作为构成影像帧的单位的场图像信号。In this third embodiment, the "picture" is described as an image frame signal scanned sequentially (progressive scanning), but when the image signal is an interlaced scanning signal, the "picture" can also be a field image signal that is a unit constituting an image frame.
最初,说明图1的运动图像编码装置的处理内容。First, the processing contents of the moving picture encoding apparatus in FIG. 1 will be described.
首先,编码控制部2决定成为编码对象的图片(当前图片)的编码中使用的最大编码块的尺寸、和对最大编码块进行层次分割的层次数的上限(图2的步骤ST1)。First, the encoding control unit 2 determines the size of the maximum coding block used for encoding the picture to be encoded (current picture) and the upper limit of the number of hierarchical divisions of the maximum coding block (step ST1 in FIG. 2 ).
作为最大编码块的尺寸的决定方法,例如既可以根据输入图像的影像信号的分辨率而对所有图片决定同一尺寸,也可以将输入图像的影像信号的局部性的运动的复杂度的差异作为参数而进行定量化,对于运动剧烈的图片决定小的尺寸,另一方面对于运动少的图片决定大的尺寸。As a method for determining the size of the maximum coding block, for example, the same size can be determined for all pictures based on the resolution of the image signal of the input image, or the difference in the complexity of the local motion of the image signal of the input image can be quantified as a parameter, and a small size can be determined for pictures with intense motion, and a large size can be determined for pictures with less motion.
作为分割层次数的上限的决定方法,例如有根据输入图像的影像信号的分辨率针对所有图片决定同一层次数的方法、或在输入图像的影像信号的运动剧烈的情况下设定为增大层次数而能够检测更细微的运动且在运动少的情况下设定为抑制层次数的方法等。As a method for determining the upper limit of the number of segmentation levels, there is a method of determining the same number of levels for all pictures based on the resolution of the image signal of the input image, or a method of setting the number of levels to be increased when the motion of the image signal of the input image is intense so as to be able to detect more subtle motion, and setting the number of levels to be suppressed when the motion is small.
另外,编码控制部2从可利用的1个以上的编码模式中选择与层次性地分割的各个编码块对应的编码模式(步骤ST2)。Furthermore, the encoding control unit 2 selects an encoding mode corresponding to each hierarchically divided encoding block from one or more available encoding modes (step ST2 ).
即,编码控制部2针对最大编码块尺寸的每个图像区域,直至达到预先决定的分割层次数的上限为止,层次性地分割为具有编码块尺寸的编码块,决定针对各个编码块的编码模式。That is, the encoding control unit 2 hierarchically divides each image region of the maximum encoding block size into encoding blocks having the encoding block size until the upper limit of the number of division levels determined in advance is reached, and determines the encoding mode for each encoding block.
在编码模式中有一个或多个帧内部编码模式(总称为“INTRA”)、和一个或多个帧间编码模式(总称为“INTER”),编码控制部2从在该图片中可利用的所有编码模式或者其子集中,选择与各个编码块对应的编码模式。Among the coding modes, there are one or more intra-frame coding modes (collectively referred to as "INTRA") and one or more inter-frame coding modes (collectively referred to as "INTER"). The coding control unit 2 selects the coding mode corresponding to each coding block from all coding modes available in the picture or a subset thereof.
其中,由后述块分割部1层次性地分割的各个编码块被进一步分割为作为进行预测处理的单位的一个或多个预测块,预测块的分割状态也作为信息而被包含于编码模式中。Each coding block hierarchically divided by a block division unit 1 described later is further divided into one or more prediction blocks as units for performing prediction processing, and the division status of the prediction blocks is also included as information in the coding mode.
编码控制部2的编码模式的选择方法是公知的技术,所以省略详细的说明,例如有如下方法等:使用可利用的任意的编码模式来实施针对编码块的编码处理而验证编码效率,在可利用的多个编码模式中选择编码效率最佳的编码模式。The method for selecting the coding mode of the coding control unit 2 is a well-known technology, so detailed description is omitted. For example, there are the following methods: use any available coding mode to implement coding processing for the coding block to verify the coding efficiency, and select the coding mode with the best coding efficiency from multiple available coding modes.
另外,编码控制部2针对各个编码块的每一个,决定在压缩差分图像时使用的量化参数以及变换块尺寸,并且决定在实施预测处理时使用的预测参数(帧内部预测参数或者帧间预测参数)。Furthermore, the encoding control unit 2 determines, for each encoding block, a quantization parameter and a transform block size used when compressing a differential image, and determines prediction parameters (intra-frame prediction parameters or inter-frame prediction parameters) used when performing a prediction process.
其中,在编码块进一步被分割为进行预测处理的预测块单位的情况下,能够针对每个预测块选择预测参数(帧内部预测参数或者帧间预测参数)。When the coding block is further divided into prediction block units for performing prediction processing, prediction parameters (intra-frame prediction parameters or inter-frame prediction parameters) can be selected for each prediction block.
进而,在编码模式是帧内部编码模式的编码块中,由于在如后所述那样进行帧内部预测处理时使用与预测块邻接的已编码的像素,所以需要按照预测块单位进行编码,所以可选择的变换块尺寸被限制为预测块的尺寸以下。Furthermore, in a coding block whose coding mode is the intra-frame coding mode, since the encoded pixels adjacent to the prediction block are used when performing intra-frame prediction processing as described later, encoding needs to be performed in units of prediction blocks, so the selectable transform block size is limited to be less than the size of the prediction block.
编码控制部2将包括量化参数以及变换块尺寸的预测差分编码参数输出到变换/量化部7、逆量化/逆变换部8以及可变长编码部13。The encoding control unit 2 outputs the prediction difference encoding parameters including the quantization parameter and the transform block size to the transform/quantization unit 7 , the inverse quantization/inverse transform unit 8 , and the variable length encoding unit 13 .
另外,编码控制部2将帧内部预测参数根据需要而输出到帧内部预测部4。Furthermore, the encoding control unit 2 outputs the intra prediction parameters to the intra prediction unit 4 as needed.
另外,编码控制部2将帧间预测参数根据需要而输出到运动补偿预测部5。Furthermore, the encoding control unit 2 outputs the inter-frame prediction parameters to the motion compensation prediction unit 5 as needed.
如果输入了输入图像的影像信号,则块分割部1将该输入图像的影像信号分割为由编码控制部2决定的最大编码块尺寸,进而将分割了的最大编码块层次性地分割为由编码控制部2决定的编码块,并输出该编码块。If the image signal of the input image is input, the block division unit 1 divides the image signal of the input image into the maximum coding block size determined by the coding control unit 2, and further hierarchically divides the divided maximum coding block into coding blocks determined by the coding control unit 2, and outputs the coding blocks.
此处,图5是示出最大编码块被层次性地分割为多个编码块的例子的说明图。Here, FIG5 is an explanatory diagram showing an example in which a maximum coding block is hierarchically divided into a plurality of coding blocks.
在图5中,最大编码块是被记载为“第0层次”的亮度分量具有(L0,M0)的尺寸的编码块。In FIG5 , the largest coding block is a coding block having a size of (L 0 , M 0 ) for the luminance component described as “layer 0”.
将最大编码块设为出发点,直至利用四叉树构造另行决定的规定的深度为止,层次性地进行分割,从而得到编码块。The largest coding block is used as a starting point, and coding blocks are obtained by hierarchically dividing the block up to a predetermined depth determined separately using a quadtree structure.
在深度n中,编码块是尺寸(Ln,Mn)的图像区域。At depth n, a coding block is an image region of size ( Ln , Mn ).
其中,Ln和Mn既可以相同,也可以不同,但在图5中示出了Ln=Mn的情形。 Ln and Mn may be the same or different, but FIG. 5 shows the case where Ln = Mn .
以后,将由编码控制部2决定的编码块尺寸定义为编码块的亮度分量中的尺寸(Ln,Mn)。Hereinafter, the coding block size determined by the coding control unit 2 is defined as the size (L n , M n ) of the luminance component of the coding block.
由于进行四叉树分割,所以(Ln+1,Mn+1)=(Ln/2,Mn/2)始终成立。Since quadtree partitioning is performed, (Ln +1 , Mn +1 ) = ( Ln /2, Mn /2) always holds.
另外,在RGB信号等所有颜色分量具有同一采样数的彩色影像信号(4:4:4格式)中,所有颜色分量的尺寸成为(Ln,Mn),但在处理4:2:0格式的情况下,所对应的色差分量的编码块尺寸成为(Ln/2,Mn/2)。Furthermore, in a color video signal (4:4:4 format) such as an RGB signal where all color components have the same number of samples, the size of all color components is ( Ln , Mn ). However, when processing the 4:2:0 format, the encoding block size of the corresponding color difference component is ( Ln /2, Mn /2).
以后,设为用Bn来表示第n层次的编码块,用m(Bn)来表示在编码块Bn中可选择的编码模式。Hereinafter, it is assumed that Bn represents the coding block of the nth layer, and m( Bn ) represents the coding mode selectable in the coding block Bn .
在由多个颜色分量构成的彩色影像信号的情况下,编码模式m(Bn)既可以构成为针对每个颜色分量分别使用单独的模式,也可以构成为针对所有颜色分量使用共同的模式。以后,只要没有特别说明,就指与YUV信号、4:2:0格式的编码块的亮度分量对应的编码模式而进行说明。In the case of a color video signal composed of multiple color components, the coding mode m(B n ) can be configured to use a separate mode for each color component or a common mode for all color components. Unless otherwise specified, the following description refers to the coding mode corresponding to the luma component of a YUV signal and a coding block in the 4:2:0 format.
编码块Bn如图6所示,通过块分割部1而被分割为表示预测处理单位的一个或多个预测块。As shown in FIG6 , the coding block Bn is divided by the block division unit 1 into one or more prediction blocks representing prediction processing units.
以后,将属于编码块Bn的预测块记载为Pi n(i是第n层次中的预测块编号)。图5示出P0 0和P1 0的一个例子。Hereinafter, the prediction block belonging to the coding block Bn will be referred to as P in (i is the prediction block number in the nth layer). FIG5 shows an example of P00 and P10 .
在编码模式m(Bn)中作为信息而包含有如何进行编码块Bn的预测块分割。Coding mode m(B n ) includes information on how to perform prediction block division of coding block B n .
关于预测块Pi n,全部依照编码模式m(Bn)进行预测处理,但能够针对每个预测块Pi n,选择单独的预测参数(帧内部预测参数或者帧间预测参数)。Regarding all prediction blocks Pin , prediction processing is performed according to the coding mode m( Bn ), but individual prediction parameters (intra-frame prediction parameters or inter-frame prediction parameters) can be selected for each prediction block Pin .
编码控制部2针对最大编码块,例如生成图6所示那样的块分割状态来确定编码块。The encoding control unit 2 generates a block division state as shown in FIG. 6 for the largest encoding block, for example, and determines the encoding blocks.
图6(a)的虚线所包围的矩形表示各编码块,各编码块内存在的用斜线涂覆的块表示各预测块的分割状态。The rectangles surrounded by dotted lines in FIG6(a) represent each coding block, and the blocks filled with diagonal lines within each coding block represent the division status of each prediction block.
图6(b)是关于图6(a)的例子利用四叉树图形表示了通过层次分割来分配编码模式m(Bn)的状况的图。图6(b)的□所包围的节点是分配了编码模式m(Bn)的节点(编码块)。Fig. 6(b) shows the allocation of coding mode m( Bn ) by hierarchical partitioning using a quadtree graph in the example of Fig. 6(a). Nodes surrounded by squares in Fig. 6(b) are nodes (coding blocks) to which coding mode m( Bn ) is allocated.
该四叉树图形的信息与编码模式m(Bn)一起从编码控制部2输出到可变长编码部13而被复用到比特流。The information on the quadtree pattern is output from the encoding control unit 2 to the variable-length encoding unit 13 together with the encoding mode m(B n ) and multiplexed into the bit stream.
切换开关3在由编码控制部2决定的编码模式m(Bn)是帧内部编码模式的情况(m(Bn)∈INTRA的情况)下,将从块分割部1输出的编码块Bn输出到帧内部预测部4。When the coding mode m(B n ) determined by the coding control unit 2 is the intra coding mode (m(B n )∈INTRA), the switch 3 outputs the coding block B n output from the block division unit 1 to the intra prediction unit 4 .
另一方面,在由编码控制部2决定的编码模式m(Bn)是帧间编码模式的情况(m(Bn)∈INTER的情况)下,将从块分割部1输出的编码块Bn输出到运动补偿预测部5。On the other hand, when the coding mode m(B n ) determined by the coding control unit 2 is the inter-coding mode (m(B n )∈INTER), the coding block B n output from the block division unit 1 is output to the motion compensation prediction unit 5 .
在帧内部预测部4中,如果由编码控制部2决定的编码模式m(Bn)是帧内部编码模式(m(Bn)∈INTRA的情况),且从切换开关3接收到编码块Bn(步骤ST3),则一边参照帧内部预测用存储器10中储存的局部解码图像,一边使用由编码控制部2决定的帧内部预测参数,来实施针对该编码块Bn内的各预测块Pi n的帧内部预测处理而生成帧内部预测图像PINTRAi n(步骤ST4)。In the intra-frame prediction unit 4, if the coding mode m( Bn ) determined by the coding control unit 2 is the intra-frame coding mode (in the case where m( Bn )∈INTRA) and the coding block Bn is received from the switch 3 (step ST3), the intra-frame prediction unit 4 performs intra-frame prediction processing on each prediction block P in the coding block Bn using the intra-frame prediction parameters determined by the coding control unit 2 while referring to the local decoded image stored in the intra- frame prediction memory 10 , thereby generating an intra-frame prediction image P INTRAi n (step ST4).
另外,运动图像解码装置需要生成与帧内部预测图像PINTRAi n完全相同的帧内部预测图像,所以帧内部预测图像PINTRAi n的生成中使用的帧内部预测参数从编码控制部2输出到可变长编码部13而被复用到比特流。In addition, the motion picture decoding device needs to generate an intra-frame prediction image that is completely identical to the intra-frame prediction image P INTRAi n , so the intra-frame prediction parameters used in generating the intra-frame prediction image P INTRAi n are output from the encoding control unit 2 to the variable length encoding unit 13 and multiplexed into the bit stream.
在后面详细叙述帧内部预测部4的处理内容。The details of the processing performed by the intra-frame prediction unit 4 will be described later.
在运动补偿预测部5中,如果由编码控制部2决定的编码模式m(Bn)是帧间编码模式(m(Bn)∈INTER的情况),且从切换开关3接收到编码块Bn(步骤ST3),则比较该编码块Bn内的各预测块Pi n和运动补偿预测帧存储器12中储存的滤波处理后的局部解码图像来搜索运动矢量,使用该运动矢量和由编码控制部2决定的帧间预测参数,实施针对该编码块Bn内的各预测块Pi n的帧间预测处理,生成帧间预测图像PINTERi n(步骤ST5)。In the motion-compensated prediction unit 5, if the coding mode m( Bn ) determined by the coding control unit 2 is the inter-frame coding mode (in the case where m( Bn )∈INTER), and the coding block Bn is received from the switching switch 3 (step ST3), each prediction block P in the coding block Bn is compared with the filtered local decoded image stored in the motion-compensated prediction frame memory 12 to search for a motion vector. Then, using the motion vector and the inter-frame prediction parameters determined by the coding control unit 2, inter-frame prediction processing is performed on each prediction block P in the coding block Bn to generate an inter-frame prediction image PINTERi n (step ST5).
另外,运动图像解码装置需要生成与帧间预测图像PINTERi n完全相同的帧间预测图像,所以帧间预测图像PINTERi n的生成中使用的帧间预测参数从编码控制部2输出到可变长编码部13而被复用到比特流。Furthermore, the moving picture decoding apparatus needs to generate an inter-frame prediction image identical to the inter-frame prediction image PINTERi n , so the inter-frame prediction parameters used in generating the inter-frame prediction image PINTERi n are output from the encoding control unit 2 to the variable-length encoding unit 13 and multiplexed into the bitstream.
另外,由运动补偿预测部5搜索到的运动矢量也输出到可变长编码部13而被复用到比特流。In addition, the motion vector searched by the motion compensation prediction unit 5 is also output to the variable length coding unit 13 and multiplexed into the bit stream.
减法部6如果从块分割部1接收到编码块Bn,则从该编码块Bn内的预测块Pi n减去由帧内部预测部4生成的帧内部预测图像PINTRAi n或者由运动补偿预测部5生成的帧间预测图像PINTERi n中的某一方,将作为其相减结果的预测差分信号ei n输出到变换/量化部7(步骤ST6)。Upon receiving the coding block Bn from the block partitioning unit 1, the subtraction unit 6 subtracts either the intra- frame prediction image P INTRAi n generated by the intra-frame prediction unit 4 or the inter-frame prediction image P INTERi n generated by the motion-compensated prediction unit 5 from the prediction block P in the coding block Bn , and outputs a prediction difference signal e in which the subtraction result is obtained to the transform/quantization unit 7 (step ST6).
变换/量化部7如果从减法部6接收到预测差分信号ei n,则参照由编码控制部2决定的预测差分编码参数,实施针对该预测差分信号ei n的正交变换处理(例如,DCT(离散余弦变换)、对预先确定的学习序列进行了基底设计的KL变换等正交变换处理),计算变换系数。Upon receiving the prediction differential signal e in from the subtraction unit 6, the transform/quantization unit 7 performs an orthogonal transform process (e.g., DCT (discrete cosine transform), KL transform with a basis design performed on a predetermined learning sequence, or other orthogonal transform process) on the prediction differential signal e in reference to the prediction differential coding parameters determined by the coding control unit 2, and calculates the transform coefficients.
另外,变换/量化部7参照该预测差分编码参数,对该变换系数进行量化,将作为量化后的变换系数的压缩数据输出到逆量化/逆变换部8以及可变长编码部13(步骤ST7)。Furthermore, the transform/quantization unit 7 quantizes the transform coefficients with reference to the prediction difference coding parameters, and outputs the compressed data of the quantized transform coefficients to the inverse quantization/inverse transform unit 8 and the variable length coding unit 13 (step ST7).
逆量化/逆变换部8如果从变换/量化部7接收到压缩数据,则参照由编码控制部2决定的预测差分编码参数,对该压缩数据进行逆量化。Upon receiving the compressed data from the transform/quantization unit 7 , the inverse quantization/inverse transform unit 8 inversely quantizes the compressed data with reference to the prediction difference encoding parameter determined by the encoding control unit 2 .
另外,逆量化/逆变换部8参照该预测差分编码参数,实施针对作为逆量化后的压缩数据的变换系数的逆正交变换处理(例如,逆DCT、逆KL变换等),计算与从减法部6输出的预测差分信号ei n相当的局部解码预测差分信号并输出到加法部9(步骤ST8)。In addition, the inverse quantization/inverse transform unit 8 refers to the predicted differential coding parameters, performs inverse orthogonal transform processing (for example, inverse DCT, inverse KL transform, etc.) on the transform coefficients of the compressed data after inverse quantization, calculates the local decoded predicted differential signal equivalent to the predicted differential signal e i n output from the subtraction unit 6, and outputs it to the addition unit 9 (step ST8).
加法部9如果从逆量化/逆变换部8接收到局部解码预测差分信号,则将该局部解码预测差分信号、与由帧内部预测部4生成的帧内部预测图像PINTRAi n和由运动补偿预测部5生成的帧间预测图像PINTERi n中的某一方进行相加,从而计算局部解码图像(步骤ST9)。If the adding unit 9 receives the local decoded prediction differential signal from the inverse quantization/inverse transform unit 8, it adds the local decoded prediction differential signal to one of the intra-frame prediction image P INTRAi n generated by the intra-frame prediction unit 4 and the inter-frame prediction image P INTERi n generated by the motion compensation prediction unit 5, thereby calculating the local decoded image (step ST9).
另外,加法部9将该局部解码图像输出到环路滤波器部11,并且将该局部解码图像储存到帧内部预测用存储器10中。Furthermore, the adding unit 9 outputs the local decoded image to the loop filtering unit 11 and stores the local decoded image in the intra-frame prediction memory 10 .
该局部解码图像成为在以后的帧内部预测处理时使用的已编码的图像信号。This locally decoded image becomes an encoded image signal used in subsequent intra-frame prediction processing.
环路滤波器部11如果从加法部9接收到局部解码图像,则对该局部解码图像实施规定的滤波处理,将滤波处理后的局部解码图像储存到运动补偿预测帧存储器12中(步骤ST10)。Upon receiving the local decoded image from the adder 9 , the loop filter unit 11 performs a predetermined filtering process on the local decoded image and stores the filtered local decoded image in the motion-compensated prediction frame memory 12 (step ST10 ).
另外,关于由环路滤波器部11执行的滤波处理,既可以以所输入的局部解码图像的最大编码块或者各个编码块为单位进行,也可以在输入了1个图片量的局部解码图像之后集中1个图片量来进行。The filtering process performed by the loop filter unit 11 may be performed in units of the largest coding block or each coding block of the input local decoded image, or may be performed collectively for one picture after one picture of local decoded images is input.
另外,作为规定的滤波处理的例子,可以举出以使编码块边界的不连续性(块噪声)不会变得显著的方式对块边界进行滤波的处理、以使作为输入图像的图1的影像信号与局部解码图像之间的误差成为最小的方式对局部解码图像的失真进行补偿的滤波处理等。In addition, as examples of prescribed filtering processing, there can be cited processing that filters block boundaries in a manner that prevents discontinuity (block noise) at the coding block boundaries from becoming noticeable, filtering processing that compensates for distortion of a local decoded image in a manner that minimizes the error between the image signal of Figure 1 as the input image and the local decoded image, and the like.
但是,在进行以使作为输入图像的图1的影像信号与局部解码图像之间的误差成为最小的方式对局部解码图像的失真进行补偿的滤波处理的情况下,需要在环路滤波器部11中参照影像信号,所以需要变更图1的运动图像编码装置使得对环路滤波器部11输入影像信号。However, when performing filtering processing to compensate for the distortion of the local decoded image in a manner that minimizes the error between the image signal of Figure 1 as the input image and the local decoded image, it is necessary to refer to the image signal in the loop filter unit 11, so it is necessary to change the motion image encoding device of Figure 1 so that the image signal is input to the loop filter unit 11.
直至针对层次性地分割了的所有编码块Bn的处理完成为止重复实施步骤ST3~ST9的处理,如果针对所有编码块Bn的处理完成,则转移到步骤ST13的处理(步骤ST11、ST12)。The processes of steps ST3 to ST9 are repeatedly performed until the processes of all the hierarchically divided coding blocks Bn are completed. When the processes of all the coding blocks Bn are completed, the process proceeds to step ST13 (steps ST11 and ST12).
可变长编码部13对从变换/量化部7输出的压缩数据、从编码控制部2输出的最大编码块内的块分割信息(以图6(b)为例子的四叉树信息)、编码模式m(Bn)以及预测差分编码参数、从编码控制部2输出的帧内部预测参数(编码模式是帧内部编码模式的情况)或者帧间预测参数(编码模式是帧间编码模式的情况)、以及从运动补偿预测部5输出的运动矢量(编码模式是帧间编码模式的情况)进行可变长编码,生成表示这些编码结果的比特流(步骤ST13)。The variable-length coding unit 13 performs variable-length coding on the compressed data output from the transform/quantization unit 7, the block division information within the largest coding block output from the coding control unit 2 (quadtree information in FIG. 6B ), the coding mode m (B n ) and the prediction difference coding parameters, the intra-frame prediction parameters (when the coding mode is the intra-frame coding mode) or inter-frame prediction parameters (when the coding mode is the inter-frame coding mode) output from the coding control unit 2, and the motion vector (when the coding mode is the inter-frame coding mode) output from the motion compensation prediction unit 5, and generates a bitstream representing these coding results (step ST13).
接下来,详细说明帧内部预测部4的处理内容。Next, the processing contents of the intra prediction unit 4 will be described in detail.
图17是示出编码块Bn内的各预测块Pi n可选择的帧内部预测参数(帧内部预测模式)的一个例子的说明图。其中,NI表示帧内部预测模式数。FIG17 is an explanatory diagram showing an example of intra-frame prediction parameters (intra-frame prediction modes) selectable by each prediction block Pin within a coding block Bn . NI represents the number of intra-frame prediction modes.
在图17中,示出帧内部预测模式和该帧内部预测模式所表示的预测方向矢量,在图17的例子中,进行设计使得随着可选择的帧内部预测模式的个数增加而使预测方向矢量彼此的相对角度变小。FIG17 shows an intra-frame prediction mode and a prediction direction vector represented by the intra-frame prediction mode. In the example of FIG17 , the design is such that the relative angles between the prediction direction vectors decrease as the number of selectable intra-frame prediction modes increases.
帧内部预测部4如上述那样参照预测块Pi n的帧内部预测参数,实施针对该预测块Pi n的帧内部预测处理,生成帧内部预测图像PINTRAi n,但此处说明生成亮度信号中的预测块Pi n的帧内部预测信号的帧内部处理。As described above, the intra - frame prediction unit 4 refers to the intra-frame prediction parameters of the prediction block Pin , performs intra-frame prediction processing on the prediction block Pin , and generates an intra-frame prediction image Pintran . However, the intra-frame processing for generating an intra- frame prediction signal of the prediction block Pin in the luminance signal is described here.
将预测块Pi n的尺寸设为li n×mi n像素。The size of the prediction block Pin is set to lin × min pixels .
图8是示出生成li n=mi n=4的情况的预测块Pi n内的像素的预测值时使用的像素的一个例子的说明图。FIG8 is an explanatory diagram showing an example of pixels used when generating predicted values of pixels in a prediction block Pin in the case of lin = min = 4 .
在图8中,将预测块Pi n的上面的已编码的像素(2×li n+1)个、和左面的已编码的像素(2×mi n)个设为预测中使用的像素,但预测中使用的像素既可以多于图8所示的像素也可以少于图8所示的像素。In FIG8 , the coded pixels ( 2 × lin +1) above and the coded pixels ( 2× min ) to the left of the prediction block Pin are used as pixels for prediction. However, the number of pixels used for prediction may be more or less than the number of pixels shown in FIG8 .
另外,在图8中,将预测块Pi n的附近的1行或者1列量的像素用于预测,但也可以将2行或2列、或者其以上的像素用于预测。In addition, in Figure 8, one row or one column of pixels near the prediction block Pin is used for prediction, but two rows or two columns, or more than two rows of pixels may be used for prediction.
在针对预测块Pi n的帧内部预测模式的索引值是0(平面(Planar)预测)的情况下,将使用预测块Pi n的上面所邻接的已编码的像素和预测块Pi n的左面所邻接的已编码的像素根据预测块Pi n内的预测对象像素与上述邻接像素之间的距离进行内插而得到的值作为预测值,生成预测图像。When the index value of the intra-frame prediction mode for the prediction block Pin is 0 (planar prediction), the value obtained by interpolating the distance between the prediction object pixel in the prediction block Pin and the above-adjacent coded pixels and the left -adjacent coded pixels of the prediction block Pin is used as the prediction value to generate the predicted image.
在针对预测块Pi n的帧内部预测模式的索引值是1(垂直方向预测)的情况下,根据下述式(1)计算预测块Pi n内的像素的预测值来生成预测图像。When the index value of the intra-frame prediction mode for the prediction block Pin is 1 (vertical prediction), the prediction value of the pixel in the prediction block Pin is calculated according to the following formula (1) to generate a predicted image.
S′(x,y)=S(x,-1)+(S(-1,y)-S(-1,-1))/t (1)S'(x, y)=S(x,-1)+(S(-1, y)-S(-1,-1))/t (1)
其中,坐标(x,y)是以预测块Pi n内的左上像素为原点的相对坐标(参照图9),S’(x,y)是坐标(x,y)中的预测值,S(x,y)是坐标(x,y)中的已编码的像素的亮度值(解码了的亮度值)。Among them, the coordinates (x, y) are relative coordinates with the upper left pixel in the prediction block P i n as the origin (refer to Figure 9), S'(x, y) is the predicted value at the coordinates (x, y), and S(x, y) is the brightness value (decoded brightness value) of the encoded pixel at the coordinates (x, y).
这样,对作为以往(MPEG-4AVC/H.264)的垂直方向预测的预测值的预测块Pi n的上面所邻接的已编码的像素的亮度值S(x,-1),相加与预测块Pi n的左面所邻接的已编码的像素(图10的粗框所包围的像素)的表示垂直方向的亮度值的变化量的S(-1,y)-S(-1,-1)成比例的值(将表示垂直方向的亮度值的变化量的S(-1,y)-S(-1,-1)缩放为1/t而得到的值),将该相加后的值决定为预测图像的预测值,从而能够实现追随向预测方向的亮度值的变化的垂直方向预测。In this way, a value proportional to S(-1, y)-S(-1, -1) representing the amount of change in the vertical brightness value of the coded pixel adjacent to the left of the prediction block Pin (the pixel surrounded by the thick frame in Figure 10) is added to the brightness value S(x, -1) of the coded pixel above the prediction block Pin, which is the prediction value of the vertical prediction in the previous (MPEG-4AVC/H.264) method (a value obtained by scaling S(-1, y)-S(-1, -1) representing the amount of change in the vertical brightness value to 1/t) is added, and the added value is determined as the prediction value of the predicted image, thereby realizing vertical prediction that follows the change in the brightness value in the prediction direction.
但是,在上述预测值未收敛于亮度值可取的值的范围内的情况下,也可以对值进行舍入使得收敛于该范围内。由此,虽然与进行舍入处理相应地运算量稍微增加,但能够抑制成为亮度值可取的值的范围外的预测值的发生从而减少预测误差。However, if the predicted value does not fall within the range of acceptable luminance values, the value may be rounded to fall within that range. While this slightly increases the amount of computation required due to rounding, it can prevent predicted values from falling outside the acceptable luminance range, thereby reducing prediction errors.
另外,上述1/t也可以设为固定值,但还可以设为根据坐标(x,y)而变化的变量。In addition, the above-mentioned 1/t may be set as a fixed value, or may be set as a variable that changes according to the coordinates (x, y).
例如,如果设为t=2x+1,则如图11所示,缩放值从左端的列起依次如1/2、1/4、1/8、1/16那样变小,所以从预测块Pi n的左面所邻接的已编码的像素起的距离越远,相加的垂直方向的亮度值的变化量越小。For example, if t=2x +1 , as shown in FIG11 , the scaling value decreases in order from the left column, such as 1/2, 1/4, 1/8, and 1/16. Therefore, the greater the distance from the left adjacent coded pixel of the prediction block Pin , the smaller the change in the added vertical brightness value.
由此,越是与预测块Pi n的左面所邻接的已编码的像素之间的距离远而相关变低的预测对象像素,越能够使预测块Pi n的左面所邻接的已编码的像素的影响变小,所以能够进行和与预测块Pi n的左面所邻接的已编码的像素之间的相关对应的高精度的预测。Therefore, the farther the prediction target pixel is from the already encoded pixel adjacent to the left of the prediction block Pin and the lower the correlation becomes, the smaller the influence of the already encoded pixel adjacent to the left of the prediction block Pin can be. Therefore, a high-precision prediction corresponding to the correlation between the already encoded pixels adjacent to the left of the prediction block Pin can be performed.
另外,在t=2x+1的情况下,能够如下所述通过基于比特移位(bit shift)的式来表现式(1)。In addition, when t=2x +1 , the equation (1) can be expressed by an equation based on bit shift as follows.
S′(x,y)=S(x,-1)+(S(-1,y)-S(-1,-1))>>(x+1) (1a)S'(x, y)=S(x,-1)+(S(-1, y)-S(-1,-1))>>(x+1) (1a)
在式(1a)中,“>>a”表示向右算术移位a比特的运算。In formula (1a), “>>a” represents an operation of a right arithmetic shift by a bits.
通过使用移位运算来代替式(1)的除法,从而在计算机上安装的情况下能够实现高速的运算。By using a shift operation instead of the division in equation (1), high-speed operation can be achieved when the method is installed on a computer.
但是,S(-1,y)-S(-1,-1)还可以取负值,所以有时根据安装环境(编译器)等,“>>”并非被处理为算术移位而被处理为逻辑移位,计算结果与式(1)不同。However, S(-1, y)-S(-1, -1) can also take negative values, so sometimes, depending on the installation environment (compiler), ">>" is not processed as an arithmetic shift but as a logical shift, and the calculation result is different from formula (1).
因此,作为不依赖于安装环境的t=2x+1的情况的式(1)的近似式,可以举出下述式(1b)。Therefore, as an approximate expression of the expression (1) in the case of t=2x +1 that does not depend on the installation environment, the following expression (1b) can be cited.
S′(x,y)=S(x,-1)+S(-1,y)>>(x+1)-S(-1,-1)>>(x+1) (1b)S'(x, y)=S(x,-1)+S(-1, y)>>(x+1)-S(-1,-1)>>(x+1) (1b)
在式(1b)中,使亮度值S(-1,y)、S(-1,-1)分别先向右移位(x+1)比特之后进行减法运算,所以如果用正值来定义亮度值,则算术移位、逻辑移位都得到同一计算结果。In formula (1b), the brightness values S(-1, y) and S(-1, -1) are first shifted to the right by (x+1) bits before the subtraction operation is performed. Therefore, if the brightness value is defined by a positive value, the arithmetic shift and the logical shift will obtain the same calculation result.
另外,进行式(1)的预测处理的预测块Pi n的块尺寸也可以限定为特定的尺寸。一般,在大的块尺寸中,在块内易于包含各种信号变化,能够使用方向性预测而高精度地预测的情形少,所以例如在16×16像素以上的块尺寸的预测块Pi n中,不应用式(1),而作为以往的垂直方向预测的预测值(预测块Pi n的上面所邻接的已编码的像素的亮度值S(x,-1)),仅在比16×16像素小的块中应用式(1),从而相比于以往的垂直方向预测,能够提高预测性能并且抑制运算量的增加。Furthermore, the block size of the prediction block P in which the prediction process of equation (1) is performed can also be limited to a specific size. Generally, with large block sizes, various signal variations are easily included within the block, making it less likely that directional prediction can be used to achieve high-precision prediction. Therefore, for example, equation (1) is not applied to prediction blocks P in a block size of 16×16 pixels or larger. Instead , equation (1) is applied only to blocks smaller than 16×16 pixels as the predicted value for conventional vertical prediction (the luminance value S(x,-1) of the already encoded pixel adjacent to the top of the prediction block P ). This improves prediction performance and suppresses an increase in computational complexity compared to conventional vertical prediction.
另外,在针对预测块Pi n的帧内部预测模式的索引值是2(水平方向预测)的情况下,根据下述式(2)计算预测块Pi n内的像素的预测值来生成预测图像。In addition, when the index value of the intra-frame prediction mode for the prediction block Pin is 2 (horizontal prediction), the prediction value of the pixel in the prediction block Pin is calculated according to the following formula (2) to generate a predicted image.
S′(x,y)=S(-1,y)+(S(x,-1)-S(-1,-1))/u (2)S'(x, y)=S(-1, y)+(S(x,-1)-S(-1,-1))/u (2)
其中,坐标(x,y)是以预测块Pi n内的左上像素为原点的相对坐标(参照图9),S’(x,y)是坐标(x,y)中的预测值,S(x,y)是坐标(x,y)中的已编码的像素的亮度值(解码了的亮度值)。Among them, the coordinates (x, y) are relative coordinates with the upper left pixel in the prediction block P i n as the origin (refer to Figure 9), S'(x, y) is the predicted value at the coordinates (x, y), and S(x, y) is the brightness value (decoded brightness value) of the encoded pixel at the coordinates (x, y).
这样,对作为以往(MPEG-4AVC/H.264)的水平方向预测的预测值的预测块Pi n的左面所邻接的已编码的像素的亮度值S(-1,y),相加与预测块Pi n的上面所邻接的已编码的像素(图12的粗框所包围的像素)的表示水平方向的亮度值的变化量的S(x,-1)-S(-1,-1)成比例的值(将表示水平方向的亮度值的变化量的S(x,-1)-S(-1,-1)缩放为1/u而得到的值),将该相加后的值决定为预测图像的预测值,从而能够实现追随向预测方向的亮度值的变化的水平方向预测。In this way, a value proportional to S(x, -1)-S(-1, -1) representing the amount of change in the horizontal brightness value of the coded pixel adjacent to the top of the prediction block Pin (the pixel surrounded by the thick frame in Figure 12) is added to the brightness value S(-1, y) of the coded pixel adjacent to the left of the prediction block Pin, which is the prediction value of the horizontal prediction in the previous (MPEG-4AVC/H.264) method (a value obtained by scaling S(x, -1)-S(-1, -1) representing the amount of change in the horizontal brightness value to 1/u) is added, and the added value is determined as the prediction value of the predicted image, thereby realizing horizontal prediction that follows the change in the brightness value in the prediction direction.
但是,在上述预测值未收敛于亮度值可取的值的范围内的情况下,也可以对值进行舍入使得收敛于该范围内。由此,虽然与进行舍入处理相应地运算量稍微增加,但能够抑制成为亮度值可取的值的范围外的预测值的发生而减少预测误差。However, if the predicted value does not fall within the range of acceptable luminance values, the value may be rounded to fall within that range. While this rounding process slightly increases the computational complexity, it can prevent predicted values from falling outside the acceptable luminance range, thereby reducing prediction errors.
另外,上述1/u也可以设为固定值,但还可以设为根据坐标(x,y)而变化的变量。In addition, the above-mentioned 1/u may be set as a fixed value, or may be set as a variable that changes according to the coordinates (x, y).
例如,如果设为u=2y+1,则如图13所示,缩放值从上端的行起依次如1/2、1/4、1/8、1/16那样变小,所以从预测块Pi n的上面所邻接的已编码的像素起的距离越远,相加的水平方向的亮度值的变化量越小。For example, if u=2y +1 , as shown in FIG13, the scaling value decreases from the top row in the order of 1/2, 1/4, 1/8, and 1/16, so the greater the distance from the adjacent encoded pixel above the prediction block P in , the smaller the change in the added horizontal brightness value.
由此,越是与预测块Pi n的上面所邻接的已编码的像素之间的距离远而相关变低的像素,越能够使预测块Pi n的上面所邻接的已编码的像素的影响变小,所以能够进行和与预测块Pi n的上面所邻接的已编码的像素之间的相关对应的高精度的预测。Therefore, the farther the distance from the already-encoded pixels adjacent to the prediction block Pin is , and the lower the correlation is, the smaller the influence of the already-encoded pixels adjacent to the prediction block Pin is . Therefore, a high-precision prediction corresponding to the correlation between the already-encoded pixels adjacent to the prediction block Pin can be performed.
另外,在u=2y+1的情况下,能够如下所述通过基于比特移位的式来表现式(2)。In addition, when u=2y +1 , the equation (2) can be expressed by an equation based on bit shifting as follows.
S′(x,y)=S(-1,y)+(S(x,-1)-S(-1,-1))>>(y+1) (2a)S'(x, y)=S(-1, y)+(S(x,-1)-S(-1,-1))>>(y+1) (2a)
在式(2a)中,“>>a”表示向右算术移位a比特的运算。In formula (2a), “>>a” represents an operation of arithmetic shift to the right by a bits.
通过使用移位运算来代替式(2)的除法,从而在计算机上安装的情况下能够实现高速的运算。By using a shift operation instead of the division in equation (2), high-speed operation can be achieved when the method is installed on a computer.
但是,S(x,-1)-S(-1,-1)也可以取负值,所以有时根据安装环境(编译器)等,“>>”并非被处理为算术移位而被处理为逻辑移位,计算结果与式(2)不同。However, S(x, -1)-S(-1, -1) can also take negative values, so sometimes, depending on the installation environment (compiler), ">>" is not processed as an arithmetic shift but as a logical shift, and the calculation result is different from formula (2).
因此,作为不依赖于安装环境的u=2y+1的情况的式(2)的近似式,可以举出下述式(2b)。Therefore, as an approximate expression of the expression (2) in the case of u=2y +1 that does not depend on the installation environment, the following expression (2b) can be given.
S′(x,y)=S(-1,y)+S(x,-1)>>(y+1)-S(-1,-1)>>(y+1) (2b)S'(x, y)=S(-1, y)+S(x,-1)>>(y+1)-S(-1,-1)>>(y+1) (2b)
在式(2b)中,使亮度值S(x,-1)、S(-1,-1)分别先向右移位(y+1)比特之后进行减法运算,所以如果用正值来定义亮度值,则算术移位、逻辑移位都得到同一计算结果。In formula (2b), the brightness values S(x, -1) and S(-1, -1) are first shifted to the right by (y+1) bits before the subtraction operation is performed. Therefore, if the brightness value is defined by a positive value, the arithmetic shift and the logical shift will obtain the same calculation result.
另外,进行式(2)的预测处理的预测块Pi n的块尺寸也可以限定为特定的尺寸。一般,在大的块尺寸中,在块内易于包含各种信号变化,能够使用方向性预测而高精度地预测的情形少,所以例如在16×16像素以上的块尺寸的预测块Pi n中,不应用式(2),而设为以往的水平方向预测的预测值(预测块Pi n的左面所邻接的已编码的像素的亮度值S(-1,y)),仅在比16×16像素小的块中应用式(2),从而相比于以往的水平方向预测,能够提高预测性能并且抑制运算量的增加。Furthermore, the block size of the prediction block P in which the prediction process of equation (2) is performed can also be limited to a specific size. Generally, with large block sizes, various signal variations are easily included within the block, making it less likely that directional prediction can be used to achieve high-precision prediction. Therefore, for example, in prediction blocks P in a block size of 16×16 pixels or larger, equation (2) is not applied, and instead the prediction value of conventional horizontal prediction (the luminance value S(-1, y) of the already coded pixel adjacent to the left of the prediction block P ) is used. Equation (2) is applied only to blocks smaller than 16×16 pixels. This improves prediction performance and suppresses an increase in computational complexity compared to conventional horizontal prediction.
另外,在针对预测块Pi n的帧内部预测模式的索引值是3(平均值(DC)预测)的情况下,将预测块Pi n的上面所邻接的已编码的像素和预测块Pi n的左面所邻接的已编码的像素的平均值作为预测块Pi n内的像素的预测值而生成预测图像。In addition, when the index value of the intra-frame prediction mode for the prediction block Pin is 3 (average value (DC) prediction), the average value of the coded pixels adjacent to the top of the prediction block Pin and the average value of the coded pixels adjacent to the left of the prediction block Pin is used as the prediction value of the pixel in the prediction block Pin to generate a predicted image.
在帧内部预测模式的索引值是0(平面(Planar)预测)、1(垂直方向预测)、2(水平方向预测)、3(平均值(DC)预测)以外的情况下,根据索引值表示的预测方向矢量υp=(dx,dy),生成预测块Pi n内的像素的预测值。When the index value of the intra-frame prediction mode is other than 0 (planar prediction), 1 (vertical prediction), 2 (horizontal prediction), and 3 (average value (DC) prediction), the predicted value of the pixel in the prediction block Pin is generated according to the prediction direction vector υp = (dx, dy) represented by the index value.
如图9所示,如果以预测块Pi n的左上像素为原点而将预测块Pi n内的相对坐标设定为(x,y),则预测中使用的参照像素的位置成为下述L和邻接像素的交点。As shown in FIG9 , if the upper left pixel of the prediction block Pin is set as the origin and the relative coordinates within the prediction block Pin are set to (x, y), the position of the reference pixel used in the prediction becomes the intersection of the following L and the adjacent pixel.
其中,k是负的标量值。Here, k is a negative scalar value.
在参照像素处于整数像素位置的情况下,将该整数像素设为预测对象像素的预测值,在参照像素不处于整数像素位置的情况下,将根据与参照像素邻接的整数像素而生成的插值像素设为预测值。When the reference pixel is at an integer pixel position, the integer pixel is used as the predicted value of the prediction target pixel. When the reference pixel is not at an integer pixel position, an interpolated pixel generated from integer pixels adjacent to the reference pixel is used as the predicted value.
在图8的例子中,参照像素不处于整数像素位置,所以将根据与参照像素邻接的2个像素进行内插而得到的结果作为预测值。另外,不仅是邻接的2个像素,也可以根据邻接的2个像素以上的像素生成插值像素而作为预测值。In the example of FIG8 , since the reference pixel is not located at an integer pixel position, the prediction value is obtained by interpolating two pixels adjacent to the reference pixel. Furthermore, the prediction value can be generated by interpolating pixels not only from two adjacent pixels but also from two or more adjacent pixels.
通过增加插值处理中使用的像素,从而具有提高插值像素的插值精度的效果,另一方面,由于插值处理所需的运算的复杂度增加,所以在即使运算负荷大也仍要求高的编码性能的运动图像编码装置的情况下,优选根据更大量的像素生成插值像素。By increasing the number of pixels used in the interpolation process, the interpolation accuracy of the interpolated pixels is improved. On the other hand, since the complexity of the calculations required for the interpolation process increases, in the case of a motion picture encoding device that requires high encoding performance even if the calculation load is large, it is preferable to generate interpolated pixels based on a larger number of pixels.
通过同样的步骤,生成与预测块Pi n内的亮度信号的所有像素对应的预测像素而输出帧内部预测图像PINTRAi n。Through the same steps, predicted pixels corresponding to all pixels of the luminance signal in the prediction block Pin are generated, and an intra-frame predicted image Pintran is output.
另外,帧内部预测图像PINTRAi n的生成中使用的帧内部预测参数为了复用到比特流而被输出到可变长编码部13。In addition, the intra-frame prediction parameters used for generating the intra-frame prediction image PINTRAin are output to the variable-length coding unit 13 in order to be multiplexed into the bit stream.
另外,与之前说明的MPEG-4AVC/H.264中的8×8像素的块的帧内部预测同样地,关于在进行帧内部预测时使用的像素,也可以并非使用已编码的邻接块内的像素自身,而是使用对这些像素实施滤波处理而得到的结果。In addition, similar to the intra-frame prediction of 8×8 pixel blocks in MPEG-4AVC/H.264 described above, the pixels used for intra-frame prediction may not be the pixels in the encoded adjacent blocks themselves, but the results of filtering these pixels may be used.
针对预测块Pi n的色差信号,也通过与亮度信号同样的步骤,实施基于帧内部预测参数(帧内部预测模式)的帧内部预测处理,将帧内部预测图像的生成中使用的帧内部预测参数输出到可变长编码部13。For the color difference signal of the prediction block Pin , the same steps as the luminance signal are used to implement intra-frame prediction processing based on intra-frame prediction parameters (intra-frame prediction mode), and the intra-frame prediction parameters used in generating the intra-frame prediction image are output to the variable length coding unit 13.
但是,在色差信号中可选择的帧内部预测参数(帧内部预测模式)无需与亮度信号相同,另外,关于垂直方向预测以及水平方向预测,也可以是以往(MPEG-4AVC/H.264)的预测方法。However, the intra-frame prediction parameters (intra-frame prediction modes) selectable in the chrominance signal do not need to be the same as those for the luminance signal. In addition, the vertical prediction and horizontal prediction may also be the conventional (MPEG-4 AVC/H.264) prediction methods.
例如,在YUV信号4:2:0格式的情况下,色差信号(U、V信号)是相对亮度信号(Y信号)将分辨率在水平方向、垂直方向上都缩小为1/2而得到的信号,相比于亮度信号,图像信号的复杂性低且预测容易,所以可选择的帧内部预测参数(帧内部预测模式)的数量少于亮度信号,对于垂直方向预测以及水平方向预测也设为以往的简易的预测方法,从而几乎不会降低预测效率而能够实现对帧内部预测参数(帧内部预测模式)进行编码而所需的符号量的削减、预测处理的低运算化。For example, in the case of a YUV signal in 4:2:0 format, the color difference signals (U and V signals) are signals obtained by reducing the resolution of the luminance signal (Y signal) to 1/2 in both the horizontal and vertical directions. Compared with the luminance signal, the image signal has low complexity and is easier to predict, so the number of selectable intra-frame prediction parameters (intra-frame prediction modes) is less than that of the luminance signal. The vertical and horizontal predictions are also set to the previous simple prediction methods, thereby almost without reducing the prediction efficiency and achieving a reduction in the amount of symbols required to encode the intra-frame prediction parameters (intra-frame prediction modes) and low computational complexity in the prediction processing.
另外,关于作为垂直方向预测中使用的缩放值的1/t、和作为水平方向预测中使用的缩放值的1/u,也可以预先在运动图像编码装置以及运动图像解码装置之间约定,但也可以由运动图像编码装置的帧内部预测部4按照序列单位或者图片单位,将t、u输出到可变长编码部13,由可变长编码部13对t、u进行可变长编码而包含到比特流中,并由运动图像解码装置从比特流对t、u进行可变长解码来使用。In addition, the scaling value 1/t used for vertical prediction and the scaling value 1/u used for horizontal prediction can also be agreed upon in advance between the motion image encoding device and the motion image decoding device, but the intra-frame prediction unit 4 of the motion image encoding device can output t and u to the variable length encoding unit 13 according to sequence units or picture units, and the variable length encoding unit 13 can perform variable length encoding on t and u and include them in the bit stream, and the motion image decoding device can perform variable length decoding on t and u from the bit stream for use.
这样按照序列单位或者图片单位,自适应地控制t、u,从而能够实现进一步与输入图像的影像信号的特性对应的预测处理。By adaptively controlling t and u in sequence units or picture units in this manner, it is possible to implement prediction processing that further corresponds to the characteristics of the video signal of the input image.
另外,关于使用式(1)的垂直方向预测、式(2)的水平方向预测的块尺寸,也可以预先在运动图像编码装置以及运动图像解码装置之间约定,但也可以由运动图像编码装置的帧内部预测部4按照序列单位或者图片单位,将表示使用式(1)的垂直方向预测、式(2)的水平方向预测的块尺寸的每个块尺寸的ON/OFF标志输出到可变长编码部13,由可变长编码部13对上述ON/OFF标志进行可变长编码而包含到比特流中,并由运动图像解码装置从比特流对上述ON/OFF标志进行可变长解码来使用。In addition, the block size for the vertical prediction using formula (1) and the horizontal prediction using formula (2) can also be agreed upon in advance between the motion image encoding device and the motion image decoding device, but the intra-frame prediction unit 4 of the motion image encoding device can output the ON/OFF flag of each block size representing the block size for the vertical prediction using formula (1) and the horizontal prediction using formula (2) to the variable length encoding unit 13 according to the sequence unit or the picture unit, and the variable length encoding unit 13 can perform variable length encoding on the above-mentioned ON/OFF flag and include it in the bit stream, and the motion image decoding device can perform variable length decoding on the above-mentioned ON/OFF flag from the bit stream for use.
这样能够按照序列单位或者图片单位,自适应地控制使用式(1)的垂直方向预测、式(2)的水平方向预测的块尺寸,从而能够实现进一步与输入图像的影像信号的特性对应的预测处理。In this way, the block size of the vertical prediction using equation (1) and the horizontal prediction using equation (2) can be adaptively controlled in sequence units or picture units, thereby enabling prediction processing that further corresponds to the characteristics of the image signal of the input image.
接下来,具体说明图3的运动图像解码装置的处理内容。Next, the processing contents of the moving picture decoding device in FIG. 3 will be described in detail.
可变长解码部31如果输入了由图1的运动图像编码装置生成的比特流,则实施针对该比特流的可变长解码处理(图4的步骤ST21),按照由1帧以上的图片构成的序列单位、或者图片单位,对帧尺寸的信息进行解码。If the variable length decoding unit 31 inputs the bit stream generated by the motion image encoding device in Figure 1, it implements variable length decoding processing on the bit stream (step ST21 in Figure 4) and decodes the frame size information according to the sequence unit composed of more than one frame of pictures or the picture unit.
此时,在垂直方向预测中使用的缩放值的参数t、水平方向预测中使用的缩放值的参数u、表示使用式(1)的垂直方向预测、式(2)的水平方向预测的块尺寸的每个块尺寸的ON/OFF标志中,只要任意一个被可变长编码并被复用到比特流的情况下,就按照由图1的运动图像编码装置编码了的单位(序列单位或者图片单位)进行解码。At this time, among the parameter t of the scaling value used in the vertical prediction, the parameter u of the scaling value used in the horizontal prediction, and the ON/OFF flag of each block size indicating the block size of the vertical prediction using formula (1) and the horizontal prediction using formula (2), as long as any one of them is variable-length encoded and multiplexed into the bit stream, it is decoded according to the unit (sequence unit or picture unit) encoded by the motion image encoding device of Figure 1.
可变长解码部31通过与运动图像编码装置同样的步骤,决定由图1的运动图像编码装置的编码控制部2决定的最大编码块尺寸以及分割层次数的上限(步骤ST22)。The variable length decoding unit 31 determines the maximum coding block size and the upper limit of the number of division hierarchies determined by the encoding control unit 2 of the moving picture encoding device of FIG. 1 through the same steps as the moving picture encoding device (step ST22 ).
例如,在根据影像信号的分辨率决定了最大编码块尺寸、分割层次数上限的情况下,根据所解码的帧尺寸信息,通过与运动图像编码装置同样的步骤来决定最大编码块尺寸。For example, when the maximum coding block size and the upper limit of the number of division levels are determined based on the resolution of the video signal, the maximum coding block size is determined based on the decoded frame size information using the same procedure as that of the moving picture encoding device.
最大编码块尺寸以及分割层次数上限在运动图像编码装置侧被复用到比特流中的情况下,使用从比特流解码得到的值。When the maximum coding block size and the upper limit of the number of division layers are multiplexed into the bitstream on the moving picture coding device side, the values obtained by decoding the bitstream are used.
以后,在运动图像解码装置中,将上述最大编码块尺寸称为最大解码块尺寸,将最大编码块称为最大解码块。Hereinafter, in the moving picture decoding apparatus, the maximum coding block size is referred to as the maximum decoding block size, and the maximum coding block is referred to as the maximum decoding block.
可变长解码部31按照所决定的最大解码块单位,对图6所示那样的最大解码块的分割状态进行解码。根据所解码的分割状态,层次性地确定解码块(与图1的运动图像编码装置的“编码块”相当的块)(步骤ST23)。The variable length decoding unit 31 decodes the division state of the maximum decoding block as shown in FIG6 in units of the determined maximum decoding block. Based on the decoded division state, the decoding blocks (blocks corresponding to the "coding blocks" in the moving image encoding device of FIG1) are hierarchically determined (step ST23).
接下来,可变长解码部31解码对解码块分配的编码模式。根据所解码的编码模式中包含的信息,将解码块进一步分割为一个或多个预测处理单位即预测块,解码对预测块单位分配的预测参数(步骤ST24)。Next, the variable length decoding unit 31 decodes the coding mode assigned to the decoding block. Based on the information included in the decoded coding mode, the decoding block is further divided into one or more prediction processing units, namely prediction blocks, and prediction parameters assigned to the prediction block units are decoded (step ST24).
即,在对解码块分配的编码模式是帧内部编码模式的情况下,可变长解码部31针对包含在解码块中且成为预测处理单位的一个以上的预测块的每一个,对帧内部预测参数进行解码。That is, when the coding mode assigned to the decoding block is the intra coding mode, the variable length decoding unit 31 decodes the intra prediction parameters for each of one or more prediction blocks included in the decoding block and serving as prediction processing units.
另一方面,在对解码块分配的编码模式是帧间编码模式的情况下,针对包含在解码块中且成为预测处理单位的一个以上的预测块的每一个,对帧间预测参数以及运动矢量进行解码(步骤ST24)。On the other hand, when the coding mode assigned to the decoding block is the inter-frame coding mode, the inter-frame prediction parameters and motion vectors are decoded for each of one or more prediction blocks included in the decoding block and serving as prediction processing units (step ST24).
进而,可变长解码部31根据预测差分编码参数中包含的变换块尺寸的信息,将解码块分割为成为变换处理单位的一个或多个变换块,针对每个变换块,对压缩数据(变换/量化后的变换系数)进行解码(步骤ST24)。Furthermore, the variable length decoding unit 31 divides the decoding block into one or more transform blocks serving as transform processing units based on the transform block size information included in the predicted differential coding parameters, and decodes the compressed data (transformed/quantized transform coefficients) for each transform block (step ST24).
在切换开关33中,如果由可变长解码部31可变长解码了的编码模式m(Bn)是帧内部编码模式(m(Bn)∈INTRA的情况),则将由可变长解码部31可变长解码了的预测块单位的帧内部预测参数输出到帧内部预测部34。In the switching switch 33, if the coding mode m( Bn ) variable-length-decoded by the variable-length decoding unit 31 is an intra-frame coding mode (in the case of m( Bn )∈INTRA), the intra-frame prediction parameters of the prediction block units variable-length-decoded by the variable-length decoding unit 31 are output to the intra-frame prediction unit 34.
另一方面,如果由可变长解码部31可变长解码了的编码模式m(Bn)是帧间编码模式(m(Bn)∈INTER的情况),则将由可变长解码部31可变长解码了的预测块单位的帧间预测参数以及运动矢量输出到运动补偿部35。On the other hand, if the coding mode m(B n ) variable-length-decoded by the variable-length decoding unit 31 is an inter-frame coding mode (in the case of m(B n )∈INTER), the inter-frame prediction parameters and motion vectors of the prediction block units variable-length-decoded by the variable-length decoding unit 31 are output to the motion compensation unit 35.
帧内部预测部34在由可变长解码部31可变长解码了的编码模式m(Bn)是帧内部编码模式(m(Bn)∈INTRA)的情况下(步骤ST25),接收从切换开关33输出的预测块单位的帧内部预测参数,通过与图1的帧内部预测部4同样的步骤,一边参照帧内部预测用存储器37中储存的解码图像,一边实施使用了上述帧内部预测参数的针对解码块Bn内的各预测块Pi n的帧内部预测处理,生成帧内部预测图像PINTRAi n(步骤ST26)。When the coding mode m( Bn ) variable-length-decoded by the variable-length decoding unit 31 is the intra coding mode (m( Bn )∈INTRA) (step ST25), the intra prediction unit 34 receives the intra prediction parameters for the prediction block output from the switch 33, and performs intra prediction processing on each prediction block P in the decoded block Bn using the intra prediction parameters through the same steps as those of the intra prediction unit 4 in FIG. 1 while referring to the decoded image stored in the intra prediction memory 37 , thereby generating an intra prediction image P INTRAi n (step ST26).
即,帧内部预测部34在针对预测块Pi n的帧内部预测模式的索引值是0(垂直方向预测)的情况下,根据上述式(1)计算预测块Pi n内的像素的预测值,生成帧内部预测图像PINTRAi n。That is, when the index value of the intra prediction mode for the prediction block Pin is 0 (vertical prediction), the intra prediction unit 34 calculates the prediction value of the pixels in the prediction block Pin according to the above equation (1) to generate the intra prediction image Pintran .
另外,在针对预测块Pi n的帧内部预测模式的索引值是1(水平方向预测)的情况下,根据上述式(2)计算预测块Pi n内的像素的预测值,生成帧内部预测图像PINTRAi n。Furthermore, when the index value of the intra prediction mode for the prediction block Pin is 1 (horizontal prediction), the prediction values of the pixels in the prediction block Pin are calculated according to the above equation (2) to generate the intra prediction image Pintrain .
但是,在使用式(1)的垂直方向预测、式(2)的水平方向预测的块尺寸被限制了的情况下,在使用式(1)的垂直方向预测、式(2)的水平方向预测的块尺寸以外的尺寸的预测块Pi n中通过以往(MPEG-4AVC/H.264)的垂直方向预测及水平方向预测进行帧内部预测处理。However, when the block size of the vertical prediction using formula (1) and the horizontal prediction using formula (2) is limited, intra-frame prediction processing is performed in the prediction block Pin of a size other than the block size of the vertical prediction using formula (1) and the horizontal prediction using formula (2) using the previous (MPEG-4AVC/H.264) vertical prediction and horizontal prediction.
运动补偿部35在由可变长解码部31可变长解码了的编码模式m(Bn)是帧间编码模式(m(Bn)∈INTER)的情况下(步骤ST25),接收从切换开关33输出的预测块单位的运动矢量和帧间预测参数,一边参照运动补偿预测帧存储器39中储存的滤波处理后的解码图像,一边实施使用了上述运动矢量和帧间预测参数的针对解码块内的各预测块Pi n的帧间预测处理来生成帧间预测图像PINTERi n(步骤ST27)。When the coding mode m( Bn ) variable-length-decoded by the variable-length decoding unit 31 is an inter-frame coding mode (m( Bn )∈INTER) (step ST25), the motion compensation unit 35 receives the motion vector and inter-frame prediction parameters of the prediction block unit output from the switch 33, and performs inter-frame prediction processing on each prediction block P in the decoded block using the motion vector and inter-frame prediction parameters while referring to the filtered decoded image stored in the motion- compensated prediction frame memory 39 , thereby generating an inter-frame prediction image PINTERi n (step ST27).
逆量化/逆变换部32如果从可变长解码部31接收到压缩数据以及预测差分编码参数,则通过与图1的逆量化/逆变换部8同样的步骤,参照该预测差分编码参数,对该压缩数据进行逆量化,并且参照该预测差分编码参数,实施针对作为逆量化后的压缩数据的变换系数的逆正交变换处理,计算与从图1的逆量化/逆变换部8输出的局部解码预测差分信号相同的解码预测差分信号(步骤ST28)。If the inverse quantization/inverse transform unit 32 receives compressed data and predicted differential coding parameters from the variable length decoding unit 31, it performs inverse quantization on the compressed data with reference to the predicted differential coding parameters through the same steps as the inverse quantization/inverse transform unit 8 in Figure 1, and performs inverse orthogonal transform processing on the transform coefficients of the inverse quantized compressed data with reference to the predicted differential coding parameters, and calculates a decoded predicted differential signal that is the same as the locally decoded predicted differential signal output from the inverse quantization/inverse transform unit 8 in Figure 1 (step ST28).
加法部36将由逆量化/逆变换部32计算出的解码预测差分信号、与由帧内部预测部34生成的帧内部预测图像PINTRAi n和由运动补偿部35生成的帧间预测图像PINTERi n中的某一方进行相加而计算出解码图像,并输出到环路滤波器部38,并且将该解码图像储存到帧内部预测用存储器37中(步骤ST29)。The addition unit 36 adds the decoded prediction differential signal calculated by the inverse quantization/inverse transform unit 32 to either the intra-frame prediction image P INTRAi n generated by the intra-frame prediction unit 34 or the inter-frame prediction image P INTERi n generated by the motion compensation unit 35 to calculate a decoded image, outputs it to the loop filter unit 38, and stores the decoded image in the intra-frame prediction memory 37 (step ST29).
该解码图像成为在以后的帧内部预测处理时使用的已解码的图像信号。This decoded image becomes a decoded image signal used in subsequent intra-frame prediction processing.
在环路滤波器部38中,如果针对所有解码块Bn的步骤ST23~ST29的处理完成(步骤ST30),则对从加法部36输出的解码图像实施规定的滤波处理,将滤波处理后的解码图像储存到运动补偿预测帧存储器39中(步骤ST31)。In the loop filter unit 38, if the processing of steps ST23 to ST29 for all decoding blocks Bn is completed (step ST30), the prescribed filtering processing is performed on the decoded image output from the addition unit 36, and the decoded image after filtering is stored in the motion compensation prediction frame memory 39 (step ST31).
另外,关于环路滤波器部38的滤波处理,即可以以所输入的解码图像的最大解码块或者各个解码块为单位来进行,也可以在输入了1个图片量的解码图像之后集中1个图片量来进行。The filtering process of the loop filter unit 38 may be performed in units of the largest decoded block or each decoded block of the input decoded image, or may be performed collectively for one picture after one picture of decoded images is input.
另外,作为规定的滤波处理的例子,可以举出以使编码块边界的不连续性(块噪声)不会变得显著的方式对块边界进行滤波的处理、对解码图像的失真进行补偿的滤波处理等。Examples of the predetermined filtering process include filtering of block boundaries to prevent discontinuity (block noise) at the coding block boundaries from becoming noticeable and filtering to compensate for distortion of a decoded image.
该解码图像成为运动补偿预测用的参照图像,并且成为再生图像。This decoded image becomes a reference image for motion compensation prediction and also becomes a reconstructed image.
根据以上可知,根据该实施方式3,运动图像编码装置的帧内部预测部4构成为在生成预测图像时的帧内预测处理是水平方向预测处理的情况下,对预测块的左面所邻接的像素的亮度值相加与预测块的上面所邻接的像素的水平方向的亮度值变化量成比例的值,将该相加后的值决定为预测图像的预测值,在生成预测图像时的帧内预测处理是垂直方向预测处理的情况下,对预测块的上面所邻接的像素的亮度值相加与预测块的左面所邻接的像素的垂直方向的亮度值变化量成比例的值,将该相加后的值决定为预测图像的预测值,所以起到即使在信号值沿着预测方向而变化的情况下也能够实现高精度的预测来提高图像质量的效果。As can be seen from the above, according to this embodiment 3, the intra-frame prediction unit 4 of the motion image encoding device is constructed to add a value proportional to the amount of change in the horizontal brightness value of the pixel adjacent to the upper side of the prediction block to the brightness value of the pixel adjacent to the left of the prediction block when the intra-frame prediction processing when generating the prediction image is a horizontal prediction processing, and to determine the added value as the prediction value of the prediction image; when the intra-frame prediction processing when generating the prediction image is a vertical prediction processing, add a value proportional to the amount of change in the vertical brightness value of the pixel adjacent to the left of the prediction block to the brightness value of the pixel adjacent to the upper side of the prediction block, and determine the added value as the prediction value of the prediction image, thereby achieving the effect of improving image quality by achieving high-precision prediction even when the signal value changes along the prediction direction.
另外,根据该实施方式3,运动图像解码装置的帧内部预测部34构成为在生成预测图像时的帧内预测处理是水平方向预测处理的情况下,对预测块的左面所邻接的像素的亮度值相加与预测块的上面所邻接的像素的水平方向的亮度值变化量成比例的值,将该相加后的值决定为预测图像的预测值,在生成预测图像时的帧内预测处理是垂直方向预测处理的情况下,对预测块的上面所邻接的像素的亮度值相加与预测块的左面所邻接的像素的垂直方向的亮度值变化量成比例的值,将该相加后的值决定为预测图像的预测值,所以起到即使在信号值沿着预测方向而变化的情况下也能够实现高精度的预测来提高图像质量的效果。In addition, according to the third embodiment, the intra-frame prediction unit 34 of the motion image decoding device is configured to, when the intra-frame prediction processing when generating the predicted image is a horizontal prediction processing, add a value proportional to the amount of change in the horizontal brightness value of the pixel adjacent to the upper side of the prediction block to the brightness value of the pixel adjacent to the prediction block, and determine the added value as the predicted value of the predicted image; when the intra-frame prediction processing when generating the predicted image is a vertical prediction processing, add a value proportional to the amount of change in the vertical brightness value of the pixel adjacent to the left side of the prediction block to the brightness value of the pixel adjacent to the upper side of the prediction block, and determine the added value as the predicted value of the predicted image. This has the effect of achieving high-precision prediction even when the signal value changes along the prediction direction, thereby improving image quality.
根据该实施方式3,关于由帧内部预测部4、34实施水平方向预测处理时所使用的缩放值即1/u,构成为越是与从预测块的上面所邻接的像素起距离远的行有关的缩放值,设定为越小的值,所以越是与预测块的上面所邻接的像素之间的距离远而相关变低的像素,越能够使预测块的上面所邻接的像素的影响变小,其结果,起到能够高精度地进行预测的效果。According to this embodiment 3, the scaling value 1/u used when the frame internal prediction units 4 and 34 perform horizontal prediction processing is configured so that the scaling value related to the row farther from the pixel adjacent to the top of the prediction block is set to a smaller value. Therefore, the farther the distance between the pixels adjacent to the top of the prediction block and the lower the correlation, the smaller the influence of the pixels adjacent to the top of the prediction block can be. As a result, the effect of high-precision prediction can be achieved.
另外,关于由帧内部预测部4、34实施垂直方向预测处理时所使用的缩放值即1/t,构成为越是与从预测块的左面所邻接的像素起距离远的列有关的缩放值,设定为越小的值,所以越是与预测块的左面所邻接的像素之间的距离远而相关变低的像素,越能够使预测块的左面所邻接的像素的影响变小,其结果,起到能够高精度地进行预测的效果。In addition, regarding the scaling value 1/t used when the frame internal prediction units 4 and 34 implement vertical prediction processing, the scaling value related to the column that is farther away from the pixel adjacent to the left of the prediction block is set to a smaller value. Therefore, the farther the distance between the pixels adjacent to the left of the prediction block is, the lower the correlation becomes. The smaller the influence of the pixels adjacent to the left of the prediction block can be. As a result, the effect of high-precision prediction can be achieved.
另外,在该实施方式3中,示出了由帧内部预测部4、34实施水平方向预测处理时的预测块内的第N行(从预测块的上端起第N行)的缩放值是1/2N+1(=1/2,1/4,1/8,1/16,···)、由帧内部预测部4、34实施垂直方向预测处理时的预测块内的第M列(从预测块的左端起第M列)的缩放值是1/2M+1(=1/2,1/4,1/8,1/16,···)的例子,但这只是一个例子,只要由帧内部预测部4、34实施水平方向预测处理时越是从预测块的上端远离的行的缩放值越小、并且由帧内部预测部4、34实施垂直方向预测处理时越是从预测块的左端远离的列的缩放值越小,就可以是任意值。In addition, in this embodiment 3, an example is shown in which the scaling value of the Nth row (the Nth row from the top of the prediction block) in the prediction block when the intra-frame prediction unit 4, 34 performs horizontal prediction processing is 1/ 2N+1 (=1/2, 1/4, 1/8, 1/16,...), and the scaling value of the Mth column (the Mth column from the left end of the prediction block) in the prediction block when the intra-frame prediction unit 4, 34 performs vertical prediction processing is 1/ 2M+1 (=1/2, 1/4, 1/8, 1/16,...). However, this is only an example, and any value may be used as long as the scaling value of the row farther from the top of the prediction block is smaller when the intra-frame prediction unit 4, 34 performs horizontal prediction processing, and the scaling value of the column farther from the left end of the prediction block is smaller when the intra-frame prediction unit 4, 34 performs vertical prediction processing.
另外,本申请发明能够在本发明的范围内实现各实施方式的自由的组合、或者各实施方式的任意的构成要素的变形、或者各实施方式中的任意的构成要素的省略。Furthermore, the present invention can realize free combination of the various embodiments, modification of arbitrary components of the various embodiments, or omission of arbitrary components of the various embodiments within the scope of the present invention.
(产业上的可利用性)(Industrial Applicability)
本发明适用于需要高效地对运动图像进行编码的运动图像编码装置,另外适用于需要对高效地编码了的运动图像进行解码的运动图像解码装置。The present invention is applicable to a moving picture encoding device that needs to encode moving pictures efficiently, and is also applicable to a moving picture decoding device that needs to decode efficiently encoded moving pictures.
Claims (5)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2011-140598 | 2011-06-24 | ||
| JP2012-009115 | 2012-01-19 |
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| HK14103284.3A Addition HK1190257B (en) | 2011-06-24 | 2012-05-30 | Image encoding apparatus, image decoding apparatus, image encoding method and image decoding method |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| HK14103284.3A Division HK1190257B (en) | 2011-06-24 | 2012-05-30 | Image encoding apparatus, image decoding apparatus, image encoding method and image decoding method |
Publications (3)
| Publication Number | Publication Date |
|---|---|
| HK1234555A HK1234555A (en) | 2018-02-15 |
| HK1234555A1 HK1234555A1 (en) | 2018-02-15 |
| HK1234555B true HK1234555B (en) | 2020-02-28 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6851429B2 (en) | Image decoding device, image decoding method, image coding device and image coding method | |
| CN106791880B (en) | Image encoding device and method, image decoding device and method, and recording medium | |
| JP2014090327A (en) | Moving image encoder, moving image decoder, moving image encoding method and moving image decoding method | |
| JP2014090326A (en) | Moving image encoder, moving image decoder, moving image encoding method and moving image decoding method | |
| JP2013098713A (en) | Video encoding device, video decoding device, video encoding method, and video decoding method | |
| HK1234555B (en) | Image encoding device and method, image decoding device and method and storage medium | |
| HK1234554B (en) | Image encoding device and method, image decoding device and method and storage medium | |
| HK1234556B (en) | Image encoding device and method, image decoding device and method and storage medium | |
| HK1232359B (en) | Image encoding device and method, image decoding device and method and storage medium | |
| HK1234556A (en) | Image encoding device and method, image decoding device and method and storage medium | |
| HK1234556A1 (en) | Image encoding device and method, image decoding device and method and storage medium | |
| HK1234554A (en) | Image encoding device and method, image decoding device and method and storage medium | |
| HK1234554A1 (en) | Image encoding device and method, image decoding device and method and storage medium | |
| HK1234555A1 (en) | Image encoding device and method, image decoding device and method and storage medium | |
| HK1234555A (en) | Image encoding device and method, image decoding device and method and storage medium | |
| HK1219593B (en) | Motion-video encoding apparatus, motion-video decoding apparatus, motion-video encoding method, and motion-video decoding method | |
| HK1225203B (en) | Motion-video encoding apparatus and method and motion-video decoding apparatus and method | |
| HK1225204B (en) | Motion-video encoding apparatus and method and motion-video decoding apparatus and method |