Prediction image generation device, moving image decoding device, and moving image encoding device

By using the technical means of the filtering unit and the motion vector deriving unit in the encoding and decoding of motion images, the problem of increasing the storage amount of filter coefficients and not improving the encoding efficiency due to the improvement of motion compensation accuracy is solved, and more efficient motion image encoding and decoding is achieved.

CN116074532BActive Publication Date: 2025-08-01GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210849184.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2016-02-01
Filing Date
2017-01-26
Publication Date
2025-08-01
Estimated Expiration
2037-01-26

AI Technical Summary

Technical Problem

In the motion image encoding and decoding techniques in recent years, the improvement of the accuracy of motion compensation leads to an increase in the filter coefficient, an increase in the storage amount, and the increase in the amount of time-difference vector codes using high-precision motion vectors, so the encoding efficiency may not be improved.

Method used

By performing motion compensation on the reference image to generate a predicted image, a filter unit is used to apply a motion vector with 1/Mac pixel accuracy, and a filtering process specified by the filter coefficient position is used. Combined with the motion vector derivation unit to switch the motion vector accuracy based on the size of the prediction block and the quantization parameters, an appropriate motion vector is derived.

Benefits of technology

The problem of increasing the storage amount of filter coefficients and not improving the encoding efficiency is solved, and more efficient motion image encoding and decoding is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116074532B_ABST
    Figure CN116074532B_ABST
Patent Text Reader

Abstract

The present invention relates to a predicted image generation device, a moving image decoding device, and a moving image encoding device, which improve the encoding efficiency. A motion compensation filtering unit (30912) that acts on an image after applying a motion vector obtained by applying a motion vector to a reference image causes a filtering coefficient mcFilter[i][k] specified by a phase (i) and a filtering coefficient position (k) to act, and the filtering coefficient mcFilter[i][k] includes a filtering coefficient calculated using filtering coefficients mcFilter[p][k] (p≠i) and filtering coefficients mcFilter[q][k] (q≠i).
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the PCT national phase application with an application date of January 26, 2017 and a national application number of 201780008957.2. Technical Field

[0002] The present invention relates to a predictive image generation device, a moving image decoding device, and a moving image encoding device. Background Art

[0003] In order to efficiently transmit or record moving images, a moving image encoding device that generates encoded data by encoding a moving image and a moving image decoding device that generates a decoded image by decoding the encoded data are used.

[0004] As specific moving image encoding methods, for example, methods proposed in H.264 / MPEG-4.AVC, HEVC (High-Efficiency Video Coding), etc. can be cited.

[0005] In such a moving image encoding method, images (pictures) constituting a moving image are managed by a hierarchical structure formed by slices obtained by dividing an image, coding units (sometimes also referred to as coding units) obtained by dividing a slice, and prediction units (PUs) and transform units (TUs) that are blocks obtained by dividing a coding unit, and thus encoding and decoding are performed on a block-by-block basis.

[0006] Furthermore, in such a moving image encoding method, generally, a predictive image is generated based on a locally decoded image obtained by encoding / decoding an input image, and encoding is performed on a prediction residual (sometimes also referred to as a "differential image" or "residual image") obtained by subtracting the predictive image from the input image (original image). As methods for generating a predictive image, inter-picture prediction (inter-frame prediction) and intra-picture prediction (intra-frame prediction) can be cited.

[0007] Furthermore, as a technique for moving image encoding and decoding in recent years, Non-Patent Document 1 can be cited.

[0008] Prior Art Documents

[0009] Non-Patent Documents

[0010] Non-Patent Document 1: Video / JVET, "Algorithm Description of Joint Exploration Test Model 1 (JEM 1)", INTERNATIONAL ORGANIZATION FOR STANDARDIZATION ORGANISATION INTERNATIONALE DE NORMALISATION ISO / IEC JTC1 / SC29 / WG11 CODING OF MOVING PICTURES AND AUDIO, ISO / IEC JTC1 / SC29 / WG11 / N15790, October 2015, Geneva, CH. SUMMARY OF THE INVENTION

[0011] PROBLEM TO BE SOLVED BY THE INVENTION

[0012] In recent years' moving image encoding and decoding technologies, a technique of using motion compensation filtering in motion compensation processing when generating a prediction image has been implemented. On the other hand, a first problem has arisen that as the accuracy of motion compensation is improved, the required filter coefficients increase, and the storage amount required to pre-store the filter coefficients increases.

[0013] In addition, in recent years' moving image encoding and decoding technologies, a technique of using a high-precision motion vector to generate a prediction image has been implemented. On the other hand, in order to use a high-precision motion vector, the code amount of the differential vector increases, and thus a second problem has arisen that the encoding efficiency is not necessarily improved.

[0014] The present invention provides an image decoding device, an image encoding device, and a prediction image generation device that can solve at least one of the above first and second problems.

[0015] SOLUTION TO THE PROBLEM

[0016] To solve the above problems, a prediction image generation device according to an aspect of the present invention generates a prediction image by performing motion compensation on a reference image. The prediction image generation device includes: a filtering unit that acts on an image after applying a motion vector with a 1 / Mac pixel accuracy obtained by applying a motion vector to the reference image. The filtering unit causes a filtering process using a filtering coefficient mcFilter[i][k] specified by a phase i (i is an integer from 0 to Mac-1) and a filtering coefficient position k (k is an integer from 0 to Ntaps-1, and Ntaps is the number of taps) to act on the image after applying the motion vector. The filtering coefficient mcFilter[i][k] is in a relationship of a weighted average of a filtering coefficient mcFilter[p][k] (P≠i) and a filtering coefficient mcFilter[q][k] (Q≠i).

[0017] In addition, to solve the above problems, a prediction image generation device according to an aspect of the present invention generates a prediction image by performing motion compensation on a reference image for each prediction block. The prediction image generation device includes: a motion vector derivation unit that derives a motion vector by adding or subtracting a differential vector to / from a prediction vector for each prediction block. The motion vector derivation unit switches the accuracy of the motion vector derived for the prediction block according to the size of the prediction block.

[0018] In addition, to solve the above problems, a prediction image generation device according to an aspect of the present invention generates a prediction image by performing motion compensation on a reference image for each prediction block. The prediction image generation device includes: a motion vector derivation unit that derives a motion vector by adding or subtracting a differential vector to / from a prediction vector for each prediction block. The motion vector derivation unit switches the accuracy of the motion vector derived for the prediction block according to the magnitude of a quantization parameter related to the prediction block.

[0019] In addition, to solve the above problems, a prediction image generation device according to an aspect of the present invention generates a prediction image by performing motion compensation on a reference image. The prediction image generation device includes: a motion vector derivation unit that derives a motion vector by adding or subtracting an inverse-quantized differential vector to / from a prediction vector. The motion vector derivation unit switches the accuracy of the inverse quantization process for the differential vector according to the quantization value of the quantized differential vector.

[0020] In addition, in order to solve the above problems, a prediction image generation device according to an aspect of the present invention generates a prediction image by performing motion compensation on a reference image. The prediction image generation device includes: a motion vector derivation unit that derives a motion vector by adding or subtracting a differential vector to / from a prediction vector. When a flag indicating the accuracy of the motion vector indicates a first value, the motion vector derivation unit switches the accuracy of the inverse quantization process for the differential vector according to the quantization value of the quantized differential vector. When the flag indicating the accuracy of the motion vector indicates a second value, the inverse quantization process for the differential vector is performed with a fixed accuracy regardless of the quantization value of the quantized differential vector.

[0021] In addition, in order to solve the above problems, a prediction image generation device according to an aspect of the present invention generates a prediction image by performing motion compensation on a reference image. The prediction image generation device includes: a motion vector derivation unit that derives a motion vector by adding or subtracting a differential vector to / from a prediction vector. When a flag indicating the accuracy of the motion vector indicates a first value, the motion vector derivation unit switches whether to set the accuracy of the inverse quantization process for the differential vector to a first accuracy or a second accuracy according to the quantization value of the quantized differential vector. When the flag indicating the accuracy of the motion vector indicates a second value, the motion vector derivation unit switches whether to set the accuracy of the inverse quantization process for the differential vector to a third accuracy or a fourth accuracy according to the quantization value of the quantized differential vector. At least one of the first accuracy and the second accuracy is higher than the third accuracy and the fourth accuracy.

[0022] Advantageous Effects

[0023] According to the above configuration, at least one of the above first and second problems can be solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 FIG. is a diagram showing a hierarchical structure of data of an encoded stream according to the present embodiment.

[0025] Figure 2 FIG. is a diagram showing a pattern of a PU partition mode. Figure 2 (a) to (h) respectively show partition shapes in cases where the PU partition mode is 2N×2N, 2N×N, 2N×nU, 2N×nD, N×2N, nL×2N, nR×2N, and N×N.

[0026] Figure 3 FIG. is a conceptual diagram showing an example of a reference picture list.

[0027] Figure 4 FIG. is a conceptual diagram showing an example of a reference picture.

[0028] Figure 5It is a schematic diagram showing the configuration of the image decoding apparatus according to the present embodiment.

[0029] Figure 6 It is a schematic diagram showing the configuration of the inter-frame prediction parameter decoding unit according to the present embodiment.

[0030] Figure 7 It is a schematic diagram showing the configuration of the merge prediction parameter derivation unit according to the present embodiment.

[0031] Figure 8 It is a schematic diagram showing the configuration of the AMVP prediction parameter derivation unit according to the present embodiment.

[0032] Figure 9 It is a conceptual diagram showing an example of a vector candidate.

[0033] Figure 10 It is a schematic diagram showing the configuration of the inter-frame prediction parameter decoding control unit according to the present embodiment. [[ID=2)]

[0034] Figure 11 It is a schematic diagram showing the configuration of the inter-frame prediction image generation unit according to the present embodiment.

[0035] Figure 12 It is a block diagram showing the configuration of the image encoding apparatus according to the present embodiment.

[0036] Figure 13 It is a schematic diagram showing the configuration of the inter-frame prediction parameter encoding unit according to the present embodiment.

[0037] Figure 14 It is a schematic diagram showing the configuration of the image transmission system according to the embodiment of the present invention.

[0038] Figure 15 It is a flowchart showing the process of the inter-frame prediction syntax decoding process performed by the inter-frame prediction parameter decoding control unit according to the present embodiment.

[0039] Figure 16 It is a flowchart showing an example of the differential vector decoding process according to the present embodiment.

[0040] Figure 17 It is a flowchart showing another example of the differential vector decoding process according to the present embodiment.

[0041] Figure 18 It is a flowchart showing the process of the motion vector derivation process performed by the inter-frame prediction parameter decoding unit according to the present embodiment.

[0042] Figure 19 It is a flowchart showing an example of the differential vector derivation process according to the present embodiment.

[0043] Figure 20It is a flowchart showing an example of predictive vector loop processing according to this embodiment.

[0044] Figure 21 It is a flowchart specifically showing an example of motion vector scale derivation processing according to this embodiment.

[0045] Figure 22 It is a flowchart more specifically showing another example of motion vector scale derivation processing according to this embodiment.

[0046] Figure 23 It is a flowchart more specifically showing another example of motion vector scale derivation processing according to this embodiment.

[0047] Figure 24 (a) to Figure 24 (c) is a table showing the relationship between the basic vector accuracy according to this embodiment and the parameter (shiftS) indicating the motion vector accuracy set (switched) according to the block size of the target block.

[0048] Figure 25 (a) to Figure 25 (c) is a table showing the relationship with the parameter (shiftS) indicating the motion vector accuracy set (switched) according to the block size of the target block and the motion vector accuracy flag according to this embodiment.

[0049] Figure 26 (a) to Figure 26 (c) is a table showing the parameter (shiftS) indicating the motion vector accuracy set (switched) according to the QP according to this embodiment.

[0050] Figure 27 (a) and Figure 27 (b) is a table showing the motion vector accuracy (shiftS) set (switched) according to the QP and the motion vector accuracy flag according to this embodiment.

[0051] Figure 28 It is a graph showing the relationship between the quantized differential vector and the inverse quantized differential vector according to this embodiment.

[0052] Figure 29 It is a flowchart more specifically showing another example of motion vector scale derivation processing according to this embodiment.

[0053] Figure 30 It is a block diagram showing the specific configuration of the motion compensation unit according to this embodiment.

[0054] Figure 31 It is a diagram showing an example of the filter coefficient according to this embodiment.

[0055] Figure 32(a) is a diagram showing an example in which the motion compensation filter unit according to the present embodiment calculates the filter coefficients of odd phases from the filter coefficients of even phases. Figure 32 (b) is a diagram showing an example in which the motion compensation filter unit according to the present embodiment calculates the filter coefficients of even phases from the filter coefficients of odd phases.

[0056] Figure 33 is a diagram showing the configurations of a transmission device equipped with the above-described image encoding device and a reception device equipped with the above-described image decoding device. Figure 33 (a) shows a transmission device equipped with an image encoding device, Figure 33 (b) shows a reception device equipped with an image decoding device.

[0057] Figure 34 is a diagram showing the configurations of a recording device equipped with the above-described image encoding device and a reproduction device equipped with the above-described image decoding device. Figure 34 (a) shows a recording device equipped with an image encoding device, Figure 34 (b) shows a reproduction device equipped with an image decoding device. Detailed Embodiments

[0058] (First Embodiment)

[0059] Hereinafter, embodiments of the present invention will be described with reference to the drawings.

[0060] Figure 14 is a schematic diagram showing the configuration of an image transmission system 1 according to the present embodiment.

[0061] The image transmission system 1 is a system that transmits a code obtained by encoding an encoding target image and displays an image obtained by decoding the transmitted code. The image transmission system 1 includes an image encoding device (moving image encoding device) 11, a network 21, an image decoding device (moving image decoding device) 31, and an image display device 41.

[0062] A signal T indicating a single-layer or multi-layer image is input to the image encoding device 11. A layer is a concept for distinguishing multiple pictures when there are one or more pictures constituting a certain time. For example, when encoding the same picture in multiple layers with different image qualities and resolutions, it becomes scalable coding, and when encoding pictures with different viewpoints in multiple layers, it becomes view scalable coding. When performing prediction (inter-layer prediction, inter-viewpoint prediction) between pictures in multiple layers, the encoding efficiency is greatly improved. In addition, even in the case of non-prediction (simulcast), the encoded data can be aggregated.

[0063] The network 21 transmits the encoded stream Te generated by the image encoding device 11 to the image decoding device 31. The network 21 is the Internet, a wide area network (WAN), a local area network (LAN), or a combination thereof. The network 21 is not necessarily limited to a two-way communication network, and may also be a one-way or two-way communication network that transmits broadcast waves such as terrestrial digital broadcasts and satellite broadcasts. In addition, the network 21 may be replaced by a storage medium such as a DVD (Digital Versatile Disc) or a BD (Blue-ray Disc, registered trademark) on which the encoded stream Te is recorded.

[0064] The image decoding device 31 decodes the encoded stream Te transmitted by the network 21 respectively, and generates one or more decoded layer images Td (decoded viewpoint images Td) after decoding respectively.

[0065] The image display device 41 displays all or part of the one or more decoded layer images Td generated by the image decoding device 31. For example, in view-point scalable coding, when displaying all, a three-dimensional image (stereoscopic image) or a free viewpoint image is displayed, and when displaying a part, a two-dimensional image is displayed. The image display device 41 includes, for example, a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display. In addition, in spatial scalable coding or signal-to-noise ratio (SNR) scalable coding, when the image decoding device 31 and the image display device 41 have high processing capabilities, an enhanced layer image with high image quality is displayed. In addition, when the image decoding device 31 and the image display device 41 only have low processing capabilities, a base layer image that does not require high processing capabilities and display capabilities of the enhanced layer is displayed.

[0066] <Structure of the encoded stream Te>

[0067] Before explaining the image encoding device 11 and the image decoding device 31 of the present embodiment in detail, the data structure of the encoded stream Te generated by the image encoding device 11 and decoded by the image decoding device 31 is explained.

[0068] Figure 1 It is a diagram showing the hierarchical structure of the data in the encoded stream Te. The encoded stream Te exemplarily includes a sequence and a plurality of pictures constituting the sequence. Figure 1 (a)~ Figure 1(f) is a diagram showing the sequence layer of a given sequence SEQ, the picture layer of a specified picture PICT, the slice layer of a specified slice S, the slice data layer of specified slice data, the coding tree layer of a coding tree unit included in the slice data, and the coding unit layer of a coding unit (CU: Coding Unit) included in the coding tree.

[0069] (Sequence layer)

[0070] In the sequence layer, a set of data for the image decoding device 31 to decode a sequence SEQ (hereinafter also referred to as the object sequence) to be processed is specified. As shown in Figure 1 (a), the sequence SEQ includes a Video Parameter Set, a Sequence Parameter Set SPS (Sequence Parameter Set), a Picture Parameter Set PPS (Picture Parameter Set), a picture PICT, and Supplemental Enhancement Information SEI (Supplemental Enhancement Information). Here, the value shown after # represents the layer ID. In Figure 1 an example of coded data with #0 and #1, i.e., layer 0 and layer 1, is shown, but the type and number of layers do not depend on this.

[0071] The Video Parameter Set VPS specifies a set of coding parameters common to multiple moving images in a moving image composed of multiple layers, and a set of coding parameters for the multiple layers included in the moving image and related to each layer.

[0072] In the Sequence Parameter Set SPS, a set of coding parameters for the image decoding device 31 to decode the object sequence is specified. For example, the width and height of the picture are specified. It should be noted that there may be multiple SPSs. In this case, any one of the multiple SPSs is selected from the PPS.

[0073] In the Picture Parameter Set PPS, a set of coding parameters for the image decoding device 31 to decode each picture in the object sequence is specified. For example, it includes a reference value (pic_init_qp_minus26) for the quantization width for picture decoding and a flag (weighted_pred_flag) indicating the application of weighted prediction. It should be noted that there may be multiple PPSs. In this case, any one of the multiple PPSs is selected from each picture in the object sequence.

[0074] (Picture layer)

[0075] In the picture layer, a set of data for decoding a picture PICT (hereinafter, also referred to as an object picture) to be processed is defined for reference by the image decoding device 31. As shown in Figure 1 (b), the picture PICT includes slices S0 to SNS-1 (NS is the total number of slices included in the picture PICT).

[0076] It should be noted that hereinafter, when it is not necessary to distinguish between the slices S0 to SNS-1 respectively, the suffix of the code may sometimes be omitted in the description. In addition, the same applies to other data included in the coding stream Te and marked with a suffix described below.

[0077] (Slice layer)

[0078] In the slice layer, a set of data for decoding a slice S (also referred to as an object slice) to be processed is defined for reference by the image decoding device 31. As shown in Figure 1 (c), the slice S includes a slice header (SH) and slice data SDATA.

[0079] The slice header SH includes a set of coding parameters for the image decoding device 31 to determine the decoding method of the object slice. The slice type designation information (slice_type) that designates the slice type is an example of the coding parameters included in the slice header SH.

[0080] As the slice types that can be designated by the slice type designation information, the following can be listed: (1) I slice that uses only intra prediction during encoding, (2) P slice that uses unidirectional prediction or intra prediction during encoding, and (3) B slice that uses unidirectional prediction, bidirectional prediction, or intra prediction during encoding, etc.

[0081] It should be noted that the slice header SH may also contain a reference (pic_parameter_set_id) to the picture parameter set PPS included in the above sequence layer.

[0082] (Slice data layer)

[0083] In the slice data layer, a set of data for decoding the slice data SDATA to be processed is defined for reference by the image decoding device 31. As shown in Figure 1 (d), the slice data SDATA includes coded tree blocks (CTB: Coded TreeBlock). CTB is a block of a fixed size (e.g., 64×64) that constitutes a slice, and is sometimes also referred to as the largest coding unit (LCU: Largest Cording Unit) or coded tree unit (CTU: Coded Tree Unit).

[0084] (Coding tree layer)

[0085] The coding tree layer is as Figure 1 shown in (e), and defines a set of data used by the image decoding device 31 for decoding the coding tree block of the processing object. The coding tree block is divided by recursive quadtree partitioning. The nodes of the tree structure obtained by recursive quadtree partitioning are called coding trees. The intermediate nodes of the quadtree are coded quad trees (CQT: Coded Quad Tree), and the coding tree block itself is also defined as the top-level CQT. The CQT includes a split flag (split_flag). When split_flag is 1, it is divided into 4 coding tree units CQT. When split_flag is 0, the coding tree unit CQT is not divided, but has one coding unit (CU: Coded Unit) as a node. The coding unit CU is the end node of the coding tree layer and is not further divided in this layer. The coding unit CU becomes the basic unit of the coding process.

[0086] In addition, when the size of the coding tree block CTB is 64×64 pixels, the size of the coding unit can be any one of 64×64 pixels, 32×32 pixels, 16×16 pixels, and 8×8 pixels.

[0087] (Coding unit layer)

[0088] The coding unit layer is as Figure 1 shown in (f), and defines a set of data used by the image decoding device 31 for decoding the coding unit of the processing object. Specifically, the coding unit consists of a coding tree, a prediction tree, a transform tree, and a CU header CUF. In the coding tree, a split flag, a split pattern, a prediction mode, etc. are defined.

[0089] In the prediction tree, the prediction information (reference picture index, motion vector, etc.) of each prediction block obtained by dividing the coding unit into one or more is defined. In other words, the prediction block is one or more non-overlapping regions that make up the coding unit. In addition, the prediction tree includes one or more prediction blocks obtained by the above division. It should be noted that the prediction unit obtained by further dividing the prediction block below is called a "sub-block". The sub-block (prediction block) consists of one or more pixels. When the size of the prediction block is equal to the size of the sub-block, the sub-block in the prediction block is one. When the size of the prediction block is larger than the size of the sub-block, the prediction block is divided into sub-blocks. For example, when the prediction block is 8×8 and the sub-block is 4×4, the prediction block is horizontally divided into two parts and vertically divided into two parts, thus divided into four sub-blocks.

[0090] The prediction process is performed for each prediction block (sub-block). Hereinafter, the prediction block, which is a unit of prediction, is also referred to as a prediction unit (PU: prediction unit).

[0091] Generally speaking, the types of splits in the prediction tree are mainly two cases: intra-frame prediction and inter-frame prediction. Intra-frame prediction is prediction within the same picture, and inter-frame prediction refers to the prediction process performed between different pictures (for example, between display times, between layer images).

[0092] In the case of intra-frame prediction, the splitting methods are 2N×2N (the same size as the coding unit) and N×N.

[0093] In addition, in the case of inter-frame prediction, the splitting method is encoded according to the PU splitting mode (part_mode) of the encoded data. The splits include 2N×2N (the same size as the coding unit), 2N×N, 2N×nU, 2N×nD, N×2N, nL×2N, nR×2N, and N×N, etc. It should be noted that 2N×nU means that the 2N×2N coding unit is successively split into two regions of 2N×0.5N and 2N×1.5N from top to bottom. 2N×nD means that the 2N×2N coding unit is successively split into two regions of 2N×1.5N and 2N×0.5N from top to bottom. nL×2N means that the 2N×2N coding unit is successively split into two regions of 0.5N×2N and 1.5N×2N from left to right. nR×2N means that the 2N×2N coding unit is successively split into two regions of 1.5N×2N and 0.5N×1.5N from left to right. The number of splits is any one of one, two, and four, so the PUs included in the CU are one to four. These PUs are successively denoted as PU0, PU1, PU2, and PU3.

[0094] Figure 2 (a)~ Figure 2 (h) specifically show the positions of the boundaries of the PU splits in the CU for each split type.

[0095] It should be noted that Figure 2 (a) represents the 2N×2N PU splitting mode without splitting the CU.

[0096] In addition, Figure 2 (b), Figure 2 (c), and Figure 2 (d) respectively represent the shapes of the partitions in the cases where the PU splitting modes are 2N×N, 2N×nU, and 2N×nD, respectively. Hereinafter, the partitions in the cases where the PU splitting modes are 2N×N, 2N×nU, and 2N×nD are collectively referred to as horizontally long partitions.

[0097] In addition, Figure 2(e), Figure 2 (f), and Figure 2 (g) represent the shapes of the partitions in the cases where the PU partitioning pattern is N×2N, nL×2N, and nR×2N, respectively. Hereinafter, the partitions in the cases where the PU partitioning type is N×2N, nL×2N, and nR×2N are collectively referred to as vertically long partitions.

[0098] In addition, the horizontally long partitions and the vertically long partitions are collectively referred to as rectangular partitions.

[0099] In addition, Figure 2 (h) represents the shape of the partition in the case where the PU partitioning pattern is N×N. Based on the shape of its partition, Figure 2 (a) and Figure 2 (h) of the PU partitioning pattern are also called square partitioning. In addition, Figure 2 (b) to Figure 2 (g) of the PU partitioning pattern are also called non-square partitioning.

[0100] In addition, in Figure 2 (a) to Figure 2 (h), the numbers assigned to the respective regions represent the identification numbers of the regions, and the regions are processed in order according to the order of the identification numbers. That is, the identification number represents the scanning order of the partition.

[0101] In addition, in Figure 2 (a) to Figure 2 (h), the upper left is set as the reference point (origin) of the CU.

[0102] In addition, in the transform tree, the coding unit is divided into one or more transform blocks, and the positions and sizes of the respective transform blocks are specified. In other words, the transform block is one or more non-overlapping regions that make up the coding unit. In addition, the transform tree includes one or more transform blocks obtained by the above-mentioned division.

[0103] In the division of the transform tree, there are a division that allocates a region having the same size as the coding unit as the transform block, and a division that is performed by recursive quadtree division in the same manner as the division of the above-mentioned tree block.

[0104] The transform processing is performed on the transform block. Hereinafter, the transform block as the unit of the transform is also called a transform unit (TU).

[0105] (Prediction parameter)

[0106] The predicted image of the prediction unit is derived by the prediction parameters attached to the prediction unit. Among the prediction parameters, there are prediction parameters for intra prediction or prediction parameters for inter prediction. Hereinafter, the prediction parameters for inter prediction (inter prediction parameters) will be described. The inter prediction parameters are composed of a prediction list using flags predFlagL0, predFlagL1, reference picture indices refIdxL0, refIdxL1, and vectors mvL0, mvL1. The prediction list using flags predFlagL0, predFlagL1 are flags indicating whether to use each of the reference picture lists called the L0 list and the L1 list. When the value is 1, the corresponding reference picture list is used. It should be noted that when it is described as "a flag indicating whether it is XX" in this specification, 1 is set to the case of being XX, 0 is set to the case of not being XX, and 1 is treated as true and 0 is treated as false in logical negation, logical multiplication, etc. (the same applies hereinafter). However, in actual devices and methods, other values can also be used as true values and false values. When using two reference picture lists, that is, the case where predFlagL0 = 1 and predFlagL1 = 1 corresponds to dual prediction. In addition, when using one reference picture list, that is, the case where (predFlagL0, predFlagL1) = (1, 0) or (predFlagL0, predFlagL1) = (0, 1) corresponds to single prediction. It should be noted that the information of the prediction list using flag can also be represented by the inter prediction flag inter_pred_idc described later. Usually, the prediction list using flag is used in the prediction image generation unit (prediction image generation device) 308 and the prediction parameter memory 307 described later. In addition, when decoding the information on whether to use which reference picture list from the encoded data, the inter prediction flag inter_pred_idc is used.

[0107] Among the syntax elements for deriving the inter prediction parameters included in the encoded data, for example, there are partition mode part_mode, merge flag merge_flag, merge index merge_idx, inter prediction flag inter_pred_idc, reference picture index refIdxLX, predicted vector index mvp_LX_idx, and differential vector mvdLX.

[0108] (An example of a reference picture list)

[0109] Next, an example of the reference picture list will be described. The reference picture list is a column formed by the reference pictures stored in the reference picture memory 306 ( Figure 5 ). Figure 3It is a conceptual diagram showing an example of a reference picture list. In the reference picture list 601, five rectangles arranged in a column from left to right respectively represent reference pictures. The codes P1, P2, Q0, P3, P4 shown in sequence from the left end to the right are the codes representing the respective reference pictures. The P in P1 etc. represents the viewpoint P, and then the Q in Q0 represents a viewpoint Q different from the viewpoint P. The suffixes of P and Q represent the picture order number POC. The downward arrow directly below refIdxLX indicates that the reference picture index refIdxLX is the index that has referred to the reference picture Q0 in the reference picture memory 306.

[0110] (Example of reference picture)

[0111] Next, an example of the reference picture used when deriving a vector will be described. Figure 4 It is a conceptual diagram showing an example of a reference picture. In Figure 4 it, the horizontal axis represents the display time, and the vertical axis represents the viewpoint. Figure 4 The two vertical rows and three horizontal columns (a total of six) of rectangles shown respectively represent pictures. Among the six rectangles, the rectangle in the second column from the left in the lower row represents the picture to be decoded (object picture), and the remaining five rectangles respectively represent reference pictures. The reference picture Q0 indicated by the upward arrow starting from the object picture is a picture with the same display time as the object picture but a different viewpoint. In the displacement prediction based on the object picture, the reference picture Q0 is used. The reference picture P1 indicated by the leftward arrow starting from the object picture is a past picture with the same viewpoint as the object picture. The reference picture P2 indicated by the rightward arrow starting from the object picture is a future picture with the same viewpoint as the object picture. In the motion prediction based on the object picture, the reference picture P1 or P2 is used. (Inter-frame prediction flag and prediction list utilization flag)

[0112] The relationship between the inter-frame prediction flag and the prediction list utilization flags predFlagL0 and predFlagL1 is as described below and can be transformed into each other. Therefore, as inter-frame prediction parameters, either the prediction list utilization flag or the inter-frame prediction flag can be used. In addition, hereinafter, the determination using the prediction list utilization flag can be replaced with the inter-frame prediction flag. Conversely, the determination using the inter-frame prediction flag can also be replaced with the prediction list utilization flag.

[0113] Inter-frame prediction flag = (predFlagL1 << 1) + predFlagL0

[0114] predFlagL0 = inter-frame prediction flag & 1

[0115] predFlagL1 = inter-frame prediction flag >> 1

[0116] Here, >> represents a right shift, and << represents a left shift.

[0117] (Combined Prediction and AMVP Prediction)

[0118] In the decoding (encoding) method of prediction parameters, there are a merge prediction mode and an AMVP (Adaptive Motion Vector Prediction) mode. The merge flag merge_flag is a flag used to identify these. Whether it is the merge prediction mode or the AMVP mode, the prediction parameters of the processed blocks are used to derive the prediction parameters of the target PU. The merge prediction mode is a mode that directly uses the prediction parameters of the nearby PUs that have been derived without including the prediction list utilization flag predFlagLX (or the inter-frame prediction flag inter_pred_idc), the reference picture index refIdxLX, and the motion vector mvLX in the encoded data. In addition, the AMVP mode is a mode that includes the inter-frame prediction flag inter_pred_idc, the reference picture index refIdxLX, and the motion vector mvLX in the encoded data. It should be noted that the motion vector mvLX is encoded as a prediction vector index mvp_LX_idx that identifies the prediction vector mvpLX and a differential vector mvdLX.

[0119] The inter-frame prediction flag inter_pred_idc is data indicating the type and number of reference pictures, and takes any value among Pred_L0, Pred_L1, and Pred_Bi. Pred_L0 and Pred_L1 indicate using the reference pictures stored in the reference picture lists called the L0 list and the L1 list respectively, and both indicate using one reference picture (single prediction). The predictions using the L0 list and the L1 list are called L0 prediction and L1 prediction respectively. Pred_Bi indicates using two reference pictures (dual prediction), and indicates using the two reference pictures stored in the L0 list and the L1 list. The prediction vector index mvp_LX_idx is an index indicating the prediction vector, and the reference picture index refIdxLX is an index indicating the reference picture stored in the reference picture list. It should be noted that LX is a description method used without distinguishing between L0 prediction and L1 prediction. By replacing LX with L0 and L1, the parameters for the L0 list and the parameters for the L1 list are distinguished. For example, refIdxL0 is the reference picture index for L0 prediction, refIdxL1 is the reference picture index for L1 prediction, and refIdx (refIdxLX) is a label used without distinguishing between refIdxL0 and refIdxL1.

[0120] The merge index merge_idx is an index indicating whether to use any of the prediction parameter candidates (merge candidates) derived from the processed completed blocks as the prediction parameter for the decoding target block.

[0121] It should be noted that the "target block" can be a prediction block at a level higher than multiple prediction blocks, or a coding unit including the above multiple prediction blocks.

[0122] (Motion Vector and Displacement Vector)

[0123] In the motion vector mvLX, it can be divided into a narrow sense motion vector (narrow sense motion vector) representing the offset between blocks on two pictures at different times, and a displacement vector (disparity vector: parallax vector) representing the offset between two blocks at the same time. In the following description, the motion vector and the displacement vector are not distinguished, and are simply referred to as the motion vector mvLX. The prediction vector and the differential vector related to the motion vector mvLX are respectively referred to as the prediction vector mvpLX and the differential vector mvdLX. Whether the motion vector mvLX and the differential vector mvdLX are motion vectors or displacement vectors is identified using the reference picture index refIdxLX attached to the vector.

[0124] (Configuration of Image Decoding Device)

[0125] Next, the configuration of the image decoding device 31 of the present embodiment will be described. Figure 5 It is a schematic diagram showing the configuration of the image decoding device 31 of the present embodiment. The image decoding device 31 includes an entropy decoding unit 301, a prediction parameter decoding unit (predicted image generation device) 302, a reference picture memory (reference image storage unit, frame memory) 306, a prediction parameter memory (prediction parameter storage unit, frame memory) 307, a predicted image generation unit 308, an inverse quantization / inverse DCT unit 311, and an addition unit 312, and a residual storage unit 313 (residual recording unit).

[0126] In addition, the prediction parameter decoding unit 302 includes an inter prediction parameter decoding unit (motion vector derivation unit) 303 and an intra prediction parameter decoding unit 304. The predicted image generation unit 308 includes an inter predicted image generation unit 309 and an intra predicted image generation unit 310.

[0127] The entropy decoding unit 301 performs entropy decoding on the encoded stream Te input from the outside, and separates and decodes each code (syntax element). Among the separated codes, there is prediction information for generating a predicted image and residual information for generating a differential image, etc.

[0128] The entropy decoding unit 301 outputs a part of the separated code to the prediction parameter decoding unit 302. A part of the separated code is, for example, the prediction mode PredMode, the partition mode part_mode, the merge flag merge_flag, the merge index merge_idx, the inter-prediction flag inter_pred_idc, the reference picture index refIdxLX, the prediction vector index mvp_LX_idx, and the differential vector mvdLX. The control of whether to decode which code is performed based on the instruction of the prediction parameter decoding unit 302. The entropy decoding unit 301 outputs the quantization coefficients to the inverse quantization / inverse DCT unit 311. The quantization coefficients are the coefficients obtained by performing DCT (Discrete Cosine Transform) on the residual signal and quantizing it in the encoding process.

[0129] The inter-prediction parameter decoding unit 303 decodes the inter-prediction parameters based on the code input from the entropy decoding unit 301, with reference to the prediction parameters stored in the prediction parameter memory 307.

[0130] The inter-prediction parameter decoding unit 303 outputs the decoded inter-prediction parameters to the predicted image generation unit 308 and, in addition, stores them in the prediction parameter memory 307. The details of the inter-prediction parameter decoding unit 303 will be described below.

[0131] The intra-prediction parameter decoding unit 304 decodes the intra-prediction parameters based on the code input from the entropy decoding unit 301, with reference to the prediction parameters stored in the prediction parameter memory 307. The intra-prediction parameters are the parameters used in the process of predicting a picture block within a single picture, such as the intra-prediction mode IntraPredMode. The intra-prediction parameter decoding unit 304 outputs the decoded intra-prediction parameters to the predicted image generation unit 308 and, in addition, stores them in the prediction parameter memory 307.

[0132] The intra prediction parameter decoding unit 304 may also derive intra prediction modes that are different for luminance and color difference. In this case, the intra prediction parameter decoding unit 304 decodes the luminance prediction mode IntraPredModeY as a prediction parameter for luminance, and decodes the color difference prediction mode IntraPredModeC as a prediction parameter for color difference. The luminance prediction mode IntraPredModeY has 35 modes, corresponding to planar prediction (0), DC prediction (1), and directional prediction (2 to 34). The color difference prediction mode IntraPredModeC uses any one of planar prediction (0), DC prediction (1), directional prediction (2 to 34), and LM mode (35). The intra prediction parameter decoding unit 304 decodes a flag indicating whether IntraPredModeC is the same mode as the luminance mode. If the flag indicates that it is the same mode as the luminance mode, IntraPredModeY is assigned to IntraPredModeC. In addition, if the flag indicates that it is a mode different from the luminance mode, the intra prediction parameter decoding unit 304 may also decode planar prediction (0), DC prediction (1), directional prediction (2 to 34), and LM mode (35) as IntraPredModeC.

[0133] The reference picture memory 306 stores the blocks of the reference pictures (reference picture blocks) generated by the adder 312 at predetermined positions for each picture and block to be decoded.

[0134] The prediction parameter memory 307 stores the prediction parameters at predetermined positions for each picture and block to be decoded. Specifically, the prediction parameter memory 307 stores the inter prediction parameters decoded by the inter prediction parameter decoding unit 303, the intra prediction parameters decoded by the intra prediction parameter decoding unit 304, and the prediction mode predMode separated by the entropy decoding unit 301. Among the stored inter prediction parameters, for example, there are prediction list utilization flags predFlagLX (inter prediction flag inter_pred_idc), reference picture indices refIdxLX, and motion vectors mvLX.

[0135] The predicted image generation unit 308 receives the prediction mode predMode input from the entropy decoding unit 301, and also receives prediction parameters from the prediction parameter decoding unit 302. In addition, the predicted image generation unit 308 reads out the reference pictures from the reference picture memory 306. The predicted image generation unit 308 generates a predicted picture block P (predicted image) using the input prediction parameters and the read-out reference pictures in the prediction mode indicated by the prediction mode predMode.

[0136] Here, when the prediction mode predMode indicates an inter prediction mode, the inter prediction image generation unit 309 generates a predicted picture block P by inter prediction using the inter prediction parameters input from the inter prediction parameter decoding unit 303 and the read reference pictures. The predicted picture block P corresponds to a prediction unit PU. A PU corresponds to a part of a picture formed by a plurality of pixels that are units and perform prediction processing as described above, that is, a decoding target block that performs one prediction processing.

[0137] The inter prediction image generation unit 309 uses the reference picture list (L0 list or L1 list) with the flag predFlagLX being 1 for the prediction list, and reads, from the reference picture memory 306, a reference picture block located at the position indicated by the motion vector mvLX with respect to the decoding target block according to the reference picture indicated by the reference picture index refIdxLX. The inter prediction image generation unit 309 performs prediction on the read reference picture block to generate a predicted picture block P. The inter prediction image generation unit 309 outputs the generated predicted picture block P to the addition unit 312.

[0138] When the prediction mode predMode indicates an intra prediction mode, the intra prediction image generation unit 310 performs intra prediction using the intra prediction parameters input from the intra prediction parameter decoding unit 304 and the read reference pictures. Specifically, the intra prediction image generation unit 310 reads, from the reference picture memory 306, a reference picture block that is the picture to be decoded and is within a predetermined range from the decoding target block among the already decoded blocks. The predetermined range is, for example, any one of the adjacent blocks to the left, upper left, upper, and upper right when the decoding target block moves in the so-called raster scan order, and varies according to the intra prediction mode. The raster scan order is the order of moving from the left end to the right end for each row from the upper end to the lower end in each picture.

[0139] The intra prediction image generation unit 310 performs prediction on the read reference picture block in the prediction mode indicated by the intra prediction mode IntraPredMode to generate a predicted picture block. The intra prediction image generation unit 310 outputs the generated predicted picture block P to the addition unit 312.

[0140] In the intra prediction parameter decoding unit 304, when deriving intra prediction modes that are different in luminance and color difference, the intra prediction image generation unit 310 generates a predicted picture block for luminance by any one of planar prediction (0), DC prediction (1), and directional prediction (2 to 34) according to the luminance prediction mode IntraPredModeY. In addition, the intra prediction image generation unit 310 generates a predicted picture block for color difference by any one of planar prediction (0), DC prediction (1), directional prediction (2 to 344), and LM mode (35) according to the color difference prediction mode IntraPredModeC.

[0141] The inverse quantization / inverse DCT unit 311 inverse quantizes the quantized coefficients input from the entropy decoding unit 301 to obtain DCT coefficients. The inverse quantization / inverse DCT unit 311 performs an inverse DCT (Inverse Discrete Cosine Transform) on the obtained DCT coefficients to calculate a decoded residual signal. The inverse quantization / inverse DCT unit 311 outputs the calculated decoded residual signal to the addition unit 312 and the residual storage unit 313.

[0142] The addition unit 312 adds the signal values of the predicted picture block P input from the inter prediction image generation unit 309 and the intra prediction image generation unit 310 and the decoded residual signal input from the inverse quantization / inverse DCT unit 311 on a pixel-by-pixel basis to generate a reference picture block. The addition unit 312 stores the generated reference picture block in the reference picture memory 306, and outputs the decoded layer image Td obtained by integrating the reference picture blocks generated for each picture to the outside.

[0143] (Configuration of the Inter Prediction Parameter Decoding Unit)

[0144] Next, the configuration of the inter prediction parameter decoding unit 303 will be described.

[0145] Figure 6 is a schematic diagram showing the configuration of the inter prediction parameter decoding unit 303 of the present embodiment. The inter prediction parameter decoding unit 303 includes an inter prediction parameter decoding control unit (motion vector derivation unit) 3031, an AMVP prediction parameter derivation unit 3032, an addition unit 3035, and a merge prediction parameter derivation unit 3036.

[0146] The inter-frame prediction parameter decoding control unit 3031 instructs the entropy decoding unit 301 to decode codes (syntax elements) associated with inter-frame prediction, and extracts the codes (syntax elements) included in the encoded data, such as the partition mode part_mode, merge flag merge_flag, merge index merge_idx, inter-frame prediction flag inter_pred_idc, reference picture index refIdxLX, prediction vector index mvp_LX_idx, and differential vector mvdLX.

[0147] [[ID=,3]]The inter-frame prediction parameter decoding control unit 3031 first extracts the merge flag. When the inter-frame prediction parameter decoding control unit 3031 indicates the extraction of a certain syntax element, it means instructing the entropy decoding unit 301 to decode the certain syntax element and reading out the corresponding syntax element from the encoded data. Here, when the value indicated by the merge flag is 1, that is, when the merge prediction mode is indicated, the inter-frame prediction parameter decoding control unit 3031 extracts the merge index merge_idx as the prediction parameter for merge prediction. The inter-frame prediction parameter decoding control unit 3031 outputs the extracted merge index merge_idx to the merge prediction parameter derivation unit 3036.

[0148] When the merge flag merge_flag is 0, that is, when the AMVP prediction mode is indicated, the inter-frame prediction parameter decoding control unit 3031 uses the entropy decoding unit 301 to extract the AMVP prediction parameters from the encoded data. As the AMVP prediction parameters, for example, there are the inter-frame prediction flag inter_pred_idc, reference picture index refIdxLX, prediction vector index mvp_LX_idx, and differential vector mvdLX. The inter-frame prediction parameter decoding control unit 3031 outputs the prediction list derived from the extracted inter-frame prediction flag inter_pred_idc to the AMVP prediction parameter derivation unit 3032 and the predicted image generation unit 308( Figure 5 ), and in addition, stores it in the prediction parameter memory 307( Figure 5 ). The inter-frame prediction parameter decoding control unit 3031 outputs the extracted prediction vector index mvp_LX_idx to the AMVP prediction parameter derivation unit 3032. The inter-frame prediction parameter decoding control unit 3031 outputs the extracted differential vector mvdLX to the addition unit 3035.

[0149] Figure 7This is a schematic diagram showing the configuration of the merge prediction parameter derivation unit 3036 of the present embodiment. The merge prediction parameter derivation unit 3036 includes a merge candidate derivation unit 30361 (prediction vector calculation unit) and a merge candidate selection unit 30362. The merge candidate storage unit 303611 stores the merge candidates input from the merge candidate derivation unit 30361. It should be noted that the merge candidates are composed of a prediction list utilization flag predFlagLX, a motion vector mvLX, and a reference picture index refIdxLX. In the merge candidate storage unit 303611, indexes are assigned to the stored merge candidates according to a predetermined rule.

[0150] The merge candidate derivation unit 30361 directly uses the motion vectors and reference picture index refIdxLX of adjacent blocks that have already undergone decoding processing to derive merge candidates. In addition, affine prediction can also be used to derive merge candidates. Hereinafter, this method will be described in detail. The merge candidate derivation unit 30361 can use affine prediction for the spatial merge candidate derivation process, the temporal merge (inter-frame merge) candidate derivation process, the combined merge candidate derivation process, and the zero merge candidate derivation process described below. It should be noted that affine prediction is performed in sub-block units, and the prediction parameters are stored in the prediction parameter memory 307 in sub-block units. Alternatively, affine prediction can also be performed in pixel units.

[0151] (Spatial merge candidate derivation process)

[0152] As the spatial merge candidate derivation process, the merge candidate derivation unit 30361 reads out the prediction parameters (prediction list utilization flag predFlagLX, motion vector mvLX, reference picture index refIdxLX) stored in the prediction parameter memory 307 according to a predetermined rule, and derives the read prediction parameters as merge candidates. The read prediction parameters are the prediction parameters of each block within a predetermined range starting from the block to be decoded (for example, all or part of the blocks adjacent to the lower left end, upper left end, and upper right end of the block to be decoded). The merge candidates derived by the merge candidate derivation unit 30361 are stored in the merge candidate storage unit 303611.

[0153] (Temporal merge candidate derivation process)

[0154] As time merging derivation processing, the merge candidate derivation unit 30361 reads out the prediction parameters of the blocks in the reference image including the coordinates of the lower right of the decoded object block from the prediction parameter memory 307 as merge candidates. For example, the method of specifying the reference image can use the reference picture index refIdxLX specified in the slice header, or can use the smallest reference picture index among the reference picture indexes refIdxLX of the blocks adjacent to the decoded object block. The merge candidates derived by the merge candidate derivation unit 30361 are stored in the merge candidate storage unit 303611.

[0155] (Combined merge candidate derivation processing)

[0156] As combined merge derivation processing, the merge candidate derivation unit 30361 derives combined merge candidates by combining the vectors and reference picture indexes of two different completed-derived merge candidates that have been derived and stored in the merge candidate storage unit 303611 as the vectors of L0 and L1 respectively. The merge candidates derived by the merge candidate derivation unit 30361 are stored in the merge candidate storage unit 303611.

[0157] (Zero merge candidate derivation processing)

[0158] As zero merge candidate derivation processing, the merge candidate derivation unit 30361 derives a merge candidate whose reference picture index refIdxLX is 0 and the X and Y components of the motion vector mvLX are both 0. The merge candidates derived by the merge candidate derivation unit 30361 are stored in the merge candidate storage unit 303611.

[0159] The merge candidate selection unit 30362 selects, as the inter-frame prediction parameter of the target PU, the merge candidate assigned with the index corresponding to the merge index merge_idx input from the inter-frame prediction parameter decoding control unit 3031 among the merge candidates stored in the merge candidate storage unit 303611. The merge candidate selection unit 30362 stores the selected merge candidate in the prediction parameter memory 307 and outputs it to the predicted image generation unit 308( Figure 5 ).

[0160] Figure 8 is a schematic diagram showing the configuration of the AMVP prediction parameter derivation unit 3032 of the present embodiment. The AMVP prediction parameter derivation unit 3032 includes a vector candidate derivation unit 3033 (vector calculation unit) and a vector candidate selection unit 3034. The vector candidate derivation unit 3033 reads out the vectors (motion vectors or displacement vectors) stored in the prediction parameter memory 307 based on the reference picture index refIdx as the prediction vector mvpLX. The read vectors are the vectors of each block within a predetermined range starting from the decoded object block (for example, all or part of the blocks adjacent to the lower left end, upper left end, and upper right end of the decoded object block).

[0161] The vector candidate selection unit 3034 selects, as the prediction vector mvpLX, the vector candidate indicated by the prediction vector index mvp_LX_idx input from the inter-frame prediction parameter decoding control unit 3031 among the vector candidates read out by the vector candidate derivation unit 3033. The vector candidate selection unit 3034 outputs the selected prediction vector mvpLX to the addition unit 3035.

[0162] In addition, the vector candidate selection unit 3034 may also adopt a configuration in which a loop process described later is performed on the selected prediction vector mvpLX.

[0163] The vector candidate storage unit 30331 stores the vector candidates input from the vector candidate derivation unit 3033. It should be noted that the vector candidates include the prediction vector mvpLX. In the vector candidate storage unit 30331, indexes are assigned to the stored vector candidates according to a prescribed rule.

[0164] The vector candidate derivation unit 3033 derives vector candidates using affine prediction. The vector candidate derivation unit 3033 may also use affine prediction for the spatial vector candidate derivation process, the temporal vector (inter-frame vector) candidate derivation process, the combined vector candidate derivation process, and the zero vector candidate derivation process described later. It should be noted that the affine prediction is performed in sub-block units, and the prediction parameters are stored in the prediction parameter memory 307 in sub-blocks. Alternatively, the affine prediction may also be performed in pixel units.

[0165] Figure 9 It is a conceptual diagram showing an example of vector candidates. Figure 9 The shown prediction vector list 602 is a list formed by a plurality of vector candidates derived in the vector candidate derivation unit 3033. In the prediction vector list 602, five rectangles arranged in a row from left to right respectively represent regions indicating prediction vectors. The downward arrow directly below the second mvp_LX_idx from the left end and mvpLX below it indicate that the prediction vector index mvp_LX_idx is an index for referring to the vector mvpLX in the prediction parameter memory 307.

[0166] The vector candidates are generated based on the vectors of the block referred to by the vector candidate selection unit 3034. The block referred to by the vector candidate selection unit 3034 is a block for which the decoding process has been completed, or may also be a block within a predetermined range starting from the block to be decoded (e.g., an adjacent block). It should be noted that the adjacent blocks include not only blocks that are spatially adjacent to the block to be decoded, such as the left block and the upper block, but also blocks that are temporally adjacent to the block to be decoded, such as blocks obtained from blocks at the same position as the block to be decoded but with different display times.

[0167] The adder 3035 adds the prediction vector mvpLX input from the AMVP prediction parameter derivation unit 3032 and the differential vector mvdLX input from the inter-frame prediction parameter decoding control unit 3031, and calculates the motion vector mvLX. The adder 3035 outputs the calculated motion vector mvLX to the predicted image generation unit 308( Figure 5 ).

[0168] Figure 10 FIG. is a schematic diagram showing the configuration of the inter-frame prediction parameter decoding control unit 3031 of the present embodiment. The inter-frame prediction parameter decoding control unit 3031 includes an additional prediction flag decoding unit 30311, a merge index decoding unit 30312, a vector candidate index decoding unit 30313, and a segmentation mode decoding unit, a merge flag decoding unit, an inter-frame prediction flag decoding unit, a reference picture index decoding unit, a vector difference decoding unit, etc. not shown. The segmentation mode decoding unit, the merge flag decoding unit, the merge index decoding unit, the inter-frame prediction flag decoding unit, the reference picture index decoding unit, the vector candidate index decoding unit 30313, and the vector difference decoding unit decode the segmentation mode part_mode, the merge flag merge_flag, the merge index merge_idx, the inter-frame prediction flag inter_pred_idc, the reference picture index refIdxLX, the prediction vector index mvp_LX_idx, and the differential vector mvdLX, respectively. (Inter-frame prediction image generation unit 309)

[0169] Figure 11 FIG. is a schematic diagram showing the configuration of the inter-frame prediction image generation unit 309 of the present embodiment. The inter-frame prediction image generation unit 309 includes a motion compensation unit 3091 and a weight prediction unit 3094.

[0170] (Motion compensation)

[0171] Based on the prediction list input from the inter-frame prediction parameter decoding unit 303, the motion compensation unit 3091 uses the flag predFlagLX, the reference picture index refIdxLX, and the motion vector mvLX to read, from the reference picture memory 306, a block located at a position offset by the motion vector mvLX from the position of the decoding target block of the reference picture specified by the reference picture index refIdxLX, thereby generating a motion-compensated image. Here, when the accuracy of the motion vector mvLX is not integer accuracy, filtering called motion compensation filtering for generating pixels at fractional positions is performed to generate a motion-compensated image. Hereinafter, the motion-compensated image of L0 prediction is called predSamplesL0, and the motion-compensated image of L1 prediction is called predSamplesL1. When not distinguishing between the two, it is called predSamplesLX.

[0172] (Weight Prediction)

[0173] The weight prediction unit 3094 generates a predicted picture block P (predicted image) by multiplying the input motion displacement image predSamplesLX by a weight coefficient. The input motion displacement image predSamplesLX is an image on which residual prediction has been performed in the case of performing residual prediction. In the case where one of the reference list utilization flags (predFlagL0 or predFlagL1) is 1 (single prediction case), without using weight prediction, the following processing of the formula that makes the input motion displacement image predSamplesLX (LX is L0 or L1) consistent with the number of pixel bits is performed.

[0174] predSamples[x][y] = Clip3(0, (1 << bitDepth) - 1, (predSamplesLX[x][y] + offset1) >> shift1)

[0175] Here, shift1 = 14 - bitDepth, offset1 = 1 << (shift1 - 1).

[0176] In addition, in the case where both of the reference list utilization flags (predFlagL0 or predFlagL1) are 1 (double prediction case), without using weight prediction, the following processing of averaging the input motion displacement images predSamplesL0 and predSamplesL1 and making the average value consistent with the number of pixel bits is performed.

[0177] predSamples[x][y] = Clip3(0, (1 << bitDepth) - 1, (predSamplesL0[x][y] + predSamplesL1[x][y] + offset2) >> shift2)

[0178] Here, shift2 = 15 - bitDepth, offset2 = 1 << (shift2 - 1).

[0179] Moreover, in the case of single prediction, in the case of performing weight prediction, the weight prediction unit 3094 derives a weight prediction coefficient w0 and an offset value (offset) o0 from the encoded data, and performs the following processing.

[0180] predSamples[x][y] = Clip3(0, (1 << bitDepth) - 1, ((predSamplesLX[x][y] * w0 + 2log2WD - 1) >> log2WD) + o0)

[0181] Here, log2WD is a variable representing a specified shift amount.

[0182] Moreover, in the case of dual prediction, when performing weight prediction, the weight prediction unit 3094 derives weight prediction coefficients w0, w1, o0, and o1 from the encoded data and performs the following processing.

[0183] predSamples[x][y] = Clip3(0, (1 << bitDepth) - 1, (predSamplesL0[x][y] * w0 + predSamplesL1[x][y] * w1 + ((o0 + o1 + 1) << log2WD)) >> (log2WD + 1))

[0184] <Motion Vector Decoding Process>

[0185] Hereinafter, with reference to Figures 15 to 27 , the motion vector decoding process of the present embodiment will be specifically described.

[0186] It is clear from the above description that the motion vector decoding process of the present embodiment includes a process of decoding syntax elements related to inter prediction (also referred to as motion syntax decoding process) and a process of deriving a motion vector (motion vector derivation process).

[0187] (Motion Syntax Decoding Process)

[0188] Figure 15 is a flowchart showing the flow of the inter prediction syntax decoding process performed by the inter prediction parameter decoding control unit 3031. In the following description of Figure 15 , unless otherwise specified, each process is performed by the inter prediction parameter decoding control unit 3031.

[0189] First, in step S101, the merge flag merge_flag is decoded, and in step S102, it is determined whether merge_flag!= 0?.

[0190] When merge_flag!= 0 is true (Y in S102), in S103, the merge index merge_idx is decoded, and the process proceeds to the motion vector derivation process in the merge mode (S201) Figure 18 (a).

[0191] When merge_flag!= 0 is false (N in S102), in S104, the inter - prediction flag inter_pred_idc is decoded, in S105, the reference picture index refIdxL0 is decoded, in S106, the syntax of the differential vector mvdL0 is decoded, and in S107, the prediction vector index mvp_L0_idx is decoded.

[0192] In S108, the reference picture index refIdxL1 is decoded, in S109, the syntax of the differential vector mvdL1 is decoded, in S110, the prediction vector index mvp_L1_idx is decoded, and then it proceeds to the motion vector derivation process (S301) in the AMVP mode ( Figure 18 (b)).

[0193] It should be noted that when the inter - prediction flag inter_pred_idc is 0, that is, when indicating L0 prediction (PRED_L0), the processes of S108 - S110 are not required. On the other hand, when the inter - prediction flag inter_pred_idc is 1, that is, when indicating L1 prediction (PRED_L1), the processes of S105 - S107 are not required. In addition, when the inter - prediction flag inter_pred_idc is 2, that is, when indicating bi - prediction (PRED_B), each step of S105 - S110 is executed.

[0194] (Differential vector decoding process)

[0195] Figure 16 is a flowchart that more specifically represents the differential vector decoding processes in steps S106 and S109 above. So far, the motion vector and the horizontal and vertical components of the differential vector mvdLX have been marked as mvLX and mvdLX without distinction. Here, in order to clarify the cases where the syntax of the horizontal and vertical components is required and the cases where the processing of the horizontal and vertical components is required, [0] and [1] are used to mark each component.

[0196] As Figure 16 shown, first, in step S10611, the syntax mvdAbsVal[0] representing the absolute value of the horizontal motion vector difference is decoded from the encoded data, and in step S10612, it is judged whether the absolute value of the (horizontal) motion vector difference is 0

[0197] mvdAbsVal[0]!= 0.

[0198] When the absolute value of the horizontal motion vector difference mvdAbsVal[0]!= 0 is true (Y in S10612), in S10614, the syntax mv_sign_flag[0] representing the code (positive or negative) of the horizontal motion vector difference is decoded from the encoded data, and the process proceeds to S10615. On the other hand, when mvdAbsVal[0]!= 0 is false (N in S10612), in S10613, mv_sign_flag[0] is set (inferred) to 0, and the process proceeds to S10615.

[0199] Next, in step S10615, the syntax mvdAbsVal[1] representing the absolute value of the vertical motion vector difference is decoded. In step S10612, it is determined whether the (vertical) motion vector difference absolute value is 0

[0200] mvdAbsVal[1]!= 0.

[0201] When mvdAbsVal[1]!= 0 is true (Y in S10616), in S10618, the syntax mv_sign_flag[1] representing the code (positive or negative) of the vertical motion vector difference is decoded from the encoded data. On the other hand, when mvdAbsVal[1]!= 0? is false (N in S10616), in S10617, the syntax mv_sign_flag[1] representing the code (positive or negative) of the vertical motion vector difference is set to 0.

[0202] In the above, the motion vector difference absolute value mvdAbsVal and the code mvd_sign_flag of the motion vector difference are each represented by a vector formed by {horizontal component, vertical component}, and the horizontal component is selected as [0], and the vertical component is selected as [1]. As another selection method, for example, the vertical component can also be selected as [0] and the horizontal component can be selected as [1]. In addition, after processing the horizontal component, the vertical component is processed, but the processing order is not limited to this. For example, the vertical component can also be processed first and then the horizontal component (the same applies below).

[0203] Figure 17 It represents a flowchart of an example of decoding the differential vector in steps S106 and S109 using a method different from the method exemplified in Figure 16 For the steps already described in Figure 16 the same symbols are given in Figure 17 and the description is omitted.

[0204] In Figure 17In the example shown, further decoding the motion vector precision flag mvd_dequant_flag is different from Figure 16 this.

[0205] That is, in Figure 17 the example shown, after S10617 and S10618 which have been described, in S10629, a variable nonZeroMV indicating whether the differential vector is 0 is derived, and it is determined whether the differential vector is 0

[0206] nonZeroMV!= 0?.

[0207] Here, the variable nonZeroMV can be derived as follows.

[0208] nonZeroMV = mvdAbsVal[0] + mvdAbsVal[1]

[0209] When nonZeroMV!= 0 is true (Y in S10629), that is, when the differential vector is other than 0, in S10630, the motion vector precision flag mvd_dequant_flag is decoded from the encoded data. In addition, when nonZeroMV!= 0 is false (N in S10629), mvd_dequant_flag is set to 0 without decoding mvd_dequant_flag from the encoded data. That is, when the differential vector is other than 0, that is, only when nonZeroMV!= 0, mvd_dequant_flag is decoded.

[0210] It should be noted that the motion vector precision flag mvd_dequant_flag is used to switch the precision of the motion vector. In addition, when this flag is set as a flag for selecting whether to set the precision of the motion vector to full pixel, it can be written as (can be marked as) integer_mv_flag.

[0211] (Motion Vector Derivation Process)

[0212] Next, the motion vector derivation process is described using Figures 18 to 27 this.

[0213] Figure 18 is a flowchart showing the process of the motion vector derivation process performed by the inter-frame prediction parameter decoding unit 303 of the present embodiment.

[0214] (Motion Vector Derivation Process in Merge Prediction Mode)

[0215] Figure 18(a) is a flowchart showing the process of motion vector derivation processing in the merge prediction mode. As Figure 18 (a) shows, in S201, the merge candidate derivation unit 30361 derives the merge candidate list mergeCandList. In S202, the merge candidate selection unit 30362 selects the merge candidate mvLX specified by the merge index merge_idx based on mergeCandList[merge_idx]. For example, it is derived by mvLX = mergeCandList[merge_idx]. (Motion vector derivation processing in the AMVP mode)

[0216] In the AMVP mode, the differential motion vector mvdLX is derived by decoding the already decoded syntax mvdAbsVal and mv_sign_flag, and the motion vector mvLX is derived by adding the differential motion vector mvdLX to the prediction vector mvpLX. In the description of the syntax, mvdAbsVal[0], mvdAbsVal[1], etc. and [0], [1] are used to distinguish the horizontal component and the vertical component, but hereinafter, for simplicity, the components are not distinguished and are abbreviated as mvdAbsVal, etc. In fact, since the motion vector has a horizontal component and a vertical component, the processes described without distinguishing the components can be sequentially performed on each component.

[0217] On the other hand, Figure 18 (b) is a flowchart showing the process of motion vector derivation processing in the AMVP mode. As Figure 18 (b) shows, in S301, the vector candidate derivation unit 3033 derives the motion vector predictor list mvpListLX. In S302, the vector candidate selection unit 3034 selects the motion vector candidate (prediction vector, predicted motion vector) mvpLX = mvpListLX[mvp_LX_idx] specified by the prediction vector index mvp_LX_idx.

[0218] Next, in S303, the inter-frame prediction parameter decoding control unit 3031 derives the differential vector mvdLX. As Figure 18 (b)'s S304 shows, the vector candidate selection unit 3034 can also perform a loop process on the selected prediction vector. Next, in S305, the prediction vector mvpLX and the differential vector mvdLX are added in the adder 3035 to calculate the motion vector mvLX. That is, mvLX = mvpLX + mvdLX

[0219] Calculate mvLX.

[0220] (Differential vector derivation processing)

[0221] Next, use Figure 19 to explain the differential vector derivation process. Figure 19 is a flowchart that more specifically represents the differential vector derivation process in the above step S303. The differential vector derivation process consists of the following two processes. Inverse quantization process (PS_DQMV): A process of inverse quantizing the value decoded from the encoded data and passed through quantization, that is, the absolute value of the motion vector difference mvdAbsVal (quantized value), and deriving the absolute value of the motion vector difference mvdAbsVal with a specific precision (for example, the basic vector precision described later). Code assignment process (PS_SIGN): A process of determining the code of the derived absolute value of the motion vector difference mvdAbsVal and deriving the motion vector difference mvdLX.

[0222] In Figure 19 the following description of the description, unless otherwise specified, each process is performed by the inter-frame prediction parameter decoding control unit 3031.

[0223] As Figure 19 shown, in S3031, the motion vector scale shiftS, which is a parameter specifying the motion vector precision, is derived. In S3032, it is determined whether the motion vector scale is >0. When the motion vector scale >0 is true, that is, shiftS>0 (Y in S3032), in S3033, the differential vector is inverse quantized, for example, by using a shift operation with shiftS. Here, the shift operation is more specifically, for example, a process of shifting the quantized absolute value of the motion vector difference mvdAbsVal to the left by shiftS. Through

[0224] mvdAbsVal = mvdAbsVal << shiftS formula (Scale)

[0225] it is performed (process PS_DQMV0).

[0226] Then, in S3034, the code assignment process for the differential vector is performed, and it proceeds to S3041. It should be noted that this code assignment process (process PS_SIGN) is through

[0227] mvdLX = mvdAbsVal * (1 - 2 * mv_sign_flag) formula (sign)

[0228] This is done as follows. That is, according to the value of mv_sign_flag, the motion vector difference mvdLX is derived from the absolute value of the motion vector difference mvdAbsVal. It should be noted that when the motion vector scale > 0 is false, i.e., shiftS = 0 (N in S3032), the process advances to S3034 without going through S3033. It should be noted that the inverse quantization of the difference vector with the shift applied when the value 0 (shiftS = 0) is used does not affect the value of the difference vector. Therefore, even when the motion vector scale > 0 is false, it is also possible to adopt a configuration where S3033 is not skipped, but rather S3033 is performed after deriving the motion vector scale as 0 (shiftS = 0).

[0229] In addition, since the motion vector scale generally uses values of 0 or more, when the motion vector scale is other than 0, the motion vector scale is always positive (>0). Thus, instead of the determination of "motion vector scale > 0", "motion vector scale!= 0" can also be used for the determination. It should be noted that the same applies to other processes in this specification where the determination of "motion vector scale > 0" is made.

[0230] (Prediction vector loop processing)

[0231] Next, use Figure 20 to explain the prediction vector loop processing (predicted motion vector loop processing). Figure 20 is a flowchart that more specifically represents the prediction vector loop processing in step S304 above. In the following description of the description of Figure 20 , unless otherwise specified, each process is performed by the vector candidate selection unit 3034. As Figure 20 shown, in S3041, the motion vector scale is derived, and in S3042, it is determined whether the motion vector scale > 0. When the motion vector scale > 0 is true (Y in S3042), that is, when the inverse quantization of the difference vector according to the motion vector scale is performed, in S3043, the predicted motion vector mvpLX can also be looped based on the motion vector scale, that is, through

[0232] mvpLX = round(mvpLX, shiftS)

[0233] to perform a loop process (process PS_PMVROUND). Here, round(mvpLX, shiftS) represents a function that performs a loop process on the predicted motion vector mvpLX using shiftS. For example, the loop process can use the following formulas (SHIFT - 1) to (SHIFT - 4), etc., to set the predicted motion vector mvpLX to a value (discrete value) of 1 << shiftS units.

[0234] After S304, proceed to S305. In S305, the motion vector mvLX is derived from the predicted vector mvpLX and the differential vector mvdLX. It should be noted that in the case where the motion vector scale > 0 is false (N in S3042), the predicted motion vector mvpLX proceeds to S305 without cycling, and the motion vector mvLX is derived.

[0235] (Motion vector scale derivation process using the motion vector precision flag)

[0236] Next, use Figure 21 to illustrate the motion vector scale derivation process (PS_P0) using the motion vector precision flag. Figure 21 It more specifically represents the motion vector scale derivation processes in the above S3031 (refer to Figure 19 ) and S3041 (refer to Figure 20 ). It is a flowchart of the motion vector scale derivation process. In Figure 21 , for the convenience of explanation, the process of S3041 is specifically exemplified, but the process shown in Figure 21 can also be applied to S3031.

[0237] In Figure 21 the following explanations in the explanation, unless otherwise specified, each process is performed by the inter-frame prediction parameter decoding control unit 3031.

[0238] As Figure 21 shows, in S304111, it is judged whether the motion vector precision flag mvd_dequant_flag satisfies

[0239] mvd_dequant_flag != 0. When mvd_dequant_flag != 0 is true (Y in S304111), for example, when mvd_dequant_flag = 1, in S304112, for example, shiftS is set to be equal to the motion vector basic accuracy mvBaseAccu (>0) of the parameter representing the motion vector accuracy, and the accuracy of the motion vector is set to full pixel. Here, the value of mvBaseAccu is, for example, 2. After S304112, proceed to S3042. When the motion vector accuracy flag mvd_dequant_flag != 0 is false (N in S304111), for example, when mvd_dequant_flag = 0, in S304113, set shiftS = 0 and proceed to S3042. In this case, the accuracy of the motion vector is set to 1 / 4 pixel. It should be noted that in S304112, for example, shiftS can also be set to mvBaseAccu - 1, the motion vector basic accuracy of the parameter representing the motion vector accuracy. In this case, when mvd_dequant_flag is 1 (other than 0), the accuracy of the motion vector is set to half pixel.

[0240] It should be noted that in the above, a configuration is adopted in which the accuracy of the motion vector is reduced when mvd_dequant_flag is 1, and the accuracy of the motion vector is maintained when mvd_dequant_flag is 0. As another configuration, it is also possible to reduce the motion vector accuracy when the value of mvd_dequant_flag is another value, for example, 0, and maintain the motion vector accuracy when it is 1. That is, for the flag shown in this specification, any combination of its numerical value and the content represented by the flag can be set.

[0241] In this way, according to the above configuration, the accuracy of the motion vector is switched with reference to the motion vector accuracy flag, so that a motion vector with a more appropriate accuracy can be used. On the other hand, since it is necessary to include the motion vector accuracy flag in the encoded data, the code amount increases, and there may be a case where the coding efficiency does not increase as expected.

[0242] Hereinafter, a configuration example for improving the coding efficiency and using a motion vector with an appropriate accuracy will be described.

[0243] (Motion vector scale derivation process using the block size of the target block)

[0244] As one of the configuration examples (derivation process PS_P1A) for improving the coding efficiency and using a motion vector with an appropriate accuracy, use Figure 22A description will be given of a motion vector scale derivation process that utilizes the block size of an object block. Figure 22 More specifically, it represents the above-mentioned S3031 (refer to Figure 19 ) and the flowchart of the motion vector scale derivation process in S3041 (refer to Figure 20 ). In Figure 22 , for the sake of convenience in explanation, the process of S3041 is specifically exemplified, but the process shown in Figure 22 can also be applied to S3031.

[0245] In the following description in the description of Figure 22 , unless otherwise specified, each process is performed by the inter-frame prediction parameter decoding control unit 3031.

[0246] As shown in Figure 22 , in S304121, it is determined whether the block size blkW satisfies

[0247] blkW < TH (TH is a specified threshold).

[0248] When the block size blkW < TH is true (Y in S304121), that is, when the block size blkW is small, in S304122, it is set to

[0249] shiftS = shiftM,

[0250] and proceed to S3042. In addition, when the block size blkW < TH is false (N in S304121), that is, when the block size blkW is large, in S304123, it is set to

[0251] shiftS = shiftN,

[0252] and proceed to S3042. Here, shiftM and shiftN are scale parameters that satisfy shiftM > shiftN, and shiftN can also be 0.

[0253] It should be noted that Figure 22 the above-described process can also be represented by the following formula.

[0254] shiftS = (blkW < TH)? shiftM : shiftN (formula P1A)

[0255] It should be noted that in a configuration where the width blkW and height blkH of the block size are different, as the threshold determination of the block size, blkW + blkH < TH can also be used instead of blkW < TH. It should be noted that the above-mentioned changes can also be appropriately applied to other processes in this specification.

[0256] In addition, the branch determination is not limited to <(greater than), and ≤(less than or equal to) can also be used. As an equivalent configuration, the branches of Y and N can also be set to > and ≥ vice versa. It should be noted that the above changes can also be appropriately applied to other processes in this specification.

[0257] As described above, the motion vector scale is derived in such a way that the value of the motion vector scale becomes smaller (the motion vector accuracy is improved more) as the block size increases. As in the above example, in the configuration where the block sizes are classified according to the block size and the motion vector scale is switched according to the classification, the number of classifications of the block size is not limited to two and can also be three or more.

[0258] In this way, according to the above configuration, the accuracy of the differential vector can be switched according to the block size. For example, when the block size is larger than a specified value, a high-precision vector can be switched, and when the block size is smaller than the specified value, a low-precision motion vector can be switched. In this way, by switching the accuracy of the motion vector according to the block size, a more appropriate accuracy of the motion vector can be used.

[0259] In addition, in the above configuration, the accuracy of the differential vector can be switched without using the motion vector accuracy flag. Therefore, there is no need to encode and decode the motion vector accuracy flag, thereby reducing the code amount of the encoded data. In addition, thereby, an improvement in encoding efficiency can be achieved. (Motion vector scale derivation process using block size and motion vector accuracy flag)

[0260] In addition, as another configuration example (derivation process PS_P1B), then use Figure 23 The motion vector scale derivation process using the block size of the target block and the motion vector accuracy flag will be described. Figure 23 It is a flowchart that more specifically represents the motion vector scale derivation process in S3031 and S3041 above. In Figure 23 For convenience of explanation, the process of S3041 is specifically exemplified, but the process shown in Figure 23 can also be applied to S3031.

[0261] As in Figure 23As shown, in S304131, it is determined whether mvd_dequant_flag! = 0. When mvd_dequant_flag! = 0 is false (N in S304131), that is, when mvd_dequant_flag is 0, in S304132, it is determined whether the block size blkW satisfies blkW < TH (TH is a specified threshold). When the block size blkW < TH is true (Y in S304132), that is, when the block size blkW is small,

[0262] In S304133, it is set as

[0263] shiftS = shiftM,

[0264] Proceed to S3042. In addition, when the block size blkW < TH is false (N in S304132), that is, when the block size blkW is large, in S304133, a value different from the value (shiftM) in the case of a smaller block value is set as the motion vector scale, and shiftS = shiftN is set,

[0265] Proceed to S3042.

[0266] In addition, when mvd_dequant_flag! = 0 is true (Y in S304131), that is, when mvd_dequant_flag is 1,

[0267] shiftS = shiftL is set, and proceed to S3042. Here, shiftL, shiftM, and shiftN are scale parameters that satisfy shiftL ≥ shiftM > shiftN, and shiftN = 0 is also possible. shiftN = 0 is equivalent to not performing inverse quantization on the motion vector (differential motion vector) (encoding the motion vector that has become less rough through the quantization scale). It should be noted that when shiftL = mvBaseAccu and mvd_dequant_flag is 1, it is also appropriate to set it as full pixels.

[0268] It should be noted that Figure 23 Part of the processing of S304132 to S304134 (equivalent to Figure 22 ) can also be expressed by the above (formula P1A).

[0269] Figure 23 As described above, the overall processing of

[0270] shiftS = mvd_dequant_flag != 0 ? shiftL : (blkW < TH) ? shiftM : shiftN (Equation P1B)

[0271] As described above, the following configuration is formed: a mode that classifies and uses motion vectors with multiple precisions according to the block size, and switches in such a way that the value of the motion vector scale becomes smaller (the motion vector precision is improved more) as the block size becomes larger. Note that the classification of the block size is not limited to two classifications, and a configuration with three or more classifications may also be adopted.

[0272] According to the above configuration, the precision of the motion vector is determined by referring to both the block size and the motion vector precision flag. Therefore, a motion vector with a more appropriate precision can be used. For example, when the precision of the motion vector is represented by the motion vector precision flag with integer precision (low precision), the precision of the differential vector is set to integer precision (low precision) regardless of the block size. In addition, when the precision of the motion vector is represented by the motion vector precision flag with fractional precision (high precision), the precision of the differential vector can be further switched according to the block size.

[0273] Therefore, according to the above configuration, it is possible to improve the coding efficiency by using a motion vector with a more appropriate precision.

[0274] Note that the derivation of the above motion vector can be described in another way as follows. That is, the inter-frame prediction parameter decoding unit 303 (motion vector derivation unit) derives the motion vector by adding or subtracting the differential vector to / from the prediction vector for each prediction block. The inter-frame prediction parameter decoding unit 303 switches the precision of the motion vector derived for the prediction block (especially the shift value used to derive the absolute value of the motion vector difference) according to the size of the prediction block.

[0275] In addition, the motion vector derived through the processing of the above motion vector derivation can be expressed by the following formula. That is, when the motion vector to be derived is marked as mvLX, the prediction vector is marked as mvpLX, the differential vector is marked as mvdLX, and the loop processing is marked as round(), the shift amount shiftS can be determined according to the size of the prediction block, and

[0276] mvLX = round(mvpLX) + (mvdLX << shiftS)

[0277] is used to determine mvLX.

[0278] Note that the inverse quantization of the differential vector mvdLX represented by the above (mvdLX << shiftS) can also be performed on the absolute value of the motion vector difference. That is, as described below, a configuration can also be adopted in which the inverse quantization of the absolute value of the motion vector difference mvdAbsVal is performed and code processing is performed.

[0279] mvdAbsVal = mvdAbsVal(= |qmvd|) << shiftS

[0280] mvdLX = mvdAbsVal * (1 - 2 * mv_sign_flag)

[0281] mvLX = round(mvpLX) + mvdLX

[0282] In the above, it is represented in a configuration that updates the variables mvdAbsVal and mvdLX. However, when using ''' for clarity in processing, it can be represented in the following manner.

[0283] mvdAbsVal' = mvdAbsVal(= |qmvd|) << shiftS

[0284] mvdLX' = mvdAbsVal' * (1 - 2 * mv_sign_flag)

[0285] mvLX = round(mvpLX) + mvdLX'

[0286] In addition, as described in the parentheses () above, in addition to mvdAbsVal, the absolute value of the differential motion vector before inverse quantization (after quantization) can also be represented by qmvd.

[0287] (Various specific examples of loop processing)

[0288] Loop processing was mentioned in the above description. The specific examples of loop processing do not limit this embodiment. For example, using

[0289] round(mvpLX) = (mvpLX >> shiftS << shiftS) ··· (SHIFT - 1)

[0290] is sufficient. In addition, the variable inside round() is not limited to mvpLX. In addition, for loop processing, in addition to the above example, examples using the following formula can also be cited. For example, the offset value

[0291] offsetS = 1 << (shiftS - 1),

[0292] can be set as

[0293] round(mvpLX) = ((mvpLX + offsetS) >> shiftS) << shiftS ··· (SHIFT - 2). Additionally,

[0294] round(mvpLX) = mvpLX > 0? (mvpLX >> shiftS) << shiftS : -(((-mvpLX) >> shiftS) << shiftS) ··· (SHIFT - 3)

[0295] That is, when the object in the loop is negative, the following configuration can also be adopted: temporarily transform it into a positive value by multiplying by -1, then perform the same processing as in (formula: SHIFT - 1), and then transform it into a negative value by multiplying by -1.

[0296] Additionally,

[0297] round(mvpLX) = mvpLX > 0? ((mvpLX + offsetS) >> shiftS) << shiftS : -((((-mvpLX + offsetS)) >> shiftS) << shiftS) ··· (SHIFT - 4)

[0298] That is, a processing combining the processing of formula (SHIFT - 2) and formula (SHIFT - 3) can also be adopted.

[0299] (Example of motion vector precision using block size switching)

[0300] Hereinafter, use Figure 24 to illustrate a specific example of the motion vector precision (derivation process P1A) using the block size switching of the target block. Figure 24 (a) to Figure 24 (c) are tables showing the relationship between the basic vector precision and the parameter (shiftS) indicating the motion vector precision set (switched) according to the block size of the target block. For example, the inter - frame prediction parameter decoding control unit 3031 can perform the above Figure 24 (a) to Figure 24 (c) in the manner shown in the example for the processing of S304121 to S304123 as Figure 22 shown.

[0301] Note that in this specification, the concept of "basic vector" is introduced, and the parameter mvBaseAccu is used to represent the accuracy of specifying this basic vector. In addition, the "basic vector" is assumed to be decoded with an accuracy of 1<<mvBaseAccu. Here, the term "basic vector" is only for convenience, and the "basic vector" is just a concept introduced as a reference for specifying the accuracy of the motion vector. In this patent, the accuracy of the vector when input to the motion compensation filtering unit 30912 is given in terms of the basic vector accuracy. For example, when mvBaseAccu = 2, the basic vector is set to be processed with an accuracy of 1 / 4 (= 1 / (1<<mvBaseAccu)) pixel. In the motion compensation filtering unit 30912, filtering processing is performed using a set of filtering coefficients of phases from 0 to M-1 (M = (1<<mvBaseAccu)) (filtering coefficients from 0 to M-1). In addition, a configuration may be adopted in which the motion vector derived (utilized) is stored in the prediction parameter memory 108 using the accuracy of this basic vector.

[0302] Figure 24 (a) is a table showing the relationship among the block size of the target block, the basic vector accuracy, and the parameter shiftS indicating the motion vector accuracy when the motion vector accuracy is switched to two values. In Figure 24 In the example shown by "I" in (a), mvBaseAccu = 3, and the accuracy of the basic vector is 1 / 8 pel. In the example shown by "I", when the block size blkW of the target block satisfies blkW >= 64, shiftS = 0 is set, and the motion vector accuracy becomes 1 / 8 pel. On the other hand, when the block size blkW satisfies blkW < 64, shiftS = 1 is set, and the motion vector accuracy becomes 1 / 4 pel.

[0303] In Figure 24 (a) the example shown by "II", mvBaseAccu = 4, and the accuracy of the basic vector is 1 / 16 pel. In the example shown by "II", when the block size blkW of the target block satisfies blkW >= 64, shiftS = 0 is set, and the motion vector accuracy becomes 1 / 16 pel. On the other hand, when the block size blkW satisfies blkW < 64, shiftS = 2 is set, and the motion vector accuracy becomes 1 / 4 pel.

[0304] In Figure 24In the example shown as "III" in (a), mvBaseAccu = 6, and the accuracy of the basic vector is 1 / 64 pel. In the example shown as "III", when the block size blkW of the target block satisfies blkW >= 64, shiftS = 0 is set, and the motion vector accuracy becomes 1 / 64 pel. On the other hand, when the block size blkW satisfies blkW < 64, shiftS = 4 is set, and the motion vector accuracy becomes 1 / 4 pel.

[0305] Figure 24 (b) is a table showing the relationship between the block size of the target block, the basic vector accuracy, and the parameter (shiftS) indicating the motion vector accuracy when the motion vector accuracy is switched to three values.

[0306] In Figure 24 In the example shown in (b), the basic vector accuracy is 1 / 64 pel. When the block size blkW of the target block satisfies blkW >= 64, shiftS = 0 is set, and the motion vector accuracy becomes 1 / 64 pel. In addition, when the block size blkW satisfies blkW >= 32 && blkW < 64, shiftS = 2 is set, and the motion vector accuracy becomes 1 / 16 pel. In addition, when the block size blkW satisfies blkW < 32, shiftS = 4 is set, and the motion vector accuracy becomes 1 / 4 pel.

[0307] Figure 24 (c) is a table showing the relationship between the block size of the target block, the basic vector accuracy, and the parameter (shiftS) indicating the motion vector accuracy when the motion vector accuracy is switched to five values.

[0308] In Figure 24 In the example shown in (c), the basic vector accuracy is 1 / 64 pel. When the block size blkW of the target block satisfies blkW >= 128, shiftS = 0 is set, and the motion vector accuracy becomes 1 / 64 pel. In addition, when the block size blkW satisfies blkW >= 64 && blkW < 128, shiftS = 1 is set, and the motion vector accuracy becomes 1 / 32 pel. In addition, when the block size blkW satisfies blkW >= 32 && blkW < 64, shiftS = 2 is set, and the motion vector accuracy becomes 1 / 16 pel. In addition, when the block size blkW satisfies blkW >= 16 && blkW < 32, shiftS = 3 is set, and the motion vector accuracy becomes 1 / 8 pel. In addition, when the block size blkW satisfies blkW < 16, shiftS = 4 is set, and the motion vector accuracy becomes 1 / 4 pel.

[0309] (Utilization of Motion Vector Accuracy MVQStep)

[0310] The inter-frame prediction parameter decoding control unit 3031 may also be configured to perform inverse quantization by multiplying the quantization step size (MVQStep) of the motion vector, instead of using the left shift performed by the motion vector scale shiftS. That is, inverse quantization may be performed by the following formula instead of formula (Scale).

[0311] mvdAbsVal = mvdAbsVal * MVQStep formula (QStep)

[0312] Here, MVQStep and shiftS satisfy

[0313] shiftS = log2(MVQStep)

[0314] This is equivalent to the following.

[0315] MVQStep = 1 << shiftS = 2 shifts

[0316] Furthermore, when the accuracy of the basic motion vector is 1 / 8, when the quantization step MVQStep is 1, the accuracy (MVStep) of the encoded motion vector becomes 1 / 8, and when the quantization step MVQStep is 2, the accuracy (MVStep) of the encoded motion vector becomes 1 / 4. Therefore, when the accuracy of the basic motion vector is set to 1 / mvBaseAccu, in the quantization step MVQStep, the accuracy MVStep of the encoded motion vector becomes 1 / mvBaseAccu * MVQStep. For example, when using the product of MVQStep instead of the shift using the quantization scale shiftS to perform Figure 24 (a) In the case of switching the motion vector accuracy shown by "I", when the block size blkW satisfies blkW >= 64, it is set to MVQStep = 1 (= 1 << ShiftS = 1 << 0 = 1). In other words, it is set to MVStep = 1 / 8 = (1 / mvBaseAccu * MVQStep = 1 / 8 * 1). On the other hand, when the block size blkW satisfies blkW < 64, it is set to MVQStep = 2 (= 1 << ShiftS = 1 << 1 = 2). In other words, it is set to MVStep = 1 / 4 = (1 / 8 * 2).

[0317] In addition, when using MVQStep to perform Figure 24In the case of switching the motion vector precision as shown in (b), when the block size blkW satisfies blkW >= 64, MVQStep is set to 1 (= 1 << shiftS = 1 << 0). In other words, MVStep is set to 1 / 64 = (1 / 64 * 1). Further, when the block size blkW satisfies blkW >= 32 && blkW < 64, MVQStep is set to 4 (= 1 << ShiftS = 1 << 2 = 4). In other words, MVStep is set to 1 / 16 = (1 / 64 * 4). Further, when the block size blkW satisfies blkW < 32, MVQStep is set to 16 (= 1 << ShiftS = 1 << 4). In other words, MVStep is set to 1 / 4 = (1 / 64 * 16).

[0318] Further, in performing Figure 24 In the case of switching the motion vector precision as shown in (c), when the block size blkW satisfies blkW >= 128, MVQStep is set to 1. In other words, MVStep is set to 1 / 64. Further, when the block size blkW satisfies blkW >= 64 && blkW < 128, MVQStep is set to 2. In other words, MVStep is set to 1 / 32. Further, when the block size blkW satisfies blkW >= 32 && blkW < 64, MVQStep is set to 3. In other words, MVStep is set to 1 / 16. Further, when the block size blkW satisfies blkW >= 16 && blkW < 32, MVQStep is set to 4. In other words, MVStep is set to 1 / 8. Further, when the block size blkW < 16 is satisfied, MVQStep is set to 5. In other words, MVStep is set to 1 / 4. (Example of motion vector precision using block size and motion vector precision flag switching)

[0319] Next, use Figure 25 A specific example of the motion vector precision (derivation process PS_P1B) switched using the block size and the mvd_dequant_flag as the motion vector precision flag is described. Figure 25 (a) to Figure 25 (c) is a table showing the relationship with the parameter (shiftS) indicating the motion vector precision set (switched) by the block size of the target block and the motion vector precision flag. It should be noted that in Figure 25 (a) to Figure 25 (c), an example in which the basic vector precision is set to 1 / 16 is shown, but any value can be applied to the value of the basic vector precision. The inter-frame prediction parameter decoding control unit 3031 can also Figure 25 (a) to Figure 25(c) Carry out the above in the manner of the example shown Figure 23 the processing of S304131 to S304135 shown.

[0320] In Figure 25 In the example shown in (a), when the motion vector precision flag is mvd_dequant_flag = 0 and the block size is larger than a specified value (large block size), shiftS is set to 0 and the motion vector precision becomes 1 / 16 pel. Further, when the motion vector precision flag is mvd_dequant_flag = 0 and the block size is smaller than a specified value (small block size), shiftS is set to 2 and the motion vector precision becomes 1 / 4 pel. On the other hand, when the motion vector precision flag is mvd_dequant_flag = 1, shiftS is set to 4 and the motion vector precision becomes 1 pel (full pixel). When expressed by an arithmetic expression, it is as follows.

[0321] shiftS = mvd_dequant_flag!= 0? 4 : (blkW < TH)? 2 : 0 (equivalent to arithmetic expression P1B)

[0322] In Figure 25 In the example shown in (b), when the motion vector precision flag is mvd_dequant_flag = 0 and the block size is larger than a specified value (large block size), shiftS is set to 0 and the motion vector precision MVStep becomes 1 / 16 pel. Further, when the motion vector precision flag is mvd_dequant_flag = 0 and the block size is smaller than a specified value (small block size), shiftS is set to 2 and the motion vector precision becomes 1 / 4 pel. On the other hand, when the motion vector precision flag is mvd_dequant_flag = 1 and the block size is larger than a specified value (large block size), shiftS is set to 3 and the motion vector precision becomes 1 / 2 pel (half pixel). Further, when the motion vector precision flag is mvd_dequant_flag = 1 and the block size is smaller than a specified value (small block size), shiftS is set to 4 and the motion vector precision becomes 1 pel (full pixel).

[0323] In Figure 25In the example shown in (c), when the motion vector precision flag is mvd_dequant_flag = 0 and the block size is larger than a specified value (large block size), shiftS is set to 0 and the motion vector precision becomes 1 / 16 pel. Further, when the motion vector precision flag is mvd_dequant_flag = 0 and the block size is smaller than the specified value (small block size), shiftS is set to 1 and the motion vector precision becomes 1 / 8 pel. On the other hand, when the motion vector precision flag is mvd_dequant_flag = 1 and the block size is larger than the specified value (large block size), shiftS is set to 2 and the motion vector precision becomes 1 / 4 pel. Further, when the motion vector precision flag is mvd_dequant_flag = 1 and the block size is smaller than the specified value (small block size), shiftS is set to 3 and the motion vector precision becomes 1 / 2 pel (half pixel).

[0324] (Example of motion vector precision using QP switching)

[0325] Note that in the above example, the configuration for deriving shiftS based on the block size of the object block has been described. As another configuration, a configuration (derivation process PS_P2A) in which the inter-frame prediction parameter decoding control unit 3031 (motion vector derivation unit) derives shiftS based on the QP (Quantization Parameter) as the quantization parameter instead of the block size of the object block can also be adopted. In particular, by deriving shiftS according to the magnitude of the QP (or the predicted value of the QP), a high-precision motion vector (smaller shiftS) is used when the QP is small, and a low-precision (larger shiftS) is used when the QP is large. For example, by making a determination of the QP according to a specified value, a high-precision motion vector is used when the QP is smaller than the specified value, and a low-precision is used in other cases.

[0326] Here, use Figure 26 to illustrate an example of motion vector precision using QP switching. Figure 26 (a) to Figure 26 (c) is a table showing the parameter (shiftS) indicating the motion vector precision set (switched) according to the QP. For example, the inter-frame prediction parameter decoding control unit 3031 can also perform the differential vector derivation process in the manner of the example shown in Figure 26 (a) to Figure 26 (c). In the description of Figure 26 (a) to Figure 26 (c), the value of the basic vector precision is not particularly mentioned, but a basic vector precision with an arbitrary value can be used. In Figure 26In (a), (b), and (c), examples of switching two, three, and five values according to the QP are shown, but the number of switches (the number of QP classifications) is not limited to this. In addition, the domain values for classifying the QP are not limited to the examples in the figure.

[0327] Figure 26 (a) is a table showing the relationship between the QP and the motion vector precision (shiftS) when the motion vector precision is switched to two values. In Figure 26 In the example shown in (a), when the QP is small (QP < 24), shiftS = 0 is set. On the other hand, when the QP is large (QP >= 24), shiftS is set to a value greater than that in the case of a small QP. Here, shiftS = 1 is set.

[0328] In Figure 26 (b) is a table showing the relationship between the QP and the parameter (shiftS) indicating the motion vector precision when the motion vector precision is switched to three values. As Figure 26 shown in (b), when the QP is small (QP < 12), shiftS = 0 is set. In addition, when the QP is at a medium level (QP >= 12 && QP < 24), shiftS = 1 is set. In addition, when the QP is large (QP >= 36), shiftS = 2 is set.

[0329] Figure 26 (c) is a table showing the correspondence between the QP and the parameter (shiftS) indicating the motion vector precision when the motion vector precision is switched to five values. As Figure 26 shown in (c), when QP < 12 is satisfied, shiftS = 0 is set. In addition, when QP >= 12 && QP < 18 is satisfied, shiftS = 1 is set. In addition, when QP >= 18 && QP < 24 is satisfied, shiftS = 2 is set. In addition, when QP >= 24 && QP < 36 is satisfied, shiftS = 3 is set. In addition, when QP >= 36 is satisfied, shiftS = 4 is set.

[0330] According to the above configuration, the precision of the motion vector derived for the prediction block is switched according to the magnitude of the quantization parameter. Therefore, a prediction image can be generated using a motion vector with appropriate precision. It should be noted that it can also be used in combination with a configuration that switches the precision of the motion vector according to a flag.

[0331] (Use of Motion Vector Precision MVQStep)

[0332] In addition, the inter-frame prediction parameter decoding control unit 3031 may also be configured as follows: instead of the above-mentioned shiftS, MVQStep is derived based on the block size of the target block as the motion vector accuracy.

[0333] For example, when using MVQStep to perform Figure 26 the switching of the motion vector accuracy as shown in (a), when QP < 24 is satisfied, MVQStep = 16 is set. In other words, MVStep = 1 / 16 is set. On the other hand, when QP >= 24 is satisfied, MVQStep = 4 is set. In other words, MVStep = 1 / 4 is set.

[0334] In addition, when using MVQStep to perform Figure 26 the switching of the motion vector accuracy as shown in (b), when QP < 12 is satisfied, MVQStep = 64 is set. In other words, MVStep = 1 / 64 is set. In addition, when QP >= 12 && QP < 36 is satisfied, MVQStep = 16 is set. In other words, MVStep = 1 / 16 is set. In addition, when QP < 36 is satisfied, MVQStep = 4 is set. In other words, MVStep = 1 / 4 is set.

[0335] In addition, when using MVQStep to perform Figure 26 the switching of the motion vector accuracy as shown in (c), when QP < 12 is satisfied, MVQStep = 64 is set.

[0336] In other words, MVStep = 1 / 64 is set. In addition, when QP >= 12 && QP < 18 is satisfied, MVQStep = 32 is set. In other words, MVStep = 1 / 32 is set. In addition, when QP >= 18 && QP < 24 is satisfied, MVQStep = 16 is set. In other words, MVStep = 1 / 16 is set. In addition, when QP >= 24 && QP < 36 is satisfied, MVQStep = 8 is set. In other words, MVStep = 1 / 8 is set. In addition, when QP >= 36 is satisfied, MVQStep = 4 is set. In other words, MVStep = 1 / 4 is set.

[0337] (Examples of motion vector accuracy switched using QP and motion vector accuracy flag)

[0338] Next, an example of Figure 27 the motion vector accuracy (derivation process PS_P2B) switched using QP and mvd_dequant_flag as the motion vector accuracy flag is described. Figure 27 (a) and Figure 27(b) is a table showing the motion vector precision (shiftS) set (switched) according to the QP and the motion vector precision flag. The inter-frame prediction parameter decoding control unit 3031 can also perform the process of differential vector derivation in the manner of the examples shown in Figure 27 (a) and (b).

[0339] In Figure 27 (a) and Figure 27 (b), an example in which the basic vector precision is set to 1 / 16 pel (mvBaseAccu = 4) is shown, but any value can be applied to the value of the basic vector precision (mvBaseAccu).

[0340] In Figure 27 (a) shown in the example, when the motion vector precision flag mvd_dequant_flag is 1 (other than 0), regardless of the QP, the value of shiftS is determined to be a fixed value. In addition, when the motion vector precision flag mvd_dequant_flag is 0, the value of the motion vector scale shiftS is determined according to the QP. For example, when the motion vector precision flag is mvd_dequant_flag = 0 and the QP is less than a specified value (QP small), it is set to shiftS = 0, and the motion vector precision becomes 1 / 16 pel. In addition, when the motion vector precision flag is mvd_dequant_flag = 0 and the QP is greater than a specified value (QP large), it is set to shiftS = 2, and the motion vector precision becomes 1 / 4 pel. On the other hand, when the motion vector precision flag is mvd_dequant_flag = 1, it is fixedly set to shiftS = mvBaseAccu (= 4), and the motion vector precision becomes 1 pel (full pixel). In this way, even when it changes according to the QP, it is appropriate to set shiftS in the case where the motion vector precision flag mvd_dequant_flag is 1 to be greater than shiftS in other cases (mvd_dequant_flag is 0) (set the motion vector precision to low precision).

[0341] In Figure 27In the example shown in (b), an example of deriving the motion vector scale shiftS according to the QP is shown even when the motion vector precision flag is 1 (other than 0). Specifically, when the motion vector precision flag is mvd_dequant_flag = 0 and the QP is less than a specified value (small QP), shiftS = 0 is set, and the motion vector precision becomes 1 / 16 pel. In addition, when the motion vector precision flag is mvd_dequant_flag = 0 and the QP is greater than a specified value (large QP), shiftS = 4 is set, and the motion vector precision becomes 1 pel. On the other hand, when the motion vector precision flag is mvd_dequant_flag = 1 and the QP is less than a specified value (small QP), shiftS = 3 is set, and the motion vector precision becomes 1 / 2 pel (half pixel). In addition, when the motion vector precision flag is mvd_dequant_flag = 1 and the QP is greater than a specified value (large QP), shiftS = mvBaseAccu (= 4) is set, and the motion vector precision becomes 1 pel (full pixel). In this way, when the motion vector precision flag mvd_dequant_flag is 1, it is appropriate to switch between half pixels and full pixels.

[0342] In addition, the motion vector derived by the above-described motion vector derivation process can be expressed by the following formula. That is, when the motion vector to be derived is marked as mvLX, the prediction vector is marked as mvpLX, the difference vector is marked as mvdLX, and the rounding process is marked as round(), the shift amount shiftS is determined according to the size of the prediction block, and

[0343] mvLX = round(mvpLX)+(mvdLX << shiftS)

[0344] is used to determine mvLX.

[0345] <Inverse quantization process of difference vector>

[0346] Hereinafter, with reference to Figure 28 and Figure 29 the inverse quantization process of the difference vector of the present embodiment will be described.

[0347] The processes described below are performed by the inter-frame prediction parameter decoding control unit 3031 unless otherwise specified.

[0348] (Inverse quantization process example 1: Inverse quantization of the difference vector with the motion vector precision corresponding to the quantized difference vector)

[0349] Hereinafter, a non-linear inverse quantization process for the quantized differential vector qmvd (quantized value, quantized differential vector) performed by the inter-frame prediction parameter decoding control unit 3031 will be described.

[0350] It should be noted that the quantized differential vector is equivalent to the absolute value of the differential vector at the time when the coded data is decoded (the time point before inverse quantization), and the absolute value of qmvd is mvdAbsVal. It should be noted that in Figure 28 , whether the differential vector is negative or positive, for the sake of clarifying the image, the quantized value qmvd of the differential vector is set to a value that can be both positive and negative, and thus an example is shown. On the other hand, in actual processing, the absolute value of the differential vector can be used as qmvd, that is, qmvd = mvdAbsVal can be set. In the following description, qmvd is processed as an absolute value.

[0351] Figure 28 It is a curve graph showing the relationship between the quantized differential vector and the inverse quantization differential vector in this processing example. Figure 28 The horizontal axis of the shown curve graph is the quantized differential vector, that is, qmvd (the value obtained by decoding the differential vector that has been quantized and encoded by the encoding device and has not been inverse quantized, that is, the quantized value of the differential vector), Figure 28 The vertical axis of the shown curve graph is the inverse quantization differential vector (also simply referred to as the inverse quantization differential vector) mvd (= mvdAbsVal after inverse quantization). The inter-frame prediction parameter decoding control unit 3031 performs an inverse quantization process on the quantized differential vector qmvd as shown in Figure 28 the shown curve graph.

[0352] mvdAbsVal = mvdAbsVal (= qmvd) << shiftS

[0353] Thereafter, the adder 3035 derives a motion vector by adding or subtracting the inverse quantization differential vector to / from the prediction vector. For example, by

[0354] mvdLX = mvdAbsVal * (1 - 2 * mv_sign_flag)

[0355] mvLX = round(mvpLX) + mvdLX

[0356] it is derived.

[0357] Regarding Figure 28 the shown curve graph, a detailed description will be given. As shown in Figure 28As shown, the inter-frame prediction parameter decoding control unit 3031 switches the precision of the inverse quantization process of the quantized motion vector according to the magnitude relationship between the quantized motion vector difference decoded from the encoded data and a specified value (dTH).

[0358] For example, when the absolute value of the differential vector mvd is small, the precision of the motion vector is set to be high, and when the absolute value of the differential vector mvd is large, the precision of the motion vector is set to be low.

[0359] In other words, when the differential vector mvd is near zero (when the absolute value of the differential vector mvd is small), compared with the case where the absolute value of the differential vector mvd is far from near zero, the change in the inverse quantization differential vector mvd is smaller with respect to the change in the quantized differential vector qmvd.

[0360] When the differential vector mvd is far from near zero (when the absolute value of the motion vector difference is large), compared with the case where the differential vector mvd is near zero, the change in the inverse quantization differential vector is larger with respect to the change in the quantized differential vector qmvd.

[0361] This can be achieved by the following configuration. That is, when the absolute value of the quantized differential vector, i.e., qmvd, is less than a specified value (threshold) dTH (or less), the inter-frame prediction parameter decoding control unit 3031 performs an inverse quantization of the quantized differential vector qmvd specified by a specified slope (scale factor). And when the quantized differential vector qmvd is greater than or equal to the specified value dTH, the inter-frame prediction parameter decoding control unit 3031 performs an inverse quantization specified by a slope obtained by shifting the specified slope to the left by the motion vector scale shiftS. Here, the above-specified slope can be, for example, 1.

[0362] In summary, it is as follows (derivation process Q2). That is, when the absolute value of the quantized differential vector is small (qmvd < dTH), the inter-frame prediction parameter decoding control unit 3031 does not perform inverse quantization.

[0363] Or only performs a basic inverse quantization implemented by multiplication by K (or left shift according to log2(K)), and through

[0364] mvdAbsVal = K * qmvd ··· Equation Q1

[0365] Derive mvdAbsVal.

[0366] In addition, when the absolute value of the quantized differential vector is large (satisfying qmvd >= dTH), in addition to basic inverse quantization, additional inverse quantization is further performed by a prescribed inverse quantization scale shiftS, and

[0367] mvdAbsVal = K * (dTH + (qmvd - dTH) << shiftS) ··· Equation Q2

[0368] mvdAbsVal is derived.

[0369] It should be noted that dTH appears in the equation because the values in Equation Q1 and Equation Q2 are connected in such a way as to be equal when qmvd = dTH. When paying attention to the coefficient (slope) of qmvd, note that it becomes K * 1 << shiftS, that is, note that it is better to make the inverse quantization scale large by shiftS.

[0370] Here, mvdAbsVal is the absolute value of the inverse quantized differential vector, and K represents a prescribed proportionality coefficient. As described above, K = 1 can be set, or it can be not set like this. The product based on K can be achieved by left shift according to log2(K). It should be noted that when K = 1, inverse quantization based on shiftS is performed only when the quantized differential vector qmvd >= dTH is satisfied, and when qmvd is small, inverse quantization based on shiftS is not performed.

[0371] In addition, specifically, the following configuration can be adopted: in the above Equations Q1 and Q2, the basic vector accuracy is set to 1 / 8 pel (mvBaseAccu = 3), shiftS = 1, and dTH = 16. In this case, when the quantized differential vector qmvd is 16 or more (corresponding to a motion vector accuracy of 2 pel or more), qmvd is left shifted by shiftS = 1 to perform inverse quantization, and the motion vector accuracy is set to 1 / 4 pel. That is, when qmvd is large, a configuration can be adopted in which the motion vector accuracy is set to be low.

[0372] In addition, in other examples, the following configuration may also be adopted: in the above arithmetic expressions Q1 and Q2, the basic vector accuracy is set to 1 / 16 pel (mvBaseAccu = 4), shiftS = 1, and dTH = 16. In this case, when the quantized differential vector qmvd is 16 or more (corresponding to a motion vector accuracy of 1 pel or more), qmvd is left-shifted by shiftS = 1 for inverse quantization, and the motion vector accuracy is set to 1 / 8 pel. That is, when qmvd is large, a configuration in which the motion vector accuracy is set to a lower value can be adopted.

[0373] It should be noted that if the arithmetic expressions Q1 and Q2 are represented by one arithmetic expression, the inter-frame prediction parameter decoding control unit 3031 can also be said to be through

[0374] mvdAbsVal = min(qmvd, dTH) + max(0, (qmvd - dTH) << shiftS) ··· Arithmetic expression Q3

[0375] to derive the composition of mvdAbsVal as the absolute value of the differential vector.

[0376] In addition, as another configuration, when the quantized differential vector qmvd is less than (or equal to) the threshold value dTH, the inter-frame prediction parameter decoding control unit 3031 performs specific inverse quantization with the slope obtained through

[0377] 1 << shiftS1

[0378] In addition, when the quantized differential vector qmvd is greater than or equal to (or greater than) the threshold value dTH, the inter-frame prediction parameter decoding control unit 3031 performs specific inverse quantization with the slope obtained through

[0379] 1 << shiftS2

[0380] Here, shiftS1 and shiftS2 may or may not be equal to each other.

[0381] According to the above configuration, the accuracy of the inverse quantization process for the differential vector is switched according to the value of the quantized differential vector. Therefore, a prediction image can be generated using a motion vector with a more appropriate accuracy. In addition, a reduction in the code amount of the differential vector can be achieved, thereby improving the coding efficiency. (Inverse quantization process example 2A: An example of inverse quantizing a differential vector with a motion vector accuracy corresponding to a motion vector accuracy flag and a quantized differential vector)

[0382] Next, an example of inverse quantization of the differential vector with the motion vector precision corresponding to the motion vector precision flag, i.e., mvd_dequant_flag, and the differential vector after quantization is described (derivation process PS_P2A).

[0383] In this processing example, when the motion vector precision flag satisfies mvd_dequant_flag = 1, by

[0384] mvdAbsVal = qmvd << shiftA ··· Equation Q4

[0385] mvdAbsVal is derived.

[0386] On the other hand, when the motion vector precision flag satisfies mvd_dequant_flag = 0 and the quantized differential vector qmvd < the specified value dTHS, by

[0387] mvdAbsVal = qmvd ··· Equation Q5

[0388] mvdAbsVal is derived.

[0389] In addition, when the motion vector precision flag satisfies mvd_dequant_flag = 0 and the quantized differential vector qmvd >= the specified value dTHS, by

[0390] mvdAbsVal = dTHS + (qmvd - dTHS) << shiftS ··· Equation Q6

[0391] mvdAbsVal is derived.

[0392] That is, non-linear inverse quantization is performed when the motion vector precision flag mvd_dequant_flag == 0, and linear quantization is performed when the motion vector precision flag mvd_dequant_flag == 1.

[0393] In summary, it becomes the following formula.

[0394] mvdAbsVal = mvd_quant_flag == 1?

[0395] qmvd << shiftA :

[0397] qmvd < dTHS? qmvd : dTHS + (qmvd - dTHS) << shiftS

[0398] In other words, when the flag indicating the precision of the motion vector indicates the first value (when mvd_dequant_flag == 0), the inter-frame prediction parameter decoding control unit 3031 switches the precision of the inverse quantization process for the differential vector according to the value of the quantized differential vector (quantized value). When the flag indicating the precision of the motion vector indicates the second value (when mvd_dequant_flag == 1), the inverse quantization process for the differential vector is performed with a fixed precision regardless of the quantized value of the quantized differential vector.

[0399] For example, in the above equations Q4 to Q6, when the basic vector precision is set to 1 / 8 pel (mvBaseAccu = 3) and shiftA = 3, shiftS = 1, and dTHS = 16, when the motion vector precision flag mvd_dequant_flag = 1 is satisfied, the inter-frame prediction parameter decoding control unit 3031 left-shifts the quantized motion vector qmvd (absolute value of the differential motion vector) by shiftA (= 3 bits) regardless of qmvd to perform inverse quantization of the motion vector. That is, by setting the motion vector precision to full pixel, it is fixedly set lower compared to the case where the motion vector precision is set to mvd_dequant_flag = 0. On the other hand, when the motion vector precision flag mvd_dequant_flag = 0 is satisfied, when qmvd is equal to or greater than the specified threshold value 16 (equivalent to 2 pel), the inter-frame prediction parameter decoding control unit 3031 left-shifts the quantized motion vector qmvd by shiftS (= 1 bit) to perform inverse quantization of the motion vector. That is, the motion vector precision is set to 1 / 4 pel, and the motion vector precision is set lower than the case where qmvd is less than the specified threshold value 16.

[0400] In addition, in other examples, in the above equations Q4 to Q6, when the basic vector precision is set to 1 / 16 pel (mvBaseAccu = 4) and shiftA = 4, shiftS = 2, and dTHS = 16, when the motion vector precision flag mvd_dequant_flag = 1 is satisfied, the inter-frame prediction parameter decoding control unit 3031 left-shifts the quantized motion vector qmvd by shiftA (= 4 bits) regardless of qmvd to perform inverse quantization of the motion vector. That is, the motion vector precision is set to full pixel, and the motion vector precision is set lower. On the other hand, when the motion vector precision flag mvd_dequant_flag = 0 is satisfied, when the specified threshold value qmvd is 16 (equivalent to 1 pel) or more, the quantized motion vector qmvd is left-shifted by shiftS (= 2 bits) to perform inverse quantization of the motion vector. That is, the motion vector precision is set to 1 / 4 pel, and the motion vector precision is set lower.

[0401] It should be noted that in the above configurations of Q4 to Q6, the specified threshold values and the values of the inverse quantization scales (shiftS, shiftA) may not be limited to the above examples and other values may be used.

[0402] According to the above configuration, a predicted image can be generated using a more appropriate accuracy of the motion vector. Therefore, the prediction accuracy is improved, and thus the encoding efficiency is improved.

[0403] (Inverse quantization processing example 2B: Another example of inverse quantizing the differential vector with the motion vector accuracy corresponding to the motion vector accuracy flag and the quantized differential vector)

[0404] Next, another example (derivation process Q2B) of inverse quantizing the differential vector with the motion vector accuracy corresponding to the motion vector accuracy flag and the quantized differential vector will be described.

[0405] In this processing example, when the motion vector accuracy flag is mvd_dequant_flag = 1 and the quantized differential vector qmvd < the specified value dTHA, by

[0406] mvdAbsVal = qmvd << shiftA1 ··· Equation Q7

[0407] mvdAbsVal is derived.

[0408] In addition, when the motion vector accuracy flag is mvd_dequant_flag = 1 and the quantized differential vector qmvd >= the specified value dTHA, by

[0409] mvdAbsVal = dTHA << shiftA1 + (qmvd - dTHA) << shiftA2 ··· Equation Q8 mvdAbsVal is derived.

[0410] On the other hand, when the motion vector accuracy flag is mvd_dequant_flag = 0 and the quantized differential vector qmvd < the specified value dTHS, by

[0411] mvdAbsVal = qmvd ··· Equation Q9

[0412] mvdAbsVal is derived.

[0413] In addition, when the motion vector accuracy flag is mvd_dequant_flag = 0 and the quantized differential vector qmvd >= dTHS, by

[0414] mvdAbsVal = dTHS + (qmvd - dTHS) << shiftS ··· Equation Q10

[0415] Derive mvdAbsVal.

[0416] That is, regardless of whether the motion vector precision flag mvd_dequant_flag == 0 or the motion vector precision flag mvd_dequant_flag == 1, non-linear inverse quantization of the quantized differential vector is performed.

[0417] In summary, the following equation is obtained.

[0418] mvdAbsVal = mvd_quant_flag == 1?

[0419] qmvd < dTHA? qmvd << shiftA1 : dTHA << shiftA1 + (qmvd - dTHA) << shiftA2 :

[0421] qmvd < dTHS? qmvd : dTHS + (qmvd - dTHS) << shiftS

[0422] In other words, when the flag indicating the precision of the motion vector indicates the first value (when mvd_dequant_flag == 0), the frame-inter prediction parameter decoding control unit 3031 switches whether to set the precision of the inverse quantization process for the differential vector to the first precision or the second precision according to the quantization value (the value qmvd before inverse quantization) of the quantized differential vector. When the flag indicating the precision of the motion vector indicates the second value (when mvd_dequant_flag == 1), the frame-inter prediction parameter decoding control unit 3031 switches whether to set the precision of the inverse quantization process for the differential vector to the third precision or the fourth precision according to the quantization value of the quantized differential vector. At least one of the first precision and the second precision is higher than the third precision and the fourth precision.

[0423] For example, in the case of setting the basic vector precision to 1 / 8 pel and setting shiftA1 = 2, shiftA2 = 3, dTHA = 4, shiftS = 2, and dTHS = 16 in the above Equations Q7 - Q10, when the motion vector precision flag mvd_dequant_flag = 1 and the quantized differential vector qmvd after quantization is less than dTHA = 4, the frame-inter prediction parameter decoding control unit 3031 left-shifts the quantized differential vector qmvd (differential motion vector absolute value) by shiftA1 = 2 to perform inverse quantization of the motion vector. That is, the motion vector precision is set to 1 / 2 pel, and the motion vector precision is set to be lower.

[0424] In addition, when the motion vector precision flag mvd_dequant_flag = 1 and the quantized differential vector qmvd is dTHA = 4 or more, the inter-frame prediction parameter decoding control unit 3031 left-shifts the quantized differential vector qmvd (absolute value of the differential motion vector) by shiftA2 = 3 to inverse-quantize the motion vector. That is, the motion vector precision is set to 1 pel, and the motion vector precision is set to be low.

[0425] On the other hand, when the motion vector precision flag mvd_dequant_flag = 0 and the quantized differential vector qmvd is dTHS = less than 16, the inter-frame prediction parameter decoding control unit 3031 sets the motion vector precision to 1 / 8 of the basic vector precision.

[0426] In addition, when the motion vector precision flag mvd_dequant_flag = 0 and the quantized differential vector qmvd is dTHS = 16 or more, the inter-frame prediction parameter decoding control unit 3031 left-shifts the quantized differential vector qmvd by shiftS = 2 to inverse-quantize the motion vector. That is, the motion vector precision is set to 1 / 2 pel, and the motion vector precision is set to be low.

[0427] According to the above configuration, a prediction image can be generated using a motion vector with a more appropriate precision. Therefore, the prediction accuracy is improved, and thus the encoding efficiency is improved.

[0428] (Inverse quantization process example 3: Inverse quantization of the differential vector corresponding to the quantized differential vector and cyclic processing of the prediction vector)

[0429] Next, an example of cyclic processing of the prediction vector in the case of inverse quantization of the differential vector according to the quantized differential vector will be described.

[0430] In this processing example, when the inter-frame prediction parameter decoding control unit 3031 performs inverse quantization processing of the differential vector with a lower precision, the motion vector is derived by adding or subtracting the inverse-quantized differential vector to / from the prediction vector that has undergone cyclic processing by the vector candidate selection unit 3034.

[0431] For example, it can be set according to Equation Q3 described in the above (inverse quantization of the differential vector with the motion vector precision corresponding to the quantized differential vector) as

[0432] mvdAbsVal = qmvd + (qmvd - dTH) << shiftS ··· Equation Q20.

[0433] When the quantized differential vector, i.e., qmvd, is greater than or equal to a specified value dTH, the motion vector mvLX is derived as the sum of the prediction vector mvpLX that has undergone circular processing and the differential vector mvdLX. That is, it is derived as

[0434] mvLX = round(mvpLX, shiftS) + mvdLX. Here, by round(mvpLX, shiftS), the motion vector precision of mvpLX is reduced to the precision of 1 << shiftS units. Here, the process of deriving mvdLX from mvdAbsVal is as described in the code assignment process PS_SIGN.

[0435] On the other hand, when the quantized differential vector, i.e., qmvd, is less than the specified value dTH, the motion vector mvLX is derived as the sum of the prediction vector mvpLX and the differential vector mvdLX.

[0436] That is, it is derived as

[0437] mvLX = mvpLX + mvdLX.

[0438] (Inverse quantization process example 4: Inverse quantization of the differential vector corresponding to the motion vector precision flag and the value of the quantized differential vector, and circular processing of the prediction vector)

[0439] In this processing example, the inter-frame prediction parameter decoding control unit 3031 derives the motion vector by adding or subtracting the inverse quantized differential vector to or from the prediction vector that has undergone circular processing by the vector candidate selection unit 3034 according to the motion vector precision flag and the quantized differential vector.

[0440] For example, when the motion vector precision flag is mvd_dequant_flag = 1, by

[0441] mvdAbsVal = qmvd << shiftA

[0442] mvdAbs is derived. Then, the motion vector mvLX is derived by

[0443] mvLX = round(mvpLX, shiftA) + mvdLX

[0444] as the sum of the prediction vector mvpLX that has undergone circular processing and the differential vector mvdLX. Here, by round(mvpLX, shiftA), the motion vector precision of mvpLX is reduced to the precision of 1 << shiftA units. Here, the process of deriving mvdLX from mvdAbsVal is as described in the code assignment process PS_SIGN.

[0445] On the other hand, the case where the motion vector precision flag is mvd_dequant_flag = 0 is described below. When the quantized differential vector qmvd is less than the specified value dTH, the absolute value mvdAbsVal of the differential vector is derived to be equal to the quantized differential vector qmvd. That is, it is derived by mvdAbsVal = qmvd. Then, the motion vector mvLX becomes the sum of the prediction vector mvpLX and the differential vector mvdLX. That is, it is derived by

[0446] mvLX == mvpLX + mvdLX

[0447] In addition, when the quantized differential vector qmvd is greater than or equal to the specified value dTH, the absolute value mvdAbsVal of the differential vector is obtained by

[0448] mvdAbsVal = dTHS + (qmvd - dTHS) << shiftS

[0449] and derived. Then, the motion vector mvLX becomes the sum of the prediction vector mvpLX that has undergone a loop process and the differential vector mvdLX. That is, it is derived by

[0450] mvLX = round(mvpLX, shiftS) + mvdLX

[0451] and derived. Here, through round(mvpLX, shiftS), the motion vector precision of mvpLX is reduced to the precision of 1 << shiftS units. Here, the process of deriving mvdLX from mvdAbsVal is as described in the process of assigning the code PS_SIGN.

[0452] (Inverse quantization process example 5: Other examples of inverse quantization of the differential vector corresponding to the motion vector precision flag and the quantized differential vector and loop processing of the prediction vector)

[0453] Next, other examples of inverse quantization of the differential vector corresponding to the motion vector precision flag and the quantized differential vector and loop processing of the prediction vector will be described.

[0454] In this processing example, when the inter-frame prediction parameter decoding control unit 3031 performs inverse quantization processing on the differential vector with a precision other than the highest precision among the first precision, second precision, third precision, and fourth precision, the addition unit 3035 derives the motion vector by adding or subtracting the inverse quantized differential vector to or from the prediction vector that has undergone a loop process by the vector candidate selection unit 3034.

[0455] A detailed description will be given of an example of this embodiment.

[0456] When the motion vector precision flag is mvd_dequant_flag = 1, when the quantized differential vector satisfies less than the specified value dTHA, by

[0457] mvdAbsVal = qmvd << shiftA1

[0458] Derive mvdAbsVal.

[0459] Then, the motion vector mvLX is derived as the sum of the predicted vector mvpLX that has undergone loop processing and the differential vector mvdLX. That is, it is derived as

[0460] mvLX = round(mvpLX, shiftA1) + mvdLX. Here, by round(mvpLX, shiftA1), the motion vector precision of mvpLX is reduced to the precision of 1 << shiftA1 units.

[0461] In addition, when the motion vector precision flag is mvd_dequant_flag = 1, when the quantized differential vector satisfies the specified value dTHA or more, by

[0462] mvdAbsVal = specified value dTHA << shiftA1+(qmvd - dTHA) << shiftA2

[0463] Derive mvdAbsVal.

[0464] Then, the motion vector mvLX is derived as the sum of the predicted vector mvpLX that has undergone loop processing and the differential vector mvdLX. That is, it is derived as

[0465] mvLX = round(mvpLX, shiftA2) + mvdLX. Here, by round(mvpLX, shiftA2), the motion vector precision of mvpLX is reduced to the precision of 1 << shiftA2 units. Here, the process of deriving mvdLX from mvdAbsVal is as described in the process PS_SIGN given as code.

[0466] On the other hand, the case where the motion vector precision flag is mvd_dequant_flag = 0 is as follows. When the quantized differential vector qmvd is less than the specified value dTH, the absolute value mvdAbsVal of the differential vector is derived to be equal to the quantized differential vector qmvd. That is, it is derived by mvdAbsVal = qmvd. Then, the motion vector mvLX becomes the sum of the predicted vector mvpLX and the differential vector mvdLX. That is, by

[0467] mvLX = mvpLX + mvdLX

[0468] and the derivation. In addition, when the quantized differential vector qmvd is greater than or equal to the specified value dTH, the absolute value mvdAbsVal of the differential vector is obtained by

[0469] mvdAbsVal = dTHS + (qmvd - dTHS) << shiftS

[0470] and the derivation. Then, the motion vector mvLX becomes the sum of the predicted vector mvpLX that has undergone the loop process and the differential vector mvdLX. That is, by

[0471] mvLX = round(mvpLX, shiftS) + mvdLX

[0472] and the derivation. Here, by round(mvpLX, shiftS), the motion vector accuracy of mvpLX is reduced to the accuracy of 1 << shiftS units. Here, the process of deriving mvdLX from mvdAbsVal is as described in the processing PS_SIGN given as the code.

[0473] (Flowchart of the motion vector scale derivation process using the quantized differential vector)

[0474] Figure 29 is a flowchart that more specifically represents the motion vector scale derivation process in the above S3031 (refer to Figure 19 ) and S3041 (refer to Figure 20 ). In Figure 29 , for the convenience of explanation, the process of S3041 is specifically exemplified, but the process shown in Figure 22 can also be applied to S3031.

[0475] As Figure 29 shows, in S304131, it is judged whether the quantized differential vector qmvd < the specified value dTH is satisfied. When the quantized differential vector qmvd < the specified value dTH is false (N in S304131), in S304132, shiftS = M is set, and when the quantized differential vector qmvd < the specified value dTH is true (Y in S304131), in S304133, shiftS = 0 is set. Then, it proceeds to S3042.

[0476] <Motion compensation filtering>

[0477] Hereinafter, with reference to Figures 30 to 32 , the motion compensation filtering included in the motion compensation unit 3091 will be described.

[0478] Figure 30 This is a block diagram showing the specific configuration of the motion compensation unit 3091. As Figure 30 shown, the motion compensation unit 3091 includes a motion vector application unit 30911, a motion compensation filter unit (filter unit) 30912, and a filter coefficient memory 30913.

[0479] The motion vector application unit 3091 reads, from the reference picture memory 306, a block located at a position offset by the motion vector mvLX from the position of the decoding target block of the reference picture specified by the reference picture index refIdxLX, using the prediction list input from the inter-frame prediction parameter decoding unit 303, the flag predFlagLX, the reference picture index refIdxLX, and the motion vector mvLX. Thus, an image with the motion vector applied is generated.

[0480] When the motion vector mvLX is not of integer precision but of 1 / M pixel precision (M is a natural number of 2 or more), the image with the motion vector applied is also of 1 / M pixel precision.

[0481] When the motion vector mvLX is not of integer precision, the motion compensation filter unit 30912 generates the above-mentioned motion compensation image (predSamplesL0 in the case of the motion compensation image of L0 prediction; predSamplesL1 in the case of the motion compensation image of L1 prediction; predSamplesLX when not distinguishing between the two) by causing a filter using the filter coefficients mcFilter[i][k] (where i is an integer from 0 to M - 1 and k is an integer from 0 to Ntaps - 1) to act on the image with the motion vector applied.

[0482] When the motion vector mvLX is of integer precision, the motion compensation filter unit 30912 does not act on the image with the motion vector applied, but directly makes the image with the motion vector applied the motion compensation image.

[0483] The filter coefficient memory 30913 stores the motion compensation filter coefficients decoded from the encoded data. More specifically, the filter coefficient memory 30913 stores at least a part of the filter coefficients mcFilter[i][k] (where i is an integer from 0 to M - 1 and k is an integer from 0 to Ntaps - 1) used by the motion compensation filter 30912, which are related to i.

[0484] (Filter coefficients)

[0485] Here, Figure 31 the details of the filter coefficients mcFilter[i][k] are described. Figure 31This is a diagram showing an example of the filtering coefficients of the present embodiment.

[0486] Figure 31 The filtering coefficient mcFilter[i][k] shown is for the case where the total number of phases (i = 0 - 15) of the image after applying the motion vector is 16 and the number of taps of the filter is 8 (8 taps (k = 0 - 7)). In this example, the total number of phases (i = 0 - 15) is 16. When the total number of phase numbers is 16, the accuracy of the motion vector is 1 / 16 pixel accuracy. That is, when the total number of phase numbers is M, the accuracy of the motion vector is 1 / M pixel accuracy.

[0487] For example, shown in Figure 31 the filtering coefficients {0, 0, 0, 64, 0, 0, 0, 0} at the topmost layer represent the filtering coefficients at each coefficient position when the phase i = 0. Here, the coefficient position is the relative position of the pixel where the filtering coefficient takes effect. Similarly, the filtering coefficients of the other layers shown in Figure 31 are the filtering coefficients at each coefficient position for the other phases (i = 1 - 15).

[0488] The total number of filtering coefficients is the value obtained by multiplying the number of taps of the filter by the number of phase numbers (i.e., the reciprocal of the accuracy of the motion vector).

[0489] (Calculation of Filtering Coefficients)

[0490] Among the above-mentioned filtering coefficients mcFilter[i][k] used by the motion compensation filtering unit (filtering unit) 30912, there may also be included filtering coefficients calculated using the filtering coefficients mcFilter[p][k] (p ≠ i) and the filtering coefficients mcFilter[q][k] (q ≠ i). The details of the calculation example of the filtering coefficient mcFilter[i][k] are described below.

[0491] (Calculation Example 1: Calculating the Filtering Coefficient of Phase i from the Average of the Filtering Coefficients of Phases i - 1 and i + 1)

[0492] Using Figure 32 (a) and Figure 32 (b) to illustrate an example of the calculation of the filtering coefficients of the present embodiment.

[0493] Figure 32 (a) shows an example where the motion compensation filtering unit 30912 calculates the filtering coefficients of other phases (here, odd phases) from the filtering coefficients of a part (here, even) of the phases and uses the calculated filtering coefficients. In Figure 32In (a), the filtering coefficients of the even phases are indicated by underlining.

[0494] In Figure 32 In the example shown in (a), the filtering coefficient memory 30913 stores the filtering coefficients of the even phases. Then, the filtering coefficient of the odd phase i is calculated from the average of the filtering coefficients of the even phases i - 1 and i + 1. That is, when i % 2 = 1 (the remainder of i divided by 2 is 1), mcFilter[i][k] = (mcFilter[i - 1][k] + mcFilter[i + 1][k]) / 2. In addition, in the even phase i, mcFilter[i][k] stored in the filtering coefficient memory 30913 is used as the filtering coefficient. That is, when i % 2 = 0 (the remainder of i divided by 2 is 0), mcFilter[i][k] = mcFilter[i][k].

[0495] In addition, when i % 2 = 1, it can also be set that mcFilter[i][k] = (mcFilter[i - 1][k] + mcFilter[i + 1][k]) >> 1.

[0496] In addition, a configuration can also be adopted in which the filtering coefficients of a part of the odd phases are stored in the filtering coefficient memory 30913, and the motion compensation filtering unit 30912 uses the stored filtering coefficients as the filtering coefficients.

[0497] It should be noted that the above is equivalent to a configuration in which the basic filtering coefficient mcFilterC is stored in the filtering coefficient memory 30913, and the actually used filtering coefficient mcFitler is derived by the following formula.

[0498] mcFilter[i][k] = mcFilterC[i >> 1][k] (i = 0, 2, 4, ……, 2n, 2n + 1, n = 7)

[0499] mcFilter[i][k] = (mcFilterC[i >> 1][k] + mcFilterC[(i >> 1) + 1][k]) / 2 (i = 1, 3, 5, ……, 2n + 1, n = 6)

[0500] Here, the division indicated by / 2 can be set to >>1.

[0501] For example, in Figure 32 the example shown in (a), the following table can be used as mcFilterC.

[0502]

[0503] On the other hand, Figure 32 (b) shows an example in which the motion compensation filtering unit 30912 calculates the filtering coefficients of other phases (even phases) from the filtering coefficients of a part (here, odd phases). In Figure 32 (b), the filtering coefficients of odd phases are underlined for representation.

[0504] In Figure 32 the example of (b), the filtering coefficient memory 30913 stores the filtering coefficients of odd phases. Then, the filtering coefficient of even phase i is calculated from the average of the filtering coefficients of odd phases i - 1 and i + 1. That is, when i % 2 = 0 (the remainder of i divided by 2 is 0), it becomes mcFilter[i][k] = (mcFilter[i - 1][k] + mcFilter[i + 1][k]) / 2. In addition, in odd phase i, mcFilter[i][k] stored in the filtering coefficient memory 30913 is used. That is, when i % 2 = 1 (the remainder of i divided by 2 is 1), it becomes mcFilter[i][k] = mcFilter[i][k].

[0505] In addition, when i % 2 = 0, it can also be set as mcFilter[i][k] = (mcFilter[i - 1][k] + mcFilter[i + 1][k]) >> 1.

[0506] The above is equivalent to the configuration in which the basic filtering coefficient mcFilterC is stored in the filtering coefficient memory 30913 and the actually used filtering coefficient mcFitler is derived by the following formula.

[0507] mcFilter[i][k] = mcFilterC[i >> 1][k] (i = 0, 1, 3, 5, ……, 2n + 1, n = 7)

[0508] mcFilter[i][k] = (mcFilterC[i >> 1][k] + mcFilterC[(i >> 1) + 1][k]) / 2 (i = 0, 2, 4, 6, ……, 2n + 1, n = 7)

[0509] Here, it can also be set as / 2 >> 1.

[0510] For example, in Figure 32 the example shown in (b), the following table can be used as mcFilterC.

[0511]

[0512] In addition, a configuration may be adopted in which the filter coefficients of a part of the phases of even numbers are stored in the filter coefficient memory 30913, and the motion compensation filter unit 30912 uses the stored filter coefficients as filter coefficients.

[0513] (Calculation Example 2: The filter coefficient of phase i is calculated by linear interpolation of the filter coefficients of other phases before and after)

[0514] Next, an example in which the motion compensation filter unit 30912 calculates the filter coefficient of phase i by linear interpolation of the filter coefficients of other phases before and after will be described. The motion compensation filter unit 30912 calculates the filter coefficient of phase i using the following formula.

[0515] mcFilter[i][k] = ((N - w)*mcFilter[i0][k] + w*mcFilter[i1][k]) >> log(N)

[0516] Here, i0 = (i / N)*N, i1 = i0 + N, w = (i % N), and N is an integer of 2 or more.

[0517] That is, among the above filter coefficients Filter[i][k], there are filter coefficients that satisfy mcFilter[i][k] = ((N - w)*mcFilter[i0][k] + w*mcFilter[i1][k]) >> log2(N), i0 = (i / N)*N, i1 = i0 + N, w = (i % N), and N is an integer of 2 or more.

[0518] The above is equivalent to a configuration in which the basic filter coefficient mcFilterC is stored in the filter coefficient memory 30913, and the actually used filter coefficient mcFitler is derived by the following formula.

[0519] The above is equivalent to a configuration in which the basic filter coefficient mcFilterC is stored in the filter coefficient memory 30913, and the actually used filter coefficient mcFitler is derived by the following formula.

[0520] mcFilter[i][k] = mcFilterC[i >> log2(N)][k] (i = N*n)

[0521] mcFilter[i][k] = ((N - w)*mcFilterC[i >> log2(N)][k] + w*mcFilter[(i >> log2(N)) + 1][k]) >> log2(N) (i!= N*n)

[0522] In addition, the following configuration may also be adopted.

[0523] mcFilter[i][k] = mcFilterC[i >> log2(N)][k] (i = 0, N*n + 1)

[0524] mcFilter[i][k] = ((N - w)*mcFilterC[i >> log2(N)][k] + w*mcFilter[(i >> log2(N)) + 1][k]) >> log2(N) (i != N*n + 1)

[0525] According to the configuration shown in the above calculation example, it is not necessary to store all the motion compensation filter coefficients in the filter coefficient memory 30913. Therefore, the amount of memory used to store the filter coefficients can be suppressed. In addition, since a part of the motion compensation filter coefficients can be included in the encoded data, the code amount of the encoded data is reduced, and thus an improvement in encoding efficiency can be expected.

[0526] (Configuration of the Image Encoding Apparatus)

[0527] Next, the configuration of the image encoding apparatus 11 of the present embodiment will be described. Figure 12 FIG. is a block diagram showing the configuration of the image encoding apparatus 11 of the present embodiment. The image encoding apparatus 11 includes a predicted image generation unit 101, a subtraction unit 102, a DCT / quantization unit 103, an entropy encoding unit 104, an inverse quantization / inverse DCT unit 105, an addition unit 106, a prediction parameter memory (prediction parameter storage unit, frame memory) 108, a reference picture memory (reference image storage unit, frame memory) 109, a coding parameter determination unit 110, a prediction parameter encoding unit 111, and a residual storage unit 313 (residual recording unit). The prediction parameter encoding unit 111 includes an inter prediction parameter encoding unit 112 and an intra prediction parameter encoding unit 113.

[0528] The prediction image generation unit 101 generates prediction picture blocks P for each picture at each viewpoint of the layer image T input from the outside, in blocks (regions obtained by dividing the picture). Here, the prediction image generation unit 101 reads a reference picture block from the reference picture memory 109 based on the prediction parameters input from the prediction parameter encoding unit 111. The prediction parameters input from the prediction parameter encoding unit 111 are, for example, motion vectors or displacement vectors. The prediction image generation unit 101 reads the reference picture block at the position indicated by the motion vector or displacement vector predicted with the coded block as the starting point. The prediction image generation unit 101 generates the prediction picture block P using one of the multiple prediction methods for the read reference picture block. The prediction image generation unit 101 outputs the generated prediction picture block P to the subtraction unit 102. Note that the prediction image generation unit 101 has the same operation as the prediction image generation unit 308 already described, so the details of the generation of the prediction picture block P are omitted.

[0529] In order to select a prediction method, the prediction image generation unit 101, for example, selects the prediction method that minimizes the error value, which is based on the difference between the signal values of each pixel included in the block of the image and the signal values of each pixel corresponding to the prediction picture block P. The method of selecting the prediction method is not limited to this.

[0530] The multiple prediction methods are intra prediction, motion prediction, and merge prediction. Motion prediction is the prediction between display times in the above-mentioned inter prediction. Merge prediction is a prediction that uses a reference picture block that has already been coded and is the same as a block within a predetermined range from the coded block and prediction parameters.

[0531] When the intra prediction is selected, the prediction image generation unit 101 outputs the prediction mode IntrapredMode indicating the intra prediction mode used when generating the prediction picture block P to the prediction parameter encoding unit 111.

[0532] When the motion prediction is selected, the prediction image generation unit 101 stores the motion vector mvLX used when generating the prediction picture block P in the prediction parameter memory 108 and outputs it to the inter prediction parameter encoding unit 112. The motion vector mvLX represents the vector from the position of the coded block to the position of the reference picture block when generating the prediction picture block P. The information indicating the motion vector mvLX includes information indicating the reference picture (for example, reference picture index refIdxLX, picture order count POC), and may also be information indicating the prediction parameters. In addition, the prediction image generation unit 101 outputs the prediction mode predMode indicating the inter prediction mode to the prediction parameter encoding unit 111.

[0533] When the merged prediction is selected, the prediction image generation unit 101 outputs the merge index merge_idx indicating the selected reference picture block to the inter-frame prediction parameter encoding unit 112. In addition, the prediction image generation unit 101 outputs the prediction mode predMode indicating the merged prediction mode to the prediction parameter encoding unit 111.

[0534] In addition, the prediction image generation unit 101 may also be configured to generate motion compensation filter coefficients referenced by the motion compensation unit 3091 included in the image decoding device 31.

[0535] In addition, the prediction image generation unit 101 may also be configured to correspond to the accuracy switching of the motion vector described in the image decoding device 31. That is, the prediction image generation unit 101 may switch the accuracy of the motion vector according to the block size and QP, etc. In addition, a configuration may be adopted in which the motion vector accuracy flag mvd_dequant_flag referenced when switching the accuracy of the motion vector in the image decoding device 31 is encoded.

[0536] The subtraction unit 102 subtracts the signal value of the predicted picture block P input from the prediction image generation unit 101 from the signal value of the block corresponding to the layer image T input from the outside on a pixel-by-pixel basis to generate a residual signal. The subtraction unit 102 outputs the generated residual signal to the DCT / quantization unit 103 and the encoding parameter determination unit 110.

[0537] The DCT / quantization unit 103 performs DCT on the residual signal input from the subtraction unit 102 to calculate DCT coefficients. The DCT / quantization unit 103 quantizes the calculated DCT coefficients to obtain quantization coefficients. The DCT / quantization unit 103 outputs the obtained quantization coefficients to the entropy encoding unit 104 and the inverse quantization / inverse DCT unit 105.

[0538] In the entropy encoding unit 104, quantization coefficients are input from the DCT / quantization unit 103, and encoding parameters are input from the encoding parameter determination unit 110. Among the input encoding parameters, there are codes such as the reference picture index refIdxLX, the prediction vector index mvp_LX_idx, the differential vector mvdLX, the prediction mode predMode, and the merge index merge_idx.

[0539] It should be noted that the entropy encoding unit 104 may also adopt a configuration in which a process corresponding to the non-linear inverse quantization process described in the image decoding device 31, that is, a non-linear quantization process for the differential vector, is performed before encoding the differential vector mvdLX.

[0540] The entropy encoding unit 104 performs entropy encoding on the input quantization coefficients and encoding parameters to generate an encoded stream Te, and outputs the generated encoded stream Te to the outside.

[0541] The inverse quantization / inverse DCT unit 105 inverse quantizes the quantized coefficients input from the DCT / quantization unit 103 to obtain DCT coefficients. The inverse quantization / inverse DCT unit 105 performs an inverse DCT on the obtained DCT coefficients to calculate a decoded residual signal. The inverse quantization / inverse DCT unit 105 outputs the calculated decoded residual signal to the addition unit 106.

[0542] The addition unit 106 adds, pixel by pixel, the signal value of the predicted picture block P input from the predicted image generation unit 101 to the signal value of the decoded residual signal input from the inverse quantization / inverse DCT unit 105 to generate a reference picture block. The addition unit 106 stores the generated reference picture block in the reference picture memory 109.

[0543] The prediction parameter memory 108 stores the prediction parameters generated by the prediction parameter encoding unit 111 at predetermined positions according to the pictures and blocks to be encoded.

[0544] The reference picture memory 109 stores the reference picture blocks generated by the addition unit 106 at predetermined positions according to the pictures and blocks to be encoded.

[0545] The encoding parameter determination unit 110 selects one set from multiple sets of encoding parameters. The encoding parameters are the above-mentioned prediction parameters and the parameters to be encoded that are generated in association with the prediction parameters. The predicted image generation unit 101 generates predicted picture blocks P using these sets of encoding parameters respectively.

[0546] The encoding parameter determination unit 110 calculates the amount of information and the cost value indicating the encoding error for each of the multiple sets. The cost value is, for example, the sum of the code amount and the value obtained by multiplying the squared error by a coefficient λ. The code amount is the amount of information of the encoded stream Te obtained by performing entropy encoding on the quantization error and the encoding parameters. The squared error is the sum of the squared values of the residual values of the residual signal calculated in the subtraction unit 102 between pixels. The coefficient λ is a real number greater than zero set in advance. The encoding parameter determination unit 110 selects the set of encoding parameters for which the calculated cost value is the smallest. Thus, the entropy encoding unit 104 outputs the selected set of encoding parameters as the encoded stream Te to the outside, and does not output the sets of encoding parameters that are not selected.

[0547] The prediction parameter encoding unit 111 derives the prediction parameters used when generating a predicted picture based on the parameters input from the predicted image generation unit 101, and encodes the derived prediction parameters to generate a set of encoding parameters. The prediction parameter encoding unit 111 outputs the generated set of encoding parameters to the entropy encoding unit 104.

[0548] The prediction parameter encoding unit 111 stores the prediction parameters corresponding to the parameters selected by the encoding parameter determination unit 110 in the prediction parameter memory 108 from among the set of generated encoding parameters.

[0549] When the prediction mode predMode input from the prediction image generation unit 101 indicates an inter-frame prediction mode, the prediction parameter encoding unit 111 causes the inter-frame prediction parameter encoding unit 112 to operate. When the prediction mode predMode indicates an intra-frame prediction mode, the prediction parameter encoding unit 111 causes the intra-frame prediction parameter encoding unit 113 to operate.

[0550] The inter-frame prediction parameter encoding unit 112 derives inter-frame prediction parameters based on the prediction parameters input from the encoding parameter determination unit 110. In the inter-frame prediction parameter encoding unit 112, as a configuration for deriving inter-frame prediction parameters, it includes the same configuration as that of the inter-frame prediction parameter decoding unit 303 (refer to Figure 5 etc.) for deriving inter-frame prediction parameters. The configuration of the inter-frame prediction parameter encoding unit 112 will be described below.

[0551] The intra-frame prediction parameter encoding unit 113 determines the intra-frame prediction mode IntraPredMode indicated by the prediction mode predMode input from the encoding parameter determination unit 110 as a set of inter-frame prediction parameters. (Configuration of the inter-frame prediction parameter encoding unit)

[0552] Next, the configuration of the inter-frame prediction parameter encoding unit 112 will be described. The inter-frame prediction parameter encoding unit 112 is a unit corresponding to the inter-frame prediction parameter decoding unit 303.

[0553] Figure 13 It is a schematic diagram showing the configuration of the inter-frame prediction parameter encoding unit 112 of the present embodiment.

[0554] The inter-frame prediction parameter encoding unit 112 is configured to include a merge prediction parameter derivation unit 1121, an AMVP prediction parameter derivation unit 1122, a subtraction unit 1123, and a prediction parameter integration unit 1126.

[0555] The merge prediction parameter derivation unit 1121 has the same configuration as the above-described merge prediction parameter derivation unit 3036 (refer to Figure 7 ), and the AMVP prediction parameter derivation unit 1122 has the same configuration as the above-described AMVP prediction parameter derivation unit 3032 (refer to Figure 8 ).

[0556] In the merge prediction parameter derivation unit 1121, when the prediction mode predMode input from the prediction image generation unit 101 indicates the merge prediction mode, a merge index merge_idx is input from the encoding parameter determination unit 110. The merge index merge_idx is output to the prediction parameter integration unit 1126. The merge prediction parameter derivation unit 1121 reads out the reference picture index refIdxLX and the motion vector mvLX of the reference block indicated by the merge index merge_idx in the merge candidates from the prediction parameter memory 108. The merge candidates are reference blocks located within a predetermined range starting from the coding target block to be coded (for example, reference blocks adjacent to the lower left end, upper left end, and upper right end of the coding target block), and are reference blocks for which the coding process has been completed.

[0557] The AMVP prediction parameter derivation unit 1122 has the same configuration as the above-described AMVP prediction parameter derivation unit 3032 (refer to Figure 8 ).

[0558] That is, in the AMVP prediction parameter derivation unit 1122, when the prediction mode predMode input from the prediction image generation unit 101 indicates the inter-frame prediction mode, a motion vector mvLX is input from the encoding parameter determination unit 110. The AMVP prediction parameter derivation unit 1122 derives a prediction vector mvpLX based on the input motion vector mvLX. The AMVP prediction parameter derivation unit 1122 outputs the derived prediction vector mvpLX to the subtraction unit 1123. It should be noted that the reference picture index refIdx and the prediction vector index mvp_LX_idx are output to the prediction parameter integration unit 1126.

[0559] The subtraction unit 1123 subtracts the prediction vector mvpLX input from the AMVP prediction parameter derivation unit 1122 from the motion vector mvLX input from the encoding parameter determination unit 110 to generate a differential vector mvdLX. The differential vector mvdLX is output to the prediction parameter integration unit 1126.

[0560] When the prediction mode predMode input from the prediction image generation unit 101 indicates the merge prediction mode, the prediction parameter integration unit 1126 outputs the merge index merge_idx input from the encoding parameter determination unit 110 to the entropy encoding unit 104.

[0561] When the prediction mode predMode input from the prediction image generation unit 101 indicates the inter-frame prediction mode, the prediction parameter integration unit 1126 performs the following processing.

[0562] The prediction parameter integration unit 1126 integrates the reference picture index refIdxLX and the prediction vector index mvp_LX_idx input from the coding parameter determination unit 110, and the differential vector mvdLX input from the subtraction unit 1123. The prediction parameter integration unit 1126 outputs the integrated code to the entropy coding unit 104.

[0563] It should be noted that the inter-frame prediction parameter coding unit 112 may also include an inter-frame prediction parameter coding control unit (not shown). The inter-frame prediction parameter coding control unit instructs the entropy coding unit 104 to decode codes (syntax elements) related to inter-frame prediction, and encodes codes (syntax elements) included in the encoded data, such as the partition mode part_mode, merge flag merge_flag, merge index merge_idx, inter-frame prediction flag inter_pred_idc, reference picture index refIdxLX, prediction vector index mvp_LX_idx, and differential vector mvdLX.

[0564] In this case, the inter-frame prediction parameter coding control unit 1031 includes a merge index coding unit (corresponding to Figure 10 the merge index decoding unit 30312 of Figure 10 , a vector candidate index coding unit (corresponding to

[0565] It should be noted that the above-described image encoding device 11 and a part of the image decoding device 31 in the above-described embodiments, such as an entropy decoding unit 301, a prediction parameter decoding unit 302, a predicted image generation unit 101, a DCT / quantization unit 103, an entropy encoding unit 104, an inverse quantization / inverse DCT unit 105, an encoding parameter determination unit 110, a prediction parameter encoding unit 111, an entropy decoding unit 301, a prediction parameter decoding unit 302, a predicted image generation unit 308, and an inverse quantization / inverse DCT unit 311, can be implemented by a computer. In this case, it can be implemented by recording a program for implementing this control function on a computer-readable recording medium and causing a computer system to read and execute the program recorded on the recording medium. It should be noted that the "computer system" mentioned here refers to a computer system built in any one of the image encoding devices 11-11h and the image decoding devices 31-31h, and is a computer system including hardware such as an OS and peripheral devices. In addition, the "computer-readable recording medium" refers to a removable medium such as a floppy disk, a magneto-optical disk, a ROM, a CD-ROM, and a storage device such as a hard disk built in a computer system. Moreover, the "computer-readable recording medium" may include: a medium that dynamically stores a program for a short time, such as a communication line in the case of transmitting a program via a network such as the Internet or a communication line such as a telephone line; a medium that stores a program for a fixed time, such as a volatile memory inside a computer system of a server or a client in this case. In addition, the above program may be a program for implementing a part of the foregoing functions, or a program that can further combine the foregoing functions with a program already recorded in the computer system to implement the functions.

[0566] In addition, a part or all of the above-described image encoding device 11 and image decoding device 31 in the above-described embodiments can be implemented as an integrated circuit such as an LSI (Large Scale Integration). Each functional block of the image encoding device 11 and the image decoding device 31 can be individually processorized, or a part or all of them can be integrated and processorized. In addition, the method of integrating into an integrated circuit is not limited to LSI, and can also be implemented by a dedicated circuit or a general-purpose processor. In addition, in the case where an integrated circuit technology replacing LSI appears due to the progress of semiconductor technology, an integrated circuit based on this technology can also be used.

[0567] As described above, one embodiment of the present invention has been described in detail with reference to the accompanying drawings. However, the specific configuration is not limited to the above, and various design changes and the like can be made without departing from the gist of the present invention.

[0568] 〔Application Example〕

[0569] The above-described image encoding device 11 and image decoding device 31 can be mounted on various devices for transmitting, receiving, recording, and reproducing moving images and utilized. It should be noted that the moving image can be a natural moving image captured by a camera or the like, or an artificial moving image (including CG and GUI) generated by a computer or the like.

[0570] First, with reference to Figure 33 , a case where the above-described image encoding device 11 and image decoding device 31 can be utilized for transmitting and receiving moving images will be described.

[0571] Figure 33 (a) is a block diagram showing the configuration of a transmitting device PROD_A equipped with the image encoding device 11. As Figure 33 (a) shows, the transmitting device PROD_A includes: an encoding unit PROD_A1 that obtains encoded data by encoding a moving image, a modulation unit PROD_A2 that obtains a modulation signal by modulating a carrier wave based on the encoded data obtained by the encoding unit PROD_A1, and a transmitting unit PROD_A3 that transmits the modulation signal obtained by the modulation unit PROD_A2. The above-described image encoding device 11 serves as this encoding unit PROD_A1.

[0572] The transmitting device PROD_A may further include: a camera PROD_A4 that captures a moving image, a recording medium PROD_A5 on which a moving image is recorded, an input terminal PROD_A6 for inputting a moving image from the outside, and an image processing unit A7 that generates or processes an image, as a supply source of the moving image input to the encoding unit PROD_A1. In Figure 33 (a), an example is shown where the transmitting device PROD_A has all of these configurations, but a part of them may be omitted.

[0573] It should be noted that the recording medium PROD_A5 can be a medium on which an unencoded moving image is recorded, or a medium on which a moving image encoded in a recording encoding method different from the transmission encoding method is recorded. In the latter case, it is preferable to interpose a decoding unit (not shown) that decodes the encoded data read from the recording medium PROD_A5 according to the recording encoding method between the recording medium PROD_A5 and the encoding unit PROD_A1.

[0574] Figure 33 (b) is a block diagram showing the configuration of a receiving device PROD_B equipped with the image decoding device 31. As Figure 33As shown in (b), the receiving device PROD_B includes: a receiving unit PROD_B1 that receives a modulated signal, a demodulating unit PROD_B2 that obtains encoded data by demodulating the modulated signal received by the receiving unit PROD_B1, and a decoding unit PROD_B3 that obtains a moving image by decoding the encoded data obtained by the demodulating unit PROD_B2. The above-described image decoding device 31 serves as this decoding unit PROD_B3.

[0575] The receiving device PROD_B may further include a display PROD_B4 that displays a moving image, a recording medium PROD_B5 for recording a moving image, and an output terminal PROD_B6 for outputting a moving image to the outside, as destinations for supplying the moving image output from the decoding unit PROD_B3. Figure 33 In (b), an example is shown in which the receiving device PROD_B has all of these configurations, but some of them may be omitted.

[0576] It should be noted that the recording medium PROD_B5 may be a medium for recording an unencoded moving image, or may be a medium encoded in a recording encoding method different from the encoding method for transmission. In the latter case, it is preferable to interpose an encoding unit (not shown) that encodes the moving image obtained from the decoding unit PROD_B3 according to the recording encoding method between the decoding unit PROD_B3 and the recording medium PROD_B5.

[0577] It should be noted that the transmission medium for transmitting the modulated signal may be wireless or wired. In addition, the transmission scheme for transmitting the modulated signal may be broadcasting (here, referring to a transmission scheme in which the destination is not specified in advance), or may be communication (here, referring to a transmission scheme in which the destination is specified in advance). That is, the transmission of the modulated signal can be achieved by any one of wireless broadcasting, wired broadcasting, wireless communication, and wired communication.

[0578] For example, a terrestrial digital broadcasting station (broadcasting equipment, etc.) / reception station (television receiver, etc.) is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by wireless broadcasting. In addition, a cable television broadcasting station (broadcasting equipment, etc.) / reception station (television receiver, etc.) is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by wired broadcasting.

[0579] In addition, servers (workstations, etc.) / clients (TV receivers, personal computers, smartphones, etc.) that use Internet-based VOD (Video On Demand) services, moving image sharing services, etc. are an example of a transmission device PROD_A / reception device PROD_B that communicates and transmits modulated signals (usually, either wireless or wired is used as the transmission medium in a LAN, and wired is used as the transmission medium in a WAN). Here, personal computers include desktop PCs, laptop PCs, and tablet PCs. In addition, smartphones also include multifunctional portable phone terminals.

[0580] It should be noted that, in addition to the function of decoding the encoded data downloaded from the server and displaying it on the monitor, the client of the moving image sharing service also has the function of encoding the moving images captured by a camera and uploading them to the server. That is, the client of the moving image sharing service functions as both the transmission device PROD_A and the reception device PROD_B.

[0581] Next, with reference to Figure 34 , a case where the above-described image encoding device 11 and image decoding device 31 can be used for recording and reproducing moving images will be described.

[0582] Figure 34 (a) is a block diagram showing the configuration of a recording device PROD_C equipped with the above-described image encoding device 11. As shown in Figure 34 (a), the recording device PROD_C includes: an encoding unit PROD_C1 that obtains encoded data by encoding moving images, and a writing unit PROD_C2 that writes the encoded data obtained by the encoding unit PROD_C1 to a recording medium PROD_M. The above-described image encoding device 11 serves as this encoding unit PROD_C1.

[0583] It should be noted that the recording medium PROD_M can be (1) a type of recording medium built into the recording device PROD_C such as an HDD (Hard Disk Drive) or an SSD (Solid State Drive), (2) a type of recording medium connected to the recording device PROD_C such as an SD memory card or a USB (Universal Serial Bus) flash drive, or (3) a type of recording medium loaded into a drive device (not shown) built into the recording device PROD_C such as a DVD (Digital Versatile Disc) or a BD (Blu-ray Disc, registered trademark).

[0584] In addition, the recording device PROD_C may further include: a camera PROD_C3 for shooting a moving image, an input terminal PROD_C4 for inputting a moving image from the outside, a receiving unit PROD_C5 for receiving a moving image, and an image processing unit C6 for generating or processing an image, as a supply source of the moving image input to the encoding unit PROD_C1. Figure 34 In FIG. (a), an example is shown in which the recording device PROD_C includes all of these configurations, but a part of them may be omitted.

[0585] It should be noted that the receiving unit PROD_C5 may receive an unencoded moving image or encoded data encoded in a transmission encoding method different from the recording encoding method. In the latter case, it is preferable to interpose a transmission decoding unit (not shown) for decoding the encoded data encoded in the transmission encoding method between the receiving unit PROD_C5 and the encoding unit PROD_C1.

[0586] Examples of such a recording device PROD_C include: a DVD recorder, a BD recorder, an HDD (Hard Disk Drive) recorder, etc. (in this case, the input terminal PROD_C4 or the receiving unit PROD_C5 becomes the main supply source of the moving image). In addition, a camcorder (in this case, the camera PROD_C3 becomes the main supply source of the moving image), a personal computer (in this case, the receiving unit PROD_C5 or the image processing unit C6 becomes the main supply source of the moving image), a smartphone (in this case, the camera PROD_C3 or the receiving unit PROD_C5 becomes the main supply source of the moving image), etc. are also examples of such a recording device PROD_C.

[0587] Figure 34 (b) is a block diagram showing the configuration of a playback device PROD_D equipped with the above-described image decoding device 31. As Figure 34 As shown in (b), the playback device PROD_D includes: a reading unit PROD_D1 for reading the encoded data written in the recording medium PROD_M, and a decoding unit PROD_D2 for obtaining a moving image by decoding the encoded data read by the reading unit PROD_D1. The above-described image decoding device 31 serves as this decoding unit PROD_D2.

[0588] Note that the recording medium PROD_M can be (1) a type of recording medium built into the playback device PROD_D, such as an HDD or SSD, (2) a type of recording medium connected to the playback device PROD_D, such as an SD memory card or a USB flash drive, or (3) a type of recording medium loaded into a drive device (not shown) built into the playback device PROD_D, such as a DVD or a BD.

[0589] In addition, the playback device PROD_D may further include a display PROD_D3 for displaying a moving image, an output terminal PROD_D4 for outputting the moving image to the outside, and a transmission unit PROD_D5 for transmitting the moving image, as destinations for supplying the moving image output by the decoding unit PROD_D2. Figure 34 In the example of (b), the playback device PROD_D includes all of these configurations, but some of them may be omitted.

[0590] Note that the transmission unit PROD_D5 can transmit an unencoded moving image or encoded data encoded in a transmission encoding method different from the recording encoding method. In the latter case, it is preferable to provide an encoding unit (not shown) for encoding the moving image in the transmission encoding method between the decoding unit PROD_D2 and the transmission unit PROD_D5.

[0591] Examples of such a playback device PROD_D include a DVD player, a BD player, an HDD player, etc. (in this case, the output terminal PROD_D4 connected to a television receiver or the like becomes the main destination for supplying the moving image). In addition, a television receiver (in this case, the display PROD_D3 becomes the main destination for supplying the moving image), a digital signage (also called an electronic signboard, an electronic bulletin board, etc., the display PROD_D3 or the transmission unit PROD_D5 becomes the main destination for supplying the moving image), a desktop PC (in this case, the output terminal PROD_D4 or the transmission unit PROD_D5 becomes the main destination for supplying the moving image), a laptop or tablet PC (in this case, the display PROD_D3 or the transmission unit PROD_D5 becomes the main destination for supplying the moving image), a smartphone (in this case, the display PROD_D3 or the transmission unit PROD_D5 becomes the main destination for supplying the moving image), etc. are also examples of such a playback device PROD_D.

[0592] (Hardware implementation and software implementation)

[0593] In addition, each block of the above-described image decoding device 31 and image encoding device 11 can be implemented hardware-wise by a logic circuit formed on an integrated circuit (IC chip), or can be implemented software-wise using a CPU (Central Processing Unit).

[0594] In the latter case, each of the above devices includes: a CPU that executes commands of a program for implementing each function, a ROM (Read Only Memory) that stores the program, a RAM (Random Access Memory) that expands the program, and a storage device (recording medium) such as a memory that stores the program and various data. Then, the object of the present invention can also be achieved by the following method: supplying a recording medium that stores a software for implementing the above functions, that is, a program code (executable form program, intermediate code program, source program) of a control program of each of the above devices in a computer-readable manner, to each of the above devices, and the computer (or CPU, MPU) reads the program code recorded on the recording medium and executes it.

[0595] As the above recording medium, for example, tape-like media such as magnetic tapes and cassette tapes, disk-like media including floppy disks (registered trademark) / hard disks, optical disk-like media such as CD-ROMs (Compact Disc Read-Only Memories) / MO disks (Magneto-Optical disks) / MDs (Mini Disks) / DVDs (Digital Versatile Discs) / CD-Rs (CD Recordables) / Blu-ray Discs (registered trademark), card-like media such as IC cards (including memory cards) / optical cards, semiconductor memory-like media such as mask ROMs / EPROMs (Erasable Programmable Read-Only Memories) / EEPROMs (Electrically Erasable and Programmable Read-Only Memories, registered trademark) / flash ROMs, or logic circuit-like media such as PLDs (Programmable logic devices) / FPGAs (Field Programmable Gate Arrays) can be used.

[0596] In addition, each of the above-described devices may be configured to be connectable to a communication network, and the above program code may be supplied via the communication network. The communication network only needs to be capable of transmitting the program code, and there is no particular limitation. For example, the Internet, intranet, extranet, LAN (Local Area Network), ISDN (Integrated Services Digital Network), VAN (Value-Added Network), CATV (Community Antenna television / Cable Television) communication network, virtual private network, telephone line network, mobile communication network, satellite communication network, etc. may be used. In addition, the transmission medium constituting the communication network only needs to be a medium capable of transmitting the program code, and is not limited to a specific configuration or type. For example, it can be used in wired media such as IEEE (Institute of Electrical and Electronic Engineers) 1394, USB, power line transmission, cable TV line, telephone line, ADSL (Asymmetric Digital Subscriber Line) line, etc., or in wireless media such as IrDA (Infrared Data Association), infrared rays like a remote control, Bluetooth (registered trademark), IEEE802.11 wireless, HDR (High Data Rate), NFC (Near Field Communication), DLNA (Digital Living Network Alliance, registered trademark), mobile phone network, satellite line, terrestrial digital network, etc. It should be noted that the present invention can also be implemented in the form of a computer data signal embedded in a carrier wave that embodies the above program code by electronic transmission.

[0597] The present invention is not limited to the above-described embodiments, and various modifications can be made within the scope shown in the claims. That is, embodiments obtained by combining technical solutions appropriately modified within the scope shown in the claims are also included in the technical scope of the present invention.

[0598] (Cross-reference to related applications)

[0599] This application claims the benefit of priority from Japanese Patent Application No. 2016-017444 filed on February 1, 2016, and incorporates the entire contents thereof by reference in this specification.

[0600] Industrial Applicability

[0601] The present invention can be preferably applied to an image decoding apparatus that decodes encoded data obtained by encoding image data, and an image encoding apparatus that generates encoded data obtained by encoding image data. Further, it can be preferably applied to a data structure of encoded data generated by an image encoding apparatus and referred to by an image decoding apparatus.

[0602] Symbol Explanation

[0603] 11: Image encoding apparatus (moving image encoding apparatus)

[0604] 31: Image decoding apparatus (moving image decoding apparatus)

[0605] 302: Prediction parameter decoding unit (predicted image generation apparatus)

[0606] 303: Inter-frame prediction parameter decoding unit (motion vector derivation unit)

[0607] 308: Predicted image generation unit (predicted image generation apparatus)

[0608] 3031: Inter-frame prediction parameter decoding control unit (motion vector derivation unit)

[0609] 30912: Compensation filter unit (filter unit)

Claims

1. A predictive image generation device for generating a predictive image, the predictive image generation device comprising: An inter-frame prediction parameter decoding control circuit that derives a differential motion vector by using a motion vector difference value, and decodes a flag indicating the accuracy of the motion vector from encoded data when the motion vector difference value is not equal to zero; and A predictive image generation circuit that generates a predictive image based on the differential motion vector and a predictive motion vector by using the motion vector, wherein, The inter-frame prediction parameter decoding control circuit determines a shift value for a loop process for deriving the predictive motion vector by using the flag.

2. A video decoding device comprising: The predictive image generation device according to claim 1, wherein, The video decoding device decodes an encoded target image by adding a residual image to the predictive image or subtracting the residual image from the predictive image.

3. A video encoding device comprising: The predictive image generation device according to claim 1, wherein, The video encoding device encodes the residual between the predictive image and the encoded target image.

Citation Information

Patent Citations

  • Compressor

    JP2016017444A

  • Motion compensating apparatus

    CN101848385A

  • Image decoder apparatus, image encoder apparatus and methods and programs thereof

    CN102948150A