[go: up one dir, main page]

HK1235953B - Dynamic image encoding device and method, dynamic image decoding device and method - Google Patents

Dynamic image encoding device and method, dynamic image decoding device and method Download PDF

Info

Publication number
HK1235953B
HK1235953B HK17109684.3A HK17109684A HK1235953B HK 1235953 B HK1235953 B HK 1235953B HK 17109684 A HK17109684 A HK 17109684A HK 1235953 B HK1235953 B HK 1235953B
Authority
HK
Hong Kong
Prior art keywords
motion
unit
vector
image
coding
Prior art date
Application number
HK17109684.3A
Other languages
Chinese (zh)
Other versions
HK1235953A (en
HK1235953A1 (en
Inventor
伊谷裕介
关口俊一
杉本和夫
Original Assignee
二甲苯控股股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 二甲苯控股股份有限公司 filed Critical 二甲苯控股股份有限公司
Publication of HK1235953A publication Critical patent/HK1235953A/en
Publication of HK1235953A1 publication Critical patent/HK1235953A1/en
Publication of HK1235953B publication Critical patent/HK1235953B/en

Links

Description

运动图像编码装置及其方法、运动图像解码装置及其方法Moving picture encoding device and method thereof, moving picture decoding device and method thereof

本申请是申请号为201180047148.5、申请日为2011年7月21日、发明名称为“运动图像编码装置、运动图像解码装置、运动图像编码方法以及运动图像解码方法”的发明专利申请的分案申请。This application is a divisional application of the invention patent application with application number 201180047148.5, application date July 21, 2011, 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 a moving picture encoding device, a moving picture decoding device, a moving picture encoding method, and a moving picture decoding method used in image compression encoding technology, compressed image data transmission technology, and the like.

背景技术Background Art

例如,在MPEG(Moving Picture Experts Group)、“ITU-T H.26x”等国际标准影像编码方式中,采用了将汇总了亮度信号16×16像素、和与该亮度信号16×16像素对应的色差信号8×8像素的块数据(以下,称为“宏块”)作为一个单位,根据运动补偿技术、正交变换/变换系数量化技术进行压缩的方法。For example, in international standard image coding methods such as MPEG (Moving Picture Experts Group) and "ITU-T H.26x", a method is adopted in which block data (hereinafter referred to as "macroblock") that summarizes a luminance signal of 16×16 pixels and a color difference signal of 8×8 pixels corresponding to the luminance signal of 16×16 pixels is treated as a unit and compressed based on motion compensation technology and orthogonal transformation/transform coefficient quantization technology.

在运动图像编码装置以及运动图像解码装置中的运动补偿处理中,参照前方或者后方的图片,以宏块单位进行运动矢量的检测、预测图像的生成。In the motion compensation process in the moving picture encoding device and the moving picture decoding device, a motion vector is detected and a predicted image is generated in units of macroblocks with reference to a previous or next picture.

此时,将仅参照1张图片,进行画面间预测编码而得到的图片称为P图片,将同时参照2张图片,进行画面间预测编码而得到的图片称为B图片。At this time, a picture obtained by performing inter-picture prediction coding with reference to only one picture is called a P picture, and a picture obtained by performing inter-picture prediction coding with reference to two pictures at the same time is called a B picture.

在作为国际标准方式的AVC/H.264(ISO/IEC 14496-10|ITU-T H.264)中,在对B图片进行编码时,能够选择被称为直接模式(direct mode)的编码模式(例如,参照非专利文献1)。In AVC/H.264 (ISO/IEC 14496-10 | ITU-T H.264), which is an international standard, a coding mode called direct mode can be selected when encoding a B picture (for example, see Non-Patent Document 1).

即,能够选择:在编码对象的宏块中,不具有运动矢量的编码数据,通过使用已编码的其他图片的宏块的运动矢量、周围的宏块的运动矢量的规定的运算处理,生成编码对象的宏块的运动矢量的编码模式。That is, it is possible to select: in the macroblock of the encoding object, there is no encoding data of the motion vector, and the encoding mode of the motion vector of the macroblock of the encoding object is generated by using the motion vectors of the macroblocks of other encoded pictures and the motion vectors of the surrounding macroblocks through prescribed calculation processing.

在该直接模式中,存在时间直接模式和空间直接模式这2种。There are two types of direct modes: a temporal direct mode and a spatial direct mode.

在时间直接模式中,通过参照已编码的其他图片的运动矢量,根据已编码图片与编码对象的图片的时间差进行运动矢量的缩放(scaling)处理,来生成编码对象的宏块的运动矢量。In the temporal direct mode, a motion vector of a macroblock to be coded is generated by referring to a motion vector of another coded picture and performing a motion vector scaling process according to the time difference between the coded picture and the coded picture.

在空间直接模式中,参照位于编码对象的宏块的周围的至少1个以上的已编码宏块的运动矢量,根据这些运动矢量生成编码对象的宏块的运动矢量。In the spatial direct mode, the motion vector of the current macroblock is generated based on the motion vectors of at least one already encoded macroblock located around the current macroblock, with reference to the motion vectors.

在该直接模式中,通过使用作为切片头(slice header)中设置的标志的“direct_spatial_mv_pred_flag”,能够以切片单位,选择时间直接模式或者空间直接模式中的某一方。In this direct mode, by using "direct_spatial_mv_pred_flag" which is a flag set in a slice header, either the temporal direct mode or the spatial direct mode can be selected in slice units.

其中,在直接模式中,将不对变换系数进行编码的模式称为跳跃模式。以下,在记载为直接模式时,还包括跳跃模式。In direct mode, the mode in which transform coefficients are not encoded is called skip mode. Hereinafter, when referring to direct mode, skip mode is also included.

此处,图11是示出通过时间直接模式生成运动矢量的方法的示意图。Here, FIG11 is a schematic diagram illustrating a method of generating a motion vector by the temporal direct mode.

在图11中,“P”表示P图片,“B”表示B图片。In FIG11 , “P” indicates a P picture, and “B” indicates a B picture.

另外,数字0-3表示图片的显示顺序,表示是时间T0、T1、T2、T3的显示图像。In addition, the numbers 0-3 represent the display order of the pictures, indicating that the images are displayed at time T0, T1, T2, and T3.

设为按照P0、P3、B1、B2的顺序进行了图片的编码处理。It is assumed that the encoding process of the pictures is performed in the order of P0, P3, B1, and B2.

例如,假设通过时间直接模式对图片B2中的宏块MB1进行编码的情况。For example, assume a case where macroblock MB1 in picture B2 is encoded by the temporal direct mode.

在该情况下,使用作为处于图片B2的时间轴上后方的已编码图片中的最接近图片B2的图片P3的运动矢量的、与宏块MB1在空间上处于相同的位置的宏块MB2的运动矢量MV。In this case, the motion vector MV of the macroblock MB2 spatially co-located with the macroblock MB1 is used, which is the motion vector of the picture P3 that is the closest to the picture B2 among the coded pictures that are behind the picture B2 on the time axis.

该运动矢量MV参照图片P0,在对宏块MB1进行编码时使用的运动矢量MVL0、MVL1通过以下的式(1)求出。This motion vector MV refers to the picture P0, and motion vectors MVL0 and MVL1 used when encoding the macroblock MB1 are obtained by the following equation (1).

图12是示出通过空间直接模式生成运动矢量的方法的示意图。FIG12 is a schematic diagram illustrating a method of generating a motion vector by a spatial direct mode.

在图12中,当前MB(currentMB)表示编码对象的宏块。In FIG12 , the current MB (currentMB) indicates a macroblock to be encoded.

此时,如果将编码对象的宏块的左边的已编码宏块A的运动矢量设为MVa、将编码对象的宏块的上面的已编码宏块B的运动矢量设为MVb、将编码对象的宏块的右上的已编码宏块C的运动矢量设为MVc,则通过如下述式(2)所示,求出这些运动矢量MVa、MVb、MVc的中值(中央值),能够计算编码对象的宏块的运动矢量MV。At this time, if the motion vector of the encoded macroblock A on the left of the macroblock to be encoded is set to MVa, the motion vector of the encoded macroblock B above the macroblock to be encoded is set to MVb, and the motion vector of the encoded macroblock C above the right of the macroblock to be encoded is set to MVc, then the motion vector MV of the macroblock to be encoded can be calculated by finding the median (central value) of these motion vectors MVa, MVb, and MVc as shown in the following formula (2).

MV=median(MVa、MVb、MVc) (2)MV=median(MVa, MVb, MVc) (2)

在空间直接模式中,针对前方以及后方分别求出运动矢量,但都能够使用上述方法来求出。In the spatial direct mode, motion vectors are calculated separately for the front and rear directions, but both can be calculated using the above-described method.

另外,将预测图像的生成中使用的参照图像针对参照中使用的每个矢量作为参照图像列表进行管理,在使用2个矢量的情况下,各参照图像列表被称为列表0、列表1。Furthermore, the reference image used for generating the predicted image is managed as a reference image list for each vector used for reference. When two vectors are used, the reference image lists are referred to as list 0 and list 1.

针对参照图像列表从时间上接近的参照图像起顺序地保存,通常是列表0表示前方向的参照图像,列表1表示后方向的参照图像。但是,也可以是列表1表示前方向的参照图像,列表0表示后方向的参照图像,也可以是列表0和列表1这双方表示前方向和后方向的参照图像。另外,排列顺序也无需从时间上接近的参照图像起排列。Reference image lists are stored sequentially from temporally closest reference images. Typically, list 0 represents forward reference images, and list 1 represents backward reference images. However, list 1 may represent forward reference images, list 0 may represent backward reference images, or both list 0 and list 1 may represent forward and backward reference images. Furthermore, the order of arrangement does not necessarily need to be from temporally closest reference images forward.

例如,在以下的非专利文献1中,记载了能够针对每个切片重新排列参照图像列表。For example, the following Non-Patent Document 1 describes that a reference image list can be rearranged for each slice.

【非专利文献1】MPEG-4AVC(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

以往的图像编码装置如以上那样构成,所以如果参照作为切片头中设置的标志的“direct_spatial_mv_pred_flag”,则能够以切片单位,切换时间直接模式和空间直接模式。但是,在宏块单位中,无法切换时间直接模式和空间直接模式,所以即使针对属于某切片的某宏块的最佳的直接模式例如是空间直接模式,只要与该切片对应的直接模式被决定为时间直接模式,则必需对该宏块使用时间直接模式,而无法选择最佳的直接模式。在这样的情况下,由于无法选择最佳的直接模式,所以存在必需对不必要的运动矢量进行编码,而代码量增加等课题。Conventional image coding devices are configured as described above. By referring to the "direct_spatial_mv_pred_flag" flag set in the slice header, it is possible to switch between temporal direct mode and spatial direct mode on a slice-by-slice basis. However, switching between temporal direct mode and spatial direct mode is not possible on a macroblock-by-macroblock basis. Therefore, even if the optimal direct mode for a macroblock belonging to a slice is, for example, spatial direct mode, if the direct mode corresponding to that slice is determined to be temporal direct mode, temporal direct mode must be used for that macroblock, and the optimal direct mode cannot be selected. In this case, since the optimal direct mode cannot be selected, unnecessary motion vectors must be encoded, resulting in an increase in the amount of code.

本发明是为了解决上述那样的课题而完成的,其目的在于得到一种按照规定的块单位选择最佳的直接模式,能够削减代码量的运动图像编码装置、运动图像解码装置、运动图像编码方法以及运动图像解码方法。The present invention is completed to solve the above-mentioned problems, and its purpose is to obtain a motion image encoding device, motion image decoding device, motion image encoding method and motion image decoding method that can select the optimal direct mode according to a specified block unit and reduce the amount of code.

本发明的运动图像编码装置具备:编码控制单元,决定作为实施预测处理时的处理单位的编码块的最大尺寸,并且决定最大尺寸的编码块被层次性地分割时的上限的层次数,从可利用的1个以上的编码模式中,选择决定各个编码块的编码方法的编码模式;以及块分割单元,将输入图像分割为规定的编码块,并且直到达到由编码控制单元决定的上限的层次数为止,层次性地分割所述编码块,在作为与由块分割单元分割的编码块对应的编码模式,由编码控制单元选择了直接模式的帧间编码模式的情况下,运动补偿预测单元从可选择的1个以上的运动矢量中,选择适合于预测图像的生成的运动矢量,使用该运动矢量,实施针对所述编码块的运动补偿预测处理来生成预测图像,并且将表示该运动矢量的索引信息输出到可变长编码单元,可变长编码单元对索引信息进行可变长编码。The moving picture coding apparatus of the present invention comprises: a coding control unit that determines a maximum size of a coding block serving as a processing unit when performing prediction processing, determines an upper limit number of hierarchical divisions of the maximum-sized coding block, and selects a coding mode that determines a coding method for each coding block from one or more available coding modes; and a block division unit that divides an input image into predetermined coding blocks and hierarchically divides the coding blocks until the upper limit number of hierarchical divisions determined by the coding control unit is reached; when the coding control unit selects a direct mode inter-frame coding mode as the coding mode corresponding to the coding blocks divided by the block division unit, a motion compensation prediction unit that selects a motion vector suitable for generating a predicted image from one or more selectable motion vectors, performs motion compensation prediction processing on the coding block using the motion vector to generate a predicted image, and outputs index information indicating the motion vector to a variable length coding unit, which performs variable length coding on the index information.

根据本发明,构成为具备:编码控制单元,决定作为实施预测处理时的处理单位的编码块的最大尺寸,并且决定最大尺寸的编码块被层次性地分割时的上限的层次数,从可利用的1个以上的编码模式中,选择决定各个编码块的编码方法的编码模式;以及块分割单元,将输入图像分割为规定的编码块,并且直到达到由编码控制单元决定的上限的层次数为止,层次性地分割所述编码块,在作为与由块分割单元分割的编码块对应的编码模式,由编码控制单元选择了直接模式的帧间编码模式的情况下,运动补偿预测单元从可选择的1个以上的运动矢量中,选择适合于预测图像的生成的运动矢量,使用该运动矢量,实施针对所述编码块的运动补偿预测处理来生成预测图像,并且将表示该运动矢量的索引信息输出到可变长编码单元,可变长编码单元对索引信息进行可变长编码,所以具有能够以规定的块为单位选择最佳的直接模式,削减代码量的效果。According to the present invention, the present invention comprises: an encoding control unit that determines a maximum size of a coding block serving as a processing unit when performing prediction processing, determines an upper limit number of hierarchical divisions of the maximum-sized coding block, and selects a coding mode that determines a coding method for each coding block from one or more available coding modes; and a block division unit that divides an input image into predetermined coding blocks and hierarchically divides the coding blocks until the upper limit number of hierarchical divisions determined by the encoding control unit is reached. When the encoding control unit selects a direct mode inter-frame coding mode as the coding mode corresponding to the coding blocks divided by the block division unit, a motion compensation prediction unit selects a motion vector suitable for generating a predicted image from one or more selectable motion vectors, performs motion compensation prediction processing on the coding block using the motion vector to generate a predicted image, and outputs index information indicating the motion vector to a variable length encoding unit. The variable length encoding unit performs variable length coding on the index information. This achieves the effect of being able to select the optimal direct mode for each predetermined block, thereby reducing the amount of code.

附图说明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的运动图像编码装置的运动补偿预测部5的结构图。FIG2 is a diagram showing the structure of the motion compensation prediction unit 5 of the moving picture encoding device according to the first embodiment of the present invention.

图3是示出构成了运动补偿预测部5的直接矢量生成部23的结构图。FIG. 3 is a diagram showing the configuration of the direct vector generation unit 23 constituting the motion compensation prediction unit 5 .

图4是示出构成了直接矢量生成部23的直接矢量判定部33的结构图。FIG. 4 is a diagram showing the configuration of the direct vector determination unit 33 constituting the direct vector generation unit 23 .

图5是示出本发明的实施方式1的运动图像解码装置的结构图。FIG5 is a diagram showing the structure of the moving picture decoding apparatus according to Embodiment 1 of the present invention.

图6是示出本发明的实施方式1的运动图像解码装置的运动补偿预测部54的结构图。FIG6 is a diagram showing the structure of the motion compensation prediction unit 54 of the moving picture decoding device according to Embodiment 1 of the present invention.

图7是示出本发明的实施方式1的运动图像编码装置的处理内容的流程图。FIG7 is a flowchart showing the processing contents of the moving picture encoding apparatus according to Embodiment 1 of the present invention.

图8是示出本发明的实施方式1的运动图像解码装置的处理内容的流程图。FIG8 is a flowchart showing the processing contents of the moving picture decoding apparatus according to Embodiment 1 of the present invention.

图9是示出最大尺寸的编码块被层次性地分割为多个编码块的情况的说明图。FIG. 9 is an explanatory diagram showing a case where a coding block of a maximum size is hierarchically divided into a plurality of coding blocks.

图10(a)是示出分割后的分区(partition)的分布的图,(b)是通过4叉树图形示出对层次分割后的分区分配了编码模式m(Bn)的状况的说明图。FIG10(a) is a diagram showing the distribution of partitions after division, and FIG10(b) is an explanatory diagram showing, in a quad-tree graph, the allocation of coding modes m( Bn ) to partitions after hierarchical division.

图11是示出通过时间直接模式生成运动矢量的方法的示意图。FIG. 11 is a schematic diagram illustrating a method of generating a motion vector by the temporal direct mode.

图12是示出通过空间直接模式生成运动矢量的方法的示意图。FIG12 is a schematic diagram illustrating a method of generating a motion vector by a spatial direct mode.

图13是示出根据中值预测的候补A1-An、B1-Bn、C、D、E生成空间直接矢量的方法的示意图。FIG13 is a schematic diagram illustrating a method of generating a space direct vector from the median prediction candidates A1-An, B1-Bn, C, D, and E. FIG.

图14是示出通过根据时间方向的距离进行缩放来生成空间直接矢量的方法的示意图。FIG. 14 is a schematic diagram illustrating a method of generating a space direct vector by scaling according to a distance in a time direction.

图15是示出利用前方预测图像和后方预测图像的类似度的评价值的计算例的说明图。FIG. 15 is an explanatory diagram showing an example of calculation of an evaluation value using the similarity between a forward prediction image and a backward prediction image.

图16是示出使用了运动矢量的方差值(variance)的评价式的说明图。FIG. 16 is an explanatory diagram showing an evaluation formula using a variance value (variance) of a motion vector.

图17是示出空间矢量MV_A、MV_B、MV_C、时间矢量MV_1~MV_8的说明图。FIG17 is an explanatory diagram showing space vectors MV_A, MV_B, MV_C, and time vectors MV_1 to MV_8.

图18是示出根据多个已编码矢量生成1个候补矢量的说明图。FIG18 is an explanatory diagram showing the generation of one candidate vector from a plurality of encoded vectors.

图19是示出仅组合时间上处于前面的图像来计算评价值SAD的例子的说明图。FIG. 19 is an explanatory diagram showing an example of calculating the evaluation value SAD by combining only temporally preceding images.

图20是示出与L字模板类似的图像的搜索的说明图。FIG. 20 is an explanatory diagram illustrating a search for an image similar to an L-shaped template.

图21是示出编码块Bn的尺寸是Ln=kMn的例子的说明图。FIG21 is an explanatory diagram showing an example in which the size of the coding block Bn is Ln = kMn .

图22是示出如(Ln+1,Mn+1)=(Ln/2,Mn/2)那样分割的例子的说明图。FIG. 22 is an explanatory diagram showing an example of division such as (Ln +1 , Mn +1 ) = ( Ln /2, Mn /2).

图23是示出能够选择图21或者图22中的某一个分割的例子的说明图。FIG. 23 is an explanatory diagram showing an example in which one of the divisions in FIG. 21 or FIG. 22 can be selected.

图24是示出变换块尺寸单位成为层次构造的例子的说明图。FIG. 24 is an explanatory diagram showing an example in which the transform block size unit has a hierarchical structure.

图25是示出本发明的实施方式3的运动图像编码装置的运动补偿预测部5的结构图。FIG25 is a diagram showing the structure of the motion compensation prediction unit 5 of the moving picture encoding device according to Embodiment 3 of the present invention.

图26是示出构成了运动补偿预测部5的直接矢量生成部25的结构图。FIG26 is a diagram showing the structure of the direct vector generation unit 25 constituting the motion compensation prediction unit 5 .

图27是示出构成了直接矢量生成部25的初始矢量生成部34的结构图。FIG. 27 is a diagram showing the configuration of the initial vector generating section 34 constituting the direct vector generating section 25 .

图28是示出构成了初始矢量生成部34的初始矢量判定部73的结构图。FIG. 28 is a diagram showing the configuration of the initial vector determination unit 73 constituting the initial vector generation unit 34 .

图29是示出本发明的实施方式3的运动图像解码装置的运动补偿预测部54的结构图。FIG29 is a diagram showing the structure of the motion compensation prediction unit 54 of the moving picture decoding device according to Embodiment 3 of the present invention.

图30是示出运动矢量的搜索处理的说明图。FIG30 is an explanatory diagram showing a motion vector search process.

图31是示出本发明的实施方式4的运动图像编码装置的运动补偿预测部5的结构图。FIG31 is a diagram showing the structure of the motion compensation prediction unit 5 of the moving picture encoding device according to the fourth embodiment of the present invention.

图32是示出本发明的实施方式4的运动图像解码装置的运动补偿预测部54的结构图。FIG32 is a diagram showing the structure of the motion compensation prediction unit 54 of the moving picture decoding device according to Embodiment 4 of the present invention.

图33是示出记述了可选择的运动矢量、和表示该运动矢量的索引信息的直接矢量候补索引的说明图。FIG. 33 is an explanatory diagram showing direct vector candidate indices describing selectable motion vectors and index information indicating the motion vectors.

图34是示出仅对1个矢量的索引信息进行编码的例子的说明图。FIG34 is an explanatory diagram showing an example of encoding only index information of one vector.

图35是示出构成了运动补偿预测部5的直接矢量生成部26的结构图。FIG35 is a diagram showing the structure of the direct vector generation unit 26 constituting the motion compensation prediction unit 5. As shown in FIG35 , the direct vector generation unit 26 includes a plurality of motion compensation prediction units 5;

图36是示出本发明的实施方式5的运动图像编码装置的运动补偿预测部5的结构图。FIG36 is a diagram showing the structure of the motion compensation prediction unit 5 of the moving picture encoding device according to the fifth embodiment of the present invention.

图37是示出构成了运动补偿预测部5的直接矢量生成部27的结构图。FIG37 is a diagram showing the structure of the direct vector generation unit 27 constituting the motion compensation prediction unit 5. As shown in FIG37 , the direct vector generation unit 27 includes ...

图38是示出本发明的实施方式5的运动图像解码装置的运动补偿预测部54的结构图。FIG38 is a diagram showing the structure of the motion compensation prediction unit 54 of the moving picture decoding device according to Embodiment 5 of the present invention.

图39是示出构成了运动补偿预测部5的直接矢量生成部26的结构图。FIG39 is a diagram showing the structure of the direct vector generation unit 26 constituting the motion compensation prediction unit 5. As shown in FIG39 , the direct vector generation unit 26 includes a plurality of motion compensation prediction units 5;

图40是示出与周围的块的相关关系的说明图。FIG40 is an explanatory diagram showing the correlation with surrounding blocks.

图41是针对编码块的每个块尺寸示出可选择的1个以上的运动矢量的列表的说明图。FIG. 41 is an explanatory diagram showing a list of one or more selectable motion vectors for each block size of a coding block.

图42是示出最大的块尺寸是“128”的列表的一个例子的说明图。FIG. 42 is an explanatory diagram showing an example of a list in which the maximum block size is "128".

图43是针对编码块的每个分割图案示出可选择的1个以上的运动矢量的列表的说明图。FIG. 43 is an explanatory diagram showing a list of one or more selectable motion vectors for each division pattern of a coding block.

图44是示出运动图像编码装置中的列表信息的发送处理的流程图。FIG44 is a flowchart showing a process of transmitting list information in the moving picture encoding device.

图45是示出运动图像解码装置中的列表信息的接收处理的流程图。FIG45 is a flowchart showing a process of receiving list information in the moving picture decoding device.

图46是示出为了将列表内的“temporal”从可选择变更为不可选择,对“ON”的变更标志和表示变更后的列表的列表信息进行了编码的例子的说明图。FIG46 is an explanatory diagram showing an example in which a change flag “ON” and list information indicating the list after the change are encoded in order to change “temporal” in the list from selectable to unselectable.

图47是示出由于变更标志是“ON”,所以变更了当前保持的列表的例子的说明图。FIG. 47 is an explanatory diagram showing an example in which the currently held list is changed because the change flag is “ON”.

图48是示出针对每个块尺寸准备变更标志,仅对与可选择的运动矢量被变更的块尺寸有关的列表信息进行了编码的例子的说明图。FIG. 48 is an explanatory diagram showing an example in which a change flag is prepared for each block size and only list information related to the block size for which the selectable motion vector is changed is encoded.

图49是示出从成为对象的块搜索被帧间编码了的块,将该块内包含的所有矢量作为空间矢量候补的例子的说明图。FIG49 is an explanatory diagram showing an example in which an inter-coded block is searched from a target block, and all vectors included in the block are regarded as spatial vector candidates.

(附图标记说明)(Explanation of Reference Numerals)

1:编码控制部(编码控制单元);2:块分割部(块分割单元);3:切换开关(帧内预测单元、运动补偿预测单元);4:帧内预测部(帧内预测单元);5:运动补偿预测部(运动补偿预测单元);6:减法部(差分图像生成单元);7:变换·量化部(图像压缩单元);8:逆量化·逆变换部;9:加法部;10:帧内预测用存储器;11:环路滤波器部;12:运动补偿预测帧存储器;13:可变长编码部(可变长编码单元);21:切换开关;22:运动矢量搜索部;23:直接矢量生成部;24:运动补偿处理部;25、26、27:直接矢量生成部;31:空间直接矢量生成部;32:时间直接矢量生成部;33:直接矢量判定部;34、36、37:初始矢量生成部;35:运动矢量搜索部;41:运动补偿部;42:类似度计算部;43:直接矢量选择部;51:可变长解码部(可变长解码单元);52:切换开关(帧内预测单元、运动补偿预测单元);53:帧内预测部(帧内预测单元);54:运动补偿预测部(运动补偿预测单元);55:逆量化·逆变换部(差分图像生成单元);56:加法部(解码图像生成单元);57:帧内预测用存储器;58:环路滤波器部;59:运动补偿预测帧存储器;61:切换开关;62:直接矢量生成部;63:运动补偿处理部;64、65、66:直接矢量生成部;71:空间矢量生成部;72:时间矢量生成部;73:初始矢量判定部;81:运动补偿部;82:类似度计算部;83:初始矢量决定部;91:切换开关。1: Coding control unit (coding control unit); 2: Block division unit (block division unit); 3: Switch (intra-frame prediction unit, motion compensation prediction unit); 4: Intra-frame prediction unit (intra-frame prediction unit); 5: Motion compensation prediction unit (motion compensation prediction unit); 6: Subtraction unit (differential image generation unit); 7: Transformation and quantization unit (image compression unit); 8: Inverse quantization and inverse transformation unit; 9: Addition unit; 10: Intra-frame prediction memory; 11: Loop filter unit; 12: Motion compensation prediction frame memory; 13: Variable length coding unit (variable length coding unit); 21: Switch; 22: Motion vector search unit; 23: Direct vector generation unit; 24: Motion compensation processing unit; 25, 26, 27: Direct vector generation unit; 31: Spatial direct vector generation unit; 32: Temporal direct vector generation unit; 33: Direct vector determination unit; 34, 36, 37: Initial vector generation unit; 35: Motion compensation processing unit Motion vector search unit; 41: Motion compensation unit; 42: Similarity calculation unit; 43: Direct vector selection unit; 51: Variable length decoding unit (variable length decoding unit); 52: Switch (intra-frame prediction unit, motion compensation prediction unit); 53: Intra-frame prediction unit (intra-frame prediction unit); 54: Motion compensation prediction unit (motion compensation prediction unit); 55: Inverse quantization/inverse transform unit (differential image generation unit); 56: Addition unit (decoded image generation unit); 57: Memory for intra-frame prediction; 58: Loop filter unit; 59: Motion compensation prediction frame memory; 61: Switch; 62: Direct vector generation unit; 63: Motion compensation processing unit; 64, 65, 66: Direct vector generation unit; 71: Spatial vector generation unit; 72: Temporal vector generation unit; 73: Initial vector determination unit; 81: Motion compensation unit; 82: Similarity calculation unit; 83: Initial vector determination unit; 91: Switch.

具体实施方式DETAILED DESCRIPTION

以下,参照附图,详细说明本发明的实施方式。Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

实施方式1.Implementation method 1.

在该实施方式1中,说明输入影像的各帧图像并在接近帧之间实施运动补偿预测而得到预测差分信号并对该预测差分信号通过正交变换、量化实施了压缩处理之后进行可变长编码来生成比特流的运动图像编码装置、和对从该运动图像编码装置输出的比特流进行解码的运动图像解码装置。In this embodiment 1, a motion image encoding device is described which inputs each frame image of an image, performs motion compensation prediction between adjacent frames to obtain a prediction differential signal, and performs variable-length coding on the prediction differential signal through orthogonal transformation and quantization, performs compression processing, and then generates a bit stream, and a motion image decoding device which decodes the bit stream output from the motion image encoding device.

该实施方式1的运动图像编码装置的特征在于,适应于影像信号的空间·时间方向的局部性的变化,将影像信号分割为多种尺寸的区域来进行帧之内·帧之间适应编码。The moving picture encoding apparatus of this first embodiment is characterized in that it divides the video signal into regions of various sizes to perform intra-frame and 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 across space and time. When viewed spatially, within a given image frame, there are graphics with uniform signal characteristics across relatively wide image regions, such as the sky and walls, but there are also graphics with complex texture patterns within smaller image regions, such as people and paintings with fine textures.

在时间上观察时,天空、壁的局部的时间方向的图形的变化小,但运动的人物、物体由于其轮廓在时间上进行刚体·非刚体的运动,所以时间上的变化大。When observed in time, the local time-direction graphics of the sky and the wall change little, but the moving people and objects change greatly in time because their outlines perform rigid and non-rigid motion in time.

在编码处理中,通过时间·空间上的预测生成信号电力、熵小的预测差分信号,从而削减整体的代码量,而如果能够对尽可能大的图像信号区域均匀地应用用于预测的参数,则能够减小该参数的代码量。In the encoding process, a prediction differential signal with low signal power and entropy is generated through temporal and spatial prediction, thereby reducing the overall code amount. If the parameters used for prediction can be evenly applied to the largest possible image signal area, the code amount of the parameter can be reduced.

另一方面,如果针对时间上·空间上变化大的图像信号图案,应用同一预测参数,则预测的错误增加,所以无法削减预测差分信号的代码量。On the other hand, if the same prediction parameters are applied to an image signal pattern that varies greatly temporally and spatially, prediction errors increase, making it impossible to reduce the amount of code of the prediction difference signal.

因此,优选针对时间上·空间上变化大的图像信号图案,减小预测对象的区域,而即使增加用于预测的参数的数据量,也降低预测差分信号的电力·熵。Therefore, for image signal patterns that vary greatly temporally and spatially, it is preferable to reduce the area to be predicted, thereby reducing the power and entropy of the prediction difference signal even if the amount of data of the parameters used for prediction is increased.

为了进行这样的适应于影像信号的一般的性质的编码,在该实施方式1的运动图像编码装置中,从规定的最大块尺寸层次性地分割影像信号的区域,针对每个分割区域实施预测处理、预测差分的编码处理。In order to perform such encoding adapted to the general properties of image signals, the moving picture encoding apparatus of this first embodiment hierarchically divides the image signal into regions based on a predetermined maximum block size, and performs prediction processing and prediction difference encoding processing on each divided region.

该实施方式1的运动图像编码装置作为处理对象的影像信号除了由亮度信号和2个色差信号构成的YUV信号、从数字摄像元件输出的RGB信号等任意的颜色空间的彩色影像信号以外,还有单色图像信号、红外线图像信号等影像帧由水平·垂直二维的数字采样(像素)列构成的任意的影像信号。The motion image encoding device of this embodiment 1 processes, as image signals, color image signals of arbitrary color spaces such as YUV signals composed of a luminance signal and two color difference signals, and RGB signals output from a digital camera element, as well as arbitrary image signals whose image frames are composed of horizontal and vertical two-dimensional columns of digital samples (pixels), such as monochrome image signals and infrared image signals.

各像素的灰度既可以是8比特,也可以是10比特、12比特等灰度。The grayscale of each pixel can be 8 bits, 10 bits, 12 bits, etc.

但是,在以下的说明中,只要没有特别说明,设为所输入的影像信号是YUV信号。另外,设为2个色差分量U、V相对亮度分量Y被二次采样(subsample)的4:2:0格式的信号。However, in the following description, unless otherwise specified, the input video signal is assumed to be a YUV signal, and is a 4:2:0 format signal in which the two color difference components U and V are subsampled relative to the luminance component Y.

另外,将与影像的各帧对应的处理数据单位称为“图片”,在该实施方式1中,将“图片”设为依次扫描(逐行扫描)了的影像帧的信号而进行说明。但是,在影像信号是交错信号的情况下,“图片”也可以是作为构成影像帧的单位的场(field)图像信号。Furthermore, the unit of processed data corresponding to each image frame is referred to as a "picture." In this first embodiment, a "picture" is described as a signal of an image frame that has been sequentially scanned (progressive scanning). However, if the image signal is an interlaced signal, a "picture" may also be a field image signal that constitutes a video frame.

图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实施如下处理:决定作为实施运动补偿预测处理(帧之间预测处理)或者帧内(intra)预测处理(帧之内预测处理)时的处理单位的编码块的最大尺寸,并且决定最大尺寸的编码块被层次性地分割时的上限的层次数。In Figure 1, the encoding control unit 1 implements the following processing: determines the maximum size of the coding block that serves as the processing unit when performing motion compensation prediction processing (inter-frame prediction processing) or intra-frame prediction processing (intra-frame prediction processing), and determines the upper limit of the number of layers when the maximum-sized coding block is hierarchically divided.

另外,编码控制部1实施如下处理:从可利用的1个以上的编码模式(1个以上的帧内编码模式、1个以上的帧间(inter)编码模式(包括直接模式的帧间编码模式))中,选择适合于层次性地分割的各个编码块的编码模式。另外,编码控制部1构成了编码控制单元。The encoding control unit 1 also performs processing to select a coding mode suitable for each hierarchically divided coding block from one or more available coding modes (one or more intra-frame coding modes and one or more inter-frame coding modes (including the inter-frame coding mode of the direct mode)). Furthermore, the encoding control unit 1 constitutes an encoding control unit.

块分割部2实施如下处理:如果输入了表示输入图像的影像信号,则将该影像信号表示的输入图像分割为由编码控制部1决定的最大尺寸的编码块,并且直到达到由编码控制部1决定的上限的层次数为止,将该编码块层次性地分割。另外,块分割部2构成了块分割单元。The block division unit 2 performs the following processing: upon receiving an image signal representing an input image, the block division unit 2 divides the input image represented by the image signal into coding blocks of the maximum size determined by the coding control unit 1, and further divides the coding blocks hierarchically until the upper limit of the number of layers determined by the coding control unit 1 is reached. The block division unit 2 also constitutes a block division unit.

切换开关3实施如下处理:如果由编码控制部1选择的编码模式是帧内编码模式,则将由块分割部2分割的编码块输出到帧内预测部4,如果由编码控制部1选择的编码模式是帧间编码模式,则将由块分割部2分割的编码块输出到运动补偿预测部5。The switching switch 3 implements the following processing: if the encoding mode selected by the encoding control unit 1 is the intra-frame encoding mode, the encoding block divided by the block division unit 2 is output to the intra-frame prediction unit 4; if the encoding mode selected by the encoding control unit 1 is the inter-frame encoding mode, the encoding block divided by the block division unit 2 is output to the motion compensation prediction unit 5.

帧内预测部4实施如下处理:如果从切换开关3接收到由块分割部2分割的编码块,则使用从编码控制部1输出的帧内预测参数,实施针对该编码块的帧内预测处理来生成预测图像。Upon receiving the coding block divided by the block division unit 2 from the switch 3 , the intra prediction unit 4 performs intra prediction processing on the coding block using the intra prediction parameters output from the encoding control unit 1 to generate a predicted image.

另外,由切换开关3以及帧内预测部4构成了帧内预测单元。The switch 3 and the intra prediction unit 4 constitute an intra prediction unit.

运动补偿预测部5实施如下处理:在作为适合于由块分割部2分割的编码块的编码模式,由编码控制部1选择了直接模式的帧间编码模式的情况下,根据位于该编码块的周围的已编码块的运动矢量生成空间直接模式的空间直接矢量,并且根据该编码块可参照的已编码图片的运动矢量生成时间直接模式的时间直接矢量,从该空间直接矢量或者时间直接矢量中,选择参照图像间的相关高的一方的直接矢量,使用该直接矢量,实施针对该编码块的运动补偿预测处理来生成预测图像。The motion compensation prediction unit 5 performs the following processing: when the inter-frame coding mode of the direct mode is selected by the coding control unit 1 as the coding mode suitable for the coding block divided by the block division unit 2, a spatial direct vector of the spatial direct mode is generated based on the motion vectors of the coded blocks located around the coding block, and a temporal direct vector of the temporal direct mode is generated based on the motion vectors of the coded pictures that can be referenced by the coding block. From the spatial direct vector or the temporal direct vector, the direct vector with a higher correlation between the reference images is selected, and the motion compensation prediction processing is performed on the coding block using the direct vector to generate a predicted image.

另外,运动补偿预测部5实施如下处理:在作为适合于由块分割部2分割的编码块的编码模式,由编码控制部1选择了直接模式以外的帧间编码模式的情况下,从该编码块和运动补偿预测帧存储器12中保存的参照图像搜索运动矢量,使用该运动矢量,实施针对该编码块的运动补偿预测处理来生成预测图像。In addition, the motion compensation prediction unit 5 implements the following processing: when an inter-frame coding mode other than the direct mode is selected by the coding control unit 1 as a coding mode suitable for the coding block divided by the block division unit 2, a motion vector is searched from the coding block and the reference image stored in the motion compensation prediction frame memory 12, and using the motion vector, motion compensation prediction processing is implemented for the coding block to generate a predicted image.

另外,由切换开关3以及运动补偿预测部5构成了运动补偿预测单元。The switch 3 and the motion compensation prediction unit 5 constitute a motion compensation prediction unit.

减法部6实施如下处理:通过从由块分割部2分割的编码块,减去由帧内预测部4或者运动补偿预测部5生成的预测图像,生成差分图像(=编码块-预测图像)。另外,减法部6构成了差分图像生成单元。The subtraction unit 6 generates a differential image (= coded block - predicted image) by subtracting the predicted image generated by the intra prediction unit 4 or the motion compensation prediction unit 5 from the coded block divided by the block division unit 2. The subtraction unit 6 constitutes differential image generation means.

变换·量化部7实施如下处理:以从编码控制部1输出的预测差分编码参数中包含的变换块尺寸为单位,实施由减法部6生成的差分图像的变换处理(例如,DCT(离散余弦变换)、预先对特定的学习系列进行了基底设计的KL变换等正交变换处理),并且使用该预测差分编码参数中包含的量化参数,对该差分图像的变换系数进行量化,从而将量化后的变换系数作为差分图像的压缩数据输出。另外,变换·量化部7构成了图像压缩单元。The transform/quantization unit 7 performs a transform process (e.g., a DCT (discrete cosine transform) or an orthogonal transform such as a KL transform with a pre-designed basis for a specific learning series) on the difference image generated by the subtraction unit 6, using the transform block size included in the predicted difference coding parameters output from the coding control unit 1 as a unit. Furthermore, the transform coefficients of the difference image are quantized using the quantization parameters included in the predicted difference coding parameters, and the quantized transform coefficients are output as compressed data of the difference image. Furthermore, the transform/quantization unit 7 constitutes image compression means.

逆量化·逆变换部8实施如下处理:使用从编码控制部1输出的预测差分编码参数中包含的量化参数,对从变换·量化部7输出的压缩数据进行逆量化,以该预测差分编码参数中包含的变换块尺寸为单位,实施逆量化的压缩数据的逆变换处理(例如,逆DCT(逆离散余弦变换)、逆KL变换等逆变换处理),从而将逆变换处理后的压缩数据作为局部解码预测差分信号输出。The inverse quantization and inverse transformation unit 8 performs the following processing: using the quantization parameter included in the predicted differential coding parameter output from the coding control unit 1, the compressed data output from the transformation and quantization unit 7 is inverse quantized, and the inverse transformation processing (for example, inverse DCT (inverse discrete cosine transform), inverse KL transform and other inverse transformation processing) of the inversely quantized compressed data is performed in units of the transformation block size included in the predicted differential coding parameter, thereby outputting the compressed data after the inverse transformation processing as a locally decoded predicted differential signal.

加法部9实施如下处理:将从逆量化·逆变换部8输出的局部解码预测差分信号和表示由帧内预测部4或者运动补偿预测部5生成的预测图像的预测信号相加,从而生成表示局部解码图像的局部解码图像信号。The adding unit 9 performs the following processing: adds the local decoded prediction difference signal output from the inverse quantization and inverse transformation unit 8 and the prediction signal representing the predicted image generated by the intra-frame prediction unit 4 or the motion compensation prediction unit 5, thereby generating a local decoded image signal representing the local decoded image.

帧内预测用存储器10是作为由帧内预测部4在下次的帧内预测处理中使用的图像,保存由加法部9生成的局部解码图像信号表示的局部解码图像的RAM等记录介质。The intra prediction memory 10 is a recording medium such as a RAM that stores a local decoded image represented by a local decoded image signal generated by the adding unit 9 as an image to be used by the intra prediction unit 4 in the next intra prediction process.

环路滤波器部11实施如下处理:补偿由加法器9生成的局部解码图像信号中包含的编码失真(encoding distortion),将编码失真补偿后的局部解码图像信号表示的局部解码图像作为参照图像输出到运动补偿预测帧存储器12。The loop filter unit 11 performs processing to compensate for coding distortion included in the local decoded image signal generated by the adder 9 and outputs the local decoded image represented by the local decoded image signal after coding distortion compensation to the motion compensation prediction frame memory 12 as a reference image.

运动补偿预测帧存储器12是作为由运动补偿预测部5在下次的运动补偿预测处理中使用的参照图像,保存利用环路滤波器部11的滤波处理后的局部解码图像的RAM等记录介质。The motion compensation prediction frame memory 12 is a recording medium such as RAM that stores a local decoded image filtered by the loop filter unit 11 as a reference image used by the motion compensation prediction unit 5 in the next motion compensation prediction process.

可变长编码部13实施如下处理:对从变换·量化部7输出的压缩数据、从编码控制部1输出的编码模式以及预测差分编码参数、从帧内预测部4输出的帧内预测参数或者从运动补偿预测部5输出的帧间预测参数进行可变长编码,生成该压缩数据、编码模式、预测差分编码参数、帧内预测参数/帧间预测参数的编码数据被多路复用的比特流。另外,可变长编码部13构成了可变长编码单元。The variable-length coding unit 13 performs variable-length coding on the compressed data output from the transform/quantization unit 7, the coding mode and prediction difference coding parameters output from the coding control unit 1, and the intra-frame prediction parameters output from the intra-frame prediction unit 4 or the inter-frame prediction parameters output from the motion-compensated prediction unit 5, thereby generating a bitstream in which the compressed data, coding mode, prediction difference coding parameters, and coded data of the intra-frame prediction parameters/inter-frame prediction parameters are multiplexed. The variable-length coding unit 13 constitutes a variable-length coding unit.

图2是示出本发明的实施方式1的运动图像编码装置的运动补偿预测部5的结构图。FIG2 is a diagram showing the structure of the motion compensation prediction unit 5 of the moving picture encoding device according to the first embodiment of the present invention.

在图2中,切换开关21实施如下处理:在由编码控制部1选择的编码模式是直接模式以外的帧间模式的情况下,将由块分割部2分割的编码块输出到运动矢量搜索部22,另一方面,在该编码模式是直接模式的帧间模式的情况下,将由块分割部2分割的编码块输出到直接矢量生成部23。In Figure 2, the switching switch 21 implements the following processing: when the coding mode selected by the coding control unit 1 is an inter-frame mode other than the direct mode, the coding block divided by the block division unit 2 is output to the motion vector search unit 22; on the other hand, when the coding mode is an inter-frame mode other than the direct mode, the coding block divided by the block division unit 2 is output to the direct vector generation unit 23.

另外,在直接矢量生成部23中,在生成直接矢量时,不使用由块分割部2分割的编码块,所以也可以不将该编码块输出到直接矢量生成部23。Furthermore, the direct vector generator 23 does not use the coded blocks divided by the block divider 2 when generating the direct vectors. Therefore, the coded blocks do not need to be output to the direct vector generator 23 .

运动矢量搜索部22实施如下处理:一边参照从切换开关21输出的编码块和运动补偿预测帧存储器12中保存的参照图像,一边以帧间模式搜索最佳的运动矢量,将该运动矢量输出到运动补偿处理部24。The motion vector search unit 22 searches for an optimal motion vector in inter-frame mode while referring to the coding block output from the switch 21 and the reference image stored in the motion compensation prediction frame memory 12 , and outputs the motion vector to the motion compensation processing unit 24 .

直接矢量生成部23实施如下处理:根据位于该编码块的周围的已编码块的运动矢量生成空间直接模式的空间直接矢量,并且根据该编码块可参照的已编码图片的运动矢量生成时间直接模式的时间直接矢量,从该空间直接矢量或者时间直接矢量中,选择参照图像间的相关高的一方的直接矢量。The direct vector generation unit 23 performs the following processing: generates a spatial direct vector of the spatial direct mode based on the motion vector of the coded blocks located around the coding block, and generates a temporal direct vector of the temporal direct mode based on the motion vector of the coded picture that can be referenced by the coding block, and selects the direct vector with a higher correlation between the reference images from the spatial direct vector or the temporal direct vector.

运动补偿处理部24实施如下处理:使用由运动矢量搜索部22搜索的运动矢量或者由直接矢量生成部23选择的直接矢量和运动补偿预测帧存储器12中保存的1帧以上的参照图像,根据从编码控制部1输出的帧间预测参数,实施运动补偿预测处理,从而生成预测图像。The motion compensation processing unit 24 performs the following processing: using the motion vector searched by the motion vector search unit 22 or the direct vector selected by the direct vector generation unit 23 and one or more reference images stored in the motion compensation prediction frame memory 12, it performs motion compensation prediction processing based on the inter-frame prediction parameters output from the encoding control unit 1, thereby generating a predicted image.

另外,运动补偿处理部24将在实施运动补偿预测处理时使用的帧间预测参数输出到可变长编码部13。在由编码控制部1选择的编码模式是直接模式以外的帧间模式的情况下,将由运动矢量搜索部22搜索的运动矢量包含于该帧间预测参数而输出到可变长编码部13。Furthermore, the motion compensation processing unit 24 outputs the inter-frame prediction parameters used when performing the motion compensation prediction process to the variable length coding unit 13. When the coding mode selected by the coding control unit 1 is an inter-frame mode other than the direct mode, the motion vector searched by the motion vector search unit 22 is included in the inter-frame prediction parameters and output to the variable length coding unit 13.

图3是示出构成了运动补偿预测部5的直接矢量生成部23的结构图。FIG. 3 is a diagram showing the configuration of the direct vector generation unit 23 constituting the motion compensation prediction unit 5 .

在图3中,空间直接矢量生成部31实施如下处理:从已编码的块的运动矢量(已编码的块的运动矢量保存于未图示的运动矢量存储器、或者运动补偿预测部5的内部存储器)中,读出位于编码块的周围的已编码的块的运动矢量,根据该运动矢量生成空间直接模式的空间直接矢量。In Figure 3, the spatial direct vector generation unit 31 implements the following processing: from the motion vector of the encoded block (the motion vector of the encoded block is stored in a motion vector memory not shown in the figure, or the internal memory of the motion compensation prediction unit 5), the motion vector of the encoded block located around the encoded block is read out, and the spatial direct vector of the spatial direct mode is generated based on the motion vector.

时间直接矢量生成部32实施如下处理:从已编码的块的运动矢量中,读出作为编码块可参照的已编码图片的运动矢量的、与编码块在空间上处于相同的位置的块的运动矢量,根据该运动矢量生成时间直接模式的时间直接矢量。The temporal direct vector generation unit 32 performs the following processing: from the motion vector of the encoded block, it reads the motion vector of the block that is spatially located at the same position as the encoded block, which is the motion vector of the encoded picture that the encoded block can refer to, and generates the temporal direct vector of the temporal direct mode based on the motion vector.

直接矢量判定部33实施如下处理:使用由空间直接矢量生成部31生成的空间直接矢量,计算空间直接模式的评价值,并且使用由时间直接矢量生成部32生成的时间直接矢量,计算时间直接模式的评价值,比较该空间直接模式的评价值和时间直接模式的评价值,选择该空间直接矢量或者时间直接矢量中的某一方。The direct vector determination unit 33 performs the following processing: using the spatial direct vector generated by the spatial direct vector generation unit 31, it calculates the evaluation value of the spatial direct mode, and using the temporal direct vector generated by the temporal direct vector generation unit 32, it calculates the evaluation value of the temporal direct mode, compares the evaluation value of the spatial direct mode with the evaluation value of the temporal direct mode, and selects either the spatial direct vector or the temporal direct vector.

图4是示出构成了直接矢量生成部23的直接矢量判定部33的结构图。FIG. 4 is a diagram showing the configuration of the direct vector determination unit 33 constituting the direct vector generation unit 23 .

在图4中,运动补偿部41实施如下处理:使用由空间直接矢量生成部31生成的空间直接矢量,生成空间直接模式的列表0预测图像(例如,空间直接模式的前方预测图像)和空间直接模式的列表1预测图像(例如,空间直接模式的后方预测图像),并且使用由时间直接矢量生成部32生成的时间直接矢量,生成时间直接模式的列表0预测图像(例如,时间直接模式的前方预测图像)和时间直接模式的列表1预测图像(例如,时间直接模式的后方预测图像)。In Figure 4, the motion compensation unit 41 implements the following processing: using the spatial direct vector generated by the spatial direct vector generation unit 31, a list 0 prediction image of the spatial direct mode (for example, the forward prediction image of the spatial direct mode) and a list 1 prediction image of the spatial direct mode (for example, the backward prediction image of the spatial direct mode) are generated, and using the temporal direct vector generated by the temporal direct vector generation unit 32, a list 0 prediction image of the temporal direct mode (for example, the forward prediction image of the temporal direct mode) and a list 1 prediction image of the temporal direct mode (for example, the backward prediction image of the temporal direct mode) are generated.

类似度计算部42实施如下处理:作为空间直接模式的评价值,计算空间直接模式的列表0预测图像(前方预测图像)和列表1预测图像(后方预测图像)的类似度,并且作为时间直接模式的评价值,计算时间直接模式的列表0预测图像(前方预测图像)和列表1预测图像(后方预测图像)的类似度。The similarity calculation unit 42 performs the following processing: as the evaluation value of the spatial direct mode, the similarity of the list 0 prediction image (forward prediction image) and the list 1 prediction image (backward prediction image) of the spatial direct mode is calculated, and as the evaluation value of the temporal direct mode, the similarity of the list 0 prediction image (forward prediction image) and the list 1 prediction image (backward prediction image) of the temporal direct mode is calculated.

直接矢量选择部43实施如下处理:比较由类似度计算部42计算的空间直接模式中的列表0预测图像(前方预测图像)和列表1预测图像(后方预测图像)的类似度、与时间直接模式中的列表0预测图像(前方预测图像)和列表1预测图像(后方预测图像)的类似度,选择空间直接矢量或者时间直接矢量中的、列表0预测图像(前方预测图像)和列表1预测图像(后方预测图像)的类似度高的一方的直接模式的直接矢量。The direct vector selection unit 43 performs the following processing: compares the similarity between the list 0 prediction image (forward prediction image) and the list 1 prediction image (backward prediction image) in the spatial direct mode calculated by the similarity calculation unit 42, and the similarity between the list 0 prediction image (forward prediction image) and the list 1 prediction image (backward prediction image) in the temporal direct mode, and selects the direct vector of the direct mode with the higher similarity between the list 0 prediction image (forward prediction image) and the list 1 prediction image (backward prediction image) in the spatial direct vector or the temporal direct vector.

图5是示出本发明的实施方式1的运动图像解码装置的结构图。FIG5 is a diagram showing the structure of the moving picture decoding apparatus according to Embodiment 1 of the present invention.

在图5中,可变长解码部51实施如下处理:从多路复用到比特流的编码数据可变长解码出与层次性地分割的各个编码块有关的压缩数据、编码模式、预测差分编码参数、帧内预测参数/帧间预测参数,将该压缩数据以及预测差分编码参数输出到逆量化·逆变换部55,并且将该编码模式以及帧内预测参数/帧间预测参数输出到切换开关52。另外,可变长解码部51构成了可变长解码单元。In FIG5 , the variable length decoding unit 51 performs the following processing: variable length decoding is performed on the coded data multiplexed into the bit stream to obtain compressed data, coding mode, prediction difference coding parameters, and intra-frame prediction parameters/inter-frame prediction parameters related to each hierarchically divided coding block, and the compressed data and prediction difference coding parameters are output to the inverse quantization and inverse transformation unit 55. The coding mode and intra-frame prediction parameters/inter-frame prediction parameters are also output to the switch 52. The variable length decoding unit 51 constitutes a variable length decoding unit.

切换开关52实施如下处理:在从可变长解码部51输出的与编码块有关的编码模式是帧内编码模式的情况下,将从可变长解码部51输出的帧内预测参数输出到帧内预测部53,在该编码模式是帧间编码模式的情况下,将从可变长解码部51输出的帧间预测参数输出到运动补偿预测部54。The switching switch 52 implements the following processing: when the coding mode related to the coding block output from the variable length decoding unit 51 is the intra-frame coding mode, the intra-frame prediction parameters output from the variable length decoding unit 51 are output to the intra-frame prediction unit 53; when the coding mode is the inter-frame coding mode, the inter-frame prediction parameters output from the variable length decoding unit 51 are output to the motion compensation prediction unit 54.

帧内预测部53实施如下处理:使用从切换开关52输出的帧内预测参数,实施针对该编码块的帧内预测处理来生成预测图像。The intra prediction unit 53 performs a process of performing an intra prediction process on the coding block using the intra prediction parameters output from the switch 52 to generate a predicted image.

另外,由切换开关52以及帧内预测部53构成了帧内预测单元。The switch 52 and the intra prediction unit 53 constitute an intra prediction unit.

运动补偿预测部54实施如下处理:在从可变长解码部51输出的与编码块有关的编码模式是直接模式的帧间编码模式的情况下,根据位于该编码块的周围的已解码块的运动矢量生成空间直接模式的空间直接矢量,并且根据该编码块可参照的已解码图片的运动矢量生成时间直接模式的时间直接矢量,从该空间直接矢量或者时间直接矢量中,选择参照图像间的相关高的一方的直接矢量,使用该直接矢量,实施针对该编码块的运动补偿预测处理来生成预测图像。The motion compensation prediction unit 54 performs the following processing: when the coding mode related to the coding block output from the variable length decoding unit 51 is the inter-frame coding mode of the direct mode, a spatial direct vector of the spatial direct mode is generated based on the motion vectors of the decoded blocks located around the coding block, and a temporal direct vector of the temporal direct mode is generated based on the motion vectors of the decoded pictures that the coding block can refer to. From the spatial direct vector or the temporal direct vector, the direct vector with a higher correlation between the reference images is selected, and the motion compensation prediction processing is performed on the coding block using the direct vector to generate a predicted image.

另外,运动补偿预测部54实施如下处理:在从可变长解码部51输出的与编码块有关的编码模式是直接模式以外的帧间编码模式的情况下,使用从可变长解码部51输出的帧间预测参数中包含的运动矢量,实施针对该编码块的运动补偿预测处理来生成预测图像。In addition, the motion compensation prediction unit 54 performs the following processing: when the coding mode related to the coding block output from the variable length decoding unit 51 is an inter-frame coding mode other than the direct mode, the motion vector included in the inter-frame prediction parameters output from the variable length decoding unit 51 is used to perform motion compensation prediction processing on the coding block to generate a predicted image.

另外,由切换开关52以及运动补偿预测部54构成了运动补偿预测单元。The switch 52 and the motion compensation prediction unit 54 constitute a motion compensation prediction unit.

逆量化·逆变换部55实施如下处理:使用从可变长解码部51输出的预测差分编码参数中包含的量化参数,对从可变长解码部51输出的与编码块有关的压缩数据进行逆量化,以该预测差分编码参数中包含的变换块尺寸为单位,实施逆量化的压缩数据的逆变换处理(例如,逆DCT(逆离散余弦变换)、逆KL变换等逆变换处理),从而将逆变换处理后的压缩数据作为解码预测差分信号(表示压缩前的差分图像的信号)输出。另外,逆量化·逆变换部55构成了差分图像生成单元。The inverse quantization/inverse transform unit 55 performs the following processing: using the quantization parameter included in the prediction difference coding parameter output from the variable length decoding unit 51, it inversely quantizes the compressed data related to the coding block output from the variable length decoding unit 51, and performs inverse transform processing (for example, inverse DCT (inverse discrete cosine transform) or inverse KL transform) on the inversely quantized compressed data in units of the transform block size included in the prediction difference coding parameter. The inversely transformed compressed data is then output as a decoded prediction difference signal (a signal representing the difference image before compression). Furthermore, the inverse quantization/inverse transform unit 55 constitutes a difference image generation unit.

加法部56实施如下处理:通过将从逆量化·逆变换部55输出的解码预测差分信号和表示由帧内预测部53或者运动补偿预测部54生成的预测图像的预测信号相加,生成表示解码图像的解码图像信号。另外,加法部56构成了解码图像生成单元。The addition unit 56 performs processing to generate a decoded image signal representing a decoded image by adding the decoded prediction difference signal output from the inverse quantization and inverse transform unit 55 and a prediction signal representing a predicted image generated by the intra prediction unit 53 or the motion compensation prediction unit 54. The addition unit 56 constitutes a decoded image generation unit.

帧内预测用存储器57是作为由帧内预测部53在下次的帧内预测处理中使用的图像,保存由加法部56生成的解码图像信号表示的解码图像的RAM等记录介质。The intra prediction memory 57 is a recording medium such as a RAM that stores a decoded image represented by a decoded image signal generated by the adding unit 56 as an image to be used by the intra prediction unit 53 in the next intra prediction process.

环路滤波器部58实施如下处理:补偿由加法器56生成的解码图像信号中包含的编码失真,将编码失真补偿后的解码图像信号表示的解码图像作为参照图像输出到运动补偿预测帧存储器59。The loop filter unit 58 performs processing to compensate for coding distortion included in the decoded image signal generated by the adder 56 , and outputs a decoded image represented by the decoded image signal after coding distortion compensation to the motion compensation prediction frame memory 59 as a reference image.

运动补偿预测帧存储器59是作为由运动补偿预测部54在下次的运动补偿预测处理中使用的参照图像,保存利用环路滤波器部58的滤波处理后的解码图像的RAM等记录介质。The motion compensation prediction frame memory 59 is a recording medium such as RAM that stores a decoded image filtered by the loop filter unit 58 as a reference image used by the motion compensation prediction unit 54 in the next motion compensation prediction process.

图6是示出本发明的实施方式1的运动图像解码装置的运动补偿预测部54的结构图。FIG6 is a diagram showing the structure of the motion compensation prediction unit 54 of the moving picture decoding device according to Embodiment 1 of the present invention.

在图6中,切换开关61实施如下处理:在从可变长解码部51输出的与编码块有关的编码模式是直接模式以外的帧间模式的情况下,将从可变长解码部51输出的帧间预测参数(包括运动矢量)输出到运动补偿处理部63,在该编码模式是直接模式的帧间模式的情况下,将从可变长解码部51输出的帧间预测参数输出到直接矢量生成部62。In Figure 6, the switching switch 61 implements the following processing: when the coding mode related to the coding block output from the variable length decoding unit 51 is an inter-frame mode other than the direct mode, the inter-frame prediction parameters (including motion vectors) output from the variable length decoding unit 51 are output to the motion compensation processing unit 63; when the coding mode is an inter-frame mode other than the direct mode, the inter-frame prediction parameters output from the variable length decoding unit 51 are output to the direct vector generation unit 62.

直接矢量生成部62实施如下处理:根据位于该编码块的周围的已解码块的运动矢量生成空间直接模式的空间直接矢量,并且根据该编码块可参照的已解码图片的运动矢量生成时间直接模式的时间直接矢量,从该空间直接矢量或者时间直接矢量中,选择参照图像间的相关高的一方的直接矢量。The direct vector generation unit 62 performs the following processing: generates a spatial direct vector of the spatial direct mode based on the motion vector of the decoded block located around the coding block, and generates a temporal direct vector of the temporal direct mode based on the motion vector of the decoded picture that can be referenced by the coding block, and selects the direct vector with a higher correlation between the reference images from the spatial direct vector or the temporal direct vector.

另外,直接矢量生成部62实施将从切换开关61输出的帧间预测参数输出到运动补偿处理部63的处理。Furthermore, the direct vector generation unit 62 performs a process of outputting the inter prediction parameter output from the switch 61 to the motion compensation processing unit 63 .

另外,直接矢量生成部62的内部结构与图2的直接矢量生成部23相同。The internal structure of the direct vector generating unit 62 is the same as that of the direct vector generating unit 23 in FIG. 2 .

运动补偿处理部63实施如下处理:使用从切换开关61输出的帧间预测参数中包含的运动矢量或者由直接矢量生成部62选择的直接矢量和运动补偿预测帧存储器59中保存的1帧的参照图像,根据从直接矢量生成部62输出的帧间预测参数,实施运动补偿预测处理,从而生成预测图像。The motion compensation processing unit 63 performs the following processing: using the motion vector included in the inter-frame prediction parameters output from the switching switch 61 or the direct vector selected by the direct vector generation unit 62 and the reference image of one frame stored in the motion compensation prediction frame memory 59, a motion compensation prediction process is performed based on the inter-frame prediction parameters output from the direct vector generation unit 62, thereby generating a predicted image.

在图1中,假设作为运动图像编码装置的构成要素的编码控制部1、块分割部2、切换开关3、帧内预测部4、运动补偿预测部5、减法部6、变换·量化部7、逆量化·逆变换部8、加法部9、环路滤波器部11以及可变长编码部13分别由专用的硬件(例如,安装了CPU的半导体集成电路、或者单片微型计算机(one chip microcomputer)等)构成的例子,但在运动图像编码装置由计算机构成的情况下,也可以将记述了编码控制部1、块分割部2、切换开关3、帧内预测部4、运动补偿预测部5、减法部6、变换·量化部7、逆量化·逆变换部8、加法部9、环路滤波器部11以及可变长编码部13的处理内容的程序保存到该计算机的存储器,由该计算机的CPU执行该存储器中保存的程序。In FIG1 , an example is shown in which the components of the moving picture coding apparatus, namely, the coding control unit 1, the block division unit 2, the switch 3, the intra-frame prediction unit 4, the motion-compensated prediction unit 5, the subtraction unit 6, the transform/quantization unit 7, the inverse quantization/inverse transform unit 8, the addition unit 9, the loop filter unit 11, and the variable-length coding unit 13, are each configured by dedicated hardware (e.g., a semiconductor integrated circuit or a one-chip microcomputer having a CPU mounted thereon). However, if the moving picture coding apparatus is configured by a computer, a program describing the processing contents of the coding control unit 1, the block division unit 2, the switch 3, the intra-frame prediction unit 4, the motion-compensated prediction unit 5, the subtraction unit 6, the transform/quantization unit 7, the inverse quantization/inverse transform unit 8, the addition unit 9, the loop filter unit 11, and the variable-length coding unit 13 may be stored in a memory of the computer, and the CPU of the computer may execute the program stored in the memory.

图7是示出本发明的实施方式1的运动图像编码装置的处理内容的流程图。FIG7 is a flowchart showing the processing contents of the moving picture encoding apparatus according to Embodiment 1 of the present invention.

在图5中,假设作为运动图像解码装置的构成要素的可变长解码部51、切换开关52、帧内预测部53、运动补偿预测部54、逆量化·逆变换部55、加法部56以及环路滤波器部58分别由专用的硬件(例如,安装了CPU的半导体集成电路、或者单片微型计算机等)构成的例子,但在运动图像解码装置由计算机构成的情况下,也可以将记述了可变长解码部51、切换开关52、帧内预测部53、运动补偿预测部54、逆量化·逆变换部55、加法部56以及环路滤波器部58的处理内容的程序保存到该计算机的存储器,由该计算机的CPU执行该存储器中保存的程序。In FIG5 , an example is shown in which the variable length decoding unit 51, the switching switch 52, the intra-frame prediction unit 53, the motion compensation prediction unit 54, the inverse quantization/inverse transform unit 55, the adding unit 56, and the loop filter unit 58, which are components of the motion picture decoding apparatus, are each constituted by dedicated hardware (for example, a semiconductor integrated circuit in which a CPU is mounted, or a single-chip microcomputer, etc.). However, in a case where the motion picture decoding apparatus is constituted by a computer, a program describing the processing contents of the variable length decoding unit 51, the switching switch 52, the intra-frame prediction unit 53, the motion compensation prediction unit 54, the inverse quantization/inverse transform unit 55, the adding unit 56, and the loop filter unit 58 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.

图8是示出本发明的实施方式1的运动图像解码装置的处理内容的流程图。FIG8 is a flowchart showing the processing contents of the moving picture decoding apparatus according to Embodiment 1 of the present invention.

接下来,说明动作。Next, the operation will be explained.

最初,说明图1的运动图像编码装置的处理内容。First, the processing contents of the moving picture encoding apparatus in FIG. 1 will be described.

首先,编码控制部1决定作为实施运动补偿预测处理(帧之间预测处理)或者帧内预测处理(帧之内预测处理)时的处理单位的编码块的最大尺寸,并且决定最大尺寸的编码块被层次性地分割时的上限的层次数(图7的步骤ST1)。First, the encoding control unit 1 determines the maximum size of the coding block that serves as the processing unit when performing motion compensation prediction processing (inter-frame prediction processing) or intra-frame prediction processing (intra-frame prediction processing), and determines the upper limit number of layers when the maximum-sized coding block is hierarchically divided (step ST1 of Figure 7).

作为编码块的最大尺寸的决定方法,例如,考虑针对所有图片,决定为与输入图像的分辨率对应的尺寸的方法。As a method for determining the maximum size of a coding block, for example, a method of determining a size corresponding to the resolution of an input image for all pictures may be considered.

另外,考虑将输入图像的局部性的运动的复杂度的差异定量化为参数,在运动剧烈的图片中将最大尺寸决定为小的值,在运动少的图片中将最大尺寸决定为大的值的方法等。Another possible method is to quantify the difference in complexity of local motion in the input image as a parameter and determine the maximum size to be a small value in pictures with intense motion and a large value in pictures with less motion.

关于上限的层次数,例如,考虑设定为输入图像的运动越剧烈,越增大层次数,而能够检测更细致的运动,如果输入图像的运动少,则设定为抑制层次数的方法。Regarding the upper limit of the number of layers, for example, it is conceivable to increase the number of layers as the motion of the input image becomes more intense so as to detect finer motion, and to reduce the number of layers as the motion of the input image becomes less.

另外,编码控制部1从可利用的1个以上的编码模式(M种帧内编码模式、N种帧间编码模式(包括直接模式的帧间编码模式))中,选择适合于层次性地分割的各个编码块的编码模式(步骤ST2)。Furthermore, the encoding control unit 1 selects an encoding mode suitable for each hierarchically divided encoding block from one or more available encoding modes (M intra-frame encoding modes, N inter-frame encoding modes (including the direct mode)) (step ST2).

由编码控制部1进行的编码模式的选择方法是公知的技术,所以省略详细的说明,例如,有使用可利用的任意的编码模式,实施针对编码块的编码处理来验证编码效率,在可利用的多个编码模式中,选择编码效率最佳的编码模式的方法等。The method for selecting the coding mode performed by the coding control unit 1 is a well-known technology, so detailed description is omitted. For example, there is a method of using any available coding mode to implement coding processing on the coding block to verify the coding efficiency, and selecting the coding mode with the best coding efficiency from multiple available coding modes.

块分割部2如果输入了表示输入图像的影像信号,则将该影像信号表示的输入图像分割为由编码控制部1决定的最大尺寸的编码块,并且直到达到由编码控制部1决定的上限的层次数为止,将该编码块层次性地分割。When a video signal representing an input image is input, the block division unit 2 divides the input image represented by the video signal into coding blocks of the maximum size determined by the coding control unit 1, and divides the coding blocks hierarchically until the upper limit of the number of layers determined by the coding control unit 1 is reached.

此处,图9是示出最大尺寸的编码块被层次性地分割为多个编码块的情况的说明图。Here, FIG9 is an explanatory diagram showing a case where a coding block of a maximum size is hierarchically divided into a plurality of coding blocks.

在图9的例子中,最大尺寸的编码块是第0层次的编码块B0,在亮度分量中具有(L0,M0)的尺寸。In the example of FIG. 9 , the coding block of the largest size is the coding block B 0 of the 0th layer, which has a size of (L 0 , M 0 ) in the luminance component.

另外,在图9的例子中,以最大尺寸的编码块B0作为出发点,通过4叉树构造,直到另外确定的规定的深度为止,层次性地进行分割,从而得到编码块BnIn the example of FIG. 9 , the maximum-sized coding block B 0 is used as a starting point, and hierarchical division is performed to a predetermined depth determined separately using a quad-tree structure to obtain coding blocks B n .

在深度n下,编码块Bn是尺寸(Ln,Mn)的图像区域。At depth n, a coding block Bn is an image region of size ( Ln , Mn ).

其中,Ln和Mn既可以相同也可以不同,但在图9的例子中示出了Ln=Mn的情形。However, Ln and Mn may be the same or different, but the example in FIG9 shows a case where Ln = Mn .

以后,将编码块Bn的尺寸定义为编码块Bn的亮度分量中的尺寸(Ln,Mn)。Hereinafter, the size of the coding block Bn is defined as the size ( Ln , Mn ) in the luma component of the coding block Bn .

块分割部2进行4叉树分割,所以(Ln+1,Mn+1)=(Ln/2,Mn/2)始终成立。Since the block division unit 2 performs quadtree division, (Ln +1 , Mn +1 ) = ( Ln /2, Mn /2) always holds.

其中,在如RGB信号等那样,所有颜色分量具有同一采样数的彩色影像信号(4:4:4格式)中,所有颜色分量的尺寸成为(Ln,Mn),但在处理4:2:0格式的情况下,对应的色差分量的编码块的尺寸是(Ln/2,Mn/2)。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 size of the coding block of the corresponding color difference component is ( Ln /2, Mn / 2).

以后,将在第n层次的编码块Bn中可选择的编码模式记载为m(Bn)。Hereinafter, the coding mode selectable in the coding block Bn of the nth layer will be expressed as m( Bn ).

在由多个颜色分量构成的彩色影像信号的情况下,编码模式m(Bn)可构成为针对每个颜色分量,分别使用独立的模式,但以后,只要没有特别说明,则设为是指针对YUV信号、4:2:0格式的编码块的亮度分量的编码模式而进行说明。In the case of a color video signal composed of multiple color components, the coding mode m( Bn ) may be configured to use an independent mode for each color component. However, unless otherwise specified, the following description will refer to the coding mode for the luminance component of a coding block in a YUV signal and 4:2:0 format.

在编码模式m(Bn)中,有1个或者多个帧内编码模式(总称为“INTRA”)、1个或者多个帧间编码模式(总称为“INTER”),编码控制部1如上所述,从在该图片中可利用的所有编码模式或者其子集合中,选择针对编码块Bn编码效率最佳的编码模式。In coding mode m( Bn ), 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"). As described above, the coding control unit 1 selects the coding mode with the best coding efficiency for the coding block Bn from all coding modes or a subset thereof that can be used in the picture.

编码块Bn如图9所示,被进一步分割为1个或者多个预测处理单位(分区)。As shown in FIG9 , the coding block Bn is further divided into one or more prediction processing units (partitions).

以后,将属于编码块Bn的分区记载为Pi n(i:第n层次中的分区编号)。Hereinafter, the partitions belonging to the coding block Bn are referred to as Pin ( i: partition number in the nth layer).

关于如何进行属于编码块Bn的分区Pi n的分割,作为信息而包含于编码模式m(Bn)中。How to divide the partition P in the coding block B n is included as information in the coding mode m(B n ).

分区Pi n是全部依照编码模式m(Bn)进行预测处理,但能够针对每个分区Pi n,选择独立的预测参数。All partitions P i n are predicted according to the coding mode m(B n ), but independent prediction parameters can be selected for each partition P i n .

编码控制部1针对最大尺寸的编码块,例如,生成图10所示那样的块分割状态,确定编码块BnThe encoding control unit 1 generates a block division state as shown in FIG. 10 , for example, for the maximum-sized encoding block, and determines the encoding block B n .

图10(a)的阴影部分表示分割后的分区的分布,并且,图10(b)通过4叉树图形表示对层次分割后的分区分配了编码模式m(Bn)的状况。The shaded areas in FIG. 10( a ) represent the distribution of partitions after division, and FIG. 10( b ) shows, in a quad-tree diagram, the allocation of coding modes m(B n ) to partitions after hierarchical division.

在图10(b)中,□所包围的节点表示分配了编码模式m(Bn)的节点(编码块Bn)。In FIG10(b) , the nodes surrounded by □ represent nodes (coding blocks Bn ) to which coding mode m( Bn ) is assigned.

当编码控制部1针对各个编码块Bn的分区Pi n选择了最佳的编码模式m(Bn)时,如果该编码模式m(Bn)是帧内编码模式(步骤ST3),则切换开关3将由块分割部2分割的编码块Bn的分区Pi n输出到帧内预测部4。When the encoding control unit 1 selects the optimal encoding mode m( Bn ) for each partition P in the encoding block Bn , if the encoding mode m( Bn ) is an intra-frame encoding mode (step ST3), the switching switch 3 outputs the partition P in the encoding block Bn divided by the block division unit 2 to the intra-frame prediction unit 4.

另一方面,如果该编码模式m(Bn)是帧间编码模式(步骤ST3),则将由块分割部2分割的编码块Bn的分区Pi n输出到运动补偿预测部5。On the other hand, if the coding mode m(B n ) is the inter-frame coding mode (step ST3 ), the partitions P in of the coding block B n divided by the block dividing unit 2 are output to the motion compensation prediction unit 5 .

帧内预测部4如果从切换开关3接收到编码块Bn的分区Pi n,则使用与由编码控制部1选择的编码模式m(Bn)对应的帧内预测参数,实施针对该编码块Bn的分区Pi n的帧内预测处理,生成帧内预测图像Pi n(步骤ST4)。Upon receiving the partition Pin of the coding block Bn from the switch 3, the intra prediction unit 4 performs intra prediction processing on the partition Pin of the coding block Bn using the intra prediction parameters corresponding to the coding mode m( Bn ) selected by the coding control unit 1 , and generates an intra prediction image Pin (step ST4).

帧内预测部4如果生成了帧内预测图像Pi n,则将该帧内预测图像Pi n输出到减法部6以及加法部9,而为了在图5的运动图像解码装置中也能够生成相同的帧内预测图像Pi n,将该帧内预测参数输出到可变长编码部13。该实施方式1中的帧内预测处理不限于在AVC/H.264标准(ISO/IEC 14496-10)中决定的算法,但作为帧内预测参数,需要包括为了在运动图像编码装置侧和运动图像解码装置侧生成完全相同的帧内预测图像而所需的信息。After generating the intra-prediction image Pin , the intra-prediction unit 4 outputs the intra -prediction image Pin to the subtraction unit 6 and the addition unit 9. In order to enable the video decoding apparatus in FIG5 to also generate the same intra-prediction image Pin , the intra-prediction parameters are output to the variable-length coding unit 13. The intra-prediction processing in this first embodiment is not limited to the algorithm defined in the AVC/H.264 standard (ISO/IEC 14496-10), but the intra-prediction parameters must include information required to generate completely identical intra-prediction images on both the video encoding apparatus and the video decoding apparatus side.

运动补偿预测部5在从切换开关3接收到编码块Bn的分区Pi n时,如果由编码控制部1选择的编码模式m(Bn)是直接模式的帧间编码模式,则根据位于编码块Bn的分区Pi n的周围的已编码块的运动矢量生成空间直接模式的空间直接矢量,并且根据编码块Bn可参照的已编码图片的运动矢量生成时间直接模式的时间直接矢量。When the motion compensation prediction unit 5 receives the partition P i n of the coding block B n from the switching switch 3, if the coding mode m(B n ) selected by the coding control unit 1 is the inter-frame coding mode of the direct mode, the motion compensation prediction unit 5 generates a spatial direct vector of the spatial direct mode based on the motion vectors of the coded blocks located around the partition P i n of the coding block B n , and generates a temporal direct vector of the temporal direct mode based on the motion vectors of the coded pictures that can be referenced by the coding block B n .

然后,运动补偿预测部5从该空间直接矢量或者时间直接矢量中,选择参照图像间的相关高的一方的直接矢量,使用与该直接矢量以及编码模式m(Bn)对应的帧间预测参数,实施针对编码块Bn的分区Pi n的运动补偿预测处理,生成帧间预测图像Pi n(步骤ST5)。Then, the motion-compensated prediction unit 5 selects the direct vector with the highest correlation between the reference images from the spatial direct vector or the temporal direct vector, and performs motion-compensated prediction processing on the partition Pin of the coding block Bn using the inter-frame prediction parameters corresponding to the direct vector and the coding mode m ( Bn ), thereby generating an inter- frame predicted image Pin (step ST5).

另一方面,如果由编码控制部1选择的编码模式m(Bn)是直接模式以外的帧间编码模式,则运动补偿预测部5从编码块Bn的分区Pi n和运动补偿预测帧存储器12中保存的参照图像搜索运动矢量,使用与该运动矢量以及编码模式m(Bn)对应的帧间预测参数,实施针对编码块Bn的分区Pi n的运动补偿预测处理,生成帧间预测图像Pi n(步骤ST5)。On the other hand, if the coding mode m( Bn ) selected by the coding control unit 1 is an inter-frame coding mode other than the direct mode, the motion-compensated prediction unit 5 searches for a motion vector from the partition Pin of the coding block Bn and the reference image stored in the motion-compensated prediction frame memory 12, and performs motion-compensated prediction processing on the partition Pin of the coding block Bn using the motion vector and the inter-frame prediction parameters corresponding to the coding mode m( Bn ), thereby generating an inter-frame prediction image Pin (step ST5).

运动补偿预测部5如果生成了帧间预测图像Pi n,则将该帧间预测图像Pi n输出到减法部6以及加法部9,而为了在图5的运动图像解码装置中也能够生成相同的帧间预测图像Pi n,将该帧间预测参数输出到可变长编码部13。在帧间预测图像的生成中使用的帧间预测参数中,包括When the motion compensation prediction unit 5 generates the inter-frame prediction image Pin , it outputs the inter-frame prediction image Pin to the subtraction unit 6 and the addition unit 9. In order to generate the same inter-frame prediction image Pin in the moving picture decoding apparatus of FIG. 5 , the inter-frame prediction parameters are output to the variable length coding unit 13. The inter-frame prediction parameters used to generate the inter-frame prediction image include:

·记述编码块Bn内的分区分割的模式信息Describes the partition splitting mode information within the coding block Bn

·各分区的运动矢量Motion vectors for each partition

·在运动补偿预测帧存储器12内包括多个参照图像的结构的情况下,表示使用哪一个参照图像来进行预测的参照图像指示索引信息When the motion compensation prediction frame memory 12 includes a plurality of reference images, reference image indication index information indicating which reference image is used for prediction

·在有多个运动矢量预测值候补的情况下,表示选择哪一个运动矢量预测值来使用的索引信息When there are multiple motion vector predictor candidates, index information indicating which motion vector predictor to select for use

·在有多个运动补偿内插滤波器的情况下表示选择哪一个滤波器来使用的索引信息Index information indicating which filter to use when there are multiple motion compensation interpolation filters

·在该分区的运动矢量能够表示多个像素精度(半像素、1/4像素、1/8像素等)的情况下,表示使用哪一个像素精度的选择信息When the motion vector of the partition can express multiple pixel precisions (half pixel, 1/4 pixel, 1/8 pixel, etc.), selection information indicating which pixel precision to use

等信息,为了在运动图像解码装置侧生成完全相同的帧间预测图像,通过可变长编码部13多路复用到比特流。Such information is multiplexed into the bit stream by the variable length coding unit 13 in order to generate a completely identical inter-frame predicted image on the moving picture decoding device side.

运动补偿预测部5的处理内容的概况如上所述,而详细的处理内容后述。The outline of the processing contents of the motion compensation prediction unit 5 is as described above, and the detailed processing contents will be described later.

减法部6在帧内预测部4或者运动补偿预测部5生成了预测图像(帧内预测图像Pi n、帧间预测图像Pi n)时,从由块分割部2分割的编码块Bn的分区Pi n,减去由帧内预测部4或者运动补偿预测部5生成的预测图像(帧内预测图像Pi n、帧间预测图像Pi n),从而生成差分图像,将表示该差分图像的预测差分信号ei n输出到变换·量化部7(步骤ST6)。When the intra prediction unit 4 or the motion compensation prediction unit 5 generates a prediction image ( intra prediction image Pin , inter prediction image Pin ), the subtraction unit 6 subtracts the prediction image (intra prediction image Pin, inter prediction image Pin ) generated by the intra prediction unit 4 or the motion compensation prediction unit 5 from the partition Pin of the coding block Bn divided by the block division unit 2 , thereby generating a difference image, and outputs a prediction difference signal ein representing the difference image to the transformation and quantization unit 7 (step ST6).

变换·量化部7如果从减法部6接收到表示差分图像的预测差分信号ei n,则以从编码控制部1输出的预测差分编码参数中包含的变换块尺寸为单位,实施该差分图像的变换处理(例如,DCT(离散余弦变换)、预先对特定的学习系列进行了基底设计的KL变换等正交变换处理),并且使用该预测差分编码参数中包含的量化参数,对该差分图像的变换系数进行量化,从而将量化后的变换系数作为差分图像的压缩数据输出到逆量化·逆变换部8以及可变长编码部13(步骤ST7)。When the transform/quantization unit 7 receives the predicted differential signal e indicative of the differential image from the subtraction unit 6, it performs transform processing (e.g., DCT (discrete cosine transform), orthogonal transform processing such as KL transform with a basis designed in advance for a specific learning series) on the differential image in units of the transform block size included in the predicted differential coding parameters output from the coding control unit 1, and quantizes the transform coefficients of the differential image using the quantization parameters included in the predicted differential coding parameters, thereby outputting the quantized transform coefficients as compressed data of the differential image to the inverse quantization/inverse transform unit 8 and the variable-length coding unit 13 (step ST7).

逆量化·逆变换部8如果从变换·量化部7接收到差分图像的压缩数据,则使用从编码控制部1输出的预测差分编码参数中包含的量化参数,对该差分图像的压缩数据进行逆量化,以该预测差分编码参数中包含的变换块尺寸为单位,实施逆量化的压缩数据的逆变换处理(例如,逆DCT(逆离散余弦变换)、逆KL变换等逆变换处理),从而将逆变换处理后的压缩数据作为局部解码预测差分信号ei n尖帽(由于电子申请的关系,将对字母文字附加的“^”记载为尖帽(hat))输出到加法部9(步骤ST8)。If the inverse quantization and inverse transformation unit 8 receives the compressed data of the differential image from the transformation and quantization unit 7, it uses the quantization parameter included in the predicted differential coding parameter output from the encoding control unit 1 to inverse quantize the compressed data of the differential image, and performs inverse transformation processing (for example, inverse DCT (inverse discrete cosine transform), inverse KL transform and other inverse transformation processing) on the inverse quantized compressed data in units of the transformation block size included in the predicted differential coding parameter, thereby outputting the compressed data after the inverse transformation processing as a local decoding prediction differential signal e i n hat (due to the relationship of electronic application, the "^" attached to the alphabetical characters is recorded as a hat) to the addition unit 9 (step ST8).

加法部9如果从逆量化·逆变换部8接收到局部解码预测差分信号ei n尖帽,则将该局部解码预测差分信号ei n尖帽、和表示由帧内预测部4或者运动补偿预测部5生成的预测图像(帧内预测图像Pi n、帧间预测图像Pi n)的预测信号相加,从而生成局部解码分区图像Pi n尖帽或者作为其集合的局部解码编码块图像即局部解码图像(步骤ST9)。Upon receiving the locally decoded prediction differential signal e int hat from the inverse quantization/inverse transform unit 8, the adder 9 adds the locally decoded prediction differential signal e int hat to a prediction signal representing a prediction image (intra-frame prediction image P in , inter-frame prediction image P in ) generated by the intra-frame prediction unit 4 or the motion compensation prediction unit 5, thereby generating a locally decoded partition image P int hat or a locally decoded coded block image as a collection thereof, i.e., a locally decoded image (step ST9).

加法部9如果生成了局部解码图像,则将表示该局部解码图像的局部解码图像信号保存到帧内预测用存储器10,并且将该局部解码图像信号输出到环路滤波器部11。When the adder 9 generates the local decoded image, it stores the local decoded image signal representing the local decoded image in the intra prediction memory 10 and outputs the local decoded image signal to the loop filter 11 .

直到针对层次性地分割了的所有编码块Bn的处理完成为止,反复实施步骤ST3~ST9的处理,如果针对所有编码块Bn的处理完成,则转移到步骤ST12的处理(步骤ST10、ST11)。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 moves to step ST12 (steps ST10 and ST11).

可变长编码部13对从变换·量化部7输出的压缩数据、从编码控制部1输出的编码模式(包括表示编码块的分割状态的信息)以及预测差分编码参数、和从帧内预测部4输出的帧内预测参数或者从运动补偿预测部5输出的帧间预测参数进行熵编码。The variable length coding unit 13 performs entropy coding on the compressed data output from the transform/quantization unit 7, the coding mode (including information indicating the segmentation status of the coding block) and the predicted differential coding parameters output from the coding control unit 1, and the intra-frame prediction parameters output from the intra-frame prediction unit 4 or the inter-frame prediction parameters output from the motion compensation prediction unit 5.

可变长编码部13对作为熵编码的编码结果的压缩数据、编码模式、预测差分编码参数、帧内预测参数/帧间预测参数的编码数据进行多路复用而生成比特流(步骤ST12)。The variable-length coding unit 13 multiplexes the compressed data, which is the encoding result of the entropy coding, the encoding mode, the prediction difference encoding parameter, and the encoded data of the intra-frame prediction parameter/inter-frame prediction parameter to generate a bit stream (step ST12).

环路滤波器部11如果从加法器9接收到局部解码图像信号,则补偿该局部解码图像信号中包含的编码失真,将编码失真补偿后的局部解码图像信号表示的局部解码图像作为参照图像保存到运动补偿预测帧存储器12(步骤ST13)。If the loop filter unit 11 receives a local decoded image signal from the adder 9, it compensates for the coding distortion contained in the local decoded image signal and saves the local decoded image represented by the local decoded image signal after coding distortion compensation as a reference image in the motion compensation prediction frame memory 12 (step ST13).

利用环路滤波器部11的滤波处理既可以以从加法器9输出的局部解码图像信号的最大编码块或者各个编码块为单位进行,也可以在输出了与1画面量的宏块相当的局部解码图像信号之后汇总1画面量来进行。The filtering process by the loop filter unit 11 can be performed in units of the largest coding block or each coding block of the local decoded image signal output from the adder 9, or can be performed after the local decoded image signals equivalent to one picture of macroblocks are output and then the local decoded image signals are aggregated for one picture.

接下来,详细说明运动补偿预测部5的处理内容。Next, the processing contents of the motion compensation prediction unit 5 will be described in detail.

运动补偿预测部5的切换开关21在由编码控制部1选择的编码模式m(Bn)是直接模式以外的帧间模式的情况下,将由块分割部2分割的编码块Bn的分区Pi n输出到运动矢量搜索部22。The switch 21 of the motion compensation prediction unit 5 outputs the partitions Pin of the coding block Bn divided by the block division unit 2 to the motion vector search unit 22 when the coding mode m( Bn ) selected by the coding control unit 1 is an inter mode other than the direct mode.

另一方面,在编码模式m(Bn)是直接模式的帧间模式的情况下,将由块分割部2分割的编码块Bn的分区Pi n输出到直接矢量生成部23。On the other hand, when the coding mode m(B n ) is the inter mode of the direct mode, the partitions P in of the coding block B n divided by the block dividing unit 2 are output to the direct vector generating unit 23 .

但是,在直接矢量生成部23中,在直接矢量的生成中不使用编码块Bn的分区Pi n,所以即使该编码模式m(Bn)是直接模式的帧间模式,也可以不将编码块Bn的分区Pi n输出到直接矢量生成部23。However, the direct vector generator 23 does not use partition Pin of coding block Bn for direct vector generation. Therefore , even if the coding mode m( Bn ) is an inter mode of the direct mode, partition Pin of coding block Bn may not be output to the direct vector generator 23.

运动补偿预测部5的运动矢量搜索部22如果从切换开关21接收到编码块Bn的分区Pi n,则一边参照该分区Pi n和运动补偿预测帧存储器12中保存的参照图像,一边以帧间模式搜索最佳的运动矢量,将该运动矢量输出到运动补偿处理部24。Upon receiving the partition Pin of the coding block Bn from the switch 21, the motion vector search unit 22 of the motion compensation prediction unit 5 searches for an optimal motion vector in the inter-frame mode while referring to the partition Pin and the reference image stored in the motion compensation prediction frame memory 12, and outputs the motion vector to the motion compensation processing unit 24.

以帧间模式搜索最佳的运动矢量的处理本身是公知的技术,所以省略详细的说明。The process of searching for the optimal motion vector in the inter-frame mode is a well-known technique, and therefore detailed description thereof will be omitted.

运动补偿预测部5的直接矢量生成部23在编码模式m(Bn)是直接模式的情况下,针对编码块Bn的每个分区Pi n,生成空间直接模式的空间直接矢量和时间直接模式的时间直接矢量,将该空间直接矢量或者时间直接矢量中的某一方作为运动矢量输出到运动补偿处理部24。When the coding mode m( Bn ) is the direct mode, the direct vector generation unit 23 of the motion compensation prediction unit 5 generates a spatial direct mode spatial direct vector and a temporal direct mode temporal direct vector for each partition P in the coding block Bn , and outputs either the spatial direct vector or the temporal direct vector as a motion vector to the motion compensation processing unit 24.

另外,表示属于编码块Bn的分区Pi n的分割状态的信息如上所述,包含于编码模式m(Bn)中,所以直接矢量生成部23能够通过参照编码模式m(Bn),确定编码块Bn的分区Pi nFurthermore, as described above, information indicating the partition state of the partition Pin belonging to the coding block Bn is included in the coding mode m( Bn ), so the direct vector generator 23 can determine the partition Pin of the coding block Bn by referring to the coding mode m( Bn ) .

即,直接矢量生成部23的空间直接矢量生成部31从由未图示的运动矢量存储器或者内部存储器保存的已编码块的运动矢量中,读出位于编码块Bn的分区Pi n的周围的已编码块的运动矢量,根据该运动矢量生成空间直接模式的空间直接矢量。That is, the spatial direct vector generation unit 31 of the direct vector generation unit 23 reads the motion vectors of the coded blocks located around the partition P in the coding block B from the motion vectors of the coded blocks stored in the motion vector memory (not shown ) or the internal memory, and generates the spatial direct vector of the spatial direct mode based on the motion vectors.

另外,直接矢量生成部23的时间直接矢量生成部32从已编码块的运动矢量中,读出作为编码块Bn可参照的已编码图片的运动矢量的、与编码块Bn的分区Pi n在空间上处于相同的位置的块的运动矢量,根据该运动矢量生成时间直接模式的时间直接矢量。In addition, the time direct vector generation unit 32 of the direct vector generation unit 23 reads out the motion vector of the block that is spatially located at the same position as the partition P in the coding block B n , which is the motion vector of the coded picture that the coding block B n can refer to , from the motion vector of the coded block, and generates the time direct vector of the time direct mode based on the motion vector.

此处,图11是示出以时间直接模式生成运动矢量(时间直接矢量)的方法的示意图。Here, FIG. 11 is a schematic diagram illustrating a method of generating a motion vector (temporal direct vector) in the temporal direct mode.

例如,假设图片B2中的块MB1是编码对象的分区Pi n,以时间直接模式对块MB1进行编码的情况。For example, it is assumed that block MB1 in picture B2 is a partition Pin to be coded, and block MB1 is coded in the temporal direct mode.

在该情况下,使用作为图片P3的运动矢量的、与块MB1在空间上处于相同的位置的块MB2的运动矢量MV,其中,该图片P3是图片B2的在时间轴上处于后方的已编码图片中的、最接近图片B2的图片。In this case, the motion vector MV of the block MB2 spatially co-located with the block MB1 is used as the motion vector of the picture P3, which is the picture closest to the picture B2 among the encoded pictures that follow the picture B2 on the time axis.

该运动矢量MV参照了图片P0,在对块MB1进行编码时使用的运动矢量MVL0、MVL1通过以下的式(3)来求出。This motion vector MV refers to the picture P0, and the motion vectors MVL0 and MVL1 used when encoding the block MB1 are obtained by the following equation (3).

时间直接矢量生成部32如果计算出运动矢量MVL0、MVL1,则将该运动矢量MVL0、MVL1作为时间直接模式的时间直接矢量输出到直接矢量判定部33。After calculating the motion vectors MVL0 and MVL1 , the temporal direct vector generation unit 32 outputs the motion vectors MVL0 and MVL1 to the direct vector determination unit 33 as temporal direct vectors in the temporal direct mode.

其中,时间直接矢量生成部32中的时间直接矢量的生成方法可以使用图11所示那样的H.264方式,但不限于此,也可以使用其他方法。The method for generating the time direct vector in the time direct vector generating unit 32 may use the H.264 method as shown in FIG. 11 , but the method is not limited thereto and other methods may be used.

图12是示出以空间直接模式生成运动矢量(空间直接矢量)的方法的示意图。FIG. 12 is a schematic diagram illustrating a method of generating a motion vector (spatial direct vector) in the spatial direct mode.

在图12中,当前MB(currentMB)表示作为编码对象的块的分区Pi nIn FIG12 , current MB (currentMB) indicates a partition Pin of a block to be encoded.

此时,如果将编码对象的块的左边的已编码块A的运动矢量设为MVa、将编码对象的块的上面的已编码块B的运动矢量设为MVb、将编码对象的块的右上的已编码块C的运动矢量设为MVc,则通过如下述式(4)所示求出这些运动矢量MVa、MVb、MVc的中值(中央值),能够计算编码对象的块的运动矢量MV。At this time, if the motion vector of the encoded block A on the left of the block of the encoding object is set to MVa, the motion vector of the encoded block B above the block of the encoding object is set to MVb, and the motion vector of the encoded block C above the right of the block of the encoding object is set to MVc, then the motion vector MV of the block of the encoding object can be calculated by finding the median (central value) of these motion vectors MVa, MVb, and MVc as shown in the following formula (4).

MV=median(MVa、MVb、MVc) (4)MV=median(MVa,MVb,MVc) (4)

在空间直接模式中,针对列表0以及列表1分别求出运动矢量,但都能够使用上述方法来求出。In the spatial direct mode, motion vectors are calculated separately for list 0 and list 1, but both can be calculated using the above-mentioned method.

空间直接矢量生成部31如果如上所述计算出列表0以及列表1的运动矢量MV,则将列表0以及列表1的运动矢量MV作为空间直接模式的空间直接矢量输出到直接矢量判定部33。After calculating the motion vectors MV of List 0 and List 1 as described above, the spatial direct vector generator 31 outputs the motion vectors MV of List 0 and List 1 to the direct vector determiner 33 as spatial direct vectors of the spatial direct mode.

其中,空间直接矢量生成部31中的空间直接矢量的生成方法可以使用图12所示那样的H.264方式,但不限于此,也可以使用其他方法。The spatial direct vector generation method in the spatial direct vector generation unit 31 may use the H.264 method as shown in FIG. 12 , but is not limited thereto and other methods may be used.

例如,也可以如图13所示,作为中值预测的候补,利用从A1-An、B1-Bn分别各选1个、从C、D、E选1个的这3个,生成空间直接矢量。For example, as shown in FIG13 , a space direct vector may be generated using three candidates, one each selected from A1 -An, B1 -Bn, and one selected from C, D, and E, as candidates for the median prediction.

另外,在空间直接矢量的生成中使用的MV候补不同的ref_Idx的情况下,也可以如图14所示,根据时间方向的距离进行缩放。Furthermore, when ref_Idx is different for MV candidates used in generating a space direct vector, scaling may be performed according to the distance in the time direction as shown in FIG. 14 .

其中,scaled_MV表示缩放后的矢量、MV表示缩放前的运动矢量、d(x)表示直到x为止的时间上的距离。Here, scaled_MV represents the vector after scaling, MV represents the motion vector before scaling, and d(x) represents the temporal distance up to x.

另外,Xr表示编码对象的块表示的参照图像、Yr表示作为缩放的对象的块位置A-D表示的参照图像。In addition, Xr represents the reference image represented by the block to be encoded, and Yr represents the reference image represented by the block position A-D to be scaled.

如果空间直接矢量生成部31生成了空间直接矢量,则直接矢量生成部23的直接矢量判定部33使用该空间直接矢量,计算空间直接模式的评价值。When the space direct vector generation unit 31 generates the space direct vector, the direct vector determination unit 33 of the direct vector generation unit 23 calculates the evaluation value of the space direct mode using the space direct vector.

另外,如果时间直接矢量生成部32生成了时间直接矢量,则直接矢量判定部33使用该时间直接矢量,计算时间直接模式的评价值。Furthermore, when the time direct vector generation unit 32 generates the time direct vector, the direct vector determination unit 33 calculates the evaluation value of the time direct mode using the time direct vector.

直接矢量判定部33比较该空间直接模式的评价值和时间直接模式的评价值,在该空间直接矢量或者时间直接矢量中,通过如以下记载那样的判定单元,选择直接模式的直接矢量并输出到运动补偿处理部24。The direct vector determination unit 33 compares the evaluation value of the spatial direct mode and the evaluation value of the temporal direct mode, and selects the direct vector of the direct mode from the spatial direct vector or the temporal direct vector through a determination unit as described below and outputs it to the motion compensation processing unit 24.

以下,具体说明直接矢量判定部33的处理内容。Hereinafter, the processing contents of the direct vector determination unit 33 will be described in detail.

如果空间直接矢量生成部31生成了空间直接矢量MVL0、MVL1,则直接矢量判定部33的运动补偿部41使用该空间直接矢量MVL0,生成空间直接模式的列表0预测图像,使用该空间直接矢量MVL1,生成空间直接模式的列表1预测图像。If the spatial direct vector generation unit 31 generates the spatial direct vectors MVL0 and MVL1, the motion compensation unit 41 of the direct vector determination unit 33 uses the spatial direct vector MVL0 to generate a list 0 prediction image of the spatial direct mode, and uses the spatial direct vector MVL1 to generate a list 1 prediction image of the spatial direct mode.

此处,图15是示出基于前方预测图像和后方预测图像的类似度的评价值的计算例的说明图,在图15的例子中,作为空间直接模式的列表0预测图像,生成了前方预测图像fspatial,作为空间直接模式的列表1预测图像,生成了后方预测图像gspatialHere, Figure 15 is an explanatory diagram showing an example of calculating an evaluation value based on the similarity between a forward predicted image and a backward predicted image. In the example of Figure 15, a forward predicted image f spatial is generated as a list 0 predicted image in spatial direct mode, and a backward predicted image g spatial is generated as a list 1 predicted image in spatial direct mode.

另外,如果时间直接矢量生成部32生成了作为列表0以及列表1的运动矢量MV的时间直接矢量,则运动补偿部41使用作为前方的运动矢量MV的时间直接矢量,生成时间直接模式的列表0预测图像,使用作为后方的运动矢量MV的时间直接矢量,生成时间直接模式的时间直接模式的列表1预测图像。In addition, if the time direct vector generation unit 32 generates time direct vectors as motion vectors MV of list 0 and list 1, the motion compensation unit 41 uses the time direct vector as the front motion vector MV to generate a predicted image of list 0 of the time direct mode, and uses the time direct vector as the rear motion vector MV to generate a predicted image of list 1 of the time direct mode.

在图15的例子中,作为时间直接模式的列表0预测图像,生成了时间直接模式的前方预测图像ftemporal,作为时间直接模式的列表1预测图像,生成了后方预测图像gtemporalIn the example of FIG. 15 , a forward prediction image f temporal of the temporal direct mode is generated as a list 0 prediction image of the temporal direct mode, and a backward prediction image g temporal is generated as a list 1 prediction image of the temporal direct mode.

此处,示出了使用表示前方向的参照图像的参照图像列表0、和表示后方向的参照图像的参照图像列表1,作为列表0预测图像生成前方预测图像,作为列表1预测图像生成后方预测图像的例子,但也可以使用表示后方向的参照图像的参照图像列表0、和表示前方向的参照图像的参照图像列表1,作为列表0预测图像生成后方预测图像,作为列表1预测图像生成前方预测图像。Here, an example is shown in which a forward prediction image is generated as a list 0 prediction image and a backward prediction image is generated as a list 1 prediction image using reference image list 0 representing a reference image in the forward direction and reference image list 1 representing a reference image in the backward direction. However, it is also possible to use reference image list 0 representing a reference image in the backward direction and reference image list 1 representing a reference image in the forward direction to generate a backward prediction image as a list 0 prediction image and a forward prediction image as a list 1 prediction image.

另外,也可以使用表示前方向的参照图像的参照图像列表0、和表示更前方向的参照图像的参照图像列表1,作为列表0预测图像以及列表1预测图像,生成前方预测图像(详细后述)。Alternatively, a forward prediction image may be generated using reference image list 0 indicating a forward reference image and reference image list 1 indicating a further forward reference image as list 0 prediction images and list 1 prediction images (described in detail later).

如果生成了空间直接模式的列表0预测图像和列表1预测图像,则直接矢量判定部33的类似度计算部42如下述式(6)那样,计算空间直接模式的评价值SADspatialWhen the list 0 prediction image and list 1 prediction image of the spatial direct mode are generated, the similarity calculation unit 42 of the direct vector determination unit 33 calculates the evaluation value SAD spatial of the spatial direct mode as shown in the following equation (6).

在式(6)中,为便于说明,将空间直接模式的列表0预测图像设为前方预测图像fspatial、将空间直接模式的列表1预测图像设为后方预测图像gspatialIn equation (6), for convenience of explanation, the list 0 prediction image of the spatial direct mode is set as the forward prediction image f spatial , and the list 1 prediction image of the spatial direct mode is set as the backward prediction image g spatial .

SADspatial=|fspatial-gspatial| (6)SAD spatial =|f spatial -g spatial | (6)

另外,如果生成了时间直接模式的列表0预测图像和列表1预测图像,则类似度计算部42如下述式(7)那样,计算时间直接模式的评价值SADtemporalFurthermore, when the list 0 prediction image and the list 1 prediction image of the temporal direct mode are generated, the similarity calculation unit 42 calculates the evaluation value SAD temporal of the temporal direct mode as shown in the following equation (7).

在式(7)中,为便于说明,将时间直接模式的列表0预测图像设为前方预测图像ftemporal、将时间直接模式的列表1预测图像设为后方预测图像gtemporalIn equation (7), for convenience of explanation, the list 0 prediction image of the temporal direct mode is set as the forward prediction image f temporal , and the list 1 prediction image of the temporal direct mode is set as the backward prediction image g temporal .

SADtemporal=|ftemporal-gtemporal| (7)SAD temporal =|f temporal -g temporal | (7)

另外,前方预测图像和后方预测图像间的差分越大,2个图像间的类似度越低(表示2个图像的差分绝对值和的评价值SAD变大),时间上的相关越低。相反地,前方预测图像和后方预测图像间的差分越小,2个图像间的类似度越高(表示2个图像的差分绝对值和的评价值SAD变小),时间上的相关越高。Furthermore, the greater the difference between the forward and backward predicted images, the lower the similarity between the two images (the larger the SAD value, representing the sum of the absolute differences between the two images), and the lower the temporal correlation. Conversely, the smaller the difference between the forward and backward predicted images, the higher the similarity between the two images (the smaller the SAD value, representing the sum of the absolute differences between the two images), and the higher the temporal correlation.

另外,关于以直接矢量预测的图像,应该对与编码对象的块类似的图像进行预测。在使用2个矢量来生成预测图像的情况下,各个矢量预测的图像应该与编码对象的块类似,这表示2个参照图像的相关高。Furthermore, when predicting an image using a direct vector, the prediction should be for an image similar to the block being coded. When generating a predicted image using two vectors, the image predicted by each vector should be similar to the block being coded, indicating a high correlation between the two reference images.

因此,通过选择评价值SAD小的一方的直接矢量,能够选择参照图像间的相关高的模式,能够提高直接模式的精度。Therefore, by selecting a direct vector with a smaller evaluation value SAD, a mode with a high correlation between reference images can be selected, and the accuracy of the direct mode can be improved.

如果类似度计算部42计算出空间直接模式的评价值SADspatial、和时间直接模式的评价值SADtemporal,则直接矢量判定部33的直接矢量选择部43通过比较该评价值SADspatial和评价值SADtemporal,比较空间直接模式中的前方预测图像fspatial和后方预测图像gspatial的类似度、以及时间直接模式中的前方预测图像ftemporal和后方预测图像gtemporal的类似度。If the similarity calculation unit 42 calculates the evaluation value SAD spatial of the spatial direct mode and the evaluation value SAD temporal of the temporal direct mode, the direct vector selection unit 43 of the direct vector determination unit 33 compares the similarity between the forward prediction image f spatial and the backward prediction image g spatial in the spatial direct mode, and the similarity between the forward prediction image f temporal and the backward prediction image g temporal in the temporal direct mode by comparing the evaluation value SAD spatial and the evaluation value SAD temporal .

直接矢量选择部43在空间直接模式中的前方预测图像fspatial和后方预测图像gspatial的类似度高于时间直接模式中的前方预测图像ftemporal和后方预测图像gtemporal的类似度的情况(SADspatial≤SADtemporal)下,选择由空间直接矢量生成部31生成的空间直接矢量,将该空间直接矢量作为运动矢量输出到运动补偿处理部24。When the similarity between the forward prediction image f spatial and the backward prediction image g spatial in the spatial direct mode is higher than the similarity between the forward prediction image f temporal and the backward prediction image g temporal in the temporal direct mode (SAD spatial ≤ SAD temporal ), the direct vector selection unit 43 selects the spatial direct vector generated by the spatial direct vector generation unit 31 and outputs the spatial direct vector as a motion vector to the motion compensation processing unit 24.

另一方面,在时间直接模式中的前方预测图像ftemporal和后方预测图像gtemporal的类似度高于空间直接模式中的前方预测图像fspatial和后方预测图像gspatial的类似度的情况(SADspatial>SADtemporal)下,选择由时间直接矢量生成部32生成的时间直接矢量,将该时间直接矢量作为运动矢量输出到运动补偿处理部24。On the other hand, when the similarity between the forward prediction image f temporal and the backward prediction image g temporal in the temporal direct mode is higher than the similarity between the forward prediction image f spatial and the backward prediction image g spatial in the spatial direct mode (SAD spatial >SAD temporal ), the temporal direct vector generated by the temporal direct vector generation unit 32 is selected and output as a motion vector to the motion compensation processing unit 24.

运动补偿处理部24在编码模式m(Bn)并非直接模式时,如果从运动矢量搜索部22接收到运动矢量,则使用该运动矢量和运动补偿预测帧存储器12中保存的1帧的参照图像,根据从编码控制部1输出的帧间预测参数,实施运动补偿预测处理,从而生成预测图像。When the coding mode m( Bn ) is not the direct mode, the motion compensation processing unit 24, upon receiving a motion vector from the motion vector search unit 22, performs motion compensation prediction processing based on the inter-frame prediction parameters output from the coding control unit 1 using the motion vector and a reference image of one frame stored in the motion compensation prediction frame memory 12, thereby generating a predicted image.

另一方面,在编码模式m(Bn)是直接模式时,如果从直接矢量生成部23接收到运动矢量(由直接矢量选择部43选择的直接矢量),则使用该运动矢量和运动补偿预测帧存储器12中保存的1帧的参照图像,根据从编码控制部1输出的帧间预测参数,实施运动补偿预测处理,从而生成预测图像。On the other hand, when the coding mode m( Bn ) is the direct mode, if a motion vector (a direct vector selected by the direct vector selection unit 43) is received from the direct vector generation unit 23, motion compensation prediction processing is performed using the motion vector and a reference image of one frame stored in the motion compensation prediction frame memory 12, based on the inter-frame prediction parameters output from the coding control unit 1, thereby generating a predicted image.

另外,运动补偿处理部24的运动补偿预测处理是公知的技术,所以省略详细的说明。Note that the motion compensation prediction process performed by the motion compensation processing unit 24 is a well-known technique, and therefore detailed description thereof will be omitted.

此处,示出了类似度计算部42计算作为差分绝对值和的评价值SAD,直接矢量选择部43比较评价值SAD的例子,但也可以是类似度计算部42计算前方预测图像和后方预测图像间的差分平方和SSE而作为评价值,直接矢量选择部43比较差分平方和SSE。通过使用SSE,处理量增加,但能够更准确地计算类似度。Here, an example is shown in which the similarity calculation unit 42 calculates the evaluation value SAD as the sum of absolute differences, and the direct vector selection unit 43 compares the evaluation value SAD. However, the similarity calculation unit 42 may calculate the sum of squared differences SSE between the forward prediction image and the backward prediction image as the evaluation value, and the direct vector selection unit 43 may compare the sum of squared differences SSE. Using SSE increases the amount of processing, but allows for more accurate similarity calculation.

接下来,说明图5的图像解码装置的处理内容。Next, the processing contents of the image decoding apparatus in FIG5 will be described.

可变长解码部51如果输入了从图1的图像编码装置输出的比特流,则实施针对该比特流的可变长解码处理,以由1帧以上的图片构成的序列为单位或者以图片为单位对帧尺寸进行解码(图8的步骤ST21)。When the variable length decoding unit 51 receives the bit stream output from the image encoding device of FIG. 1 , it performs variable length decoding processing on the bit stream, decoding the frame size in units of a sequence of pictures of one or more frames or in units of pictures (step ST21 of FIG. 8 ).

可变长解码部51通过与图1的编码控制部1同样的步骤,决定作为实施运动补偿预测处理(帧之间预测处理)或者帧内预测处理(帧之内预测处理)时的处理单位的编码块的最大尺寸,并且决定最大尺寸的编码块被层次性地分割时的上限的层次数(步骤ST22)。The variable length decoding unit 51 determines the maximum size of the coding block that is the processing unit when performing motion compensation prediction processing (inter-frame prediction processing) or intra-frame prediction processing (intra-frame prediction processing) through the same steps as the encoding control unit 1 in Figure 1, and determines the upper limit number of layers when the maximum-sized coding block is hierarchically divided (step ST22).

例如,在图像编码装置中,根据输入图像的分辨率决定了编码块的最大尺寸的情况下,根据之前解码的帧尺寸来决定编码块的最大尺寸。For example, in an image encoding device, when the maximum size of a coding block is determined according to the resolution of an input image, the maximum size of the coding block is determined according to the size of a previously decoded frame.

另外,在表示编码块的最大尺寸以及上限的层次数的信息被多路复用于比特流的情况下,参照从该比特流解码出的信息。Furthermore, when information indicating the maximum size of a coding block and the upper limit of the number of layers is multiplexed in a bit stream, the information decoded from the bit stream is referenced.

在多路复用到比特流的最大尺寸的编码块B0的编码模式m(B0)中,包括表示最大尺寸的编码块B0的分割状态的信息,所以可变长解码部51对多路复用到比特流的最大尺寸的编码块B0的编码模式m(B0)进行解码,而确定层次性地分割的各个编码块Bn(步骤ST23)。The coding mode m(B 0 ) of the maximum-sized coding block B 0 multiplexed into the bitstream includes information indicating the division state of the maximum-sized coding block B 0. Therefore, the variable-length decoding unit 51 decodes the coding mode m(B 0 ) of the maximum-sized coding block B 0 multiplexed into the bitstream to determine the hierarchically divided coding blocks B n (step ST23).

可变长解码部51如果确定了各个编码块Bn,则对该编码块Bn的编码模式m(Bn)进行解码,根据属于该编码模式m(Bn)的分区Pi n的信息,确定属于编码块Bn的分区Pi nAfter determining each coding block B n , the variable length decoding unit 51 decodes the coding mode m(B n ) of the coding block B n and determines the partition P in belonging to the coding block B n based on the information of the partition P in belonging to the coding mode m( B n ) .

可变长解码部51如果确定了属于编码块Bn的分区Pi n,则针对每个分区Pi n,解码出压缩数据、编码模式、预测差分编码参数、帧内预测参数/帧间预测参数(步骤ST24)。When the variable length decoding unit 51 identifies the partition Pin belonging to the coding block Bn , it decodes the compressed data , coding mode, prediction difference coding parameters, and intra prediction parameters/inter prediction parameters for each partition Pin (step ST24).

切换开关52在属于由可变长解码部51确定的编码块Bn的分区Pi n的编码模式m(Bn)是帧内编码模式的情况下(步骤ST25),将从可变长解码部51输出的帧内预测参数输出到帧内预测部53。When the coding mode m( Bn ) of the partition Pin of the coding block Bn determined by the variable length decoding unit 51 is the intra coding mode (step ST25), the switch 52 outputs the intra prediction parameters output from the variable length decoding unit 51 to the intra prediction unit 53.

另一方面,在分区Pi n的编码模式m(Bn)是帧间编码模式的情况下(步骤ST25),将从可变长解码部51输出的帧间预测参数输出到运动补偿预测部54。On the other hand, when the coding mode m(B n ) of the partition Pin is the inter coding mode (step ST25 ), the inter prediction parameters output from the variable length decoding unit 51 are output to the motion compensation prediction unit 54 .

帧内预测部53如果从切换开关52接收到帧内预测参数,则使用该帧内预测参数,实施针对该编码块Bn的分区Pi n的帧内预测处理,生成帧内预测图像Pi n(步骤ST26)。Upon receiving the intra prediction parameters from the switch 52, the intra prediction unit 53 performs intra prediction processing on the partition Pin of the coding block Bn using the intra prediction parameters, and generates an intra prediction image Pin (step ST26).

运动补偿预测部54在从切换开关52接收到帧间预测参数时,如果从可变长解码部51输出的编码模式m(Bn)是直接模式的帧间编码模式,则与图1的运动补偿预测部5同样地,生成空间直接模式的空间直接矢量和时间直接模式的时间直接矢量。Upon receiving the inter-frame prediction parameters from the switch 52, the motion compensation prediction unit 54 generates a spatial direct vector of the spatial direct mode and a temporal direct vector of the temporal direct mode, similarly to the motion compensation prediction unit 5 in FIG1 , if the coding mode m(B n ) output from the variable length decoding unit 51 is the inter-frame coding mode of the direct mode.

运动补偿预测部54如果生成了空间直接模式的空间直接矢量和时间直接模式的时间直接矢量,则与图1的运动补偿预测部5同样地,从该空间直接矢量或者时间直接矢量中,选择参照图像间的相关高的一方的直接矢量,使用该直接矢量以及帧间预测参数,实施针对编码块Bn的分区Pi n的运动补偿预测处理,生成帧间预测图像Pi n(步骤ST27)。After the motion compensation prediction unit 54 generates the spatial direct vector of the spatial direct mode and the temporal direct vector of the temporal direct mode, the motion compensation prediction unit 54 selects the direct vector with the highest correlation between the reference images from the spatial direct vector or the temporal direct vector, and performs motion compensation prediction processing on the partition Pin of the coding block Bn using the direct vector and the inter- frame prediction parameters to generate the inter-frame prediction image Pin (step ST27).

另一方面,如果从可变长解码部51输出的编码模式m(Bn)是直接模式以外的帧间编码模式,则运动补偿预测部54的运动补偿处理部63使用从切换开关52输出的帧间预测参数中包含的运动矢量,实施针对编码块Bn的分区Pi n的运动补偿预测处理,生成帧间预测图像Pi n(步骤ST27)。On the other hand, if the coding mode m( Bn ) output from the variable-length decoding unit 51 is an inter-frame coding mode other than the direct mode, the motion compensation processing unit 63 of the motion compensation prediction unit 54 performs motion compensation prediction processing on the partition Pin of the coding block Bn using the motion vector included in the inter-frame prediction parameters output from the switch 52 , and generates an inter-frame prediction image Pin (step ST27).

逆量化·逆变换部55使用从可变长解码部51输出的预测差分编码参数中包含的量化参数,对从可变长解码部51输出的与编码块有关的压缩数据进行逆量化,以该预测差分编码参数中包含的变换块尺寸为单位,实施逆量化的压缩数据的逆变换处理(例如,逆DCT(逆离散余弦变换)、逆KL变换等逆变换处理),从而将逆变换处理后的压缩数据作为解码预测差分信号(表示压缩前的差分图像的信号)输出到加法部56(步骤ST28)。The inverse quantization and inverse transformation unit 55 uses the quantization parameter included in the predicted differential coding parameter output from the variable length decoding unit 51 to inverse quantize the compressed data related to the coding block output from the variable length decoding unit 51, and performs inverse transformation processing (for example, inverse DCT (inverse discrete cosine transform), inverse KL transform, and other inverse transformation processing) on the inverse quantized compressed data in units of the transformation block size included in the predicted differential coding parameter, thereby outputting the compressed data after the inverse transformation processing as a decoded predicted differential signal (a signal representing the differential image before compression) to the addition unit 56 (step ST28).

加法部56如果从逆量化·逆变换部55接收到解码预测差分信号,则将该解码预测差分信号和表示由帧内预测部53或者运动补偿预测部54生成的预测图像的预测信号相加,从而生成解码图像,将表示该解码图像的解码图像信号保存到帧内预测用存储器57,并且将该解码图像信号输出到环路滤波器部58(步骤ST29)。If the adding unit 56 receives the decoded prediction differential signal from the inverse quantization/inverse transform unit 55, it adds the decoded prediction differential signal and the prediction signal representing the predicted image generated by the intra-frame prediction unit 53 or the motion compensation prediction unit 54 to generate a decoded image, saves the decoded image signal representing the decoded image to the intra-frame prediction memory 57, and outputs the decoded image signal to the loop filter unit 58 (step ST29).

直到针对层次性地分割了的所有编码块Bn的处理完成为止,反复实施步骤ST23~ST29的处理(步骤ST30)。The processes of steps ST23 to ST29 are repeatedly performed until the processes for all the hierarchically divided coding blocks Bn are completed (step ST30).

环路滤波器部58如果从加法器56接收到解码图像信号,则补偿该解码图像信号中包含的编码失真,将编码失真补偿后的解码图像信号表示的解码图像作为参照图像保存到运动补偿预测帧存储器59(步骤ST31)。Upon receiving the decoded image signal from the adder 56 , the loop filter unit 58 compensates for coding distortion included in the decoded image signal and stores the decoded image represented by the decoded image signal after coding distortion compensation as a reference image in the motion compensation prediction frame memory 59 (step ST31 ).

利用环路滤波器部58的滤波处理既可以以从加法器56输出的解码图像信号的最大编码块或者各个编码块为单位进行,也可以在输出了与1画面量的宏块相当的解码图像信号之后汇总1画面量来进行。The filtering process by the loop filter unit 58 may be performed in units of the largest coding block or each coding block of the decoded image signal output from the adder 56, or may be performed after outputting decoded image signals corresponding to macroblocks of one screen, and then performing the filtering process for one screen.

如以上说明,根据该实施方式1,构成为设置:编码控制部1,决定作为实施预测处理时的处理单位的编码块的最大尺寸,并且决定最大尺寸的编码块被层次性地分割时的上限的层次数,从可利用的1个以上的编码模式中,选择适合于层次性地分割的各个编码块的编码模式;以及块分割部2,将输入图像分割为由编码控制部1决定的最大尺寸的编码块,并且直到达到由编码控制部1决定的上限的层次数为止,将该编码块层次性地分割,在作为适合于由块分割部2分割的编码块的编码模式,由编码控制部1选择了直接模式的帧间编码模式的情况下,运动补偿预测部5根据位于该编码块的周围的已编码块的运动矢量生成空间直接模式的空间直接矢量,并且根据该编码块可参照的已编码图片的运动矢量生成时间直接模式的时间直接矢量,从该空间直接矢量或者时间直接矢量中,选择参照图像间的相关高的一方的直接矢量,使用该直接矢量,实施针对该编码块的运动补偿预测处理来生成预测图像,所以起到能够以规定的块为单位选择最佳的直接模式,削减代码量的效果。As described above, according to the first embodiment, the configuration includes: an encoding control unit 1 that determines the maximum size of a coding block as a processing unit when performing prediction processing, and determines the upper limit number of levels when the coding block of the maximum size is hierarchically divided, and selects a coding mode suitable for each hierarchically divided coding block from one or more available coding modes; and a block division unit 2 that divides an input image into coding blocks of the maximum size determined by the encoding control unit 1, and divides the coding blocks hierarchically until the upper limit number of levels determined by the encoding control unit 1 is reached, and selects a coding mode suitable for each coding block divided by the block division unit 2. In the formula, when the inter-frame coding mode of the direct mode is selected by the coding control unit 1, the motion compensation prediction unit 5 generates a spatial direct vector of the spatial direct mode based on the motion vectors of the coded blocks located around the coding block, and generates a temporal direct vector of the temporal direct mode based on the motion vectors of the coded pictures that the coding block can refer to. From the spatial direct vector or the temporal direct vector, the direct vector with a higher correlation between the reference images is selected, and the motion compensation prediction processing is performed on the coding block using the direct vector to generate a predicted image. Therefore, it is possible to select the optimal direct mode in units of specified blocks and reduce the amount of code.

另外,根据该实施方式1,构成为设置从多路复用到比特流的编码数据可变长解码出与层次性地分割的各个编码块有关的压缩数据以及编码模式的可变长解码部51,在由可变长解码部51可变长解码了的与编码块有关的编码模式是直接模式的帧间编码模式的情况下,运动补偿预测部54根据位于该编码块的周围的已解码块的运动矢量生成空间直接模式的空间直接矢量,并且根据该编码块可参照的已解码图片的运动矢量生成时间直接模式的时间直接矢量,从该空间直接矢量或者时间直接矢量中,选择参照图像间的相关高的一方的直接矢量,使用该直接矢量,实施针对该编码块的运动补偿预测处理来生成预测图像,所以起到得到能够以规定的块为单位选择最佳的直接模式那样的能够对编码数据进行解码的运动图像解码装置的效果。In addition, according to the first embodiment, a variable length decoding unit 51 is provided for variable-length decoding the coded data multiplexed into a bit stream to obtain compressed data and a coding mode associated with each hierarchically divided coding block. When the coding mode associated with the coding block variable-length-decoded by the variable length decoding unit 51 is an inter-frame coding mode of a direct mode, the motion compensation prediction unit 54 generates a spatial direct vector of the spatial direct mode based on the motion vectors of decoded blocks located around the coding block, and generates a temporal direct vector of the temporal direct mode based on the motion vectors of a decoded picture to which the coding block can refer. From the spatial direct vector or the temporal direct vector, a direct vector having a higher correlation between reference images is selected, and motion compensation prediction processing is performed on the coding block using the direct vector to generate a predicted image. This provides an effect of obtaining a motion image decoding device capable of decoding coded data, such that the optimal direct mode can be selected in units of predetermined blocks.

实施方式2.Implementation method 2.

在上述实施方式1中,示出了运动补偿预测部5、54(具体而言,类似度计算部42)计算空间直接模式的前方预测图像fspatial和后方预测图像gspatial的类似度而作为空间直接模式的评价值SADspatial,另一方面,计算时间直接模式的前方预测图像ftemporal和后方预测图像gtemporal的类似度而作为时间直接模式的评价值SADtemporal的例子,但也可以是作为空间直接模式的评价值,计算位于编码块Bn的周围的已编码块(已解码块)的运动矢量的方差值σ(spatial),另一方面,作为时间直接模式的评价值,计算在编码块Bn可参照的已编码图片(已解码图片)中位于与编码块Bn在空间上处于相同的位置的块的周围的已编码块(已解码块)的运动矢量的方差值σ(temporal),能够起到与上述实施方式1同样的效果。In the above-mentioned first embodiment, an example is shown in which the motion compensated prediction units 5 and 54 (specifically, the similarity calculation unit 42) calculate the similarity between the forward predicted image f spatial and the backward predicted image g spatial in the spatial direct mode as the evaluation value SAD spatial of the spatial direct mode, and calculate the similarity between the forward predicted image f temporal and the backward predicted image g temporal in the temporal direct mode as the evaluation value SAD temporal of the temporal direct mode. However, it is also possible to calculate the variance value σ(spatial) of the motion vectors of the coded blocks (decoded blocks) located around the coding block B n as the evaluation value of the spatial direct mode, and calculate the variance value σ(temporal) of the motion vectors of the coded blocks (decoded blocks) located around the blocks located at the same spatial position as the coding block B n in the coded picture (decoded picture) that can be referenced by the coding block B n as the evaluation value of the temporal direct mode, thereby achieving the same effect as the above-mentioned first embodiment.

即,在类似度计算部42中,作为空间直接模式的评价值SADspatial,代替计算空间直接模式的前方预测图像fspatial和后方预测图像gspatial的类似度,而如图16(a)所示,计算位于编码块Bn的周围的已编码块(已解码块)的运动矢量的方差值σ(spatial)(参照下述式(8))。That is, in the similarity calculation unit 42, instead of calculating the similarity of the forward predicted image f spatial and the backward predicted image g spatial of the spatial direct mode as the evaluation value SAD spatial of the spatial direct mode, the variance value σ(spatial) of the motion vector of the coded block (decoded block) located around the coding block Bn is calculated as shown in Figure 16(a) (refer to the following formula (8)).

另外,在类似度计算部42中,作为时间直接模式的评价值SADtemporal,代替计算时间直接模式的前方预测图像ftemporal和后方预测图像gtemporal的类似度,而如图16(b)所示,在编码块Bn可参照的已编码图片(已解码图片)中,计算位于与编码块Bn在空间上处于相同的位置的块的周围的已编码块(已解码块)的运动矢量的方差值σ(temporal)(参照下述式(8))。In addition, in the similarity calculation unit 42, instead of calculating the similarity of the forward predicted image f temporal and the backward predicted image g temporal in the temporal direct mode as the evaluation value SAD temporal of the temporal direct mode, as shown in Figure 16(b), the variance value σ(temporal) of the motion vector of the coded blocks (decoded blocks) around the blocks located at the same spatial position as the coded block B n in the coded picture (decoded picture) that can be referenced by the coded block B n is calculated (see the following formula (8)).

其中,MVm,i表示周围的运动矢量,表示周围的运动矢量的平均。Here, MV m,i represents the surrounding motion vectors and represents the average of the surrounding motion vectors.

另外,m是表示spatial或者temporal的记号。In addition, m is a symbol indicating spatial or temporal.

直接矢量选择部43比较运动矢量的方差值σ(spatial)和运动矢量的方差值σ(temporal),在运动矢量的方差值σ(spatial)大于运动矢量的方差值σ(temporal)的情况下,判断为空间直接模式的运动矢量(空间直接矢量)的可靠性低,选择时间直接模式的运动矢量(时间直接矢量)。The direct vector selection unit 43 compares the variance value σ(spatial) of the motion vector and the variance value σ(temporal) of the motion vector. When the variance value σ(spatial) of the motion vector is greater than the variance value σ(temporal) of the motion vector, it is determined that the reliability of the motion vector of the spatial direct mode (spatial direct vector) is low, and the motion vector of the temporal direct mode (temporal direct vector) is selected.

另一方面,在运动矢量的方差值σ(temporal)大于运动矢量的方差值σ(spatial)的情况下,判断为时间直接模式的运动矢量(时间直接矢量)的可靠性低,选择空间直接模式的运动矢量(空间直接矢量)。On the other hand, when the variance value σ(temporal) of the motion vector is greater than the variance value σ(spatial) of the motion vector, it is judged that the reliability of the motion vector of the temporal direct mode (temporal direct vector) is low, and the motion vector of the spatial direct mode (spatial direct vector) is selected.

在上述实施方式1中,示出了生成时间直接矢量和空间直接矢量,选择某一方的直接矢量的例子,但也可以除了该时间直接矢量、空间直接矢量以外,将其他矢量也作为候补矢量加上,从这些候补矢量中选择直接矢量。In the above-mentioned first embodiment, an example is shown in which a time direct vector and a space direct vector are generated and one of the direct vectors is selected. However, in addition to the time direct vector and the space direct vector, other vectors can also be added as candidate vectors, and a direct vector can be selected from these candidate vectors.

例如,也可以将图17那样的空间矢量MV_A、MV_B、MV_C、时间矢量MV_1~MV_8加到候补矢量,从这些空间矢量、时间矢量选择直接矢量。For example, space vectors MV_A, MV_B, MV_C and time vectors MV_1 to MV_8 as shown in FIG. 17 may be added to candidate vectors, and a direct vector may be selected from these space vectors and time vectors.

另外,也可以如图18所示,根据多个已编码矢量生成1个矢量,将该矢量加到候补矢量。Alternatively, as shown in FIG18 , one vector may be generated from a plurality of encoded vectors and added to the candidate vectors.

这样,通过增加候补矢量而处理量增加,但直接矢量的准确度提高,而能够提高编码效率。In this way, the amount of processing increases by increasing the number of candidate vectors, but the accuracy of the direct vector improves, thereby improving the encoding efficiency.

在上述实施方式1中,虽然没有特别提到,但也可以将直接矢量的候补以切片单位决定。Although not specifically mentioned in the above-mentioned first embodiment, candidates for direct vectors may be determined in slice units.

表示将哪个矢量作为候补的信息多路复用到切片头。Information indicating which vector is a candidate is multiplexed into the slice header.

例如考虑,关于时间矢量,在摄全景(pan)那样的影像中,时间矢量的效果低,所以从选择候补去掉,另一方面,在照相机被固定的影像中,空间矢量的效果大,所以加到候补等方法。For example, regarding the time vector, in an image such as a panorama, the effect of the time vector is low, so it is removed from the selection candidate. On the other hand, in an image with a fixed camera, the effect of the space vector is large, so it is added to the candidate.

成为候补的矢量多时,能够生成更接近原图像的预测图像,但编码器的处理量增大,所以将没有效果的矢量预先从候补去掉等,考虑影像的局部性来决定,从而能够实现处理量和编码效率的平衡。When there are many candidate vectors, a predicted image closer to the original image can be generated, but the processing load of the encoder increases. Therefore, ineffective vectors are removed from the candidates in advance, and the decision is made based on the locality of the image, so that a balance between processing load and coding efficiency can be achieved.

关于成为候补的矢量的切换,例如,考虑针对每个矢量设置ON/OFF(“通”/“断”)的标志,仅将该标志是ON的矢量作为候补的方法。Regarding the switching of the candidate vectors, for example, a method of setting an ON/OFF flag for each vector and selecting only vectors with the flag turned on as candidates may be considered.

关于成为选择候补的运动矢量,既可以通过切片头切换,也可以通过序列头、图片头等上位层切换。另外,也可以准备一个以上的成为选择候补的群组,而对该候补群组的索引进行编码。The motion vectors that are candidates for selection may be switched via a slice header or a higher layer such as a sequence header or a picture header. Alternatively, one or more groups of candidate candidates may be prepared and the index of the candidate group may be encoded.

另外,也可以针对每个宏块、编码块切换。通过针对每个宏块、编码块切换,能够使得具有局部性,具有编码效率改善的效果。Alternatively, the switching may be performed for each macroblock or coding block. By switching for each macroblock or coding block, localization can be achieved, which has the effect of improving coding efficiency.

另外,也可以针对每个分区块尺寸唯一地决定选择候补。一般认为,如果块尺寸变小,则空间上的相关变弱,所以通过中值预测决定的矢量的预测精度恶化。因此,例如,通过将利用中值预测决定的运动矢量从候补去掉,不会降低编码效率而能够减少处理量。Alternatively, selection candidates can be uniquely determined for each partition block size. It is generally believed that as the block size decreases, spatial correlation weakens, and the prediction accuracy of vectors determined by median prediction deteriorates. Therefore, for example, by removing motion vectors determined by median prediction from the candidate list, the processing load can be reduced without reducing coding efficiency.

在上述实施方式1中,假设存在时间直接矢量和空间直接矢量这双方的情况而进行了说明,但在对编码块Bn实施了帧内编码处理的情况等下,还有时不存在运动矢量。在该情况下,考虑设为零矢量的方法、从候补去掉等方法。While the first embodiment described above assumes the presence of both temporal and spatial direct vectors, there may be no motion vectors, such as when intra-frame coding is performed on the coding block Bn . In such cases, methods such as setting the vector to zero or removing it from the candidate list are possible.

在设为零矢量的情况下,候补增加,所以能够提高编码效率,但处理量增加。在从直接矢量的候补去掉的情况下,能够减少处理量。When the vector is set to zero, the number of candidates increases, so the coding efficiency can be improved, but the processing amount increases. When it is removed from the direct vector candidates, the processing amount can be reduced.

在上述实施方式1中,示出了生成直接矢量的例子,但也可以将该直接矢量用作通常的运动矢量的编码中使用的预测矢量。In the above-mentioned first embodiment, an example of generating a direct vector is shown, but the direct vector may be used as a prediction vector used in encoding a normal motion vector.

通过将直接矢量用作预测矢量,处理量增加,但预测的精度提高,所以能够提高编码效率。By using a direct vector as a prediction vector, the amount of processing increases, but the accuracy of prediction improves, so the coding efficiency can be improved.

在上述实施方式1中,示出了组合与编码块Bn相比在时间上处于前面的图像、和处于后面的图像来计算评价值SAD的例子(参照图15),但也可以如图19所示,仅组合在时间上处于前面的图像,来计算评价值SAD。另外,也可以仅组合在时间上处于后面的图像,来计算评价值SAD。In the first embodiment described above, an example was shown in which the evaluation value SAD was calculated by combining images that temporally precede and images that temporally follow the coding block Bn (see FIG15 ). However, as shown in FIG19 , the evaluation value SAD may be calculated by combining only images that temporally precede. Alternatively, the evaluation value SAD may be calculated by combining only images that temporally follow.

在该情况下,时间矢量如下述式(9)(10)所示。In this case, the time vector is expressed as follows: (9) (10).

其中,是列表0的矢量,是列表1的矢量。Where, is the vector of list 0 and is the vector of list 1.

另外,d表示时间上的距离,d0表示列表0的参照图像的时间上的距离,d1表示列表0的参照图像的时间上的距离。In addition, d represents a temporal distance, d0 represents a temporal distance of the reference image in list 0, and d1 represents a temporal distance of the reference image in list 0.

而且,vcol和dcol表示在参照图像中在空间上处于相同的位置的块的矢量、和该矢量表示的参照图像的在时间上的距离。Furthermore, v col and d col represent vectors of blocks at the same spatial position in the reference image, and the temporal distances in the reference image represented by the vectors.

即使在2个参照图像列表表示相同的参照图像的情况下,只要在列表中有2张以上的参照图像,就能够通过与图19同样的方法应用。Even when two reference image lists indicate the same reference image, the same method as that shown in FIG. 19 can be applied as long as there are two or more reference images in the list.

在上述实施方式1中,假设了在2个参照图像列表中有2张以上的参照图像的情况,但还考虑实际上参照图像仅有1张的情况。In the first embodiment described above, it is assumed that there are two or more reference images in the two reference image lists. However, it is also conceivable that there is actually only one reference image.

在该情况下,考虑如果在2个参照图像列表中设置了相同的参照图像,则不使用时间矢量,而仅通过空间矢量来判断。在设置了不同的参照图像的情况下,能够通过上述方式来对应。In this case, if the same reference image is set in two reference image lists, the temporal vector is not used and only the spatial vector is used for judgment. If different reference images are set, the above method can be used to cope with it.

在上述实施方式1中,假设了从2个方向的预测处理,但也可以是仅1个方向的预测处理。在根据1个方向的矢量预测的情况下,对表示使用哪一个矢量的信息进行编码而传送。由此,能够应对遮挡(occlusion)等问题,有助于预测精度的提高。While the first embodiment above assumes prediction processing from two directions, prediction processing from only one direction is also possible. When predicting from a vector in one direction, information indicating which vector is used is encoded and transmitted. This can address issues such as occlusion and contribute to improved prediction accuracy.

在上述实施方式1的直接模式中,假设了使用了2个矢量的预测,但矢量的个数也可以是3个以上。In the direct mode of the above-described first embodiment, prediction using two vectors is assumed, but the number of vectors may be three or more.

在该情况下,例如,考虑使用多个矢量候补中的、成为阈值Th以下的评价值SAD的所有候补来生成预测图像的方法。另外,将参照图像列表也保持与该矢量相应的量。In this case, for example, a method is conceivable to generate a predicted image using all candidates having evaluation values SAD equal to or less than a threshold value Th among a plurality of vector candidates.

另外,也可以并非使用阈值Th以下的所有候补,而在切片头等中,预先决定所使用的最大矢量数,从评价值小的候补起使用与最大矢量数相应的量来生成预测图像。Alternatively, instead of using all candidates below the threshold Th, the maximum number of vectors to be used may be predetermined in the slice header, etc., and a predicted image may be generated using a number corresponding to the maximum number of vectors starting from candidates with smaller evaluation values.

一般,已知预测图像中使用的参照图像越多,性能越提高。因此,虽然处理量增加,但有助于编码效率的提高。Generally, it is known that the more reference images used in the predicted image, the better the performance. Therefore, although the amount of processing increases, it contributes to improved coding efficiency.

在上述实施方式1中,通过参照图像间的评价决定了矢量,但其也可以通过在空间上邻接的已编码的图像和参照图像的比较来评价。In the first embodiment described above, the vector is determined by evaluation between reference images, but it may also be evaluated by comparison between a spatially adjacent coded image and a reference image.

在该情况下,考虑使用图20所示那样的L字型的图像来进行。In this case, it is considered to use an L-shaped image as shown in FIG. 20 .

另外,在使用空间上邻接的图像的情况下,在流水线处理的情形下已编码的图像还有可能来不及。在该情况下,考虑代替地使用预测图像。Furthermore, when spatially adjacent images are used, the already encoded images may be too late in pipeline processing. In this case, it is considered to use a predicted image instead.

在上述实施方式1中,示出了如图9所示,编码块Bn的尺寸是Ln=Mn的例子,但编码块Bn的尺寸也可以是Ln≠MnIn the above-mentioned first embodiment, an example is shown in which the size of the coding block Bn is Ln = Mn as shown in FIG9 , but the size of the coding block Bn may also be LnMn .

例如,考虑如图21所示,编码块Bn的尺寸成为Ln=kMn的情况。For example, consider the case where the size of the coding block Bn is Ln = kMn as shown in FIG21.

在接下来的分割中,成为(Ln+1,Mn+1)=(Ln,Mn),以后的分割既可以进行与图9同样的分割,也可以如(Ln+1,Mn+1)=(Ln/2,Mn/2)那样进行分割(参照图22)。In the next division, (Ln +1 , Mn +1 ) = ( Ln , Mn ). Subsequent divisions may be performed similarly to FIG9 or (Ln +1 , Mn+1 ) = ( Ln /2, Mn /2) (see FIG22).

另外,也可以如图23所示,能够选择图21和图22的分割中的某一个。在能够选择的情况下,对表示选择了哪一个分割的标志进行编码。在该情形下,仅通过例如非专利文献1的H.264那样的将以16×16作为1个块的部分横向连结就能够实现,所以能够维持与既存方式的互换性。Alternatively, as shown in FIG23 , it is possible to select either the partitioning shown in FIG21 or FIG22 . If this is possible, a flag indicating which partitioning is selected is encoded. In this case, this can be achieved simply by horizontally concatenating portions of 16×16 blocks, as in H.264 of Non-Patent Document 1, maintaining compatibility with existing methods.

在上述中,示出了编码块Bn的尺寸成为Ln=kMn的情况,但即使如kLn=Mn那样纵向连结,当然也能够通过同样的考虑来分割。In the above description, the case where the size of the coding block Bn is Ln = kMn is shown. However, even if the coding block Bn is vertically concatenated as kLn = Mn , it can of course be divided based on the same considerations.

在上述实施方式1中,示出了变换·量化部7、逆量化·逆变换部8、55以预测差分编码参数中包含的变换块尺寸为单位实施变换处理(逆变换处理)的例子,但变换块尺寸单位也可以通过变换处理单位唯一地决定,也可以如图24所示设为层次构造。在该情况下,对表示在各层次中是否进行分割的标志进行编码。In the first embodiment described above, an example was shown in which the transform/quantization unit 7 and the inverse quantization/inverse transform unit 8 and 55 perform transform processing (inverse transform processing) using the transform block size included in the prediction difference coding parameter as a unit. However, the transform block size unit may be uniquely determined by the transform processing unit, or a hierarchical structure may be provided as shown in FIG24 . In this case, a flag indicating whether or not to perform division in each hierarchy is encoded.

上述分割既可以以分区为单位进行,也可以以编码块为单位进行。The above segmentation can be performed in units of partitions or coding blocks.

上述变换假定了正方形下的变换,但也可以是长方形等其他矩形下的变换。The above transformation assumes transformation under a square, but it can also be transformation under other rectangles such as a rectangle.

实施方式3.Implementation method 3.

在上述实施方式1中,示出了运动补偿预测部5、54的直接矢量生成部23、62生成空间直接矢量和时间直接矢量的例子,但也可以在生成该空间直接矢量和时间直接矢量时,通过决定初始搜索点,并搜索该初始搜索点的周围,来决定直接矢量。In the above-mentioned embodiment 1, an example is shown in which the direct vector generation units 23 and 62 of the motion compensation prediction units 5 and 54 generate spatial direct vectors and temporal direct vectors. However, when generating the spatial direct vectors and temporal direct vectors, the direct vectors can also be determined by determining an initial search point and searching around the initial search point.

图25是示出本发明的实施方式3的运动图像编码装置的运动补偿预测部5的结构图,在图中,与图2相同的符号表示同一或者相当部分,所以省略说明。FIG25 is a block diagram showing the motion compensation prediction unit 5 of the moving picture encoding device according to Embodiment 3 of the present invention. In the figure, the same reference numerals as those in FIG2 denote the same or corresponding parts, and therefore their description is omitted.

直接矢量生成部25实施生成空间直接矢量和时间直接矢量的处理。The direct vector generating unit 25 performs processing to generate a spatial direct vector and a temporal direct vector.

图26是示出构成了运动补偿预测部5的直接矢量生成部25的结构图。FIG26 is a diagram showing the structure of the direct vector generation unit 25 constituting the motion compensation prediction unit 5 .

在图26中,初始矢量生成部34实施根据已编码的块的运动矢量生成初始矢量的处理。In FIG. 26 , the initial vector generation unit 34 performs processing for generating an initial vector based on the motion vector of the coded block.

运动矢量搜索部35实施:通过搜索由初始矢量生成部34生成的初始矢量表示的初始搜索点的周围,决定直接矢量的处理。The motion vector search unit 35 performs a process of determining a direct vector by searching around an initial search point indicated by the initial vector generated by the initial vector generation unit 34 .

图27是示出构成了直接矢量生成部25的初始矢量生成部34的结构图。FIG. 27 is a diagram showing the configuration of the initial vector generating section 34 constituting the direct vector generating section 25 .

在图27中,空间矢量生成部71实施:通过与例如图3的空间直接矢量生成部31同样的方法,根据已编码的块的运动矢量生成空间矢量的处理。In FIG27 , a spatial vector generator 71 performs processing for generating a spatial vector from a motion vector of an encoded block by the same method as, for example, the spatial direct vector generator 31 in FIG3 .

时间矢量生成部72实施:通过与例如图3的时间直接矢量生成部32同样的方法,根据已编码的块的运动矢量生成时间矢量的处理。The temporal vector generator 72 performs a process of generating a temporal vector from the motion vector of the coded block by the same method as the temporal direct vector generator 32 in FIG. 3 , for example.

初始矢量判定部73实施:将由空间矢量生成部71生成的空间矢量或者由时间矢量生成部72生成的时间矢量中的某一方选择为初始矢量的处理。The initial vector determination unit 73 performs a process of selecting one of the space vector generated by the space vector generation unit 71 and the time vector generated by the time vector generation unit 72 as the initial vector.

图28是示出构成了初始矢量生成部34的初始矢量判定部73的结构图。FIG. 28 is a diagram showing the configuration of the initial vector determination unit 73 constituting the initial vector generation unit 34 .

在图28中,运动补偿部81实施:通过与图4的运动补偿部41同样的方法,生成空间直接模式的列表0预测图像、空间直接模式的列表1预测图像、时间直接模式的列表0预测图像以及时间直接模式的列表1预测图像的处理。In Figure 28, the motion compensation unit 81 implements: using the same method as the motion compensation unit 41 in Figure 4, the processing of generating the list 0 prediction image of the spatial direct mode, the list 1 prediction image of the spatial direct mode, the list 0 prediction image of the temporal direct mode, and the list 1 prediction image of the temporal direct mode is implemented.

类似度计算部82实施如下处理:通过与图4的类似度计算部42同样的方法,作为空间评价值,计算空间直接模式的列表0预测图像和列表1预测图像的类似度,并且作为时间评价值,计算时间直接模式的列表0预测图像和列表1预测图像的类似度。The similarity calculation unit 82 performs the following processing: using the same method as the similarity calculation unit 42 in Figure 4, the similarity between the list 0 prediction image and the list 1 prediction image of the spatial direct mode is calculated as a spatial evaluation value, and the similarity between the list 0 prediction image and the list 1 prediction image of the temporal direct mode is calculated as a temporal evaluation value.

初始矢量决定部83实施如下处理:比较由类似度计算部82计算的空间评价值和时间评价值,依照其比较结果,选择空间矢量或者时间矢量。The initial vector determination unit 83 performs processing for comparing the spatial evaluation value and the temporal evaluation value calculated by the similarity calculation unit 82 and selecting a spatial vector or a temporal vector according to the comparison result.

图29是示出本发明的实施方式3的运动图像解码装置的运动补偿预测部54的结构图,在图中,与图6相同的符号表示同一或者相当部分,所以省略说明。FIG29 is a block diagram showing the motion compensation prediction unit 54 of the moving picture decoding device according to Embodiment 3 of the present invention. In the figure, the same reference numerals as those in FIG6 denote the same or corresponding parts, and therefore their description is omitted.

直接矢量生成部64实施生成空间直接矢量和时间直接矢量的处理。The direct vector generating unit 64 performs processing to generate a spatial direct vector and a temporal direct vector.

另外,直接矢量生成部64的内部结构与图25的直接矢量生成部25相同。Note that the internal structure of the direct vector generating unit 64 is the same as that of the direct vector generating unit 25 in FIG. 25 .

接下来,说明动作。Next, the operation will be explained.

相比于上述实施方式1,除了运动补偿预测部5、54的直接矢量生成部23、62被代替为直接矢量生成部25、64这一点以外相同,所以仅说明直接矢量生成部25、64的处理内容。Compared to the first embodiment, the present invention is the same except that the direct vector generators 25 and 64 are used instead of the direct vector generators 23 and 62 of the motion compensation prediction units 5 and 54 . Therefore, only the processing contents of the direct vector generators 25 and 64 will be described.

其中,直接矢量生成部25、64的处理内容相同,所以说明直接矢量生成部25的处理内容。Since the processing contents of the direct vector generating units 25 and 64 are the same, the processing contents of the direct vector generating unit 25 will be described.

直接矢量生成部25的初始矢量生成部34根据已编码的块的运动矢量生成初始矢量MV_first。The initial vector generation unit 34 of the direct vector generation unit 25 generates an initial vector MV_first based on the motion vector of the coded block.

即,初始矢量生成部34的空间矢量生成部71通过与例如图3的空间直接矢量生成部31同样的方法,根据已编码的块的运动矢量生成空间矢量。但是,也可以通过其他方法生成空间矢量。That is, the spatial vector generator 71 of the initial vector generator 34 generates a spatial vector from the motion vector of the coded block using the same method as the spatial direct vector generator 31 in Figure 3. However, the spatial vector may be generated using other methods.

初始矢量生成部34的时间矢量生成部72通过与例如图3的时间直接矢量生成部32同样的方法,根据已编码的块的运动矢量生成时间矢量。但是,也可以通过其他方法生成时间矢量。The temporal vector generator 72 of the initial vector generator 34 generates a temporal vector from the motion vector of the coded block using the same method as the temporal direct vector generator 32 in Fig. 3. However, the temporal vector may be generated using other methods.

初始矢量生成部34的初始矢量判定部73在空间矢量生成部71生成了空间矢量,时间矢量生成部72生成了时间矢量时,从该空间矢量或者时间矢量中,将某一方的矢量选择为初始矢量MV_first。When the space vector generator 71 generates a space vector and the time vector generator 72 generates a time vector, the initial vector determination unit 73 of the initial vector generator 34 selects either the space vector or the time vector as the initial vector MV_first.

即,初始矢量判定部73的运动补偿部81通过与图4的运动补偿部41同样的方法,生成空间直接模式的列表0预测图像、空间直接模式的列表1预测图像、时间直接模式的列表0预测图像以及时间直接模式的列表1预测图像。That is, the motion compensation unit 81 of the initial vector determination unit 73 generates the list 0 prediction image of the spatial direct mode, the list 1 prediction image of the spatial direct mode, the list 0 prediction image of the temporal direct mode, and the list 1 prediction image of the temporal direct mode by the same method as the motion compensation unit 41 of Figure 4.

初始矢量判定部73的类似度计算部82通过与图4的类似度计算部42同样的方法,作为空间评价值,计算空间直接模式的列表0预测图像和列表1预测图像的类似度,并且作为时间评价值,计算时间直接模式的列表0预测图像和列表1预测图像的类似度。The similarity calculation unit 82 of the initial vector determination unit 73 calculates the similarity between the list 0 prediction image and the list 1 prediction image of the spatial direct mode as a spatial evaluation value, and calculates the similarity between the list 0 prediction image and the list 1 prediction image of the temporal direct mode as a temporal evaluation value, using the same method as the similarity calculation unit 42 of Figure 4.

初始矢量判定部73的初始矢量决定部83通过参照由类似度计算部82计算的空间评价值和时间评价值的比较结果,选择空间矢量或者时间矢量中的、预测图像间的类似度高的一方的矢量。The initial vector determination unit 83 of the initial vector determination unit 73 refers to the comparison result of the spatial evaluation value and the temporal evaluation value calculated by the similarity calculation unit 82 , and selects a vector having a higher similarity between the predicted images, either the spatial vector or the temporal vector.

直接矢量生成部25的运动矢量搜索部35在初始矢量生成部34生成了初始矢量MV_first时,如图30所示,以该初始矢量MV_first表示的初始搜索点(块)为中心,搜索其周围±n的范围,从而决定直接矢量。When the initial vector generating unit 34 generates the initial vector MV_first, the motion vector search unit 35 of the direct vector generating unit 25 searches the range of ±n around the initial search point (block) represented by the initial vector MV_first as shown in Figure 30, thereby determining the direct vector.

搜索时的评价也可以进行与例如图28的类似度计算部82等同的处理。在该情况下,如果将初始矢量表示的位置设为v,则如下述式(11)那样,计算搜索的评价值SAD。The evaluation during the search may be performed by, for example, the same processing as that of the similarity calculation unit 82 in Fig. 28. In this case, assuming that the position indicated by the initial vector is v, the search evaluation value SAD is calculated as shown in the following equation (11).

SAD=|f(v1-x)-g(v2+x)| (11)SAD=|f(v 1 -x)-g(v 2 +x)| (11)

其中,搜索范围n既可以固定,也可以通过切片头等上位头决定。另外,将搜索点的分布范围(搜索范围)假定为正方形,但也可以是矩形,也可以是菱形等。The search range n can be fixed or determined by a higher-level header such as a slice header. In addition, the distribution range of the search points (search range) is assumed to be a square, but it can also be a rectangle, a diamond, etc.

运动矢量搜索部35在计算了搜索的评价值SAD时,在搜索范围内,将评价值SAD最小的运动矢量作为直接矢量输出到运动补偿处理部24。After calculating the search evaluation value SAD, the motion vector search unit 35 outputs the motion vector with the minimum evaluation value SAD within the search range as a direct vector to the motion compensation processing unit 24 .

在该实施方式3中,示出了生成时间矢量和空间矢量,将某一方的矢量选择为初始矢量的例子,但也可以除了该时间矢量、空间矢量以外,将其他矢量也作为候补矢量加上,从这些候补矢量中选择初始矢量。In this embodiment 3, an example is shown in which a time vector and a space vector are generated and one of the vectors is selected as the initial vector. However, in addition to the time vector and the space vector, other vectors can also be added as candidate vectors and the initial vector can be selected from these candidate vectors.

例如,也可以将图17那样的空间矢量MV_A、MV_B、MV_C、时间矢量MV_1~MV_8加到候补矢量,从这些空间矢量、时间矢量选择初始矢量。For example, space vectors MV_A, MV_B, MV_C and time vectors MV_1 to MV_8 as shown in FIG. 17 may be added to candidate vectors, and an initial vector may be selected from these space vectors and time vectors.

另外,也可以如图18所示,根据多个已编码矢量生成1个矢量,将该矢量加到候补矢量。Alternatively, as shown in FIG18 , one vector may be generated from a plurality of encoded vectors and added to the candidate vectors.

这样,通过增加候补矢量而处理量增加,但初始矢量的准确度提高,而能够提高编码效率。In this way, the amount of processing increases by increasing the number of candidate vectors, but the accuracy of the initial vector improves, and the encoding efficiency can be improved.

在该实施方式3中,也可以以切片为单位决定直接矢量的候补。In this third embodiment, direct vector candidates may be determined in slice units.

表示将哪个矢量作为候补的信息多路复用到切片头。Information indicating which vector is a candidate is multiplexed into the slice header.

例如考虑,关于时间矢量,在摄全景那样的影像中,时间矢量的效果低,所以从选择候补去掉,另一方面,在照相机是固定的影像中,时间矢量的效果大,所以加到候补等方法。For example, regarding the time vector, in an image such as a panoramic shot, the effect of the time vector is low, so it is removed from the selection candidate. On the other hand, in an image with a fixed camera, the effect of the time vector is large, so it is added to the candidate.

成为候补的矢量多时,能够生成更接近原图像的预测图像,但编码器的处理量增大,所以将没有效果的矢量预先从候补去掉等,考虑影像的局部性来决定,从而能够实现处理量和编码效率的平衡。When there are many candidate vectors, a predicted image closer to the original image can be generated, but the processing load of the encoder increases. Therefore, ineffective vectors are removed from the candidates in advance, and the decision is made based on the locality of the image, so that a balance between processing load and coding efficiency can be achieved.

关于成为候补的矢量的切换,例如,考虑针对每个矢量设置ON/OFF的标志,仅将该标志是ON的矢量作为候补的方法。Regarding the switching of the vectors to be candidates, for example, a method of setting an ON/OFF flag for each vector and using only the vectors with the flag turned on as candidates may be considered.

关于成为选择候补的运动矢量,既可以通过切片头切换,也可以通过序列头、图片头等上位层切换。另外,也可以准备一个以上的成为选择候补的群组,而对该候补群组的索引进行编码。The motion vectors that are candidates for selection may be switched via a slice header or a higher layer such as a sequence header or a picture header. Alternatively, one or more groups of candidate candidates may be prepared and the index of the candidate group may be encoded.

另外,也可以针对每个宏块、编码块进行切换。通过针对每个宏块、编码块进行切换,能够使得具有局部性,具有编码效率改善的效果。Alternatively, the switching may be performed for each macroblock or coding block. By performing the switching for each macroblock or coding block, localization can be achieved, which has the effect of improving coding efficiency.

另外,也可以针对每个分区块尺寸唯一地决定选择候补。一般认为,如果块尺寸变小,则空间上的相关变弱,所以通过中值预测决定的矢量的预测精度恶化。因此,例如,通过将利用中值预测决定的运动矢量从候补去掉,不会降低编码效率而能够减少处理量。Alternatively, selection candidates can be uniquely determined for each partition block size. It is generally believed that as the block size decreases, spatial correlation weakens, and the prediction accuracy of vectors determined by median prediction deteriorates. Therefore, for example, by removing motion vectors determined by median prediction from the candidate list, the processing load can be reduced without reducing coding efficiency.

在该实施方式3中,假设存在时间矢量和空间矢量这双方的情况而进行了说明,但在对编码块Bn实施帧内编码处理的情况等下,还有时不存在运动矢量。在该情况下,考虑设为零矢量的方法、从候补去掉等方法。In this third embodiment, the description assumes the presence of both a temporal vector and a spatial vector. However, there may be cases where no motion vector exists, such as when intra-frame coding is performed on coding block Bn . In such cases, methods such as setting the vector to zero or removing it from the candidate list are possible.

在设为零矢量的情况下,候补增加,所以能够提高编码效率,但处理量增加。在从直接矢量的候补去掉的情况下,能够减少处理量。When the vector is set to zero, the number of candidates increases, so the coding efficiency can be improved, but the processing amount increases. When it is removed from the direct vector candidates, the processing amount can be reduced.

在该实施方式3中,示出了生成直接矢量的例子,但也可以将该直接矢量用作通常的运动矢量的编码中使用的预测矢量。In this third embodiment, an example of generating a direct vector is shown, but the direct vector can also be used as a prediction vector used in encoding a normal motion vector.

通过将直接矢量用作预测矢量,处理量增加,但预测的精度提高,所以能够提高编码效率。By using a direct vector as a prediction vector, the amount of processing increases, but the accuracy of prediction improves, so the coding efficiency can be improved.

在该实施方式3中,示出了组合与编码块Bn相比在时间上处于前面的图像、和处于后面的图像,来计算评价值SAD的例子(参照图15),但也可以如图19所示,仅组合在时间上处于前面的图像,来计算评价值SAD。另外,也可以仅组合在时间上处于后面的图像,来计算评价值SAD。In this third embodiment, an example was shown in which the evaluation value SAD was calculated by combining images that temporally precede and images that temporally follow the coding block Bn (see FIG15 ). However, as shown in FIG19 , the evaluation value SAD may be calculated by combining only images that temporally precede. Alternatively, the evaluation value SAD may be calculated by combining only images that temporally follow.

在该情况下,时间矢量如下述式(12)(13)所示。In this case, the time vector is expressed as follows: (12) (13).

其中,是列表0的矢量,是列表1的矢量。Where, is the vector of list 0 and is the vector of list 1.

另外,d表示时间上的距离,d0表示列表0的参照图像的时间上距离,d1表示列表0的参照图像的时间上的距离。In addition, d represents the temporal distance, d0 represents the temporal distance of the reference image in list 0, and d1 represents the temporal distance of the reference image in list 0.

而且,vcol和dcol表示在参照图像中在空间上处于相同的位置的块的矢量、和该矢量表示的参照图像的在时间上的距离。Furthermore, v col and d col represent vectors of blocks at the same spatial position in the reference image, and the temporal distances in the reference image represented by the vectors.

即使在2个参照图像列表表示相同的参照图像的情况下,也能够通过与图19同样的方法应用。Even when two reference image lists indicate the same reference image, the same method as that shown in FIG. 19 can be applied.

在该实施方式3中,假设了在2个参照图像列表中有2张以上的参照图像的情况,但还考虑实际上参照图像仅有1张的情况。In this third embodiment, it is assumed that there are two or more reference images in two reference image lists, but it is also possible to consider the case where there is actually only one reference image.

在该情况下,考虑如果在2个参照图像列表中设置了相同的参照图像,则不使用时间矢量,而仅通过空间矢量来判断。在设置了不同的参照图像的情况下,能够通过上述方式来对应。In this case, if the same reference image is set in two reference image lists, the temporal vector is not used and only the spatial vector is used for judgment. If different reference images are set, the above method can be used to cope with it.

在该实施方式3中,假设了从2个方向的预测处理,但也可以是仅1个方向的预测处理。在根据1个方向的矢量预测的情况下,对表示使用哪个矢量的信息进行编码而传送。由此,能够应对遮挡等问题,有助于预测精度的提高。While this third embodiment assumes prediction processing from two directions, prediction processing from only one direction is also possible. When predicting from a vector in one direction, information indicating which vector is used is encoded and transmitted. This can address issues such as occlusion and contribute to improved prediction accuracy.

在该实施方式3中,假设了使用了2个矢量的预测,但矢量的个数也可以是3个以上。In this third embodiment, prediction using two vectors is assumed, but the number of vectors may be three or more.

在该情况下,例如,考虑使用多个矢量候补中的、成为阈值Th以下的评价值SAD的所有候补来生成预测图像的方法。In this case, for example, a method of generating a predicted image using all candidates having evaluation values SAD equal to or less than a threshold value Th among a plurality of vector candidates is conceivable.

另外,也可以并非使用阈值Th以下的所有候补,而在切片头等中,预先决定所使用的最大矢量数,从评价值小的候补起使用与最大矢量数相应的量来生成预测图像。Alternatively, instead of using all candidates below the threshold Th, the maximum number of vectors to be used may be predetermined in the slice header, etc., and a predicted image may be generated using a number corresponding to the maximum number of vectors starting from candidates with smaller evaluation values.

在该实施方式3中,通过参照图像间的评价决定了矢量,但其也可以通过在空间上邻接的已编码的图像和参照图像的比较来评价。In this third embodiment, the vector is determined by evaluation between reference images, but it may also be evaluated by comparison between a spatially adjacent coded image and a reference image.

在该情况下,考虑使用图20所示那样的L字型的图像来进行。In this case, it is considered to use an L-shaped image as shown in FIG. 20 .

另外,在使用空间上邻接的图像的情况下,在流水线处理的情形下已编码的图像还有可能来不及。在该情况下,考虑代替地使用预测图像。Furthermore, when spatially adjacent images are used, the already encoded images may be too late in pipeline processing. In this case, it is considered to use a predicted image instead.

在该实施方式3中,在决定了初始矢量之后,进行了运动矢量的搜索,但也可以以切片为单位使用标志来决定是否进行运动矢量的搜索。In this third embodiment, after the initial vector is determined, the motion vector is searched. However, whether or not to search the motion vector may be determined using a flag in units of slices.

在该情况下,虽然编码效率降低,但具有能够大幅削减处理量的效果。In this case, although the coding efficiency is reduced, it has the effect of significantly reducing the amount of processing.

其中,标志既可以是切片单位,也可以通过序列、图片等上位层决定。在标志是OFF,不进行运动搜索的情况下,进行与上述实施方式1等同的动作。The flag may be determined in slice units or in a higher layer such as a sequence or a picture. When the flag is OFF and motion search is not performed, the same operation as in the first embodiment is performed.

在该实施方式3中,假设了直接矢量生成部25、64不依赖于块尺寸而进行,但该处理也可以仅限于规定的尺寸以下的情况。In this third embodiment, it is assumed that the direct vector generating units 25 and 64 perform processing independently of the block size, but this processing may be limited to the case where the block size is equal to or smaller than a predetermined size.

表示是否限制于规定的尺寸以下的标志、表示设为哪个块尺寸以下的信息也可以多路复用于切片等上位头,也可以根据最大CU尺寸变化。A flag indicating whether to limit the size to a predetermined size or less, or information indicating which block size is set to be smaller than or equal to a predetermined size, may be multiplexed in an upper header such as a slice, or may vary according to the maximum CU size.

如果块尺寸变小,则参照图像间的相关变低,具有误差变大的倾向。因此,不论选择哪个矢量,都不太对性能造成影响的情形也多,通过使大的块尺寸下的处理成为OFF,具有不会降低编码性能而削减处理量的效果。As the block size decreases, the correlation between reference images decreases, and the error tends to increase. Therefore, regardless of which vector is selected, performance is often not significantly affected. By turning off processing for large block sizes, the amount of processing can be reduced without degrading encoding performance.

实施方式4.Implementation method 4.

在上述实施方式1中,示出了运动补偿预测部5、54根据位于编码块的周围的已编码块(已解码块)的运动矢量生成空间直接模式的空间直接矢量,并且根据该编码块可参照的已编码图片(已解码图片)的运动矢量生成时间直接模式的时间直接矢量,从该空间直接矢量或者时间直接矢量中,选择参照图像间的相关高的一方的直接矢量的例子,但也可以在运动图像编码装置的运动补偿预测部5中,从可选择的1个以上的运动矢量中,选择适合于预测图像的生成的运动矢量,使用该运动矢量,实施针对编码块的运动补偿预测处理来生成预测图像,并且将表示该运动矢量的索引信息输出到可变长编码部13。In the above-mentioned embodiment 1, an example is shown in which the motion compensation prediction units 5 and 54 generate spatial direct vectors of the spatial direct mode based on the motion vectors of the coded blocks (decoded blocks) located around the coding block, and generate temporal direct vectors of the temporal direct mode based on the motion vectors of the coded pictures (decoded pictures) to which the coding block can refer, and select the direct vector with the higher correlation between the reference pictures from the spatial direct vectors or the temporal direct vectors. However, it is also possible to select a motion vector suitable for generating a predicted image from one or more selectable motion vectors in the motion compensation prediction unit 5 of the motion picture coding device, use the motion vector to perform motion compensation prediction processing on the coding block to generate a predicted image, and output index information representing the motion vector to the variable length coding unit 13.

另一方面,也可以在运动图像解码装置的运动补偿预测部54中,使用多路复用到比特流的索引信息表示的运动矢量,实施针对编码块的运动补偿预测处理来生成预测图像。On the other hand, the motion compensation prediction unit 54 of the moving picture decoding device may generate a predicted image by performing a motion compensation prediction process on the coding block using the motion vector indicated by the index information multiplexed into the bitstream.

图31是示出本发明的实施方式4的运动图像编码装置的运动补偿预测部5的结构图,在图中,与图2相同的符号表示同一或者相当部分,所以省略说明。FIG31 is a diagram showing the structure of the motion compensation prediction unit 5 of the moving picture encoding device according to the fourth embodiment of the present invention. In the figure, the same reference numerals as those in FIG2 denote the same or corresponding parts, and therefore their description is omitted.

直接矢量生成部26实施如下处理:参照记述了可选择的运动矢量、和表示该运动矢量的索引信息的直接矢量候补索引,从可选择的1个以上的运动矢量中,选择适合于预测图像的生成的运动矢量,将该运动矢量作为直接矢量输出到运动补偿处理部24,并且将表示该运动矢量的索引信息输出到可变长编码部13。The direct vector generation unit 26 performs the following processing: referring to the direct vector candidate index that records the selectable motion vector and the index information representing the motion vector, selects a motion vector suitable for generating a predicted image from one or more selectable motion vectors, outputs the motion vector as a direct vector to the motion compensation processing unit 24, and outputs the index information representing the motion vector to the variable length coding unit 13.

另外,可变长编码部13在对压缩数据、编码模式等进行可变长编码时,将其索引信息包含于帧间预测参数而进行可变长编码。Furthermore, when performing variable-length coding on compressed data, coding modes, and the like, the variable-length coding unit 13 includes index information thereof in inter-frame prediction parameters and performs variable-length coding.

图32是示出本发明的实施方式4的运动图像解码装置的运动补偿预测部54的结构图,在图中,与图6相同的符号表示同一或者相当部分,所以省略说明。FIG32 is a block diagram showing the motion compensation prediction unit 54 of the moving picture decoding apparatus according to Embodiment 4 of the present invention. In the figure, the same reference numerals as those in FIG6 denote the same or corresponding parts, and therefore their description is omitted.

直接矢量生成部65实施如下处理:输入记述了可选择的运动矢量、和表示该运动矢量的索引信息的直接矢量候补索引,从该直接矢量候补索引,读出帧间预测参数中包含的索引信息表示的运动矢量,将该运动矢量作为直接矢量输出到运动补偿处理部63。The direct vector generation unit 65 performs the following processing: inputs a direct vector candidate index that records a selectable motion vector and index information representing the motion vector, reads out the motion vector represented by the index information included in the inter-frame prediction parameter from the direct vector candidate index, and outputs the motion vector as a direct vector to the motion compensation processing unit 63.

接下来,说明动作。Next, the operation will be explained.

相比于上述实施方式1,除了运动补偿预测部5、54的直接矢量生成部23、62被代替为直接矢量生成部26、65这一点以外是相同的,所以仅说明直接矢量生成部26、65的处理内容。Compared to the first embodiment, the present invention is the same except that the direct vector generators 23 and 62 of the motion compensation prediction units 5 and 54 are replaced by direct vector generators 26 and 65 , so only the processing contents of the direct vector generators 26 and 65 will be described.

运动补偿预测部5的直接矢量生成部26在编码模式m(Bn)是直接模式的情况下,针对编码块Bn的每个分区Pi n,生成直接矢量。The direct vector generation unit 26 of the motion compensation prediction unit 5 generates a direct vector for each partition Pin of the coding block Bn when the coding mode m( Bn ) is the direct mode.

即,直接矢量生成部26参照图33所示那样的直接矢量候补索引,从可选择的1个以上的运动矢量中,选择适合于预测图像的生成的运动矢量。That is, the direct vector generation unit 26 refers to the direct vector candidate index shown in FIG. 33 and selects a motion vector suitable for generating a predicted image from one or more selectable motion vectors.

在图33的例子中,作为可选择的运动矢量,列举了5个运动矢量,但在空间预测中,“median”被最多地选出,所以对“median”分配了索引0。In the example of FIG. 33 , five motion vectors are listed as selectable motion vectors. However, in spatial prediction, “median” is most often selected, and therefore, index 0 is assigned to “median”.

直接矢量生成部26在选择适合于预测图像的生成的运动矢量时,如下述式(14)所示,根据从可选择的运动矢量得到的预测图像和原图像的失真、以及可选择的运动矢量的索引代码量计算成本R,在多个运动矢量中,选择成本R最小的运动矢量。When selecting a motion vector suitable for generating a predicted image, the direct vector generation unit 26 calculates the cost R based on the distortion between the predicted image and the original image obtained from the selectable motion vector, and the index code amount of the selectable motion vector, as shown in the following formula (14), and selects the motion vector with the smallest cost R from among multiple motion vectors.

其中,D表示预测图像与原图像的残差信号,i表示索引,λ表示拉格朗日乘子,()表示()内所示的部分的代码量。Here, D represents the residual signal between the predicted image and the original image, i represents the index, λ represents the Lagrange multiplier, and () represents the amount of code for the portion shown in ().

直接矢量生成部26如果选择了成本R最小的运动矢量,则将该运动矢量作为直接矢量输出到运动补偿处理部24,并且将表示该运动矢量的索引信息输出到可变长编码部13。When the direct vector generation unit 26 selects the motion vector with the minimum cost R, it outputs the motion vector as a direct vector to the motion compensation processing unit 24 and outputs index information indicating the motion vector to the variable-length coding unit 13 .

例如,如果作为成本R最小的运动矢量选择“median”,则将索引0输出到可变长编码部13,如果选择“MV_A”,则将索引1输出到可变长编码部13。For example, if “median” is selected as the motion vector with the minimum cost R, index 0 is output to the variable length coding unit 13 , and if “MV_A” is selected, index 1 is output to the variable length coding unit 13 .

可变长编码部13如果从直接矢量生成部26接收到索引信息,则在对压缩数据、编码模式等进行可变长编码时,将其索引信息包含于帧间预测参数而进行可变长编码。Upon receiving the index information from the direct vector generation unit 26 , the variable length coding unit 13 includes the index information in the inter-frame prediction parameters when performing variable length coding on compressed data, coding mode, and the like.

运动补偿预测部54的直接矢量生成部65在编码模式m(Bn)是直接模式的情况下,针对编码块Bn的每个分区Pi n,生成直接矢量。When the coding mode m(B n ) is the direct mode, the direct vector generation unit 65 of the motion compensation prediction unit 54 generates a direct vector for each partition Pin of the coding block B n .

即,直接矢量生成部65如果输入了与图31的直接矢量生成部26相同的直接矢量候补索引(例如,图33的直接矢量候补索引),并从切换开关61接收到包括索引信息的帧间预测参数,则从该直接矢量候补索引,读出该索引信息表示的运动矢量,将该运动矢量作为直接矢量输出到运动补偿处理部63。That is, if the direct vector generation unit 65 inputs the same direct vector candidate index as the direct vector generation unit 26 in Figure 31 (for example, the direct vector candidate index in Figure 33) and receives the inter-frame prediction parameter including index information from the switching switch 61, it reads the motion vector represented by the index information from the direct vector candidate index and outputs the motion vector as a direct vector to the motion compensation processing unit 63.

例如,如果索引信息是索引0,则作为直接矢量,输出“median”,如果索引信息是索引1,则作为直接矢量,输出“MV_A”。For example, if the index information is index 0, "median" is output as a direct vector, and if the index information is index 1, "MV_A" is output as a direct vector.

如以上说明,根据该实施方式4,构成为从可选择的1个以上的运动矢量中,选择适合于预测图像的生成的运动矢量,使用该运动矢量,实施针对编码块的运动补偿预测处理来生成预测图像,并且将表示该运动矢量的索引信息输出到可变长编码部13,所以与上述实施方式1同样地,起到能够以规定的块为单位选择最佳的直接模式,削减代码量的效果。As described above, according to this embodiment 4, a motion vector suitable for generating a predicted image is selected from one or more selectable motion vectors, and motion compensation prediction processing is performed on the coding block using the motion vector to generate a predicted image, and index information representing the motion vector is output to the variable length coding unit 13. Therefore, similar to the above-mentioned embodiment 1, it has the effect of being able to select the best direct mode in units of specified blocks to reduce the amount of code.

在该实施方式4中,假设存在处于可选择的位置的运动矢量的情况而进行了说明,但在对编码块Bn实施帧内编码处理的情况等下,还有时不存在运动矢量。在该情况下,考虑设为零矢量的方法、从候补去掉等方法。In this fourth embodiment, the description assumes that there is a motion vector at a selectable position. However, there may be no motion vector, such as when intra-frame coding is performed on coding block Bn . In such cases, methods such as setting the vector to zero or removing it from the candidate list are possible.

在设为零矢量的情况下,候补增加,所以能够提高编码效率,但处理量增加。在从直接矢量的候补去掉的情况下,能够减少处理量。When the vector is set to zero, the number of candidates increases, so the coding efficiency can be improved, but the processing amount increases. When it is removed from the direct vector candidates, the processing amount can be reduced.

在该实施方式4中,示出了生成直接矢量的例子,但也可以将该矢量用作通常的运动矢量的编码中使用的预测矢量。In this fourth embodiment, an example of generating a direct vector is shown, but this vector can also be used as a prediction vector used in encoding a normal motion vector.

通过用作预测矢量,处理量增加,但预测的精度提高,所以能够提高编码效率。By using it as a prediction vector, the amount of processing increases, but the prediction accuracy improves, so the coding efficiency can be improved.

在该实施方式4中,可选择的运动矢量的候补被固定,但也可以按照切片单位决定可选择的运动矢量的候补。In this fourth embodiment, the candidates for selectable motion vectors are fixed, but the candidates for selectable motion vectors may be determined in units of slices.

表示将哪个矢量作为候补的信息多路复用到切片头。Information indicating which vector is a candidate is multiplexed into the slice header.

例如考虑,关于时间矢量,在摄全景那样的影像中,时间矢量的效果低,所以从选择候补去掉,另一方面,在照相机被固定的影像中,时间矢量的效果大,所以加到候补等方法。For example, regarding the time vector, in an image such as a panoramic shot, the effect of the time vector is low, so it is removed from the selection candidate. On the other hand, in an image with a fixed camera, the effect of the time vector is large, so it is added to the candidate.

成为候补的矢量多时,能够生成更接近原图像的预测图像,但编码器的处理量增大,所以将没有效果的矢量预先从候补去掉等,考虑影像的局部性来决定,从而能够实现处理量和编码效率的平衡。When there are many candidate vectors, a predicted image closer to the original image can be generated, but the processing load of the encoder increases. Therefore, ineffective vectors are removed from the candidates in advance, and the decision is made based on the locality of the image, so that a balance between processing load and coding efficiency can be achieved.

关于成为候补的矢量的切换,例如,考虑针对每个矢量设置ON/OFF的标志,仅将该标志是ON的矢量作为候补的方法。Regarding the switching of the vectors to be candidates, for example, a method of setting an ON/OFF flag for each vector and using only the vectors with the flag turned on as candidates may be considered.

关于成为选择候补的运动矢量,既可以通过切片头切换,也可以通过序列头、图片头等上位层切换。另外,也可以准备一个以上的成为选择候补的群组,而对该候补群组的索引进行编码。The motion vectors that are candidates for selection may be switched via a slice header or a higher layer such as a sequence header or a picture header. Alternatively, one or more groups of candidate candidates may be prepared and the index of the candidate group may be encoded.

另外,也可以针对每个宏块、编码块切换。通过针对每个宏块、编码块切换,能够使得具有局部性,实现编码效率的改善。Alternatively, the switching may be performed for each macroblock or coding block. By switching for each macroblock or coding block, localization can be achieved, thereby improving coding efficiency.

在该实施方式4中,固定了索引的顺序,但也可以以切片为单位变更索引的顺序。在通过切片选择的矢量中有偏差的情况下,通过以对选择次数多的矢量分配短的代码的方式切换索引表,实现编码效率的提高。In this fourth embodiment, the order of the indices is fixed, but the order of the indices can be changed per slice. If there is a discrepancy among the vectors selected by the slice, the coding efficiency can be improved by switching the index table so that shorter codes are assigned to vectors that are selected more frequently.

关于切换信息的编码,既可以针对各个矢量,分别对顺序进行编码,也可以准备多个索引群组,对表示使用哪个索引群组的信息进行编码。Regarding the coding of the switching information, the order may be coded for each vector, or a plurality of index groups may be prepared and information indicating which index group is to be used may be coded.

另外,还考虑仅决定默认设定,准备表示是否使用与默认设定不同的设定的标志,仅限于该标志是ON的情况,更新索引群组来切换设定的方法。Another method is to determine only the default setting, prepare a flag indicating whether to use a setting different from the default setting, and update the index group to switch the setting only when the flag is on.

此处,示出了以切片为单位切换索引的顺序的例子,但当然也可以通过序列、图片等上位层决定索引的顺序。Here, an example of switching the order of indexes in units of slices is shown, but of course the order of indexes can also be determined by a higher layer such as a sequence or a picture.

另外,也可以针对每个分区块、编码块切换。通过针对每个宏块、编码块切换,能够使得具有局部性,实现编码效率的改善。Alternatively, the switching can be performed for each partition block or coding block. By switching for each macroblock or coding block, localization can be achieved, thereby improving coding efficiency.

另外,也可以针对每个分区块尺寸唯一地决定选择候补。一般认为,如果块尺寸变小,则空间上的相关变弱,所以通过中值预测决定的矢量的预测精度恶化。因此,通过变更利用中值预测决定的索引的顺序,能够提高编码效率。Alternatively, selection candidates can be uniquely determined for each partition block size. It is generally believed that as the block size decreases, spatial correlation weakens, leading to a decrease in the prediction accuracy of vectors determined by median prediction. Therefore, by changing the order of indices determined by median prediction, coding efficiency can be improved.

在该实施方式4中,示出了准备了5个可选择的运动矢量的直接矢量候补索引,但也可以将6个以上的运动矢量准备为候补矢量,也可以将比5个少的运动矢量准备为候补矢量。In this fourth embodiment, five direct vector candidate indices of selectable motion vectors are prepared. However, six or more motion vectors may be prepared as candidate vectors, or fewer than five motion vectors may be prepared as candidate vectors.

例如,也可以将如图17所示的时间矢量的附近的矢量、如图18所示的进行周围的矢量的加权相加而得到的矢量作为候补矢量加上。For example, a vector near the time vector as shown in FIG. 17 or a vector obtained by weighted addition of surrounding vectors as shown in FIG. 18 may be added as a candidate vector.

在该实施方式4中,假设了从2个方向的预测处理,但也可以是仅1个方向的预测处理。在根据1个方向的矢量预测的情况下,对表示使用哪一个矢量的信息进行编码而传送。由此,能够应对遮挡等问题,有助于预测精度的提高。While this fourth embodiment assumes prediction processing from two directions, prediction processing from only one direction is also possible. When predicting from a vector in one direction, information indicating which vector is used is encoded and transmitted. This can address issues such as occlusion and contribute to improved prediction accuracy.

在该实施方式4中,假设了使用2个矢量的两个方向预测,但矢量的个数也可以是3个以上。在该情况下,例如,既可以对表示所选择的所有矢量的索引信息进行编码,也可以相反地对表示不选择的矢量的索引信息进行编码。In this fourth embodiment, two-directional prediction using two vectors is assumed, but the number of vectors may be 3 or more. In this case, for example, index information indicating all selected vectors may be encoded, or conversely, index information indicating non-selected vectors may be encoded.

或者,考虑如图34所示,仅对1个矢量的索引信息进行编码,使用接近该矢量表示的参照图像的图像的方法。Alternatively, as shown in FIG. 34 , a method may be considered in which only index information of one vector is encoded and an image close to the reference image represented by the vector is used.

在该实施方式4中,示出了在多个运动矢量中,选择成本R最小的运动矢量的例子,但也可以如下述式(15)所示,计算评价值SADk,选择该评价值SADk是阈值Th以下的运动矢量。In this fourth embodiment, an example is shown in which a motion vector having the smallest cost R is selected from a plurality of motion vectors. However, an evaluation value SAD k may be calculated as shown in the following equation (15), and a motion vector having an evaluation value SAD k equal to or less than a threshold value Th may be selected.

其中,findex表示对索引信息进行编码的矢量表示的参照图像、gk表示矢量MV_k表示的参照图像。Here, f index represents a reference image represented by a vector encoding index information, and g k represents a reference image represented by a vector MV_k.

此处,示出了使用评价值SADk的例子,但例如,当然也可以通过SSE等其他方法来评价。Here, an example using the evaluation value SAD k is shown, but it is of course possible to perform evaluation using other methods such as SSE.

表示所使用的矢量的个数的信息也可以多路复用到切片单位等上位头。如果矢量的个数增加,则编码效率提高,但处理量增加,所以处于折衷的关系。Information indicating the number of vectors used may be multiplexed into an upper header in slice units, etc. Increasing the number of vectors improves coding efficiency, but increases the amount of processing, so there is a trade-off.

另外,也可以以编码块、分区等更细致的单位设定而不是切片单位。在该情况下,根据图像的局部性,能够实现处理量和编码效率的平衡。Alternatively, the unit may be set in a finer unit such as a coding block or partition instead of a slice unit. In this case, a balance between the amount of processing and the coding efficiency can be achieved according to the locality of the image.

在该实施方式4中,示出了从多个可选择的运动矢量中,选择适合于预测图像的生成的运动矢量的例子,但也可以如上述实施方式3那样,从多个可选择的运动矢量中,选择用作初始矢量的运动矢量之后,搜索该初始矢量的周围,从而决定最终的运动矢量。该情况的直接矢量生成部26的结构如图35所示。While this fourth embodiment shows an example of selecting a motion vector suitable for generating a predicted image from a plurality of selectable motion vectors, it is also possible, as in the third embodiment, to select a motion vector to be used as an initial vector from a plurality of selectable motion vectors and then search around the initial vector to determine a final motion vector. The structure of the direct vector generator 26 in this case is shown in FIG35 .

图35的初始矢量生成部36相当于图26的初始矢量生成部34。The initial vector generation unit 36 in FIG35 corresponds to the initial vector generation unit 34 in FIG26 .

实施方式5.Implementation method 5.

该实施方式5的运动补偿预测部5、54具有上述实施方式1(或者、实施方式2、3)的功能、和上述实施方式4的功能,能够以切片为单位切换上述实施方式1(或者、实施方式2、3)的功能和上述实施方式4的功能,能够使用某一个功能,来生成预测图像。The motion compensation prediction units 5 and 54 of this embodiment 5 have the functions of the above-mentioned embodiment 1 (or, embodiments 2 and 3) and the functions of the above-mentioned embodiment 4, can switch the functions of the above-mentioned embodiment 1 (or, embodiments 2 and 3) and the functions of the above-mentioned embodiment 4 in units of slices, and can use any one of the functions to generate a predicted image.

图36是示出本发明的实施方式5的运动图像编码装置的运动补偿预测部5的结构图,在图中,与图31相同的符号表示同一或者相当部分,所以省略说明。FIG36 is a diagram showing the structure of the motion compensation prediction unit 5 of the moving picture encoding device according to the fifth embodiment of the present invention. In the figure, the same reference numerals as those in FIG31 denote the same or corresponding parts, and therefore description thereof will be omitted.

直接矢量生成部27实施如下处理:在直接模式切换标志表示不发送索引信息的意思的情况下,通过与图2的直接矢量生成部23(或者、图25的直接矢量生成部25)同样的方法,生成直接矢量,另一方面,在直接模式切换标志表示发送索引信息的意思的情况下,通过与图31的直接矢量生成部26同样的方法,生成直接矢量,并且将表示该直接矢量的索引信息输出到可变长编码部13。The direct vector generation unit 27 performs the following processing: when the direct mode switching flag indicates that index information is not to be transmitted, a direct vector is generated by the same method as the direct vector generation unit 23 in Figure 2 (or the direct vector generation unit 25 in Figure 25). On the other hand, when the direct mode switching flag indicates that index information is to be transmitted, a direct vector is generated by the same method as the direct vector generation unit 26 in Figure 31, and index information representing the direct vector is output to the variable length coding unit 13.

另外,直接矢量生成部27实施将直接模式切换标志输出到可变长编码部13的处理。Furthermore, the direct vector generation unit 27 performs a process of outputting a direct mode switching flag to the variable length coding unit 13 .

图37是示出构成了运动补偿预测部5的直接矢量生成部27的结构图。FIG37 is a diagram showing the structure of the direct vector generation unit 27 constituting the motion compensation prediction unit 5. As shown in FIG37 , the direct vector generation unit 27 includes ...

在图37中,切换开关91实施如下处理:在直接模式切换标志表示不发送索引信息的意思的情况下,将编码块Bn的分区Pi n输出到与图2的直接矢量生成部23(或者、图25的直接矢量生成部25)相当的部分,在表示发送索引信息的意思的情况下,将编码块Bn的分区Pi n输出到与图31的直接矢量生成部26相当的部分。In FIG37 , the switching switch 91 performs the following processing: when the direct mode switching flag indicates that index information is not to be sent, the partition Pin of the coding block Bn is output to a portion corresponding to the direct vector generation unit 23 in FIG2 (or the direct vector generation unit 25 in FIG25 ); and when the flag indicates that index information is to be sent, the partition Pin of the coding block Bn is output to a portion corresponding to the direct vector generation unit 26 in FIG31 .

图38是示出本发明的实施方式5的运动图像解码装置的运动补偿预测部54的结构图,在图中,与图32相同的符号表示同一或者相当部分,所以省略说明。FIG38 is a diagram showing the structure of the motion compensation prediction unit 54 of the moving picture decoding device according to Embodiment 5 of the present invention. In the figure, the same reference numerals as those in FIG32 denote the same or corresponding parts, and therefore description thereof will be omitted.

直接矢量生成部66实施如下处理:在帧间预测参数中包含的直接模式切换标志表示不发送索引信息的意思的情况下,通过与图6的直接矢量生成部62(或者、图29的直接矢量生成部64)同样的方法,生成直接矢量,另一方面,在直接模式切换标志表示发送索引信息的意思的情况下,通过与图32的直接矢量生成部65同样的方法,生成直接矢量。The direct vector generation unit 66 performs the following processing: when the direct mode switching flag included in the inter-frame prediction parameter indicates that index information is not to be transmitted, a direct vector is generated by the same method as the direct vector generation unit 62 in Figure 6 (or the direct vector generation unit 64 in Figure 29). On the other hand, when the direct mode switching flag indicates that index information is to be transmitted, a direct vector is generated by the same method as the direct vector generation unit 65 in Figure 32.

接下来,说明动作。Next, the operation will be explained.

运动补偿预测部5的直接矢量生成部27具有图2的直接矢量生成部23(或者、图25的直接矢量生成部25)的功能、和图31的直接矢量生成部26的功能,在从外部输入的直接模式切换标志表示不发送索引信息的意思的情况下,通过与图2的直接矢量生成部23(或者、图25的直接矢量生成部25)同样的方法,生成直接矢量,将该直接矢量输出到运动补偿处理部24。The direct vector generation unit 27 of the motion compensation prediction unit 5 has the functions of the direct vector generation unit 23 in Figure 2 (or the direct vector generation unit 25 in Figure 25) and the functions of the direct vector generation unit 26 in Figure 31. When the direct mode switching flag input from the outside indicates that the index information is not to be sent, the direct vector is generated by the same method as the direct vector generation unit 23 in Figure 2 (or the direct vector generation unit 25 in Figure 25) and outputs the direct vector to the motion compensation processing unit 24.

另外,直接矢量生成部27将该直接模式切换标志输出到可变长编码部13。Furthermore, the direct vector generation unit 27 outputs the direct mode switching flag to the variable length coding unit 13 .

直接矢量生成部27在该直接模式切换标志表示发送索引信息的意思的情况下,通过与图32的直接矢量生成部65同样的方法,生成直接矢量,将该直接矢量输出到运动补偿处理部24。When the direct mode switching flag indicates that index information is to be transmitted, the direct vector generation unit 27 generates a direct vector using the same method as the direct vector generation unit 65 in FIG. 32 , and outputs the direct vector to the motion compensation processing unit 24 .

另外,直接矢量生成部27将该直接模式切换标志和索引信息输出到可变长编码部13。Furthermore, the direct vector generation unit 27 outputs the direct mode switching flag and index information to the variable length coding unit 13 .

可变长编码部13如果从直接矢量生成部27接收到直接模式切换标志,则在对压缩数据、编码模式等进行可变长编码时,将该直接模式切换标志包含于帧间预测参数而进行可变长编码。Upon receiving the direct mode switching flag from the direct vector generator 27 , the variable length coding unit 13 includes the direct mode switching flag in the inter-frame prediction parameters when variable length coding is performed on compressed data, coding mode, etc.

另外,可变长编码部13如果从直接矢量生成部27接收到直接模式切换标志和索引信息,则在对压缩数据、编码模式等进行可变长编码时,将该直接模式切换标志和索引信息包含于帧间预测参数而进行可变长编码。In addition, if the variable length coding unit 13 receives the direct mode switching flag and index information from the direct vector generation unit 27, it includes the direct mode switching flag and index information in the inter-frame prediction parameters when performing variable length coding on compressed data, coding mode, etc.

运动补偿预测部54的直接矢量生成部66如果接收到由可变长解码部51解码的帧间预测参数,则在该帧间预测参数中包含的直接模式切换标志表示不发送索引信息的意思的情况下,通过与图6的直接矢量生成部62(或者、图29的直接矢量生成部64)同样的方法,生成直接矢量。When the direct vector generation unit 66 of the motion compensation prediction unit 54 receives the inter-frame prediction parameters decoded by the variable length decoding unit 51, if the direct mode switching flag included in the inter-frame prediction parameters indicates that index information is not to be sent, the direct vector is generated by the same method as the direct vector generation unit 62 in Figure 6 (or the direct vector generation unit 64 in Figure 29).

另一方面,在直接模式切换标志表示发送索引信息的意思的情况下,通过与图32的直接矢量生成部65同样的方法,生成直接矢量。On the other hand, when the direct mode switching flag indicates that the index information is to be transmitted, a direct vector is generated by the same method as the direct vector generating unit 65 in FIG. 32 .

一般,发送索引信息的模式相比于不发送索引信息的模式,附加信息增加。因此,在低速率(rate)等全代码量中附加信息的比例大的情况下,不发送索引信息的模式的性能更佳。Generally, the mode that transmits index information has more additional information than the mode that does not transmit index information. Therefore, in the case of low bit rates, where the proportion of additional information in the total code amount is large, the mode that does not transmit index information has better performance.

另一方面,在高速率的情况等全代码量中附加信息的比例小的情况下,附加索引信息来使用最佳的直接矢量时可预见编码效率的提高。On the other hand, in cases where the ratio of additional information to the total code amount is small, such as in the case of high rate, improvement in coding efficiency can be expected by adding index information and using the optimal direct vector.

在该实施方式5中,示出了直接模式切换标志包含于帧间预测参数的例子,但直接模式切换标志既可以多路复用于切片头,也可以多路复用于图片、序列头。In this fifth embodiment, an example is shown in which the direct mode switching flag is included in the inter-frame prediction parameters, but the direct mode switching flag may be multiplexed in a slice header or in a picture or sequence header.

另外,还考虑通过分区尺寸决定切换。In addition, it is also considered to determine the switching by the partition size.

一般,如果分区尺寸变大,则运动矢量等附加信息的比例相对变小。因此,考虑在某一定值以上的大小的情况下,选择发送索引信息的模式,在比其小的情况下,选择不发送索引信息的模式等结构。Generally, as the partition size increases, the proportion of additional information such as motion vectors decreases. Therefore, a configuration is considered in which a mode of transmitting index information is selected for sizes above a certain value, and a mode of not transmitting index information is selected for sizes below that value.

如上述那样,在通过分区决定的情况下,也可以针对每个编码块尺寸,将表示使用哪个的标志多路复用于切片头等上位头。As described above, when the size is determined by partitioning, a flag indicating which size to use may be multiplexed into a higher-level header such as a slice header for each coding block size.

在该实施方式4中,示出了通过直接模式切换标志,切换上述实施方式1的功能和上述实施方式4的功能的例子,但也可以切换上述实施方式2的功能和上述实施方式4的功能,也可以切换上述实施方式3的功能和上述实施方式4的功能。In this embodiment 4, an example of switching the function of the above-mentioned embodiment 1 and the function of the above-mentioned embodiment 4 through a direct mode switching flag is shown, but the function of the above-mentioned embodiment 2 and the function of the above-mentioned embodiment 4 can also be switched, and the function of the above-mentioned embodiment 3 and the function of the above-mentioned embodiment 4 can also be switched.

另外,也可以切换上述实施方式1的功能和上述实施方式2的功能,也可以切换上述实施方式1的功能和上述实施方式3的功能,也可以切换上述实施方式2的功能和上述实施方式3的功能。In addition, the function of the first embodiment and the function of the second embodiment may be switched, the function of the first embodiment and the function of the third embodiment may be switched, or the function of the second embodiment and the function of the third embodiment may be switched.

另外,也可以从上述实施方式1~4的功能中,选择任意的功能。In addition, any function may be selected from the functions of the above-mentioned first to fourth embodiments.

在该实施方式5中,示出了通过直接模式切换标志,切换上述实施方式1的功能和上述实施方式4的功能的例子,但其也可以不切换而作为on/off(“通”/“断”)的标志来使用。例如,考虑设为是否使用实施方式1的on/off标志,在on的情况下,实施方式1和实施方式4都进行,选择编码效率更佳的一方的模式,对该信息进行编码。由此,能够根据图像的局部性切换直接模式,起到有助于编码效率的提高的效果。While this fifth embodiment shows an example of switching between the functions of the first and fourth embodiments described above using a direct mode switching flag, it is also possible to use the flag as an on/off switch, rather than a switching flag. For example, consider whether the on/off flag of the first embodiment is used. If the flag is on, both the first and fourth embodiments are performed, and the mode with the higher coding efficiency is selected, and this information is encoded. This allows switching between direct modes based on the locality of the image, contributing to improved coding efficiency.

在上述中,使实施方式1成为on/off,但其也可以使实施方式4成为on/off。另外,组合也可以是实施方式2和4、实施方式3和4的组合。In the above description, the first embodiment is turned on/off, but the fourth embodiment may be turned on/off. In addition, a combination of the second and fourth embodiments or the third and fourth embodiments may be used.

在该实施方式5中,示出了从多个可选择的运动矢量中,选择适合于预测图像的生成的运动矢量的例子,但也可以如上述实施方式3那样,从多个可选择的运动矢量中,选择用作初始矢量的运动矢量之后,搜索该初始矢量的周围,从而决定最终的运动矢量。该情况的直接矢量生成部27的结构如图39所示。While this fifth embodiment shows an example of selecting a motion vector suitable for generating a predicted image from a plurality of selectable motion vectors, it is also possible to select a motion vector to be used as an initial vector from a plurality of selectable motion vectors, and then search around the initial vector to determine a final motion vector, as in the third embodiment described above. The structure of the direct vector generator 27 in this case is shown in FIG.

图39的初始矢量生成部37相当于图26的初始矢量生成部34。The initial vector generation unit 37 in FIG39 corresponds to the initial vector generation unit 34 in FIG26 .

另外,本申请发明能够在该发明的范围内,进行各实施方式的自由的组合、或者各实施方式的任意的构成要素的变形、或者各实施方式中的任意的构成要素的省略。Furthermore, the present invention can freely combine the various embodiments, modify any components of the various embodiments, or omit any components of the various embodiments within the scope of the invention.

例如记载为,决定最大尺寸,并且决定最大尺寸的编码块被层次性地分割时的上限的层次数,从可利用的1个以上的编码模式中,选择适合于层次性地分割的各个编码块的编码模式,但也可以事先预先决定最大尺寸或者层次数、编码模式中的某一个或者全部。For example, it is recorded as determining the maximum size and the upper limit of the number of layers when the coding block of the maximum size is hierarchically divided, and selecting a coding mode suitable for each hierarchically divided coding block from one or more available coding modes, but the maximum size or the number of layers, or one or all of the coding modes can also be predetermined in advance.

实施方式6.Implementation method 6.

在上述实施方式4中,示出了运动图像编码装置中的运动补偿预测部5的直接矢量生成部26参照图33所示那样的直接矢量候补索引,掌握可选择的1个以上的运动矢量的例子,但也可以编码控制部1根据编码块的块尺寸,生成可选择的1个以上的运动矢量列表,参照表示可选择的1个以上的运动矢量的直接矢量候补列表和直接矢量候补索引,从而决定直接模式矢量。In the above-mentioned embodiment 4, an example is shown in which the direct vector generation unit 26 of the motion compensation prediction unit 5 in the motion image encoding device refers to the direct vector candidate index as shown in Figure 33 to grasp one or more selectable motion vectors, but the encoding control unit 1 can also generate a list of one or more selectable motion vectors based on the block size of the encoding block, and refer to the direct vector candidate list and the direct vector candidate index representing one or more selectable motion vectors to determine the direct mode vector.

具体而言,如下所述。Specifically, it is as follows.

如上所述,关于可选择的1个以上的运动矢量,例如,能够针对分区的每个块尺寸唯一地决定,但在如图40所示,作为编码块的分区的块尺寸大的情况下,与周围的块的相关高,相反地在分区的块尺寸小的情况下,与周围的块的相关低。As described above, one or more selectable motion vectors can be uniquely determined for each block size of a partition, for example. However, as shown in FIG40 , when the block size of the partition serving as the coding block is large, the correlation with the surrounding blocks is high, whereas when the block size of the partition is small, the correlation with the surrounding blocks is low.

因此,分区的块尺寸越小,越能够减少可选择的运动矢量的候补数。Therefore, the smaller the block size of the partition, the smaller the number of selectable motion vector candidates can be.

因此,如图41所示,编码控制部1预先针对作为编码块的分区的每个块尺寸,对可选择的1个以上的运动矢量进行列表化。Therefore, as shown in FIG. 41 , the encoding control unit 1 lists one or more selectable motion vectors in advance for each block size of a partition serving as a coding block.

如从图41可知,分区的块尺寸越小,可选择的运动矢量的候补数越减少,例如,在块尺寸为“64”的分区中,可选择的运动矢量的个数是“4”,但在块尺寸为“8”的分区中,可选择的运动矢量的个数是“2”。As can be seen from Figure 41, the smaller the block size of the partition, the smaller the number of selectable motion vector candidates. For example, in a partition with a block size of "64", the number of selectable motion vectors is "4", but in a partition with a block size of "8", the number of selectable motion vectors is "2".

图42中的“median”、“MV_A”、“MV_B”、“MV_C”、“temporal”与图33中的“median”、“MV_A”、“MV_B”、“MV_C”、“temporal”对应。“median”, “MV_A”, “MV_B”, “MV_C”, and “temporal” in FIG42 correspond to “median”, “MV_A”, “MV_B”, “MV_C”, and “temporal” in FIG33 .

编码控制部1在决定可选择的1个以上的运动矢量时,例如,参照图41的列表,确定与作为编码对象的分区的块尺寸对应的1个以上的运动矢量,将表示该1个以上的运动矢量的直接矢量候补列表输出到运动补偿预测部5。When determining one or more selectable motion vectors, the encoding control unit 1, for example, refers to the list of Figure 41 to determine one or more motion vectors corresponding to the block size of the partition serving as the encoding object, and outputs the direct vector candidate list representing the one or more motion vectors to the motion compensation prediction unit 5.

例如,在分区的块尺寸是“64”的情况下,作为可选择的1个以上的运动矢量,决定“MV_A”、“MV_B”、“MV_C”、“temporal”。For example, when the block size of the partition is "64", "MV_A", "MV_B", "MV_C", and "temporal" are determined as one or more selectable motion vectors.

另外,在分区的块尺寸是“8”的情况下,作为可选择的1个以上的运动矢量,决定“median”、“temporal”。In addition, when the block size of the partition is "8", "median" and "temporal" are determined as one or more selectable motion vectors.

运动补偿预测部5的直接矢量生成部26如果从编码控制部1接收到直接矢量候补列表,则与上述实施方式4同样地,从该直接矢量候补列表表示的1个以上的运动矢量中,选择适合于预测图像的生成的运动矢量,但在分区的块尺寸小的情况下,可选择的运动矢量的候补数少,所以例如,上述式(15)所示那样的评价值SADk的计算数等减少,运动补偿预测部5的处理负荷被减轻。If the direct vector generation unit 26 of the motion compensation prediction unit 5 receives the direct vector candidate list from the encoding control unit 1, it selects a motion vector suitable for generating the predicted image from one or more motion vectors represented by the direct vector candidate list, similar to the above-mentioned embodiment 4. However, when the block size of the partition is small, the number of selectable motion vector candidates is small, so, for example, the number of calculations of the evaluation value SAD k shown in the above-mentioned formula (15) is reduced, and the processing load of the motion compensation prediction unit 5 is reduced.

这样,在运动图像编码装置的编码控制部1决定可选择的1个以上的运动矢量的情况下,在运动图像解码装置中,也需要具有与运动图像编码装置完全相同的可选择的1个以上的直接矢量候补列表。In this way, when the encoding control unit 1 of the moving picture encoding device determines one or more selectable motion vectors, the moving picture decoding device also needs to have the same one or more selectable direct vector candidate lists as the moving picture encoding device.

运动图像解码装置的可变长解码部51在编码模式m(Bn)是直接模式的情况下,针对编码块Bn的每个分区Pi n,将该分区的块尺寸输出到运动补偿预测部54,并且将从比特流可变长解码了的索引信息(表示在运动图像编码装置的运动补偿预测部5中使用的运动矢量的信息)输出到运动补偿预测部54。When the coding mode m( Bn ) is the direct mode, the variable length decoding unit 51 of the moving picture decoding apparatus outputs , for each partition P in the coding block Bn , the block size of the partition to the motion compensation prediction unit 54, and outputs index information (information indicating a motion vector used in the motion compensation prediction unit 5 of the moving picture coding apparatus) obtained by variable length decoding from the bit stream to the motion compensation prediction unit 54.

运动补偿预测部54的直接矢量生成部65如果从可变长解码部51接收到分区的块尺寸,则如上述实施方式4那样,输入直接矢量索引,根据块尺寸从预先决定的1个以上的运动矢量候补列表输出直接模式中使用的运动矢量。Upon receiving the partition block size from the variable length decoding unit 51, the direct vector generation unit 65 of the motion compensation prediction unit 54 inputs a direct vector index as in the fourth embodiment described above, and outputs a motion vector used in the direct mode from one or more predetermined motion vector candidate lists according to the block size.

即,直接矢量生成部65预先针对分区的每个块尺寸对可选择的1个以上的运动矢量进行列表化(参照图41),在决定可选择的1个以上的运动矢量时,参照图41的列表和直接矢量索引,输出与进行本次解码的分区的块尺寸对应的1个以上的运动矢量。That is, the direct vector generation unit 65 lists one or more selectable motion vectors for each block size of the partition in advance (refer to Figure 41). When determining one or more selectable motion vectors, it refers to the list of Figure 41 and the direct vector index to output one or more motion vectors corresponding to the block size of the partition to be decoded this time.

例如,在分区的块尺寸是“8”时,如果索引信息是索引0,则作为直接矢量,输出“median”,如果索引信息是索引1,则作为直接矢量,输出“temporal”。For example, when the block size of the partition is "8", if the index information is index 0, "median" is output as a direct vector, and if the index information is index 1, "temporal" is output as a direct vector.

如以上说明,根据该实施方式6,构成为根据作为编码块的分区的块尺寸,决定可选择的1个以上的运动矢量,所以在与周围的块的相关低的分区中,能够将适合于预测图像的生成的运动矢量以外的运动矢量从候补去除,所以起到能够减轻处理量的效果。As described above, according to this embodiment 6, one or more selectable motion vectors are determined based on the block size of the partition serving as the coding block. Therefore, in a partition having low correlation with surrounding blocks, motion vectors other than motion vectors suitable for generating a predicted image can be removed from the candidates, thereby achieving the effect of reducing the amount of processing.

另外,根据该实施方式6,构成为在决定可选择的1个以上的运动矢量时,分区的块尺寸越小,可选择的运动矢量的候补数越减少,所以能够将适合于预测图像的生成的运动矢量以外的运动矢量从候补去除,所以起到能够减轻处理量的效果。In addition, according to the sixth embodiment, when determining one or more selectable motion vectors, the smaller the block size of the partition, the smaller the number of selectable motion vector candidates, so that motion vectors other than motion vectors suitable for generating a predicted image can be removed from the candidates, thereby having the effect of reducing the amount of processing.

另外,在该实施方式6中,示出了作为编码块的分区的块尺寸最大是“64”的例子,但最大的块尺寸既可以是64以上,也可以小于64。In addition, in this embodiment 6, an example is shown in which the maximum block size of the partitions as the coding blocks is "64", but the maximum block size may be larger than 64 or smaller than 64.

图42示出最大的块尺寸是“128”的列表的一个例子。FIG. 42 shows an example of a list in which the maximum block size is "128".

在图42的例子中,由编码控制部1以及运动补偿预测部54保持的列表的最大的块尺寸是“128”,但在实际的分区的块尺寸的最大值例如是“32”的情况下,参照上述列表中的“32”以下的部分即可。In the example of Figure 42, the maximum block size in the list maintained by the encoding control unit 1 and the motion compensation prediction unit 54 is "128", but when the maximum value of the block size of the actual partition is, for example, "32", it is sufficient to refer to the part below "32" in the above list.

另外,在该实施方式6中,示出了根据作为编码块的分区的块尺寸,决定可选择的1个以上的运动矢量的例子,但也可以根据编码块的分割图案,决定可选择的1个以上的运动矢量,能够得到同样的效果。In addition, in this embodiment 6, an example is shown in which one or more selectable motion vectors are determined based on the block size of the partition serving as the coding block, but the same effect can also be achieved by determining one or more selectable motion vectors based on the partition pattern of the coding block.

图43是针对编码块的每个分割图案,示出可选择的1个以上的运动矢量的列表的说明图。FIG. 43 is an explanatory diagram showing a list of one or more selectable motion vectors for each division pattern of a coding block.

例如,在作为编码块的分区是2partH1的情况下,作为可选择的1个以上的运动矢量,决定了“MV_A”、“MV_B”、“MV_C”、“temporal”,但在作为编码块的分区是2partH2的情况下,其运动与作为左边的块的2partH1不同的可能性高。For example, when the partition serving as the coding block is 2partH1, "MV_A", "MV_B", "MV_C", and "temporal" are determined as one or more selectable motion vectors, but when the partition serving as the coding block is 2partH2, there is a high possibility that its motion is different from 2partH1, which is the block on the left.

因此,从2partH2可选择的1个以上的运动矢量中,删除作为左边的块的运动矢量的“MV_A”,决定“MV_B”、“MV_C”、“temporal”。Therefore, from one or more motion vectors selectable by 2partH2, "MV_A" which is the motion vector of the left block is deleted, and "MV_B", "MV_C", and "temporal" are determined.

另外,在该实施方式6中,使用了时间方向的矢量,但其为了削减使用的存储器量,也可以压缩存储器中保存的数据尺寸。例如,在最小块尺寸是4×4的情况下,通常以4×4单位保持时间方向的矢量,但考虑将其以更大的块尺寸保持。In addition, in this sixth embodiment, time-direction vectors are used. However, to reduce the amount of memory used, the size of the data stored in the memory can also be compressed. For example, when the minimum block size is 4×4, time-direction vectors are usually stored in 4×4 units, but it is conceivable to store them in larger block sizes.

在如上所述将时间方向的矢量压缩保持时,在以比所保持的单位小的块尺寸进行处理的情况下,存在所参照的位置不表示正确的位置这样的问题。因此,也可以进行不使用比所保持的单位小的块的情况的时间方向矢量这样的处理。通过将精度低的矢量从候补去掉,具有处理量的削减和索引代码量的削减这样的效果。When compressing and storing time-direction vectors as described above, processing with a block size smaller than the stored unit can lead to the problem that the referenced position may not represent the correct position. Therefore, processing can be performed without using time-direction vectors in blocks smaller than the stored unit. By removing low-precision vectors from the candidate list, both the amount of processing and the amount of index code can be reduced.

另外,在该实施方式6中,叙述了直接模式矢量,但其也可以针对通常的运动矢量编码中使用的预测矢量的决定,使用同样的方式。通过使用该方式,在处理量减轻和编码效率改善这两面中有效果。In addition, while direct mode vectors are described in Embodiment 6, the same method can also be used to determine prediction vectors used in normal motion vector encoding. This method is effective in both reducing the amount of processing and improving encoding efficiency.

另外,在该实施方式6中,针对直接矢量的生成或者预测矢量的决定中使用的多个矢量候补,直接矢量或者希望预测的矢量的ref_Idx和候补矢量的ref_Idx不同(参照目的地的图片不同)的情况下,也可以构成为如图14所示,针对候补矢量根据时间方向的距离进行缩放处理。在ref_Idx相同的情况下,不进行与时间方向的距离对应的缩放处理。Furthermore, in this sixth embodiment, when the ref_Idx of a direct vector or a vector to be predicted differs from the ref_Idx of the candidate vectors used in generating a direct vector or determining a predicted vector (the reference destination pictures differ), scaling processing may be performed on the candidate vectors based on the distance in the time direction, as shown in FIG14. If the ref_Idx values are the same, scaling processing based on the distance in the time direction is not performed.

其中,scaled_MV表示缩放后的矢量、MV表示缩放前的运动矢量、d(x)表示直到x为止的时间上的距离。Here, scaled_MV represents the vector after scaling, MV represents the motion vector before scaling, and d(x) represents the temporal distance up to x.

另外,Xr表示编码对象的块表示的参照图像、Yr表示成为缩放的对象的块位置A-D表示的参照图像。In addition, Xr represents the reference image represented by the block to be encoded, and Yr represents the reference image represented by the block position A-D to be scaled.

另外,空间矢量候补也可以构成为如图49所示,从成为对象的块搜索被帧间编码了的块,将该块内包含的所有矢量用作候补。如上所述,虽然可存在直接矢量或者希望预测的矢量应指向的目的地的参照图片、和这些候补矢量指向的参照图片相同的情况和不同的情况,但也可以构成为仅将指向同一参照图片的候补矢量用作候补,也可以构成为通过缩放处理以指向同一参照图片的方式进行校正。在前者的情况下,具有不会增加处理量而将精度低的矢量从候补去掉的效果。在后者的情况下,与搜索的量相应地处理量增加,但能够增加选择候补,所以具有代码量削减效果。Alternatively, as shown in Figure 49, spatial vector candidates can be constructed by searching inter-coded blocks from the target block and using all vectors contained in those blocks as candidates. As mentioned above, while the reference picture to which the direct vector or desired prediction vector should point may or may not be the same as the reference picture to which the candidate vectors point, a configuration can also be employed to use only candidate vectors pointing to the same reference picture, or to correct the vectors by scaling them to point to the same reference picture. The former eliminates low-precision vectors from the candidate list without increasing the processing load. The latter, while processing load increases according to the amount of searching, increases the number of candidates to choose from, thus reducing the amount of code.

另外,在进行式(16)那样的缩放的情况下,也可以在发现了被帧间编码了的块的时刻,对作为与直接矢量或者希望预测的矢量的ref_Idx不同的ref_Idx的候补矢量进行缩放(在相同的ref_Idx的情况下不进行缩放),也可以在全部搜索之后,仅在没有作为相同的ref_Idx的候补矢量的情况下,进行缩放。虽然处理量增加,但能够将提高了精度的矢量加到候补,所以具有代码量削减效果。Furthermore, when performing scaling as in equation (16), when an inter-coded block is discovered, scaling may be performed on a candidate vector having a different ref_Idx from that of the direct vector or the desired prediction vector (scaling may not be performed if the ref_Idx is the same). Alternatively, scaling may be performed only when no candidate vector having the same ref_Idx exists after a complete search. Although this increases the amount of processing, vectors with improved accuracy can be added to the candidate vectors, thereby reducing the amount of code.

实施方式7.Implementation method 7.

在上述实施方式6中,示出了运动图像编码装置的编码控制部1以及运动图像解码装置的运动补偿预测部54预先保持表示可选择的运动矢量的列表的例子,但也可以是运动图像编码装置的可变长编码部13对表示该列表的列表信息进行可变长编码,将该列表信息的编码数据例如多路复用于切片头,而传送到运动图像解码装置侧。In the above-mentioned embodiment 6, an example is shown in which the encoding control unit 1 of the motion image encoding device and the motion compensation prediction unit 54 of the motion image decoding device pre-maintain a list representing selectable motion vectors, but the variable length encoding unit 13 of the motion image encoding device may also perform variable length encoding on the list information representing the list, multiplex the encoded data of the list information, for example, into a slice header, and transmit it to the motion image decoding device side.

在该情况下,运动图像解码装置的可变长解码部51从多路复用于切片头的编码数据,可变长解码出列表信息,将该列表信息表示的列表输出到运动补偿预测部54的直接矢量生成部65。In this case, the variable length decoding unit 51 of the moving picture decoding device variable length decodes the list information from the encoded data multiplexed in the slice header, and outputs the list represented by the list information to the direct vector generation unit 65 of the motion compensation prediction unit 54.

这样,虽然也可以将表示列表的列表信息以切片为单位(或者、也可以是序列、图片等为单位)传送到运动图像解码装置侧,但也可以仅在由编码控制部1保持的列表被变更的情况下,将表示变更后的列表的列表信息传送到运动图像解码装置侧。In this way, although the list information representing the list can also be transmitted to the motion image decoding device side in units of slices (or, in units of sequences, pictures, etc.), the list information representing the changed list can also be transmitted to the motion image decoding device side only when the list maintained by the encoding control unit 1 is changed.

以下,具体说明处理内容。The following describes the details of the processing.

图44是示出运动图像编码装置中的列表信息的发送处理的流程图,图45是示出运动图像解码装置中的列表信息的接收处理的流程图。FIG44 is a flowchart showing a process of transmitting list information in the moving picture encoding device, and FIG45 is a flowchart showing a process of receiving list information in the moving picture decoding device.

运动图像编码装置的编码控制部1与上述实施方式6同样地,根据作为编码块的分区的块尺寸,决定可选择的1个以上的运动矢量,而确认在决定运动矢量时所参照的列表是否被变更,如果列表与上次相同(图44的步骤ST41),则为了将列表与上次相同的意思通知到运动图像解码装置侧,将变更标志设定为“OFF”(步骤ST42)。The encoding control unit 1 of the motion image encoding device determines one or more selectable motion vectors based on the block size of the partition serving as the encoding block, similarly to the sixth embodiment, and confirms whether the list referenced when determining the motion vector has been changed. If the list is the same as the last time (step ST41 of FIG. 44 ), the change flag is set to “OFF” (step ST42) to inform the motion image decoding device that the list is the same as the last time.

如果编码控制部1将变更标志设定为“OFF”,则可变长编码部13对“OFF”的变更标志进行编码,将该编码数据传送到运动图像解码装置侧(步骤ST43)。When the encoding control unit 1 sets the change flag to "OFF", the variable-length encoding unit 13 encodes the "OFF" change flag and transmits the encoded data to the moving picture decoding apparatus (step ST43).

编码控制部1在列表与上次不同的情况下(步骤ST41),为了将列表与上次不同的意思通知到运动图像解码装置侧,将变更标志设定为“ON”(步骤ST44)。If the list is different from the previous one (step ST41 ), the encoding control unit 1 sets a change flag to “ON” (step ST44 ) to notify the video decoding apparatus that the list is different from the previous one.

如果编码控制部1将变更标志设定为“ON”,则可变长编码部13对“ON”的变更标志和表示变更后的列表的列表信息进行编码,将该编码数据传送到运动图像解码装置侧(步骤ST45)。When the encoding control unit 1 sets the change flag to "ON", the variable length encoding unit 13 encodes the "ON" change flag and list information indicating the changed list, and transmits the encoded data to the moving picture decoding apparatus (step ST45).

图46示出由于将列表内的“temporal”从可选择变更为不可选择,对“ON”的变更标志和表示变更后的列表的列表信息进行编码的例子。FIG46 shows an example of encoding a change flag “ON” and list information indicating the changed list due to changing “temporal” in the list from selectable to non-selectable.

运动图像解码装置的可变长解码部51从编码数据解码出变更标志(图45的步骤ST51),如果该变更标志是“OFF”(步骤ST52),则将“OFF”的变更标志输出到运动补偿预测部54。The variable length decoding unit 51 of the motion image decoding device decodes the change flag from the encoded data (step ST51 of Figure 45), and if the change flag is "OFF" (step ST52), the change flag of "OFF" is output to the motion compensation prediction unit 54.

运动补偿预测部54如果从可变长解码部51接收到“OFF”的变更标志,则识别为列表与上次相同,将当前保持的列表设定为参照对象(步骤ST53)。Upon receiving the “OFF” change flag from the variable length decoding unit 51 , the motion compensation prediction unit 54 recognizes that the list is the same as the previous one, and sets the currently held list as a reference (step ST53 ).

因此,运动补偿预测部54参照当前保持的列表,决定与进行本次解码的分区的块尺寸对应的1个以上的运动矢量。Therefore, the motion-compensated prediction unit 54 refers to the currently held list and determines one or more motion vectors corresponding to the block size of the partition to be decoded this time.

如果变更标志是“ON”(步骤ST52),则运动图像解码装置的可变长解码部51从编码数据解码出列表信息,将“ON”的变更标志和列表信息输出到运动补偿预测部54(步骤ST54)。If the change flag is “ON” (step ST52 ), the variable length decoding unit 51 of the moving picture decoding apparatus decodes the list information from the coded data, and outputs the “ON” change flag and the list information to the motion compensation prediction unit 54 (step ST54 ).

运动补偿预测部54如果从可变长解码部51接收到“ON”的变更标志和列表信息,则识别为列表与上次不同,依照该列表信息变更当前保持的列表,将变更后的列表设定为参照对象(步骤ST55)。When the motion compensation prediction unit 54 receives the "ON" change flag and list information from the variable length decoding unit 51, it recognizes that the list is different from the previous one, changes the currently held list according to the list information, and sets the changed list as the reference object (step ST55).

因此,运动补偿预测部54参照变更后的列表,决定与进行本次解码的分区的块尺寸对应的1个以上的运动矢量。Therefore, the motion-compensated prediction unit 54 refers to the changed list and determines one or more motion vectors corresponding to the block size of the partition to be decoded this time.

图47示出由于变更标志是“ON”,所以变更了当前保持的列表的例子。FIG. 47 shows an example in which the currently held list is changed because the change flag is “ON”.

如以上说明,根据该实施方式7,构成为仅限于表示可选择的1个以上的运动矢量的列表被变更了的情况下,对表示变更后的列表的列表信息进行编码来生成编码数据,所以起到不会导致代码量的大幅增加而能够安装接受列表的变更的功能的效果。As described above, according to this embodiment 7, the structure is such that only when the list representing one or more selectable motion vectors is changed, the list information representing the changed list is encoded to generate encoded data, so that the function of accepting changes in the list can be installed without causing a significant increase in the amount of code.

在该实施方式7中,示出了即使在列表表示的可选择的运动矢量的一部分被变更了的情况下,也对表示变更后的列表的整体的列表信息进行编码的例子,但也可以如图48所示,针对每个块尺寸准备变更标志,将可选择的运动矢量被变更的块尺寸的变更标志设为“ON”,仅对与该块尺寸有关的列表信息进行编码。In this seventh embodiment, an example is shown in which the list information representing the entire list after the change is encoded even when a part of the selectable motion vector represented by the list is changed. However, as shown in FIG. 48 , a change flag may be prepared for each block size, the change flag of the block size in which the selectable motion vector is changed may be set to “ON”, and only the list information related to the block size may be encoded.

在图48的例子中,块尺寸为“64”和“8”中的运动矢量未被变更,所以变更标志是“OFF”,与该块尺寸有关的列表信息不被编码。In the example of FIG. 48 , the motion vectors in the block sizes of “64” and “8” are not changed, so the change flag is “OFF” and the list information related to the block size is not encoded.

另一方面,块尺寸是“32”和“16”中的运动矢量被变更,所以变更标志是“ON”,与该块尺寸有关的列表信息被编码。On the other hand, since the motion vectors are changed when the block sizes are "32" and "16", the change flag is "ON" and list information related to the block sizes is encoded.

另外,也可以仅限于某一个块尺寸的变更标志是“ON”的情况,对块尺寸单位的变更标志进行编码,而在所有块尺寸的变更标志都是“OFF”的情况下,仅对列表单位的变更标志(“OFF”的变更标志)进行编码。Alternatively, the block size unit change flag may be encoded only when the change flag for a certain block size is "ON," and when the change flags for all block sizes are "OFF," only the list unit change flag ("OFF" change flag) may be encoded.

另外,也可以不使用列表单位的变更标志,而仅对块尺寸单位的变更标志进行编码。Alternatively, instead of using a list-based change flag, only a block-size-based change flag may be encoded.

此处,示出了针对每个块尺寸,能够变更可选择的运动矢量的例子,但也可以针对编码块的每个分割图案,能够变更可选择的运动矢量。Here, an example is shown in which the selectable motion vector can be changed for each block size, but the selectable motion vector may also be changed for each division pattern of the coding block.

【产业上的可利用性】Industrial Applicability

本发明的运动图像编码装置、运动图像解码装置、运动图像编码方法以及运动图像解码方法能够按照规定的块单位选择最佳的直接模式,来削减代码量,所以适用于图像压缩编码技术、压缩图像数据传送技术等中使用的运动图像编码装置、运动图像解码装置、运动图像编码方法以及运动图像解码方法。The motion image encoding device, motion image decoding device, motion image encoding method and motion image decoding method of the present invention can select the optimal direct mode according to the specified block unit to reduce the amount of code, so they are suitable for motion image encoding devices, motion image decoding devices, motion image encoding methods and motion image decoding methods used in image compression encoding technology, compressed image data transmission technology, etc.

Claims (5)

1.一种运动图像解码装置,其特征在于,具备:1. A motion image decoding device, characterized in that it comprises: 可变长解码单元,对多路复用到比特流的编码数据进行可变长解码处理而得到压缩数据、编码模式、用于选择运动补偿预测处理中使用的运动矢量候补的索引信息以及用于变更根据该索引信息选择的运动矢量候补的数量的控制信息;The variable-length decoding unit performs variable-length decoding processing on the encoded data multiplexed to the bitstream to obtain compressed data, encoding mode, index information for selecting motion vector candidates used in motion compensation prediction processing, and control information for changing the number of motion vector candidates selected based on the index information. 运动补偿预测单元,从可选择的1个以上的运动矢量候补中选择与作为预测处理的单位的分区有关的所述索引信息表示的运动矢量,使用所选择的所述运动矢量,实施针对所述分区的运动补偿预测处理来生成预测图像;以及A motion compensation prediction unit selects a motion vector from one or more selectable motion vector candidates, representing a motion vector with index information related to a partition as the unit of prediction processing; and uses the selected motion vector to perform motion compensation prediction processing for the partition to generate a prediction image; and 解码图像生成单元,将从所述压缩数据解码出的差分图像和所述预测图像相加而生成解码图像,The decoding image generation unit adds the difference image decoded from the compressed data and the predicted image to generate a decoded image. 所述运动补偿预测单元根据所述控制信息准备运动矢量候补,其中,该运动矢量候补包括空间运动矢量或时间运动矢量,该空间运动矢量是从位于所述分区的周围的多个已解码分区的运动矢量中选择的,该时间运动矢量是从所述分区能够参照的已解码图片的运动矢量得到的,The motion compensation prediction unit prepares motion vector candidates based on the control information. These candidates include spatial motion vectors or temporal motion vectors. The spatial motion vectors are selected from motion vectors of multiple decoded partitions surrounding the partition, while the temporal motion vectors are obtained from motion vectors of decoded images that the partition can reference. 所述运动矢量候补的数量是能够以切片为单位变更的。The number of motion vector candidates can be changed in units of slices. 2.一种运动图像解码方法,其特征在于,具备:2. A method for decoding moving images, characterized by comprising: 对多路复用到比特流的编码数据进行可变长解码处理而得到压缩数据、编码模式、用于选择运动补偿预测处理中使用的运动矢量候补的索引信息以及用于变更根据该索引信息选择的运动矢量候补的数量的控制信息的步骤;The steps include performing variable-length decoding on encoded data multiplexed to a bitstream to obtain compressed data, encoding mode, index information for selecting motion vector candidates used in motion compensation prediction processing, and control information for changing the number of motion vector candidates selected based on the index information. 从可选择的1个以上的运动矢量候补中选择与作为预测处理的单位的分区有关的所述索引信息表示的运动矢量,使用所选择的所述运动矢量,实施针对所述分区的运动补偿预测处理来生成预测图像的步骤;以及The steps include: selecting a motion vector represented by the index information related to a partition as the unit of prediction processing from one or more selectable motion vector candidates; and using the selected motion vector to perform motion compensation prediction processing for the partition to generate a prediction image; and 将从所述压缩数据解码出的差分图像和所述预测图像相加而生成解码图像的步骤,The step of generating a decoded image by adding the differential image decoded from the compressed data and the predicted image. 所述运动矢量候补根据所述控制信息,包含空间运动矢量或时间运动矢量,其中,该空间运动矢量是从位于所述分区的周围的多个已解码分区的运动矢量中选择的,该时间运动矢量是从所述分区能够参照的已解码图片的运动矢量得到的,The motion vector candidates, based on the control information, include spatial motion vectors or temporal motion vectors. The spatial motion vector is selected from the motion vectors of multiple decoded partitions surrounding the partition, and the temporal motion vector is obtained from the motion vectors of decoded images that the partition can reference. 所述运动矢量候补的数量是能够以切片为单位变更的。The number of motion vector candidates can be changed in units of slices. 3.一种运动图像编码装置,其特征在于,具备:3. A motion picture encoding device, characterized in that it comprises: 运动补偿预测单元,从空间运动矢量和时间运动矢量准备运动矢量候补,使用从所述运动矢量候补中选择的运动矢量,针对分区实施运动补偿预测处理来生成预测图像,其中,该空间运动矢量是从位于所述分区的周围的多个已编码分区的运动矢量中得到的,该时间运动矢量是从所述分区能够参照的已编码图片的运动矢量得到的;以及A motion compensation prediction unit prepares motion vector candidates from spatial and temporal motion vectors, and uses the motion vectors selected from the motion vector candidates to perform motion compensation prediction processing on a partition to generate a predicted image. The spatial motion vectors are obtained from the motion vectors of multiple encoded partitions surrounding the partition, and the temporal motion vectors are obtained from the motion vectors of encoded images that the partition can reference. 可变长编码单元,生成表示所选择的运动矢量候补的索引信息,Variable-length coding units generate index information representing the selected motion vector candidates. 所述运动矢量候补的数量是能够针对每个切片变更的,所述可变长编码单元生成用于变更所述运动矢量候补的数量的控制信息。The number of motion vector candidates can be changed for each slice, and the variable-length encoding unit generates control information for changing the number of motion vector candidates. 4.一种运动图像编码方法,其特征在于,具备:4. A motion picture coding method, characterized in that it comprises: 从空间运动矢量和时间运动矢量准备运动矢量候补的步骤,其中,该空间运动矢量是从位于分区的周围的多个已编码分区的运动矢量中得到的,该时间运动矢量是从所述分区能够参照的已编码图片的运动矢量得到的;The step of preparing motion vector candidates from spatial motion vectors and temporal motion vectors, wherein the spatial motion vectors are obtained from the motion vectors of multiple encoded partitions located around the partition, and the temporal motion vectors are obtained from the motion vectors of encoded images that the partition can reference; 使用从所述运动矢量候补中选择的运动矢量,针对分区实施运动补偿预测处理来生成预测图像的步骤;以及The steps of generating a predicted image by performing motion compensation prediction processing on a partition using motion vectors selected from the motion vector candidates; and 生成表示所选择的运动矢量候补的索引信息的步骤,The step of generating index information representing the selected motion vector candidates. 所述运动矢量候补的数量是能够针对每个切片变更的,在所述运动矢量候补的数量变更的情况下,生成用于变更所述运动矢量候补的数量的控制信息。The number of motion vector candidates can be changed for each slice. When the number of motion vector candidates changes, control information is generated to change the number of motion vector candidates. 5.一种记录介质,存储计算机可读取的程序,并记录了包含编码数据的比特流,该编码数据确定:在从最大尺寸的编码块层次性地分割时的层次数被确定并且直到达到所述层次数的上限为止层次性地分割的编码块的编码模式,5. A recording medium storing a computer-readable program and recording a bit stream containing encoded data, the encoded data determining: an encoding pattern for the encoded blocks being hierarchically segmented from the largest coded block, with the number of levels determined and the segmentation occurring up to an upper limit of said number of levels. 所述编码数据具有:压缩数据,是根据对分区实施运动补偿预测处理而生成的预测图像和原图像的差分而生成的;索引信息,该索引信息与所述运动补偿预测处理中使用的运动矢量有关;以及控制信息,用于变更根据所述索引信息选择的运动矢量候补的数量,The encoded data includes: compressed data, generated based on the difference between the predicted image and the original image produced by motion compensation prediction processing on the partition; index information related to the motion vectors used in the motion compensation prediction processing; and control information for changing the number of motion vector candidates selected according to the index information. 在所述程序被处理装置执行时能够实现如下步骤:When the program is executed by the processing device, the following steps can be achieved: 对所述编码数据进行可变长解码处理而得到所述压缩数据、所述编码模式、所述索引信息以及所述控制信息,The encoded data is subjected to variable-length decoding to obtain the compressed data, the encoding mode, the index information, and the control information. 从所述运动矢量候补中选择与作为预测处理的单位的分区有关的所述索引信息表示的运动矢量,使用所选择的所述运动矢量,实施针对所述分区的运动补偿预测处理来生成预测图像,Motion vectors representing the index information associated with the partition being the unit of prediction processing are selected from the motion vector candidates. Using the selected motion vectors, motion compensation prediction processing is performed for the partition to generate a prediction image. 将从所述压缩数据解码出的差分图像和所述预测图像相加而生成解码图像,The decoded image is generated by adding the differential image decoded from the compressed data and the predicted image. 根据所述控制信息准备包括空间运动矢量或时间运动矢量的运动矢量候补的列表,该空间运动矢量是从位于所述分区的周围的多个已解码分区的运动矢量中选择的,该时间运动矢量是从所述分区能够参照的已解码图片的运动矢量得到的,Based on the control information, a list of motion vector candidates, including spatial motion vectors or temporal motion vectors, is prepared. The spatial motion vectors are selected from the motion vectors of multiple decoded partitions surrounding the partition, and the temporal motion vectors are obtained from the motion vectors of decoded images that the partition can reference. 所述索引信息在所述运动矢量为从运动矢量候补选择的矢量时表示所选择的矢量候补,其中,该运动矢量候补包含空间运动矢量以及时间运动矢量中的至少一个,该空间运动矢量是从位于所述分区的周围的多个已编码分区的运动矢量中得到的,该时间运动矢量是从所述分区能够参照的已编码图片的运动矢量得到的,The index information indicates the selected vector candidate when the motion vector is selected from the motion vector candidates. The motion vector candidate includes at least one of a spatial motion vector and a temporal motion vector. The spatial motion vector is obtained from the motion vectors of multiple encoded partitions surrounding the partition, and the temporal motion vector is obtained from the motion vectors of encoded images that the partition can reference. 所述运动矢量候补的数量是能够以切片为单位变更的。The number of motion vector candidates can be changed in units of slices.
HK17109684.3A 2010-09-30 2013-11-29 Dynamic image encoding device and method, dynamic image decoding device and method HK1235953B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2010-221460 2010-09-30
JP2011-050214 2011-03-08

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
HK13113371.7A Addition HK1186031B (en) 2010-09-30 2011-07-21 Dynamic image encoding device, dynamic image decoding device, dynamic image encoding method, and dynamic image decoding method

Related Child Applications (1)

Application Number Title Priority Date Filing Date
HK13113371.7A Division HK1186031B (en) 2010-09-30 2011-07-21 Dynamic image encoding device, dynamic image decoding device, dynamic image encoding method, and dynamic image decoding method

Publications (3)

Publication Number Publication Date
HK1235953A HK1235953A (en) 2018-03-16
HK1235953A1 HK1235953A1 (en) 2018-03-16
HK1235953B true HK1235953B (en) 2020-06-19

Family

ID=

Similar Documents

Publication Publication Date Title
JP6768110B2 (en) Video decoding device and video coding device
JP6632456B2 (en) Image encoded data
JP2012186762A (en) Video encoding device, video decoding device, video encoding method, and video decoding method
HK1235953B (en) Dynamic image encoding device and method, dynamic image decoding device and method
HK1232046B (en) Dynamic image encoding device and method, dynamic image decoding device and method
HK1232045B (en) Dynamic image encoding device and method, dynamic image decoding device and method
HK1236065B (en) Dynamic image encoding device and method, dynamic image decoding device and method
JP2013009164A (en) Moving image coding device, moving image decoding device, moving image coding method, and moving image decoding method
HK1235953A (en) Dynamic image encoding device and method, dynamic image decoding device and method
HK1235953A1 (en) Dynamic image encoding device and method, dynamic image decoding device and method
HK1232046A1 (en) Dynamic image encoding device and method, dynamic image decoding device and method
HK1232046A (en) Dynamic image encoding device and method, dynamic image decoding device and method
JP2012080210A (en) Moving image encoder, moving image decoder, moving image encoding method, and moving image decoding method
HK1232045A1 (en) Dynamic image encoding device and method, dynamic image decoding device and method
HK1232045A (en) Dynamic image encoding device and method, dynamic image decoding device and method
HK1186031A (en) Dynamic image encoding device, dynamic image decoding device, dynamic image encoding method, and dynamic image decoding method
HK1236065A (en) Dynamic image encoding device and method, dynamic image decoding device and method
HK1236065A1 (en) Dynamic image encoding device and method, dynamic image decoding device and method
HK1186031B (en) Dynamic image encoding device, dynamic image decoding device, dynamic image encoding method, and dynamic image decoding method