Prediction image generation device, motion image decoding device, and motion image encoding device
By using weighted average filter coefficients and appropriate switching motion vector accuracy in motion image encoding and decoding techniques, the problem of increasing storage amount and coding efficiency not necessarily improved due to high-precision motion compensation is solved, and more efficient image encoding and decoding is achieved.
Patent Information
- Application Number
- CN202210849198.5
- 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-03-25
- Estimated Expiration
- 2037-01-26
AI Technical Summary
In motion image encoding and decoding techniques, high-precision motion compensation processing leads to an increase in filter coefficients and an increase in storage amount, and the use of high-precision motion vectors leads to an increase in the amount of differential vector codes, and the encoding efficiency may not be improved.
By performing motion compensation on the reference image, a filtering unit and a motion vector deriving unit are used to generate a predicted image. The filtering unit performs filtering processing using the weighted average filter coefficients, and the motion vector derivation unit switches the accuracy of the motion vector based on the size of the prediction block and the quantization parameters.
The need to store filter coefficients is reduced, encoding efficiency is improved, and more efficient image encoding and decoding is achieved by appropriately switching the accuracy of motion vectors.
Smart Images

Figure CN115297330B_ABST
Abstract
Description
[0001] This application is a divisional application of the PCT national phase application with a filing date of January 26, 2017 and national application number 201780008957.2. Technical Field
[0002] The present invention relates to a prediction image generation device, a motion image decoding device, and a motion 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 the moving image and a moving image decoding device that generates a decoded image by decoding the encoded data are used.
[0004] As specific moving picture coding methods, for example, methods proposed in H.264 / MPEG-4.AVC and HEVC (High-Efficiency Video Coding) can be cited.
[0005] In this motion image encoding method, the image (picture) constituting the motion image is managed in a hierarchical structure formed by slices obtained by dividing the image, coding units (sometimes also called coding units) obtained by dividing the slices, and prediction units (PUs) and transform units (TUs) which are blocks obtained by dividing the coding units, so that encoding and decoding are performed by blocks.
[0006] In addition, in such a moving picture coding method, a prediction image is usually generated based on a local decoded image obtained by encoding / decoding an input image, and a prediction residual (sometimes also referred to as a "difference image" or "residual image") obtained by subtracting the prediction image from the input image (original image) is encoded. Examples of a method for generating a prediction image include inter-picture prediction (inter-frame prediction) and intra-picture prediction (intra-frame prediction).
[0007] In addition, Non-Patent Document 1 can be cited as a recent moving picture encoding and decoding technology.
[0008] Prior art literature
[0009] Non-patent literature
[0010] Non-patent document 1: Video / JVET, "Algorithm Description of Joint ExplorationTestModel 1 (JEM 1)", INTERNATIONAL ORGANIZATION FOR STANDARDIZATIONORGANISATION INTERNATIONALE DE NORMALISATION ISO / IEC JTC1 / SC29 / WG11 CODING OFMOVING PICTURES AND AUDIO, ISO / IEC JTC1 / SC29 / WG11 / N15790, October 2015, Geneva, CH. Summary of the invention
[0011] Problem that the invention aims to solve
[0012] In recent years, in the motion image encoding and decoding technology, a technology using motion compensation filtering in the motion compensation process when generating a predicted image is implemented. On the other hand, the more the accuracy of motion compensation is improved, the more filter coefficients are required, and the first problem that the amount of memory required to store the filter coefficients in advance increases.
[0013] In recent years, in the motion picture encoding and decoding technology, a technology for generating a predicted image using a high-precision motion vector has been implemented. On the other hand, in order to use a high-precision motion vector, the amount of code of the differential vector increases, thus generating a second problem that the encoding efficiency may not necessarily be improved.
[0014] The present invention provides an image decoding device, an image encoding device, and a predicted image generating device that can solve at least one of the first and second problems described above.
[0015] Technical Solution
[0016] In order to solve the above-mentioned problems, a predicted image generating device of one scheme of the present invention generates a predicted image by performing motion compensation on a reference image, and the predicted image generating device comprises: a filtering unit, which acts on an image to which the motion vector is applied with a pixel accuracy of 1 / Mac obtained by causing the motion vector to act on the above-mentioned reference image, and the above-mentioned filtering unit applies filtering processing using the filter coefficient mcFilter[i][k] specified by the phase i (i is an integer greater than 0 and less than Mac-1) and the filter coefficient position k (k is an integer greater than 0 and less than Ntaps-1, and Ntaps is the number of taps) to the above-mentioned image to which the motion vector is applied, and the above-mentioned filter coefficient mcFilter[i][k] is in a relationship of a weighted average of the filter coefficient mcFilter[p][k] (P≠i) and the filter coefficient mcFilter[q][k] (Q≠i).
[0017] In addition, in order to solve the above-mentioned problem, a prediction image generating device of one scheme of the present invention generates a prediction image according to a prediction block by performing motion compensation on a reference image, and the prediction image generating device comprises: a motion vector derivation unit, which derives a motion vector by adding or subtracting a differential vector to the prediction vector according to the prediction block, and the motion vector derivation unit switches the accuracy of the motion vector derived relative to the prediction block according to the size of the prediction block.
[0018] In addition, in order to solve the above-mentioned problem, a prediction image generating device of one scheme of the present invention generates a prediction image according to a prediction block by performing motion compensation on a reference image, and the prediction image generating device comprises: a motion vector derivation unit, which derives a motion vector by adding or subtracting a differential vector to the prediction vector according to the prediction block, and the motion vector derivation unit switches the accuracy of the motion vector derived relative to the prediction block according to the size of a quantization parameter related to the prediction block.
[0019] In addition, in order to solve the above-mentioned problem, a prediction image generating device of one scheme of the present invention generates a prediction image by performing motion compensation on a reference image, and the prediction image generating device comprises: a motion vector derivation unit, which derives a motion vector by adding or subtracting an inverse quantized differential vector to the prediction vector, and the motion vector derivation unit switches the accuracy of the inverse quantization processing on the differential vector according to the quantization value of the quantized differential vector.
[0020] In addition, in order to solve the above-mentioned problems, a predicted image generating device of one scheme of the present invention generates a predicted image by performing motion compensation on a reference image, and the predicted image generating device comprises: a motion vector derivation unit, which derives a motion vector by adding or subtracting a differential vector from a predicted vector, and the motion vector derivation unit switches the precision of inverse quantization processing on the differential vector according to the quantization value of the quantized differential vector when a flag indicating the precision of the motion vector indicates a first value, and performs inverse quantization processing on the differential vector with a fixed precision regardless of the quantization value of the quantized differential vector when the flag indicating the precision of the motion vector indicates a second value.
[0021] In addition, in order to solve the above-mentioned problems, a predicted image generating device of one scheme of the present invention generates a predicted image by performing motion compensation on a reference image, and the predicted image generating device comprises: a motion vector derivation unit, which derives a motion vector by adding or subtracting a differential vector from a predicted vector, and the motion vector derivation unit switches the accuracy of inverse quantization processing on the differential vector to the first accuracy or the second accuracy according to the quantization value of the quantized differential vector when a flag indicating the accuracy of the motion vector indicates a first value, and switches the accuracy of inverse quantization processing on the differential vector to the third accuracy or the fourth 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, and at least one of the first accuracy and the second accuracy is higher than the third accuracy and the fourth accuracy.
[0022] Beneficial Effects
[0023] According to the above configuration, at least one of the first and second problems described above can be solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 This is a diagram showing the hierarchical structure of data in a coded stream according to this embodiment.
[0025] Figure 2 It is a diagram showing a pattern of a PU partition mode. Figure 2 (a) to (h) respectively show partition shapes when 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 This is a conceptual diagram showing an example of a reference picture list.
[0027] Figure 4 This is a conceptual diagram showing an example of a reference picture.
[0028] Figure 5This is a schematic diagram showing the structure of the image decoding device according to this embodiment.
[0029] Figure 6 This is a schematic diagram showing the structure of the inter-frame prediction parameter decoding unit according to this embodiment.
[0030] Figure 7 This is a schematic diagram showing the structure of the combined prediction parameter derivation unit of this embodiment.
[0031] Figure 8 It is a schematic diagram showing the structure of the AMVP prediction parameter derivation unit of this embodiment.
[0032] Fig. 9 is a conceptual diagram showing an example of vector candidates.
[0033] Fig.10 This is a schematic diagram showing the structure of the inter-frame prediction parameter decoding control unit according to this embodiment.
[0034] Fig.11 This is a schematic diagram showing the structure of the inter-frame prediction image generation unit according to this embodiment.
[0035] Fig.12 This is a block diagram showing the structure of the image encoding device according to this embodiment.
[0036] Fig.13 This is a schematic diagram showing the structure of the inter-frame prediction parameter encoding unit according to this embodiment.
[0037] Fig.14 It is a schematic diagram showing the configuration of an image transmission system according to an embodiment of the present invention.
[0038] Fig.15 This is a flowchart showing the flow of inter-prediction syntax decoding processing performed by the inter-prediction parameter decoding control unit of this embodiment.
[0039] Fig.16 This is a flowchart showing an example of differential vector decoding processing according to the present embodiment.
[0040] Fig.17 This is a flowchart showing another example of the differential vector decoding process according to the present embodiment.
[0041] Fig.18 This is a flowchart showing the flow of motion vector derivation processing performed by the inter-frame prediction parameter decoding unit of this embodiment.
[0042] Fig.19 : is a flowchart showing an example of the differential vector derivation process according to the present embodiment.
[0043] Fig. 20: is a flowchart showing an example of the prediction vector loop processing according to the present embodiment.
[0044] Fig.21 Detailed description of an example of the motion vector scale derivation process according to the present embodiment.
[0045] Fig. 22 Detailed description of another example of the motion vector scale derivation process according to the present embodiment.
[0046] Fig.23 Detailed description of another example of the motion vector scale derivation process according to the present embodiment.
[0047] Fig.24 (a)~ Fig.24 (c) is a table showing the relationship between the basic vector accuracy of the present embodiment and a parameter (shiftS) indicating the motion vector accuracy set (switched) according to the block size of the target block.
[0048] Fig.25 (a)~ Fig.25 (c) is a table showing the relationship with a parameter (shiftS) indicating the motion vector accuracy set (switched) according to the block size of the target block and the motion vector accuracy flag in the present embodiment.
[0049] Fig.26 (a)~ Fig.26 (c) is a table showing a parameter (shiftS) indicating the motion vector accuracy set (switched) according to the QP of this embodiment.
[0050] Fig. 27 (a) and Fig. 27 (b) is a table showing the motion vector accuracy (shiftS) set (switched) according to the QP and the motion vector accuracy flag of this embodiment.
[0051] Fig.28 It is a graph showing the relationship between the quantized difference vector and the inversely quantized difference vector according to the present embodiment.
[0052] Fig.29 Detailed description of another example of the motion vector scale derivation process according to the present embodiment.
[0053] Fig.30 It is a block diagram showing the specific structure of the motion compensation unit according to this embodiment.
[0054] Fig.31 This is a diagram showing an example of filter coefficients according to this embodiment.
[0055] Fig.32(a) is a diagram showing an example in which the motion compensation filter unit according to the present embodiment calculates filter coefficients of odd-numbered phases from filter coefficients of even-numbered phases. Fig.32 (b) is a diagram showing an example in which the motion compensation filter unit according to the present embodiment calculates filter coefficients of even phases from filter coefficients of odd phases.
[0056] Fig.33 It is a diagram showing the configuration of a transmitting device equipped with the above-mentioned image encoding device, and a receiving device equipped with the above-mentioned image decoding device. Fig.33 (a) represents a transmitting device equipped with an image encoding device, Fig.33 (b) shows a receiving device equipped with an image decoding device.
[0057] Fig.34 It is a diagram showing the structure of a recording device equipped with the above-mentioned image encoding device and a reproduction device equipped with the above-mentioned image decoding device. Fig.34 (a) represents a recording device equipped with an image encoding device, Fig.34 (b) shows a playback device equipped with an image decoding device. DETAILED DESCRIPTION
[0058] (First Embodiment)
[0059] Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0060] Fig.14 It is a schematic diagram showing the configuration of the image transmission system 1 according to the present embodiment.
[0061] The image transmission system 1 is a system for transmitting a code obtained by encoding an encoding target image and displaying an image obtained by decoding the transmitted code. The image transmission system 1 includes an image encoding device (motion image encoding device) 11, a network 21, an image decoding device (motion image decoding device) 31, and an image display device 41.
[0062] The image encoding device 11 inputs a signal T indicating a single-layer or multi-layer image. Layer is a concept used to distinguish multiple images when there is more than one image constituting a certain time. For example, when the same image is encoded in multiple layers with different image quality and resolution, it becomes scalable coding, and when images of different viewpoints are encoded in multiple layers, it becomes view scalable coding. When prediction (inter-layer prediction, inter-viewpoint prediction) is performed between images of multiple layers, the coding efficiency is greatly improved. In addition, even in the case of no prediction (simulcast), the coded data can be aggregated.
[0063] The network 21 transmits the coded stream Te generated by the image coding device 11 to the image decoding device 31. The network 21 is the Internet, a wide area network (WAN), a small network (LAN) or a combination of these. The network 21 is not necessarily limited to a two-way communication network, and may be a one-way or two-way communication network that transmits broadcast waves such as terrestrial digital broadcasting and satellite broadcasting. 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, a registered trademark) that records the coded stream Te.
[0064] The image decoding device 31 decodes each coded stream Te transmitted through the network 21 , and generates one or more decoded layer images Td (decoded viewpoint images Td) that have been respectively decoded.
[0065] The image display device 41 displays all or part of one or more decoded layer images Td generated by the image decoding device 31. For example, in viewpoint scalable coding, a three-dimensional image (stereoscopic image) or a free viewpoint image is displayed when all are displayed, and a two-dimensional image is displayed when a part is displayed. The image display device 41 includes display devices such as a liquid crystal display and an organic EL (Electro-luminescence) display. In addition, when the image decoding device 31 and the image display device 41 have high processing capabilities in spatial scalable coding and signal-to-noise ratio (SNR) scalable coding, an enhanced layer image with high image quality is displayed. In addition, when the image decoding device 31 and the image display device 41 have only low processing capabilities, a basic layer image (base layer image) that does not require high processing capabilities and display capabilities of the enhancement layer is displayed.
[0066] <Structure of coded stream Te>
[0067] Before describing in detail the image encoding device 11 and the image decoding device 31 of the present embodiment, the data structure of the coded stream Te generated by the image encoding device 11 and decoded by the image decoding device 31 will be described.
[0068] Figure 1 : is a diagram showing the hierarchical structure of data in a coded stream Te. The coded stream Te exemplarily includes a sequence and a plurality of pictures constituting the sequence. Figure 1 (a)~ Figure 1(f) is a diagram that respectively represents a sequence layer of a predetermined sequence SEQ, a picture layer of a predetermined picture PICT, a slice layer of a predetermined slice S, a slice data layer of predetermined slice data, a coding tree layer of a coding tree unit included in the slice data, and a 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 that the image decoding device 31 refers to for decoding a sequence SEQ to be processed (hereinafter also referred to as a target sequence) is defined. Figure 1 As shown in (a), it includes a video parameter set (VideoParameter Set), a sequence parameter set SPS (Sequence Parameter Set), a picture parameter set PPS (PictureParameter Set), a picture PICT, and supplemental enhancement information SEI (Supplemental EnhancementInformation). Here, the value after # indicates the layer ID. Figure 1 , an example is shown in which #0 and #1, that is, the encoded data of layer 0 and layer 1 exist, but the type of layer and the number of layers are not limited thereto.
[0071] The video parameter set VPS defines a set of coding parameters common to a plurality of moving images, and a set of coding parameters associated with a plurality of layers included in the moving image and each layer, in a moving image.
[0072] In the sequence parameter set SPS, a set of coding parameters that the image decoding device 31 refers to for decoding 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] The picture parameter set PPS specifies a set of coding parameters that the image decoding device 31 refers to for decoding each picture in the target sequence. For example, it includes a reference value (pic_init_qp_minus26) of the quantization width for decoding the picture 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 target sequence.
[0074] (Image layer)
[0075] In the picture layer, a set of data that the image decoding device 31 refers to for decoding a picture PICT (hereinafter also referred to as a target picture) to be processed is defined. Figure 1 As shown in (b), it includes slices S0 to SNS-1 (NS is the total number of slices included in the picture PICT).
[0076] It should be noted that, in the following, when there is no need to distinguish the slices S0 to SNS-1, the code suffix may be omitted and described. The same applies to other data included in the coded stream Te and marked with a suffix described below.
[0077] (Slice layer)
[0078] In the slice layer, a set of data that the image decoding device 31 refers to for decoding a slice S (also referred to as a target slice) to be processed is defined. Figure 1 As shown in (c), it includes a slice header SH and slice data SDATA.
[0079] The slice header SH includes a coding parameter group that the image decoding device 31 refers to in order to determine a decoding method for a target slice. Slice type designation information (slice_type) that designates a slice type is an example of a coding parameter included in the slice header SH.
[0080] Examples of slice types that can be specified by slice type designation information include: (1) I slices that use only intra-frame prediction during encoding, (2) P slices that use unidirectional prediction or intra-frame prediction during encoding, and (3) B slices that use unidirectional prediction, bidirectional prediction, or intra-frame prediction during encoding.
[0081] It should be noted that the slice header SH may also include a reference (pic_parameter_set_id) to the picture parameter set PPS included in the above sequence layer.
[0082] (Slice Data Layer)
[0083] The slice data layer defines a set of data that the image decoding device 31 refers to for decoding the slice data SDATA to be processed. Figure 1 As shown in (d), a coded tree block (CTB) is included. A CTB is a block of a fixed size (for example, 64×64) constituting a slice, and is sometimes also referred to as a largest coding unit (LCU) or a coded tree unit (CTU).
[0084] (Coding tree layer)
[0085] The coding tree layer is as follows Figure 1 As shown in (e), a set of data that the image decoding device 31 refers to for decoding the coding tree block of the processing object is specified. 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 middle node of the quadtree is the coding quadtree (CQT: Coded Quad Tree), and the coding tree block itself is also specified as the top-level CQT. The CQT includes a split flag (split_flag), and 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 split, but has a coding unit (CU: Coded Unit) as a node. The coding unit CU is the end node of the coding tree layer, and no further partitioning is performed 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 may 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 follows Figure 1 As shown in (f), a set of data that the image decoding device 31 refers to for decoding the coding unit to be processed is specified. Specifically, the coding unit is composed of a coding tree, a prediction tree, a transform tree, and a CU header CUF. The coding tree specifies a split flag, a split pattern, a prediction mode, etc.
[0089] In the prediction tree, prediction information (reference picture index, motion vector, etc.) of each prediction block obtained by dividing the coding unit into one or more is specified. In other terms, a prediction block is one or more non-repeating regions constituting a coding unit. In addition, the prediction tree contains one or more prediction blocks obtained by the above-mentioned division. It should be noted that the prediction unit obtained by further dividing the prediction block is referred to as a "sub-block" below. A sub-block (prediction block) is composed of one or more pixels. When the size of the prediction block is equal to that of the sub-block, there is one sub-block in the prediction block. 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 divided into two parts horizontally and two parts vertically, thereby being divided into four sub-blocks.
[0090] The prediction process is performed for each prediction block (sub-block). Hereinafter, a prediction block as a prediction unit is also referred to as a prediction unit (PU).
[0091] There are two types of partitioning in the prediction tree: intra prediction and inter prediction. Intra prediction is prediction within the same picture, while inter prediction is prediction between different pictures (for example, between display times, between layer images).
[0092] In the case of intra prediction, the partitioning methods are 2N×2N (same size as the coding unit) and N×N.
[0093] In addition, in the case of inter-frame prediction, the partitioning method is encoded according to the PU partitioning mode (part_mode) of the encoded data. The partitioning includes 2N×2N (same size as the coding unit), 2N×N, 2N×nU, 2N×nD, N×2N, nL×2N, nR×2N, and N×N. It should be noted that 2N×nU means that the 2N×2N coding unit is divided 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 divided 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 divided 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 divided into two regions, 1.5N×2N and 0.5N×1.5N, from left to right. The number of divisions is one, two, or four, so the number of PUs included in the CU is one to four. These PUs are sequentially denoted as PU0, PU1, PU2, and PU3.
[0094] Figure 2 (a)~ Figure 2 In (h), the position of the boundary of the PU partition in the CU is specifically shown for each partition type.
[0095] It should be noted that Figure 2 (a) shows a 2N×2N PU partition mode in which CU partitioning is not performed.
[0096] also, Figure 2 (b) Figure 2 (c), and Figure 2 (d) shows the shapes of partitions when the PU partition modes are 2N×N, 2N×nU, and 2N×nD. Hereinafter, partitions when the PU partition modes are 2N×N, 2N×nU, and 2N×nD are collectively referred to as horizontally long partitions.
[0097] also, Figure 2 (e) Figure 2 (f), and Figure 2 (g) shows the shapes of partitions when the PU partition mode is N×2N, nL×2N, and nR×2N. Hereinafter, partitions when the PU partition type is N×2N, nL×2N, and nR×2N are collectively referred to as vertical partitions.
[0098] In addition, the horizontally long partitions and the vertically long partitions are collectively referred to as rectangular partitions.
[0099] also, Figure 2 (h) shows the shape of the partition when the PU partition mode is N×N. Based on the shape of the partition, Figure 2 (a) and Figure 2 The PU partitioning mode of (h) is called square partitioning. Figure 2 (b)~ Figure 2 The PU partitioning mode of (g) is called non-square partitioning.
[0100] In addition, Figure 2 (a)~ Figure 2 In (h), the number assigned to each region indicates the identification number of the region, and the regions are processed in the order of the identification numbers. That is, the identification numbers indicate the scanning order of the partitions.
[0101] In addition, Figure 2 (a)~ Figure 2 In (h), the upper left is assumed to be 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 position and size of each transform block are specified. If expressed in other terms, the transform block is one or more non-repeating regions constituting the coding unit. In addition, the transform tree contains one or more transform blocks obtained by the above-mentioned division.
[0103] The transform tree partitioning includes partitioning in which a region having the same size as a coding unit is allocated as a transform block, and partitioning by recursive quadtree partitioning similar to the above-mentioned tree block partitioning.
[0104] The transform process is performed on each transform block. Hereinafter, a transform block as a unit of transform is also referred to as a transform unit (TU).
[0105] (Prediction parameters)
[0106] The prediction image of the prediction unit is derived from the prediction parameters attached to the prediction unit. The prediction parameters include prediction parameters for intra-frame prediction or prediction parameters for inter-frame prediction. The prediction parameters for inter-frame prediction (inter-frame prediction parameters) are described below. The inter-frame prediction parameters are composed of prediction list utilization flags predFlagL0, predFlagL1, reference picture indexes refIdxL0, refIdxL1, and vectors mvL0, mvL1. The prediction list utilization flags predFlagL0, predFlagL1 are flags indicating whether to use the reference picture lists called L0 list and L1 list, respectively. 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 ××" in this specification, 1 is set to the case of ××, and 0 is set to the case of not ××. In logical NOT, logical multiplication, etc., 1 is processed as true and 0 is processed as false (the same applies below). However, other values can also be used as true values and false values in actual devices and methods. When two reference picture lists are used, that is, the case where predFlagL0=1 and predFlagL1=1 corresponds to dual prediction. In addition, when one reference picture list is used, that is, the case where (predFlagL0, predFlagL1)=(1,0) or (predFlagL0, predFlagL1)=(0,1) corresponds to uni-prediction. It should be noted that the information of the prediction list utilization flag can also be represented by the inter-frame prediction flag inter_pred_idc described later. Usually, the prediction list utilization 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 information on which reference picture list to use based on the encoded data, the inter-frame prediction flag inter_pred_idc is used.
[0107] The syntax elements used to derive the inter-frame prediction parameters included in the encoded data include, for example, a partition mode part_mode, a merge flag merge_flag, a merge index merge_idx, an inter-frame prediction flag inter_pred_idc, a reference picture index refIdxLX, a prediction vector index mvp_LX_idx, and a difference vector mvdLX.
[0108] (See an example of a picture list)
[0109] Next, an example of a reference picture list is described. The reference picture list is stored in the reference picture memory 306 ( Figure 5 ) is formed by a column of reference images. Figure 3601 is a conceptual diagram showing an example of a reference picture list. In the reference picture list 601, the five rectangles arranged in a row from left to right represent reference pictures. The codes P1, P2, Q0, P3, and P4 shown in sequence from the left end are codes representing each reference picture. The P in P1, etc. represents the viewpoint P, and the Q in Q0 represents the viewpoint Q different from the viewpoint P. The suffixes of P and Q represent the picture sequence number POC. The downward arrow directly below refIdxLX indicates that the reference picture index refIdxLX is the index of the reference picture Q0 in the reference picture memory 306.
[0110] (See the example in the picture)
[0111] Next, an example of a reference picture used when deriving a vector is described. Figure 4 is a conceptual diagram showing an example of a reference image. Figure 4 In the figure, the horizontal axis represents the display time and the vertical axis represents the viewpoint. Figure 4 The rectangles in two vertical rows and three horizontal columns (a total of six) shown represent pictures respectively. Among the six rectangles, the rectangles in the second column from the left of the bottom row represent pictures of the decoding object (object picture), and the remaining five rectangles represent reference pictures respectively. The reference picture Q0 indicated by an upward arrow from the object picture is a picture with the same display time as the object picture but a different viewpoint. In displacement prediction based on the object picture as a reference, the reference picture Q0 is used. The reference picture P1 indicated by an arrow pointing left from the object picture is a past picture with the same viewpoint as the object picture. The reference picture P2 indicated by an arrow pointing right from the object picture is a future picture with the same viewpoint as the object picture. In motion prediction based on the object picture as a reference, 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 follows, and they can be interchanged. Therefore, as an inter-frame prediction parameter, the prediction list utilization flag can be used, and the inter-frame prediction flag can also be used. In addition, below, the judgment using the prediction list utilization flag can be replaced by the inter-frame prediction flag. Conversely, the judgment using the inter-frame prediction flag can also be replaced by the prediction list utilization flag.
[0113] Inter prediction flag = (predFlagL1<<1) + predFlagL0
[0114] predFlagL0 = inter prediction flag & 1
[0115] predFlagL1 = inter prediction flag >> 1
[0116] Here, >> is a right shift and << is a left shift.
[0117] (Combined forecast and AMVP forecast)
[0118] The decoding (encoding) method of the prediction parameters includes 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 block that has been processed are used to derive the prediction parameters of the object PU. The merge prediction mode is a mode that directly uses the derived prediction parameters of the nearby PU 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 the prediction vector index mvp_LX_idx that identifies the prediction vector mvpLX and the 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 of Pred_L0, Pred_L1, and Pred_Bi. Pred_L0 and Pred_L1 indicate the use of reference pictures stored in reference picture lists called L0 list and L1 list, respectively, and indicate that one reference picture is used for both (single prediction). The predictions using the L0 list and L1 list are called L0 prediction and L1 prediction, respectively. Pred_Bi indicates the use of two reference pictures (double prediction), and indicates the use of 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 when L0 prediction and L1 prediction are not distinguished. 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 a reference picture index used for L0 prediction, refIdxL1 is a reference picture index used for L1 prediction, and refIdx (refIdxLX) is a flag used when refIdxL0 and refIdxL1 are not to be distinguished.
[0120] The merge index merge_idx is an index indicating whether any prediction parameter among prediction parameter candidates (merge candidates) derived from a processed block is used as a prediction parameter of a decoding target block.
[0121] It should be noted that the “object block” may be a prediction block that is one level higher than the multiple prediction blocks, or may be a coding unit that includes the multiple prediction blocks.
[0122] (Motion vector and displacement vector)
[0123] The motion vector mvLX can be divided into a narrow motion vector (motion vector in the narrow sense) representing the offset between blocks on two pictures at different times, and a displacement vector (disparity 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 called 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 according to this embodiment will be described. Figure 5 1 is a schematic diagram showing the structure 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 (prediction 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 prediction image generation unit 308, an inverse quantization / inverse DCT unit 311, an addition unit 312, and a residual storage unit 313 (residual recording unit).
[0126] 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 prediction image generation unit 308 includes an inter prediction image generation unit 309 and an intra prediction image generation unit 310.
[0127] The entropy decoding unit 301 performs entropy decoding on the coded stream Te input from the outside, separates and decodes each code (syntax element). The separated code includes prediction information for generating a prediction image and residual information for generating a difference image.
[0128] The entropy decoding unit 301 outputs a part of the separated code to the prediction parameter decoding unit 302. The 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-frame prediction flag inter_pred_idc, the reference picture index refIdxLX, the prediction vector index mvp_LX_idx, and the difference vector mvdLX. The control of which code to decode is performed based on the instruction of the prediction parameter decoding unit 302. The entropy decoding unit 301 outputs the quantization coefficient to the inverse quantization / inverse DCT unit 311. The quantization coefficient is a coefficient 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 parameter with reference to the prediction parameter stored in the prediction parameter memory 307 based on the code input from the entropy decoding unit 301 .
[0130] The inter prediction parameter decoding unit 303 outputs the decoded inter prediction parameter to the predicted image generation unit 308, and stores it in the prediction parameter memory 307. The inter prediction parameter decoding unit 303 will be described in detail below.
[0131] The intra prediction parameter decoding unit 304 decodes the intra prediction parameter based on the code input from the entropy decoding unit 301, referring to the prediction parameter stored in the prediction parameter memory 307. The intra prediction parameter is a parameter used in the process of predicting a picture block in one picture, for example, the intra prediction mode IntraPredMode. The intra prediction parameter decoding unit 304 outputs the decoded intra prediction parameter to the prediction image generation unit 308, and stores it in the prediction parameter memory 307.
[0132] The intra-frame prediction parameter decoding unit 304 can also derive intra-frame prediction modes that are different in brightness and color difference. In this case, the intra-frame prediction parameter decoding unit 304 decodes the brightness prediction mode IntraPredModeY as the prediction parameter of brightness, and decodes the color difference prediction mode IntraPredModeC as the prediction parameter of color difference. The brightness prediction mode IntraPredModeY is 35 modes, and plane prediction (0), DC prediction (1), and directional prediction (2 to 34) correspond to it. The chroma prediction mode IntraPredModeC uses any one of plane prediction (0), DC prediction (1), directional prediction (2 to 34), and LM mode (35). The intra-frame prediction parameter decoding unit 304 decodes a flag indicating whether IntraPredModeC is the same mode as the brightness mode. If the flag indicates that it is the same mode as the brightness mode, IntraPredModeY is assigned to IntraPredModeC. Furthermore, if the flag indicates a mode different from the luma mode, the intra prediction parameter decoding unit 304 may 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 picture (reference picture blocks) generated by the adding unit 312 at predetermined positions for each picture and block to be decoded.
[0134] The prediction parameter memory 307 stores the prediction parameters in a predetermined position according to the picture and block of the decoding object. Specifically, the prediction parameter memory 307 stores the inter-frame prediction parameters decoded by the inter-frame prediction parameter decoding unit 303, the intra-frame prediction parameters decoded by the intra-frame prediction parameter decoding unit 304, and the prediction mode predMode separated by the entropy decoding unit 301. The stored inter-frame prediction parameters include, for example, a prediction list utilization flag predFlagLX (inter-frame prediction flag inter_pred_idc), a reference picture index refIdxLX, and a motion vector mvLX.
[0135] The prediction mode predMode input from the entropy decoding unit 301 is input to the prediction image generation unit 308, and the prediction parameters are input from the prediction parameter decoding unit 302. In addition, the prediction image generation unit 308 reads the reference picture from the reference picture memory 306. The prediction image generation unit 308 generates a prediction picture block P (prediction image) using the input prediction parameters and the read reference picture in the prediction mode indicated by the prediction mode predMode.
[0136] Here, when the prediction mode predMode indicates the inter prediction mode, the inter prediction image generation unit 309 generates a prediction picture block P by inter prediction using the inter prediction parameters input from the inter prediction parameter decoding unit 303 and the reference picture read out. The prediction picture block P corresponds to the prediction unit PU. Pu corresponds to a part of a picture formed by a plurality of pixels forming a unit and subjected to prediction processing as described above, that is, corresponds to a decoding target block subjected to one prediction processing.
[0137] The inter-frame prediction image generator 309 reads out a reference picture block located at a position indicated by a motion vector mvLX based on the decoding target block from the reference picture memory 306, based on the reference picture indicated by the reference picture index refIdxLX, with respect to the reference picture list (L0 list or L1 list) in which the prediction list utilization flag predFlagLX is 1. The inter-frame prediction image generator 309 predicts the read reference picture block and generates a prediction picture block P. The inter-frame prediction image generator 309 outputs the generated prediction picture block P to the adder 312.
[0138] When the prediction mode predMode indicates an intra-frame prediction mode, the intra-frame prediction image generation unit 310 uses the intra-frame prediction parameters input from the intra-frame prediction parameter decoding unit 304 and the read reference picture to perform intra-frame prediction. Specifically, the intra-frame prediction image generation unit 310 reads out a reference picture block that is a picture to be decoded and is located in a predetermined range from the decoded block in the already decoded block from the reference picture memory 306. The predetermined range is when the decoded block is moved sequentially in the order of so-called raster scanning, for example, any one of the adjacent blocks to the left, upper left, upper, and upper right, and it differs depending on the intra-frame prediction mode. The order of raster scanning is the order of moving from the left end to the right end for each row from the top to the bottom in each picture.
[0139] The intra-prediction image generator 310 predicts the read reference picture block in a prediction mode indicated by the intra-prediction mode IntraPredMode to generate a prediction picture block. The intra-prediction image generator 310 outputs the generated prediction picture block P to the adder 312 .
[0140] In the intra prediction parameter decoding unit 304, when different intra prediction modes are derived for luma and chroma, the intra prediction image generation unit 310 generates a prediction picture block for luma by using any one of plane prediction (0), DC prediction (1), and directional prediction (2 to 34) according to the luma prediction mode IntraPredModeY. In addition, the intra prediction image generation unit 310 generates a prediction picture block for chroma by using any one of plane prediction (0), DC prediction (1), directional prediction (2 to 344), and LM mode (35) according to the chroma prediction mode IntraPredModeC.
[0141] The inverse quantization / inverse DCT unit 311 inversely quantizes the quantization coefficients input from the entropy decoding unit 301 to obtain DCT coefficients. The inverse quantization / inverse DCT unit 311 performs 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 adding unit 312 generates a reference picture block by adding pixel by pixel the predicted picture block P input from the inter-frame predicted picture generating unit 309 and the intra-frame predicted picture generating unit 310 and the signal value of the decoded residual signal input from the inverse quantization / inverse DCT unit 311. The adding unit 312 stores the generated reference picture block in the reference picture memory 306, and outputs a decoded layer image Td obtained by integrating the generated reference picture block on a picture by picture basis to the outside.
[0143] (Configuration of Inter-frame Prediction Parameter Decoding Unit)
[0144] Next, the configuration of the inter-frame prediction parameter decoding unit 303 will be described.
[0145] Figure 6 303 is a schematic diagram showing the structure of the inter-frame prediction parameter decoding unit 303 of the present embodiment. The inter-frame prediction parameter decoding unit 303 includes an inter-frame prediction parameter decoding control unit (motion vector derivation unit) 3031, an AMVP prediction parameter derivation unit 3032, an addition unit 3035, and a merged prediction parameter derivation unit 3036.
[0146] The inter-frame prediction parameter decoding control unit 3031 instructs the entropy decoding unit 301 to decode the code (syntax elements) associated with the inter-frame prediction, and extracts the code (syntax elements) contained in the encoded data, such as the partition 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.
[0147] The inter-frame prediction parameter decoding control unit 3031 first extracts the merge flag. The inter-frame prediction parameter decoding control unit 3031 indicates that the case of extracting a certain syntax element is to instruct the entropy decoding unit 301 to decode a certain syntax element, and read the corresponding syntax element from the encoded data. Here, when the value indicated by the merge flag is 1, that is, indicating the merge prediction mode, the inter-frame prediction parameter decoding control unit 3031 extracts the merge index merge_idx as the prediction parameter of the 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, indicating the AMVP prediction mode, 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 AMVP prediction parameters, there are, for example, the inter-frame prediction flag inter_pred_idc, the reference picture index refIdxLX, the prediction vector index mvp_LX_idx, and the difference 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 prediction image generation unit 308 ( Figure 5 ), and in addition, stored 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 difference vector mvdLX to the addition unit 3035.
[0149] Figure 7: This is a schematic diagram showing the structure 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 candidate includes a prediction list using a 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 prescribed rule.
[0150] The merge candidate derivation unit 30361 directly uses the motion vector of the adjacent block that has been decoded and the reference picture index refIdxLX to derive the merge candidate. In addition, affine prediction can also be used to derive the merge candidate. The method is described in detail below. The merge candidate derivation unit 30361 can use affine prediction for the spatial merge candidate derivation process, temporal merge (inter-frame merge) candidate derivation process, combined merge candidate derivation process, and zero merge candidate derivation process described later. 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 according to the sub-block. Alternatively, affine prediction can also be performed in pixel units.
[0151] (Spatial Merge Candidate Derivation Process)
[0152] As a spatial merge candidate derivation process, the merge candidate derivation unit 30361 reads 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 prescribed rule, and derives the read prediction parameters as merge candidates. The read prediction parameters are prediction parameters of each block within a predetermined range from the decoding target block (for example, all or part of the blocks connected to the lower left end, upper left end, and upper right end of the decoding target block). 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 a temporal merge derivation process, the merge candidate derivation unit 30361 reads the prediction parameter of the block in the reference image including the coordinates of the lower right of the decoding target block from the prediction parameter memory 307 as a merge candidate. The reference image may be specified by, for example, using the reference picture index refIdxLX specified in the slice header, or by using the smallest reference picture index among the reference picture indexes refIdxLX of the blocks adjacent to the decoding target block. The merge candidate derived by the merge candidate derivation unit 30361 is stored in the merge candidate storage unit 303611.
[0155] (Combined Merger Candidate Derivation Process)
[0156] As a combined merge derivation process, the merge candidate derivation unit 30361 derives a combined merge candidate by combining the vectors of two different completed merge candidates that have been derived and stored in the merge candidate storage unit 303611 and the reference picture index as vectors of L0 and L1, respectively. The merge candidate derived by the merge candidate derivation unit 30361 is stored in the merge candidate storage unit 303611.
[0157] (Zero Merging Candidate Derivation Process)
[0158] As a zero merge candidate derivation process, the merge candidate derivation unit 30361 derives a merge candidate whose reference picture index refIdxLX is 0 and whose X component and Y component of the motion vector mvLX are both 0. The merge candidate derived by the merge candidate derivation unit 30361 is stored in the merge candidate storage unit 303611 .
[0159] The merge candidate selection unit 30362 selects a merge candidate to which an index corresponding to the merge index merge_idx input from the inter-prediction parameter decoding control unit 3031 is assigned from the merge candidates stored in the merge candidate storage unit 303611 as the inter-prediction parameter of the target PU. The merge candidate selection unit 30362 stores the selected merge candidate in the prediction parameter memory 307 and outputs it to the prediction image generation unit 308 ( Figure 5 ).
[0160] Figure 81 is a schematic diagram showing the structure 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 a vector (motion vector or displacement vector) stored in the prediction parameter memory 307 based on the reference picture index refIdx as a prediction vector mvpLX. The read vector is a vector of each block (for example, all or part of the blocks connected to the lower left end, upper left end, and upper right end of the decoding object block) within a predetermined range from the decoding 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 prediction parameter decoding control unit 3031 from among the vector candidates read out by the vector candidate derivation unit 3033 , and outputs the selected prediction vector mvpLX to the addition unit 3035 .
[0162] Furthermore, the vector candidate selection unit 3034 may 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 are composed of the prediction vector mvpLX. In the vector candidate storage unit 30331, indices are assigned to the stored vector candidates according to a predetermined rule.
[0164] The vector candidate derivation unit 3033 uses affine prediction to derive vector candidates. 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 affine prediction is performed in sub-block units, and prediction parameters are stored in the prediction parameter memory 307 for each sub-block. Alternatively, affine prediction may also be performed in pixel units.
[0165] Fig. 9 is a conceptual diagram showing an example of vector candidates. Fig. 9 The predicted vector list 602 shown is a list formed of a plurality of vector candidates derived in the vector candidate derivation unit 3033. In the predicted vector list 602, five rectangles arranged in a row from left to right represent areas indicating predicted vectors. The downward arrow just below the second mvp_LX_idx from the left end and mvpLX below it indicate that the predicted vector index mvp_LX_idx is the index of the reference vector mvpLX in the prediction parameter memory 307.
[0166] The vector candidate is generated based on the vector of the block referenced by the vector candidate selection unit 3034. The block referenced by the vector candidate selection unit 3034 is a block that has completed the decoding process, and may also be a block in a predetermined range from the decoding target block (for example, an adjacent block). It should be noted that the adjacent block includes not only blocks that are spatially adjacent to the decoding target block, such as the left block and the upper block, but also blocks that are temporally adjacent to the decoding target block, such as blocks obtained from blocks at the same position as the decoding target block but at different display times.
[0167] The adding unit 3035 adds the prediction vector mvpLX input from the AMVP prediction parameter derivation unit 3032 and the difference vector mvdLX input from the inter-frame prediction parameter decoding control unit 3031 to calculate the motion vector mvLX. The adding unit 3035 outputs the calculated motion vector mvLX to the prediction image generation unit 308 ( Figure 5 ).
[0168] Fig.10 This is a schematic diagram showing the structure 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 partition 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., which are not shown in the figure. The partition 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 respectively decode the partition 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 difference vector mvdLX. (Inter-frame prediction image generation unit 309)
[0169] Fig.11 3 is a schematic diagram showing the configuration of the inter-prediction image generation unit 309 according to the present embodiment. The inter-prediction image generation unit 309 includes a motion compensation unit 3091 and a weight prediction unit 3094 .
[0170] (Motion Compensation)
[0171] The motion compensation unit 3091 uses the prediction list flag predFlagLX, the reference picture index refIdxLX, and the motion vector mvLX input from the inter-frame prediction parameter decoding unit 303 to read 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 as a starting point from the reference picture memory 306, thereby generating a motion compensated image. Here, when the accuracy of the motion vector mvLX is not integer accuracy, a filter called motion compensation filtering for generating pixels at decimal positions is performed to generate a motion compensated image. Hereinafter, the motion compensated image predicted by L0 is referred to as predSamplesL0, and the motion compensated image predicted by L1 is referred to as predSamplesL1. When the two are not distinguished, they are referred to as predSamplesLX.
[0172] (Weight prediction)
[0173] The weight prediction unit 3094 generates a prediction picture block P (prediction image) by multiplying the input motion displacement image predSamplesLX by the weight coefficient. The input motion displacement image predSamplesLX is an image that has been subjected to residual prediction when residual prediction is performed. When one of the reference list utilization flags (predFlagL0 or predFlagL1) is 1 (in the case of single prediction), when weight prediction is not used, the following processing is performed to make the input motion displacement image predSamplesLX (LX is L0 or L1) consistent with the number of pixel bits.
[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, when both reference list utilization flags (predFlagL0 or predFlagL1) are 1 (in the case of double prediction), without using weighted prediction, the input motion displacement images predSamplesL0 and predSamplesL1 are averaged and the average is made consistent with the number of pixel bits.
[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] Furthermore, in the case of uni-prediction, when weighted prediction is performed, the weighted prediction unit 3094 derives a weighted 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 predetermined shift amount.
[0182] Moreover, in the case of bi-prediction, when weighted prediction is performed, the weighted prediction unit 3094 derives weighted prediction coefficients w0, w1, o0, 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] Below, refer to Figure 15 to Figure 27 , the motion vector decoding process of this embodiment is explained in detail.
[0186] As is clear from the above description, the motion vector decoding process of this 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] Fig.153031 is a flowchart showing the flow of inter-frame prediction syntax decoding processing performed by the inter-frame prediction parameter decoding control unit 3031. Fig.15 In the following description of the description, unless otherwise specified, each process is performed by the inter-frame 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), the merge index merge_idx is decoded in S103, and the process proceeds to the motion vector derivation process (S201) in the merge mode (FIG. 18(a)).
[0191] When merge_flag!=0 is false (N in S102), the inter prediction flag inter_pred_idc is decoded in S104, the reference picture index refIdxL0 is decoded in S105, the syntax mvdL0 of the difference vector is decoded in S106, and the prediction vector index mvp_L0_idx is decoded in S107.
[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 the process proceeds to the motion vector derivation process (S301) in the AMVP mode ( Fig.18 (b)).
[0193] It should be noted that when the inter-frame prediction flag inter_pred_idc is 0, that is, when indicating L0 prediction (PRED_L0), the processing of S108 to S110 is not required. On the other hand, when the inter-frame prediction flag inter_pred_idc is 1, that is, when indicating L1 prediction (PRED_L1), the processing of S105 to S107 is not required. In addition, when the inter-frame prediction flag inter_pred_idc is 2, that is, when indicating bi-prediction (PRED_B), each step of S105 to S110 is performed.
[0194] (Differential vector decoding processing)
[0195] Fig.16This is a flowchart showing the differential vector decoding process in the above-mentioned steps S106 and S109 in more detail. So far, the horizontal component and vertical component of the motion vector and differential vector mvdLX have not been distinguished and labeled as mvLX and mvdLX. Here, in order to clarify the cases where the syntax of the horizontal component and the vertical component is required and the cases where the processing of the horizontal component and the vertical component is required, each component is labeled with [0] and [1].
[0196] like Fig.16 As 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 determined whether the absolute value of the (horizontal) motion vector difference is 0.
[0197] mvdAbsVal[0]!=0.
[0198] When the horizontal motion vector difference absolute value mvdAbsVal[0]!=0 is true (Y in S10612), the syntax mv_sign_flag[0] indicating the code (positive or negative) of the horizontal motion vector difference is decoded from the coded data in S10614, and the process proceeds to S10615. On the other hand, when mvdAbsVal[0]!=0 is false (N in S10612), mv_sign_flag[0] is set (infer) to 0 in S10613, and the process proceeds to S10615.
[0199] Next, in step S10615, the syntax mvdAbsVal[1] indicating the absolute value of the vertical motion vector difference is decoded, and in step S10612, it is determined whether the absolute value of the (vertical) motion vector difference is 0.
[0200] mvdAbsVal[1]!=0.
[0201] When mvdAbsVal[1]!=0 is true (Y in S10616), the syntax mv_sign_flag[1] indicating the code (sign or negative) of the vertical motion vector difference is decoded from the coded data in S10618. On the other hand, when mvdAbsVal[1]!=0? is false (N in S10616), the syntax mv_sign_flag[1] indicating the code (sign or negative) of the vertical motion vector difference is set to 0 in S10617.
[0202] In the above, the motion vector difference absolute value mvdAbsVal and the motion vector difference code mvd_sign_flag are 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, it is also possible to select the vertical component as [0] and the horizontal component as [1]. In addition, the vertical component is processed after the horizontal component is processed, but the processing order is not limited to this. For example, the vertical component may be processed first and then the horizontal component (the same applies below).
[0203] Fig.17 It means using and Fig.16 Flowchart of an example of decoding the differential vector in steps S106 and S109 according to the different processing methods exemplified in the example. Fig.16 The steps described in Fig.17 The same symbols are also given in the text, and the description is omitted.
[0204] exist Fig.17 In the example shown, the motion vector accuracy flag mvd_dequant_flag is further decoded. Fig.16 different.
[0205] That is, in Fig.17 In the example shown, after S10617 and S10618 described above, a variable nonZeroMV indicating whether the differential vector is 0 is derived in S10629 to determine 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 difference vector is other than 0, the motion vector accuracy flag mvd_dequant_flag is decoded from the coded data in S10630. In addition, when nonZeroMV!=0 is false (N in S10629), mvd_dequant_flag is not decoded from the coded data and mvd_dequant_flag is set to 0. That is, when the difference 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 accuracy flag mvd_dequant_flag is used to switch the accuracy of the motion vector. In addition, when the flag is set as a flag for selecting whether to set the accuracy of the motion vector to full pixel, it can be written (can be marked as) integer_mv_flag.
[0211] (Motion vector derivation process)
[0212] Next, use Figure 18 to Figure 27 The motion vector derivation process is described.
[0213] Fig.18 This is a flowchart showing the flow of motion vector derivation processing performed by the inter-prediction parameter decoding unit 303 of this embodiment.
[0214] (Motion vector derivation processing in merge prediction mode)
[0215] Fig.18 (a) is a flowchart showing the process of motion vector derivation processing in merge prediction mode. Fig.18 As shown in (a), 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 AMVP mode)
[0216] In AMVP mode, the motion vector mvLX is derived by deriving the differential motion vector mvdLX from the already decoded syntax mvdAbsVal and mv_sign_flag, and 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 between the horizontal component and the vertical component, but in the following, for simplicity, the components are not distinguished and are simply referred to as mvdAbsVal, etc. In fact, the motion vector has horizontal components and vertical components, so the processing described without distinguishing the components can be performed on each component in sequence.
[0217] on the other hand, Fig.18 (b) is a flow chart showing the process of motion vector derivation processing in AMVP mode. Fig.18As shown in (b), in S301, the vector candidate derivation unit 3033 derives a motion vector prediction sublist mvpListLX. In S302, the vector candidate selection unit 3034 selects a motion vector candidate (predicted vector, predicted motion vector) mvpLX=mvpListLX[mvp_LX_idx] specified by the predicted vector index mvp_LX_idx.
[0218] Next, in S303, the inter-frame prediction parameter decoding control unit 3031 derives a differential vector mvdLX. Fig.18 As shown in S304 of (b), the vector candidate selection unit 3034 may also perform a loop process on the selected prediction vectors. Next, in S305, the prediction vector mvpLX and the difference vector mvdLX are added in the addition unit 3035 to calculate the motion vector mvLX. That is, mvLX=mvpLX+mvdLX
[0219] Calculate mvLX.
[0220] (Differential vector derivation processing)
[0221] Next, use Fig.19 The differential vector derivation process is described. Fig.19 4 is a flowchart showing the differential vector derivation process in step S303 more specifically. The differential vector derivation process is composed of the following two processes. Inverse quantization process (PS_DQMV): The process of inverse quantizing the value decoded from the encoded data and quantized, that is, the motion vector difference absolute value mvdAbsVal (quantized value), and deriving it as the motion vector difference absolute value mvdAbsVal of a specific accuracy (for example, the basic vector accuracy described later). Code assignment process (PS_SIGN): The process of determining the code of the derived motion vector difference absolute value mvdAbsVal and deriving the motion vector difference mvdLX.
[0222] exist Fig.19 In the following description of the description, unless otherwise specified, each process is performed by the inter-frame prediction parameter decoding control unit 3031.
[0223] like Fig.19As 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 > 0. When the motion vector scale > 0 is true, i.e., shiftS > 0 (Y in S3032), in S3033, for example, inverse quantization of the differential vector is performed by using a shift operation of shiftS. Here, the shift operation is more specifically, for example, a process of shifting the absolute value of the quantized motion vector difference mvdAbsVal left by shiftS, and is performed by
[0224] mvdAbsVal = mvdAbsVal << shiftS formula (Scale)
[0225] (processing PS_DQMV0).
[0226] Then, in S3034, code assignment processing for the differential vector is performed, and the process proceeds to S3041. It should be noted that this code assignment processing (processing PS_SIGN) is performed by
[0227] mvdLX = mvdAbsVal * (1 - 2 * mv_sign_flag) formula (sign)
[0228] 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 proceeds to S3034 without going through S3033. It should be noted that the inverse quantization of the differential vector with the shift applied when the value 0 (shiftS = 0) is used does not affect the value of the differential vector. Therefore, even when the motion vector scale > 0 is false, a configuration can be adopted 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 a value 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 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, the Fig. 20 prediction vector loop processing (predicted motion vector loop processing) is described. Fig. 20is a flowchart that more specifically represents the prediction vector loop processing in step S304 described above. In Fig. 20 In the following description, unless otherwise specified, each process is performed by the vector candidate selection unit 3034. As Fig. 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 inverse quantization of the differential vector based on the motion vector scale is performed, in S3043, the predicted motion vector mvpLX can also be obtained through a loop based on the motion vector scale, that is, through
[0232] mvpLX = round(mvpLX, shiftS)
[0233] perform loop processing (process PS_PMVROUND). Here, round(mvpLX, shiftS) represents a function that performs loop processing on the predicted motion vector mvpLX using shiftS. For example, the loop processing can use the following formulas (SHIFT-1) to (SHIFT-4) etc., and 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 when the motion vector scale > 0 is false (N in S3042), the predicted motion vector mvpLX proceeds to S305 without loop processing to derive the motion vector mvLX.
[0235] (Motion vector scale derivation process using the motion vector precision flag)
[0236] Next, Fig.21 explain the motion vector scale derivation process (PS_P0) using the motion vector precision flag. Fig.21 is a flowchart that more specifically represents the motion vector scale derivation processes in the above S3031 (refer to Fig.19 ) and S3041 (refer to Fig. 20 ). In Fig.21 , for the convenience of explanation, the process of S3041 is specifically exemplified, but the process shown in Fig.21 can also be applied to S3031.
[0237] In Fig.21 In the following description, unless otherwise specified, each process is performed by the inter-frame prediction parameter decoding control unit 3031.
[0238] like Fig.21 As shown, in S304111, it is determined whether the motion vector accuracy 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 basic motion vector accuracy mvBaseAccu (>0) of the parameter indicating the reference of the motion vector accuracy, and the accuracy of the motion vector is set to full pixels. Here, the value of mvBaseAccu is, for example, 2. After S304112, the process proceeds 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, shiftS is set to 0, and the process proceeds to S3042. In this case, the accuracy of the motion vector is set to 1 / 4 pixel. Note that, in S304112, for example, shiftS may be set to the basic motion vector accuracy mvBaseAccu-1, which is a parameter indicating a reference of motion vector accuracy. In this case, when mvd_dequant_flag is 1 (other than 0), the motion vector accuracy is set to half a pixel.
[0240] It should be noted that, in the above description, 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, the accuracy of the motion vector may be reduced when the value of mvd_dequant_flag is another value, for example, 0, and the accuracy of the motion vector may be maintained when it is 1. That is, for the flags shown in this specification, the values thereof and the contents represented by the flags may be set to any combination.
[0241] Thus, according to the above configuration, the accuracy of the motion vector is switched by referring to the motion vector accuracy flag, so that a motion vector with more appropriate accuracy can be used. On the other hand, since the motion vector accuracy flag needs to be included in the coded data, the amount of code increases, and the coding efficiency may not be improved as expected.
[0242] Hereinafter, a configuration example for realizing improved coding efficiency and using a motion vector with appropriate accuracy will be described.
[0243] (Motion vector scale derivation process using the block size of the target block)
[0244] As one example of the configuration of motion vectors that achieves an improvement in coding efficiency and uses appropriate precision (derivation process PS_P1A), Fig. 22 the motion vector scale derivation process using the block size of the target block will be described. Fig. 22 This is a flowchart that more specifically represents the motion vector scale derivation process in S3031 (refer to FIG. 19) and S3041 (refer to Fig. 20 ). In FIG. 22, for ease of explanation, the process of S3041 is specifically illustrated, but the process shown Fig. 22 can also be applied to S3031.
[0245] In Fig. 22 the following description, unless otherwise specified, each process is performed by the inter-frame prediction parameter decoding control unit 3031.
[0246] As Fig. 22 shown, 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 the process proceeds 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 the process proceeds 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 Fig. 22 the above-described process can also be represented by the following formula.
[0254] shiftS = (blkW < TH)? shiftM : shiftN (formula P1A)
[0255] Note that in a configuration where the width blkW and height blkH of the block size are different, for threshold determination of the block size, blkW + blkH < TH can also be used instead of blkW < TH. Note that the above 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. Note 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 a configuration where the block size is 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 Fig.23 to describe the motion vector scale derivation process using the block size of the target block and the motion vector accuracy flag. Fig.23 is a flowchart that more specifically represents the motion vector scale derivation process in S3031 and S3041 above. In Fig.23 For the convenience of explanation, the process of S3041 is specifically exemplified, but the process shown in Fig.23 can also be applied to S3031.
[0261] As Fig.23As shown, in S304131, it is judged 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 judged 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 to
[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] Set shiftS = shiftL and proceed to S3042. Here, shiftL, shiftM, and shiftN are scale parameters satisfying 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 to full pixels.
[0268] It should be noted that Fig.23 Part of the processing of S304132 to S304134 of the Fig. 22 ) can also be expressed by the above (formula P1A).
[0269] Fig.23 In summary, the overall processing of the
[0270] shiftS = mvd_dequant_flag != 0 ? shiftL : (blkW < TH) ? shiftM : shiftN (Arithmetic expression 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 increases. It should be noted that the classification of the block size is not limited to two classifications, and a configuration with three or more classifications can 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] It should be noted 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 (especially the shift value used to derive the absolute value of the motion vector difference) derived for the prediction block 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 by the configuration of updating the variables mvdAbsVal and mvdLX. However, when it is represented using ''' for the sake of clarity of 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, an offset value
[0291] offsetS = 1 << (shiftS - 1),
[0292] can be set to
[0293] round(mvpLX) = ((mvpLX + offsetS) >> shiftS) << shiftS ··· (SHIFT - 2). In addition,
[0294] round(mvpLX) = mvpLX > 0? (mvpLX >> shiftS) << shiftS : -(((-mvpLX) >> shiftS) << shiftS) ··· (SHIFT - 3)
[0295] That is, when the object of 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] In addition,
[0297] round(mvpLX) = mvpLX > 0? ((mvpLX + offsetS) >> shiftS) << shiftS : -((((-mvpLX + offsetS)) >> shiftS) << shiftS) ··· (SHIFT - 4)
[0298] That is, a process combining the processes 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 Fig.24 to illustrate a specific example of the motion vector precision (derivation process P1A) using the block size switching of the object block. Fig.24 (a) to Fig.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 object block. For example, the inter - frame prediction parameter decoding control unit 3031 can Fig.24 (a) to Fig.24 (c) perform the above - mentioned Fig. 22 processing of S304121 to S304123 in the manner of the example 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. Herein, 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 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 with 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 with the accuracy of the basic vector.
[0302] Fig.24 (a) 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 two values. In Fig.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 Fig.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 Fig.24In the example shown in "III" of (a), mvBaseAccu=6, and the accuracy of the basic vector is 1 / 64 pel. In the example shown in "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] Fig.24 (b) 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 three values.
[0306] exist Fig.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] Fig.24 (c) 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 five values.
[0308] exist Fig.24 In the example shown in (c), the basic vector accuracy is 1 / 64 pel. When the block size blkW of the object 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] (Use of motion vector accuracy MVQStep)
[0310] The inter-frame prediction parameter decoding control unit 3031 may also be configured to perform inverse quantization by the product of the quantization step size (MVQStep) of the motion vector, instead of the left shift using the motion vector scale shiftS. That is, inverse quantization can be performed by the following formula instead of the 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 Fig.24 (a) In the case of switching the motion vector accuracy shown by "I", when the block size blkW satisfies blkW >= 64, MVQStep = 1 (= 1 << ShiftS = 1 << 0 = 1) is set. In other words, MVStep = 1 / 8 = (1 / mvBaseAccu * MVQStep = 1 / 8 * 1) is set. On the other hand, when the block size blkW satisfies blkW < 64, MVQStep = 2 (= 1 << ShiftS = 1 << 1 = 2) is set. In other words, MVStep = 1 / 4 = (1 / 8 * 2) is set.
[0317] In addition, when using MVQStep to perform Fig.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 Fig.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 Fig.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. Fig.25 (a) to Fig.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 object block and the motion vector precision flag. It should be noted that in Fig.25 (a) to Fig.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 Fig.25 (a) to Fig.25 Perform the above in the manner of the example shown in (c). Fig.23 Perform the processing of S304131 to S304135 shown.
[0320] In Fig.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 the 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 as an equation, it is as follows.
[0321] shiftS = mvd_dequant_flag!= 0? 4 : (blkW < TH)? 2 : 0 (equivalent to equation P1B)
[0322] In Fig.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 the 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 the 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 the specified value (small block size), shiftS is set to 4 and the motion vector precision becomes 1 pel (full pixel).
[0323] In Fig.25In the example shown in (c), when the motion vector accuracy flag is mvd_dequant_flag = 0 and the block size is larger than the predetermined value (the block size is large), shiftS = 0 is set, and the motion vector accuracy becomes 1 / 16 pel. In addition, when the motion vector accuracy flag is mvd_dequant_flag = 0 and the block size is smaller than the predetermined value (the block size is small), shiftS = 1 is set, and the motion vector accuracy becomes 1 / 8 pel. On the other hand, when the motion vector accuracy flag is mvd_dequant_flag = 1 and the block size is larger than the predetermined value (the block size is large), shiftS = 2 is set, and the motion vector accuracy becomes 1 / 4 pel. In addition, when the motion vector accuracy flag is mvd_dequant_flag = 1 and the block size is smaller than the predetermined value (the block size is small), shiftS = 3 is set, and the motion vector accuracy becomes 1 / 2 pel (half pixel).
[0324] (Example of motion vector accuracy using QP switching)
[0325] It should be noted that, in the above example, the structure of deriving shiftS based on the block size of the object block is described. As another structure, the inter-frame prediction parameter decoding control unit 3031 (motion vector derivation unit) may be used to derive the structure of shiftS based on the QP (Quantization Parameter) as a quantization parameter instead of the block size of the object block (derivation process PS_P2A). In particular, by deriving shiftS according to the size of QP (or the predicted value of 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, the QP is determined according to a specified value, whereby a high-precision motion vector is used when the QP is less than the specified value, and a low-precision is used in other cases.
[0326] Here, use Fig.26 An example of motion vector accuracy using QP switching is described. Fig.26 (a)~ Fig.26 (c) is a table showing a parameter (shiftS) indicating the motion vector accuracy according to the QP setting (switching). Fig.26 (a)~ Fig.26 (c) shows an example of the process of deriving the differential vector. Fig.26 (a)~ Fig.26 In the description of (c), the value of the basic vector accuracy is not particularly mentioned, but any value of the basic vector accuracy can be used. Fig.26(a), (b), and (c) show examples of switching two, three, and five values according to QP, respectively, but the number of switching (the number of QP categories) is not limited thereto. In addition, the domain values used for QP categories are not limited to the examples in the figures.
[0327] Fig.26 (a) is a table showing the relationship between QP and motion vector accuracy (shiftS) when the motion vector accuracy is switched to two values. Fig.26 In the example shown in (a), when the QP is small (QP<24), shiftS is set to 0. On the other hand, when the QP is large (QP>=24), shiftS is set to a value larger than that when the QP is small, and is set to shiftS=1 here.
[0328] exist Fig.26 In the example shown in (b), it is a table showing the relationship between the QP and the parameter (shiftS) indicating the motion vector accuracy when the motion vector accuracy is switched to three values. As shown in FIG26(b), when the QP is small (QP<12), shiftS=0 is set. In addition, when the QP is medium (QP>=12&&QP<24), shiftS=1 is set. In addition, when the QP is large (QP>=36), shiftS=2 is set.
[0329] Fig.26 (c) is a table showing the correspondence between QP and a parameter (shiftS) indicating the motion vector accuracy when the motion vector accuracy is switched to five values. Fig.26 As shown in (c), when QP<12 is satisfied, shiftS=0 is set. Also, when QP>=12&&QP<18 is satisfied, shiftS=1 is set. Also, when QP>=18&&QP<24 is satisfied, shiftS=2 is set. Also, when QP>=24&&QP<36 is satisfied, shiftS=3 is set. Also, when QP>=36 is satisfied, shiftS=4 is set.
[0330] According to the above configuration, the accuracy of the motion vector derived for the prediction block is switched according to the size of the quantization parameter, so that a prediction image can be generated using a motion vector with appropriate accuracy. It should be noted that this can also be used in conjunction with a configuration in which the accuracy of the motion vector is switched according to a flag.
[0331] (Use of motion vector accuracy MVQStep)
[0332] Furthermore, the inter-frame prediction parameter decoding control unit 3031 may adopt a configuration in which, instead of the above-mentioned shiftS, MVQStep is derived from the block size of the target block as the motion vector accuracy.
[0333] For example, when using MVQStep Fig.26 In the case of switching the motion vector accuracy 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 Fig.26 In the case of switching of the motion vector accuracy 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 Fig.26 In the case of switching the motion vector accuracy 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] (Example of using QP and motion vector accuracy switching of the motion vector accuracy flag)
[0338] Next, use Fig. 27 An example of switching the motion vector accuracy (derivation process PS_P2B) using QP and mvd_dequant_flag as a motion vector accuracy flag will be described. Fig. 27 (a) and Fig. 27 (b) is a table showing the motion vector accuracy (shiftS) set (switched) according to QP and the motion vector accuracy flag. The inter-frame prediction parameter decoding control unit 3031 may also use Fig. 27 The differential vector derivation process is performed in the exemplary manner shown in (a) and (b).
[0339] exist Fig. 27 (a) and Fig. 27 (b) shows an example in which the basic vector accuracy is set to 1 / 16 pel (mvBaseAccu=4), but any value can be applied to the value of the basic vector accuracy (mvBaseAccu).
[0340] exist Fig. 27 In the example shown in (a), when the motion vector accuracy flag mvd_dequant_flag is 1 (other than 0), the value of shiftS is determined to be a fixed value regardless of the QP. In addition, when the motion vector accuracy 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 accuracy flag is mvd_dequant_flag = 0 and the QP is less than the prescribed value (QP is small), shiftS is set to 0, and the motion vector accuracy becomes 1 / 16 pel. In addition, when the motion vector accuracy flag is mvd_dequant_flag = 0 and the QP is greater than the prescribed value (QP is large), shiftS is set to 2, and the motion vector accuracy becomes 1 / 4 pel. On the other hand, when the motion vector accuracy flag is mvd_dequant_flag = 1, shiftS is fixedly set to mvBaseAccu (= 4), and the motion vector accuracy becomes 1 pel (full pixel). In this way, even when changing according to QP, it is appropriate to set shiftS when the motion vector accuracy flag mvd_dequant_flag is 1 to be larger than shiftS in other cases (mvd_dequant_flag is 0) (setting the motion vector accuracy to low accuracy).
[0341] exist Fig. 27The example shown in (b) shows an example of deriving the motion vector scale shiftS according to QP even when the motion vector accuracy flag is 1 (other than 0). Specifically, when the motion vector accuracy flag is mvd_dequant_flag = 0 and the QP is less than the prescribed value (QP is small), shiftS = 0 is set, and the motion vector accuracy becomes 1 / 16 pel. In addition, when the motion vector accuracy flag is mvd_dequant_flag = 0 and the QP is greater than the prescribed value (QP is large), shiftS = 4 is set, and the motion vector accuracy becomes 1 pel. On the other hand, when the motion vector accuracy flag is mvd_dequant_flag = 1 and the QP is less than the prescribed value (QP is small), shiftS = 3 is set, and the motion vector accuracy becomes 1 / 2 pel (half pixel). In addition, when the motion vector accuracy flag is mvd_dequant_flag = 1 and the QP is greater than the prescribed value (QP is large), shiftS = mvBaseAccu (= 4) is set, and the motion vector accuracy becomes 1 pel (full pixel). In this way, when the motion vector accuracy 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-mentioned motion vector derivation process can be expressed as the following formula. That is, when the motion vector of the derivation object is marked as mvLX, the prediction vector is marked as mvpLX, the difference vector is marked as mvdLX, and the loop 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] Determine mvLX.
[0345] <Difference vector inverse quantization processing>
[0346] Below, refer to Fig.28 as well as Fig.29 , the inverse quantization processing of the differential vector in this embodiment is explained.
[0347] The processing described below is performed by the inter-frame prediction parameter decoding control unit 3031 unless otherwise specified.
[0348] (Inverse quantization processing example 1: Inverse quantization of the difference vector with the motion vector accuracy corresponding to the quantized difference vector)
[0349] Next, the nonlinear inverse quantization process of the quantized difference vector qmvd (quantized value, quantized difference 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 mvdAbsVal at the time point obtained by decoding the syntax of the encoded data (the time point before inverse quantization), and the absolute value of qmvd is mvdAbsVal. Fig.28 In the example, the quantized value qmvd of the difference vector is set to a value that can be both positive and negative in order to clarify the image, regardless of whether the difference vector is negative or positive. On the other hand, in actual processing, the absolute value of the difference 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] Fig.28 It is a graph showing the relationship between the quantized difference vector and the inversely quantized difference vector in this processing example. Fig.28 The horizontal axis of the graph shown is the quantized differential vector, i.e., qmvd (the value obtained by decoding the differential vector that has been quantized and encoded by the encoding device and not inversely quantized, i.e., the quantized value of the differential vector). Fig.28 The vertical axis of the graph shown is the difference vector after inverse quantization (also referred to as inverse quantization difference vector) mvd (= inverse quantization mvdAbsVal). Fig.28 As shown in the graph, the quantized difference vector qmvd is inversely quantized.
[0352] mvdAbsVal=mvdAbsVal(=qmvd)< <shiftS
[0353] Thereafter, the adding unit 3035 derives a motion vector by adding or subtracting the inversely quantized difference vector from the prediction vector.
[0354] mvdLX=mvdAbsVal*(1-2*mv_sign_flag)
[0355] mvLX=round(mvpLX)+mvdLX
[0356] And deduce.
[0357] right Fig.28 The curve diagram shown is explained in detail. Fig.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 the specified value (threshold) dTH (or less), the inter-frame prediction parameter decoding control unit 3031 performs inverse quantization of the quantized differential vector qmvd specified by a specified slope (scale factor). And when the quantized differential vector qmvd is equal to or greater than the specified value dTH, the inter-frame prediction parameter decoding control unit 3031 performs inverse quantization specified by a slope obtained by shifting the specified slope to the left by the motion vector scale shiftS. Here, the above-mentioned specified slope can be, for example, 1.
[0362] In summary, it is as follows (derivation process Q2). That is, the inter-frame prediction parameter decoding control unit 3031 does not perform inverse quantization when the absolute value of the quantized differential vector is small (qmvd < dTH).
[0363] Or only performs basic inverse quantization implemented by multiplication by K (or left shift according to log2(K)), and
[0364] mvdAbsVal = K * qmvd ··· Equation Q1
[0365] derives 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 that they become 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 can be set to 1, or it can be not set like this. The product based on K can be achieved by a left shift according to log2(K). It should be noted that in the case of K = 1, inverse quantization based on shiftS is only performed when the quantized differential vector qmvd >= dTH is satisfied, and in the case of a small qmvd, 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, in the case of a large qmvd, a configuration in which the motion vector accuracy is set to be low can be adopted.
[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 to perform 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 be low 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 the inverse quantization specific to the slope obtained by
[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 the inverse quantization specific to the slope obtained by
[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 < 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 >= 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] To sum up, 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 accuracy of the motion vector indicates a first value (mvd_dequant_flag==0), the inter-frame prediction parameter decoding control unit 3031 switches the accuracy of the inverse quantization processing on the differential vector according to the value of the quantized differential vector (quantization value), and when the flag indicating the accuracy of the motion vector indicates a second value (mvd_dequant_flag==1), the inverse quantization processing on the differential vector is performed with a fixed accuracy regardless of the quantization value of the quantized differential vector.
[0399] For example, in the above-mentioned formulas Q4 to Q6, when the base vector accuracy is set to 1 / 8 pel (mvBaseAccu = 3) and shiftA = 3, shiftS = 1, and dTHS = 16, if the motion vector accuracy flag mvd_dequant_flag = 1 is satisfied, the inter-frame prediction parameter decoding control unit 3031 shifts the quantized motion vector qmvd (differential motion vector absolute value) to the left by shiftA (= 3 bits) regardless of qmvd, and performs inverse quantization on the motion vector. That is, by setting the motion vector accuracy to full pixels, it is fixedly set to be lower than the case where the motion vector accuracy is set to mvd_dequant_flag = 0. On the other hand, when the motion vector accuracy flag mvd_dequant_flag = 0 is satisfied, when qmvd is a predetermined threshold value of 16 (equivalent to 2 pel) or more, the inter-frame prediction parameter decoding control unit 3031 shifts the quantized motion vector qmvd to the left by shiftS (= 1 bit), and performs inverse quantization on the motion vector. That is, the motion vector accuracy is set to 1 / 4pel, and the motion vector accuracy is set to be lower than the case where qmvd is less than the prescribed threshold value 16.
[0400] In another example, when the basic vector accuracy is set to 1 / 16 pel (mvBaseAccu = 4) and shiftA = 4, shiftS = 2, and dTHS = 16 in the above-mentioned formulas Q4 to Q6, when the motion vector accuracy flag mvd_dequant_flag = 1 is satisfied, the inter-frame prediction parameter decoding control unit 3031 shifts the quantized motion vector qmvd to the left by shiftA (= 4 bits) regardless of qmvd, and performs inverse quantization on the motion vector. That is, the motion vector accuracy is set to full pixels, and the motion vector accuracy is set to a lower level. On the other hand, when the motion vector accuracy flag mvd_dequant_flag = 0 is satisfied, when the predetermined threshold value qmvd is 16 (equivalent to 1 pel) or more, the quantized motion vector qmvd is shifted to the left by shiftS (= 2 bits), and performs inverse quantization on the motion vector. That is, the motion vector accuracy is set to 1 / 4 pel, and the motion vector accuracy is set to a lower level.
[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) can also be other values without being limited to the above examples.
[0402] According to the above configurations, a predicted image can be generated with a more appropriate accuracy of the motion vector. Therefore, the prediction accuracy is improved, and thus the coding 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, then 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, then by
[0409] mvdAbsVal = dTHA << shiftA1 + (qmvd - dTHA) << shiftA2 ··· Equation Q8
[0410] mvdAbsVal is derived.
[0411] 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, then by
[0412] mvdAbsVal = qmvd ··· Equation Q9
[0413] mvdAbsVal is derived.
[0414] In addition, when the motion vector accuracy flag is mvd_dequant_flag = 0 and the quantized differential vector qmvd >= dTHS, then by
[0415] mvdAbsVal = dTHS + (qmvd - dTHS) << shiftS ··· Equation Q10
[0416] Derive mvdAbsVal.
[0417] 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.
[0418] In summary, the following equation is obtained.
[0419] mvdAbsVal = mvd_quant_flag == 1?
[0420] qmvd < dTHA? qmvd << shiftA1 : dTHA << shiftA1 + (qmvd - dTHA) << shiftA2 :
[0422] qmvd < dTHS? qmvd : dTHS + (qmvd - dTHS) << shiftS
[0423] In other words, when the flag indicating the precision of the motion vector indicates the first value (the case of mvd_dequant_flag == 0), the frame interpolation 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 of the quantized differential vector (the value qmvd before inverse quantization). When the flag indicating the precision of the motion vector indicates the second value (the case of mvd_dequant_flag == 1), it 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.
[0424] For example, in the above formulas Q7 to Q10, when the basic vector accuracy is set to 1 / 8 pel and shiftA1=2, shiftA2=3, dTHA=4, shiftS=2, and dTHS=16, if the motion vector accuracy flag mvd_dequant_flag=1 is satisfied and the quantized differential vector qmvd is dTHA=less than 4, the inter-frame prediction parameter decoding control unit 3031 shifts the quantized differential vector qmvd (differential motion vector absolute value) left by shiftA1=2 to inverse quantize the motion vector. That is, the motion vector accuracy is set to 1 / 2 pel, and the motion vector accuracy is set to be low.
[0425] In addition, when the motion vector accuracy flag mvd_dequant_flag=1 is satisfied and the quantized difference vector qmvd is greater than or equal to dTHA=4, the inter-frame prediction parameter decoding control unit 3031 shifts the quantized difference vector qmvd (differential motion vector absolute value) left by shiftA2=3 to inversely quantize the motion vector. That is, the motion vector accuracy is set to 1pel, and the motion vector accuracy is set to a lower value.
[0426] On the other hand, when the motion vector accuracy flag mvd_dequant_flag=0 is satisfied and the quantized difference vector qmvd is dTHS=less than 16, the inter prediction parameter decoding control unit 3031 sets the motion vector accuracy to 1 / 8 of the basic vector accuracy.
[0427] Furthermore, when the motion vector accuracy flag mvd_dequant_flag=0 is satisfied and the quantized difference vector qmvd is greater than or equal to dTHS=16, the inter-frame prediction parameter decoding control unit 3031 shifts the quantized difference vector qmvd to the left by shiftS=2 to inversely quantize the motion vector. That is, the motion vector accuracy is set to 1 / 2pel, and the motion vector accuracy is set to a lower value.
[0428] According to the above configuration, a predicted image can be generated using a motion vector with more appropriate accuracy, thereby improving prediction accuracy and encoding efficiency.
[0429] (Inverse Quantization Processing Example 3: Inverse Quantization of a Difference Vector Corresponding to a Quantized Difference Vector and a Loop Processing of a Prediction Vector)
[0430] Next, an example of performing a loop process of a prediction vector when inverse quantization of a difference vector is performed based on a quantized difference vector will be described.
[0431] In this processing example, when the inter-frame prediction parameter decoding control unit 3031 performs inverse quantization processing for the differential vector with lower precision, it derives the motion vector by adding or subtracting the inverse-quantized differential vector to / from the prediction vector that has undergone a cyclic process by the vector candidate selection unit 3034.
[0432] 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
[0433] mvdAbsVal = qmvd + (qmvd - dTH) << shiftS ··· Equation Q20.
[0434] When the quantized differential vector, i.e., qmvd, is equal to or greater than the specified value dTH, the motion vector mvLX is derived as the sum of the prediction vector mvpLX that has undergone a cyclic process and the differential vector mvdLX. That is, it is derived as
[0435] mvLX = round(mvpLX, shiftS) + mvdLX. 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 code assignment process PS_SIGN.
[0436] 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.
[0437] That is, it is derived as
[0438] mvLX = mvpLX + mvdLX.
[0439] (Inverse Quantization Processing Example 4: Inverse Quantization of the Differential Vector and Cyclic Processing of the Prediction Vector Corresponding to the Motion Vector Precision Flag and the Value of the Quantized Differential Vector)
[0440] 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 / from the prediction vector that has undergone a cyclic process by the vector candidate selection unit 3034 according to the motion vector precision flag and the quantized differential vector.
[0441] For example, when the motion vector precision flag is mvd_dequant_flag = 1, by
[0442] mvdAbsVal = qmvd << shiftA
[0443] Derive mvdAbs. Then, the motion vector mvLX is obtained by
[0444] mvLX = round(mvpLX, shiftA) + mvdLX
[0445] where the derivation is the sum of the predicted vector mvpLX and the differential vector mvdLX that have undergone loop processing. Here, through 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.
[0446] 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 of the differential vector mvdAbsVal 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, it is obtained by
[0447] mvLX == mvpLX + mvdLX
[0448] And the derivation. In addition, when the quantized differential vector qmvd is greater than or equal to the specified value dTH, the absolute value of the differential vector mvdAbsVal is obtained by
[0449] mvdAbsVal = dTHS + (qmvd - dTHS) << shiftS
[0450] And the derivation. Then, the motion vector mvLX becomes the sum of the predicted vector mvpLX that has undergone loop processing and the differential vector mvdLX. That is, it is obtained by
[0451] mvLX = round(mvpLX, shiftS) + mvdLX
[0452] And the derivation. 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 code assignment process PS_SIGN.
[0453] (Inverse quantization process example 5: Another example of inverse quantization of the differential vector corresponding to the motion vector precision flag and the quantized differential vector, and loop processing of the predicted vector)
[0454] Next, other examples of the inverse quantization of the differential vector corresponding to the motion vector precision flag and the completed quantization of the differential vector and the loop processing of the prediction vector will be described.
[0455] In this processing example, when the inter-frame prediction parameter decoding control unit 3031 performs the inverse quantization process for the differential vector with a precision other than the highest precision among the first precision, the second precision, the third precision, and the 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 the loop processing by the vector candidate selection unit 3034.
[0456] A detailed description will be given of an example of this embodiment.
[0457] When the motion vector precision flag is mvd_dequant_flag = 1 and the completed quantization differential vector satisfies less than the specified value dTHA, by
[0458] mvdAbsVal = qmvd << shiftA1
[0459] mvdAbsVal is derived.
[0460] Then, the motion vector mvLX is derived as the sum of the prediction vector mvpLX that has undergone the loop processing and the differential vector mvdLX. That is, it is derived as
[0461] 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.
[0462] In addition, when the motion vector precision flag is mvd_dequant_flag = 1 and the completed quantization differential vector satisfies the specified value dTHA or more, by
[0463] mvdAbsVal = specified value dTHA << shiftA1 + (qmvd - dTHA) << shiftA2
[0464] mvdAbsVal is derived.
[0465] Then, the motion vector mvLX is derived as the sum of the prediction vector mvpLX that has undergone the loop processing and the differential vector mvdLX. That is, it is derived as
[0466] 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 of assigning the code PS_SIGN.
[0467] On the other hand, the case where the motion vector precision flag 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 prediction vector mvpLX and the differential vector mvdLX. That is, by
[0468] mvLX = mvpLX + mvdLX
[0469] And it is derived. 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 by
[0470] mvdAbsVal = dTHS + (qmvd - dTHS) << shiftS
[0471] And it is derived. Then, the motion vector mvLX becomes the sum of the prediction vector mvpLX that has undergone the rounding process and the differential vector mvdLX. That is, by
[0472] mvLX = round(mvpLX, shiftS) + mvdLX
[0473] And it is derived. 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 process of assigning the code PS_SIGN.
[0474] (Flowchart of the motion vector scale derivation process using the quantized differential vector)
[0475] Fig.29 Is a flowchart that more specifically represents the motion vector scale derivation process in S3031 (refer to Fig.19 ) and S3041 (refer to Fig. 20 ). In Fig.29 , for the convenience of explanation, the process of S3041 is specifically exemplified, but it can also be applied to S3031 Fig. 22Processing shown.
[0476] like Fig.29 As shown, in S304131, it is determined whether the quantized differential vector qmvd < the specified value dTH is satisfied. If the quantized differential vector qmvd < the specified value dTH is false (N in S304131), shiftS = M is set in S304132, and if the quantized differential vector qmvd < the specified value dTH is true (Y in S304131), shiftS = 0 is set in S304133. Then, the process proceeds to S3042.
[0477] <Motion compensation filtering>
[0478] Below, refer to Figure 30 to Figure 32 , the motion compensation filter provided in the motion compensation unit 3091 is described.
[0479] Fig.30 3091 is a block diagram showing the specific structure of the motion compensation unit 3091. Fig.30 As 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 .
[0480] The motion vector application unit 3091 uses the flag predFlagLX, the reference picture index refIdxLX, and the motion vector mvLX based on the prediction list input from the inter-frame prediction parameter decoding unit 303, and reads out a block located at a position offset by the motion vector mvLX from the reference picture memory 306 with the position of the decoded object block of the reference picture specified by the reference picture index refIdxLX as the starting point, thereby generating an image to which the motion vector is applied.
[0481] When the motion vector mvLX has not integer accuracy but 1 / M pixel accuracy (M is a natural number greater than or equal to 2), the image to which the motion vector is applied also has 1 / M pixel accuracy.
[0482] 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 L0 predicted motion compensation image, predSamplesL1 in the case of the L1 predicted motion compensation image, or predSamplesLX when no distinction is made between the two) by applying a filter using a filter coefficient mcFilter[i][k] (here, i is an integer greater than 0 and less than M-1, and k is an integer greater than 0 and less than Ntaps-1) to the image to which the motion vector is applied.
[0483] When the motion vector mvLX has integer precision, the motion compensation filter unit 30912 does not act on the image to which the motion vector is applied, and makes the image to which the motion vector is applied directly become the motion compensated image.
[0484] 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 portion 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.
[0485] (Filter coefficient)
[0486] Here, use Fig.31 The filter coefficient mcFilter[i][k] will be described in detail. Fig.31 This is a diagram showing an example of filter coefficients according to this embodiment.
[0487] Fig.31 The filter coefficient mcFilter[i][k] shown in the figure illustrates the filter coefficient mcFilter[i][k] when the total number of phases (i=0-15) of the image to which the motion vector is applied is 16 and the number of taps of the filter is 8 (8taps(k=0-7)). In this example, the total number of phases (i=0-15) is 16. When the total number of phases is 16, the accuracy of the motion vector is 1 / 16 pixel accuracy. That is, when the total number of phases is M, the accuracy of the motion vector is 1 / M pixel accuracy.
[0488] For example, shown in Fig.31 The top filter coefficients {0, 0, 0, 64, 0, 0, 0, 0} represent the filter coefficients at each coefficient position when phase i = 0. Here, the coefficient position refers to the relative position of the pixel where the filter coefficient works. Fig.31 The filter coefficients of other layers are filter coefficients for each coefficient position of other phases (i=1-15).
[0489] The total number of filter coefficients is a value obtained by multiplying the number of taps of the filter by the number of phases (that is, the inverse of the accuracy of the motion vector).
[0490] (Calculation of filter coefficients)
[0491] The filter coefficient mcFilter[i][k] used by the motion compensation filter unit (filter unit) 30912 may also include a filter coefficient calculated using a filter coefficient mcFilter[p][k] (p≠i) and a filter coefficient mcFilter[q][k] (q≠i). The details of the calculation example of the filter coefficient mcFilter[i][k] are as follows.
[0492] (Calculation Example 1: Calculate the filter coefficient of phase i from the average value of the filter coefficients of phases i-1 and i+1)
[0493] use Fig.32 (a) and Fig.32 (b) An example of calculation of the filter coefficient according to the present embodiment will be described.
[0494] Fig.32 (a) shows an example in which the motion compensation filter unit 30912 calculates filter coefficients of other phases (here, odd phases) from filter coefficients of a part of the phases (here, even phases) and uses the calculated filter coefficients. Fig.32 In (a), filter coefficients of even-numbered phases are indicated by underlining.
[0495] exist Fig.32 In the example shown in (a), the filter coefficient memory 30913 stores the filter coefficients of the even phases. Then, the filter coefficient of the odd phase i is calculated by the average value of the filter coefficients of the even phases i-1, i+1. That is, when i%2=1 (the remainder of i divided by 2 is 1), it becomes 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 filter coefficient memory 30913 is used as the filter coefficient. That is, when i%2=0 (the remainder of i divided by 2 is 0), it becomes mcFilter[i][k]=mcFilter[i][k].
[0496] In addition, when i%2=1, mcFilter[i][k]=(mcFilter[i-1][k]+mcFilter[i+1][k])>>1 may be satisfied.
[0497] Alternatively, a configuration may be adopted in which filter coefficients of a phase of a part of an odd number are stored in the filter coefficient memory 30913, and the motion compensation filter unit 30912 uses the stored filter coefficients as filter coefficients.
[0498] It should be noted that the above is equivalent to storing the basic filter coefficient mcFilterC in the filter coefficient memory 30913 and deriving the actually used filter coefficient mcFitler through the following formula.
[0499] mcFilter[i][k]=mcFilterC[i>>1][k](i=0, 2, 4,..., 2n, 2n+1, n=7)
[0500] mcFilter[i][k]=(mcFilterC[i>>1][k]+mcFilterC[(i>>1) +1][k]) / 2(i=1, 3, 5,..., 2n+1, n=6)
[0501] Here, the division represented by / 2 can be set to >>1.
[0502] For example, in Fig.32 In the example shown in (a), the following table can be used as mcFilterC.
[0503] mcFilterC[][]=
[0504] {
[0505] {0, 0, 0, 64, 0, 0, 0, 0},
[0506] {-1, 2, -5, 62, 8, -3, 1, 0},
[0507] {-1, 4, -10, 58, 17, -5, 1, 0},
[0508] {-1, 3, -9, 47, 31, -10, 4, -1},
[0509] {-1, 4, -11, 40, 40, -11, 4, -1},
[0510] {-1, 4, -10, 31, 47, -9, 3, -1},
[0511] {0, 1, -5, 17, 58, -10, 4, -1},
[0512] {0, 1, -3, 8, 62, -5, 2, -1},
[0513] {0, 1, -2, 4, 63, -3, 1, 0}
[0514] }
[0515] on the other hand, Fig.32(b) shows an example in which the motion compensation filter unit 30912 calculates filter coefficients of other phases (even phases) from filter coefficients of a part (here, odd phases). Fig.32 In (b), filter coefficients of odd-numbered phases are indicated by underlining.
[0516] exist Fig.32 In the example of (b), the filter coefficient memory 30913 stores the filter coefficients of the odd phases. Then, the filter coefficient of the even phase i is calculated by the average value of the filter coefficients of the 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 the odd phase i, mcFilter[i][k] stored in the filter 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].
[0517] In addition, when i%2=0, mcFilter[i][k]=(mcFilter[i-1][k]+mcFilter[i+1][k])>>1 may be satisfied.
[0518] The above is equivalent to storing the basic filter coefficient mcFilterC in the filter coefficient memory 30913, and deriving the actually used filter coefficient mcFitler through the following formula.
[0519] mcFilter[i][k]=mcFilterC[i>>1][k](i=0, 1, 3, 5,..., 2n+1, n=7)
[0520] mcFilter[i][k]=(mcFilterC[i>>1][k]+mcFilterC[(i>>1) +1][k]) / 2(i=0, 2, 4, 6,..., 2n+1, n=7)
[0521] Here, it can also be set as / 2>>1.
[0522] For example, in Fig.32 In the example shown in (b), the following table may be used as mcFilterC.
[0523] mcFilterC[][]=
[0524] {
[0525] {0, 0, 0, 64, 0, 0, 0, 0},
[0526] {0, 1, -3, 63, 4, -2, 1, 0},
[0527] {-1, 3, -8, 60, 13, -4, 1, 0},
[0528] {-1, 4, -11, 52, 26, -8, 3, -1},
[0529] {-1, 4, -11, 45, 34, -10, 4, -1},
[0530] {-1, 4, -10, 34, 45, -11, 4, -1},
[0531] {-1, 3, -8, 26, 52, -11, 4, -1},
[0532] {0, 1, -4, 13, 60, -8, 3, -1},
[0533] {0, 1, -2, 4, 63, -3, 1, 0}
[0534] }
[0535] Alternatively, a configuration may be adopted in which filter coefficients of a phase of a part of an even number are stored in the filter coefficient memory 30913, and the motion compensation filter unit 30912 uses the stored filter coefficients as filter coefficients.
[0536] (Calculation Example 2: Calculate the filter coefficient of phase i by linear interpolation of the filter coefficients of other phases before and after)
[0537] Next, an example will be described 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. The motion compensation filter unit 30912 calculates the filter coefficient of phase i using the following equation.
[0538] mcFilter[i][k]=((Nw)*mcFilter[i0][k]+w*mcFilter[i1][k])>>log(N)
[0539] Here, i0=(i / N)*N, i1=i0+N, w=(i%N), and N is an integer greater than or equal to 2.
[0540] That is, the above filter coefficients Filter[i][k] include filter coefficients that satisfy mcFilter[i][k]=((Nw)*mcFilter[i0][k]+w*mcFilter[i1][k])>>log2(N), i0=(i / N)*N, i1=i0+N, w=(i%N), and N is an integer greater than 2.
[0541] The above is equivalent to storing the basic filter coefficient mcFilterC in the filter coefficient memory 30913, and deriving the actually used filter coefficient mcFitler through the following formula.
[0542] The above is equivalent to storing the basic filter coefficient mcFilterC in the filter coefficient memory 30913, and deriving the actually used filter coefficient mcFitler through the following formula.
[0543] mcFilter[i][k]=mcFilterC[i>>log2(N)][k](i=N*n)
[0544] mcFilter[i][k]=((Nw)*mcFilterC[i>>log2(N)][k]+w*mcFilter [(i>>log2(N))+1][k])>>log2(N)(i!=N*n)
[0545] In addition, the following configuration is also possible.
[0546] mcFilter[i][k]=mcFilterC[i>>log2(N)][k](i=0,N*n+1)
[0547] mcFilter[i][k]=((Nw)*mcFilterC[i>>log2(N)][k]+w*mcFilter [(i>>log2(N))+1][k])>>log2(N)(i!=N*n+1)
[0548] 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, it is sufficient to include a part of the motion compensation filter coefficients in the encoded data, thereby reducing the amount of code in the encoded data, and thus it is possible to expect an improvement in encoding efficiency.
[0549] (Configuration of Image Coding Device)
[0550] Next, the configuration of the image encoding device 11 according to this embodiment will be described. Fig.12 1 is a block diagram showing the structure of the image coding device 11 of the present embodiment. The image coding device 11 includes a prediction image generation unit 101, a subtraction unit 102, a DCT / quantization unit 103, an entropy coding 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 picture storage unit, frame memory) 109, a coding parameter determination unit 110, a prediction parameter coding unit 111, and a residual storage unit 313 (residual recording unit). The prediction parameter coding unit 111 includes an inter-frame prediction parameter coding unit 112 and an intra-frame prediction parameter coding unit 113.
[0551] The prediction image generation unit 101 generates a prediction picture block P per block (region formed by dividing the picture) for each picture of each viewpoint of the layer image T input from the outside. Here, the prediction image generation unit 101 reads a reference picture block from the reference picture memory 109 based on the prediction parameter input from the prediction parameter encoding unit 111. The prediction parameter input from the prediction parameter encoding unit 111 is, for example, a motion vector or a displacement vector. The prediction image generation unit 101 reads a reference picture block of a block located at a position indicated by a motion vector or a displacement vector predicted with the encoding target block as a starting point. The prediction image generation unit 101 generates a prediction picture block P using one of a plurality of 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. It should be noted that the prediction image generation unit 101 performs the same operation as the prediction image generation unit 308 already described, and therefore the details of the generation of the prediction picture block P are omitted.
[0552] The prediction image generator 101 selects a prediction method, for example, to minimize an error value based on a difference between a signal value of each pixel included in the image block and a signal value of each pixel corresponding to the prediction picture block P. The method of selecting a prediction method is not limited thereto.
[0553] The multiple prediction methods are intra prediction, motion prediction and merge prediction. Motion prediction is the prediction between display times in the above inter prediction. Merge prediction is a prediction using a reference picture block and prediction parameters that have already been coded and are the same as a block located within a predetermined range from the coding target block.
[0554] When intra prediction is selected, the predicted image generation unit 101 outputs a prediction mode IntrapredMode indicating an intra prediction mode used when generating the predicted picture block P to the prediction parameter encoding unit 111 .
[0555] When 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-frame prediction parameter encoding unit 112. The motion vector mvLX represents a vector from the position of the encoding target block to the position of the reference picture block when generating the prediction picture block P. The information representing the motion vector mvLX includes information representing the reference picture (for example, the reference picture index refIdxLX, the picture sequence number POC), and may also be information representing the prediction parameters. In addition, the prediction image generation unit 101 outputs the prediction mode predMode representing the inter-frame prediction mode to the prediction parameter encoding unit 111.
[0556] When merge prediction is selected, the predicted image generation unit 101 outputs a merge index merge_idx indicating the selected reference picture block to the inter prediction parameter coding unit 112. Furthermore, the predicted image generation unit 101 outputs a prediction mode predMode indicating a merge prediction mode to the prediction parameter coding unit 111.
[0557] Furthermore, the predicted image generation unit 101 may have a configuration for generating a motion compensation filter coefficient to be referred to by the motion compensation unit 3091 included in the image decoding device 31 .
[0558] Furthermore, the predicted image generation unit 101 may have a configuration corresponding to the switching of the motion vector accuracy described in the image decoding device 31. That is, the predicted image generation unit 101 may switch the motion vector accuracy according to the block size and QP, etc. Furthermore, a configuration may be adopted in which a motion vector accuracy flag mvd_dequant_flag referenced when switching the motion vector accuracy in the image decoding device 31 is encoded.
[0559] The subtraction unit 102 generates a residual signal by subtracting the signal value of the prediction picture block P input from the prediction image generation unit 101 pixel by pixel from the signal value of the block corresponding to the layer image T input from the outside. The subtraction unit 102 outputs the generated residual signal to the DCT / quantization unit 103 and the encoding parameter determination unit 110.
[0560] 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 quantized coefficients. The DCT / quantization unit 103 outputs the obtained quantized coefficients to the entropy coding unit 104 and the inverse quantization / inverse DCT unit 105.
[0561] The entropy coding unit 104 receives quantization coefficients from the DCT / quantization unit 103 and coding parameters from the coding parameter determination unit 110. The input coding parameters include codes such as reference picture index refIdxLX, prediction vector index mvp_LX_idx, difference vector mvdLX, prediction mode predMode, and merge index merge_idx.
[0562] It should be noted that the entropy coding unit 104 may be configured to perform a process corresponding to the nonlinear inverse quantization process described in the image decoding device 31 before encoding the difference vector mvdLX, that is, a nonlinear quantization process on the difference vector.
[0563] The entropy coding unit 104 performs entropy coding on the input quantization coefficients and coding parameters to generate a coded stream Te, and outputs the generated coded stream Te to the outside.
[0564] The inverse quantization / inverse DCT unit 105 inversely quantizes the quantization coefficients input from the DCT / quantization unit 103 to obtain DCT coefficients. The inverse quantization / inverse DCT unit 105 performs 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.
[0565] The adder 106 generates a reference picture block by adding the signal value of the prediction picture block P input from the prediction image generator 101 and the signal value of the decoded residual signal input from the inverse quantization / inverse DCT unit 105 for each pixel. The adder 106 stores the generated reference picture block in the reference picture memory 109 .
[0566] The prediction parameter memory 108 stores the prediction parameter generated by the prediction parameter encoding unit 111 at a predetermined position for each picture and block to be encoded.
[0567] The reference picture memory 109 stores the reference picture blocks generated by the adding unit 106 at predetermined positions for each picture and block to be encoded.
[0568] The coding parameter determination unit 110 selects one of a plurality of sets of coding parameters. The coding parameters are the above-mentioned prediction parameters and parameters to be coded that are generated in association with the prediction parameters. The predicted image generation unit 101 generates a predicted picture block P using each of these sets of coding parameters.
[0569] The coding parameter determination unit 110 calculates the size of the amount of information and the cost value indicating the coding error for each of the multiple sets. The cost value is, for example, the sum of the amount of code and the value obtained by multiplying the square error by the coefficient λ. The amount of code is the amount of information of the coded stream Te obtained by entropy encoding the quantization error and the coding parameter. The square error is the sum of the square values of the residual value of the residual signal calculated in the subtraction unit 102 between pixels. The coefficient λ is a real number greater than a preset zero. The coding parameter determination unit 110 selects a set of coding parameters whose calculated cost value becomes the smallest. As a result, the entropy coding unit 104 outputs the selected set of coding parameters as the coded stream Te to the outside, without outputting the set of coding parameters that are not selected.
[0570] The prediction parameter coding unit 111 derives prediction parameters used when generating a prediction picture based on the parameters input from the prediction image generation unit 101 , and codes the derived prediction parameters to generate a set of coding parameters. The prediction parameter coding unit 111 outputs the generated set of coding parameters to the entropy coding unit 104 .
[0571] The prediction parameter encoding unit 111 stores the prediction parameter corresponding to the parameter selected by the encoding parameter determination unit 110 in the prediction parameter memory 108 among the generated set of encoding parameters.
[0572] When the prediction mode predMode input from the prediction image generator 101 indicates the inter prediction mode, the prediction parameter encoder 111 causes the inter prediction parameter encoder 112 to operate. When the prediction mode predMode indicates the intra prediction mode, the prediction parameter encoder 111 causes the intra prediction parameter encoder 113 to operate.
[0573] The inter-frame prediction parameter encoding unit 112 derives the inter-frame prediction parameter based on the prediction parameter input from the encoding parameter determination unit 110. The inter-frame prediction parameter encoding unit 112 includes, as a configuration for deriving the inter-frame prediction parameter, a decoder 303 (see Figure 5 The structure of the inter-frame prediction parameter encoding unit 112 is the same as that of the inter-frame prediction parameter encoding unit 112. The structure of the inter-frame prediction parameter encoding unit 112 will be described below.
[0574] 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)
[0575] Next, the configuration of the inter prediction parameter encoding unit 112 will be described. The inter prediction parameter encoding unit 112 is a unit corresponding to the inter prediction parameter decoding unit 303 .
[0576] Fig.13 It is a schematic diagram showing the structure of the inter-frame prediction parameter encoding unit 112 according to this embodiment.
[0577] The inter-frame prediction parameter encoding unit 112 includes a merged prediction parameter derivation unit 1121 , an AMVP prediction parameter derivation unit 1122 , a subtraction unit 1123 , and a prediction parameter integration unit 1126 .
[0578] The combined prediction parameter derivation unit 1121 has the same functions as the combined prediction parameter derivation unit 3036 (see Figure 7 ) has the same structure as the AMVP prediction parameter derivation unit 1122, which has the same structure as the AMVP prediction parameter derivation unit 3032 (see Figure 8 )Same composition.
[0579] 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, the 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 the reference picture index refIdxLX and the motion vector mvLX of the reference block indicated by the merge index merge_idx in the merge candidate from the prediction parameter memory 108. The merge candidate is a reference block located in a predetermined range from the encoding target block to be encoded (for example, a reference block connected to the lower left end, upper left end, or upper right end of the encoding target block), and is a reference block that has completed the encoding process.
[0580] The AMVP prediction parameter derivation unit 1122 has the same functions as the AMVP prediction parameter derivation unit 3032 (see Figure 8 )Same composition.
[0581] 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, the motion vector mvLX is input from the encoding parameter determination unit 110. The AMVP prediction parameter derivation unit 1122 derives the 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.
[0582] 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 difference vector mvdLX. The difference vector mvdLX is output to the prediction parameter integration unit 1126.
[0583] When the prediction mode predMode input from the predicted 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 .
[0584] When the prediction mode predMode input from the predicted image generation unit 101 indicates the inter prediction mode, the prediction parameter integration unit 1126 performs the following processing.
[0585] 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 difference vector mvdLX input from the subtraction unit 1123. The prediction parameter integration unit 1126 outputs the integrated code to the entropy coding unit 104.
[0586] It should be noted that the inter-frame prediction parameter encoding unit 112 may also include an inter-frame prediction parameter encoding control unit (not shown), which instructs the entropy encoding unit 104 to decode the code (syntax element) related to the inter-frame prediction, and encodes the code (syntax element) contained in the encoded data, such as the partition 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.
[0587] In this case, the inter-frame prediction parameter encoding control unit 1031 includes a merge index encoding unit (with Fig.10 The merged index decoding unit 30312 corresponds to the vector candidate index encoding unit (corresponding to Fig.10The vector candidate index decoding unit 30313 corresponds to the vector candidate index decoding unit 30313), a partition mode coding unit, a merge flag coding unit, an inter-frame prediction flag coding unit, a reference picture index coding unit, and a vector difference coding unit. The partition mode coding unit, the merge flag coding unit, the merge index coding unit, the inter-frame prediction flag coding unit, the reference picture index coding unit, the vector candidate index coding unit, and the vector difference coding unit encode the partition 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 difference vector mvdLX, respectively.
[0588] It should be noted that a part of the image encoding device 11 and the image decoding device 31 in the above-mentioned embodiment, such as the entropy decoding unit 301, the prediction parameter decoding unit 302, the prediction image generation unit 101, the DCT / quantization unit 103, the entropy coding unit 104, the inverse quantization / inverse DCT unit 105, the coding parameter determination unit 110, the prediction parameter coding unit 111, the entropy decoding unit 301, the prediction parameter decoding unit 302, the prediction image generation unit 308, and the inverse quantization / inverse DCT unit 311, can be realized by a computer. In this case, the program for realizing the control function can be recorded in a computer-readable recording medium, and the computer system can read the program recorded in the recording medium and execute it. It should be noted that the "computer system" mentioned here refers to a computer system built into any one of the image encoding devices 11-11h and the image decoding devices 31-31h, and a computer system including hardware such as an OS and peripheral devices is used. In addition, the "computer-readable recording medium" refers to a removable medium such as a floppy disk, a magneto-optical disk, a ROM, and a CD-ROM, as well as a storage device such as a hard disk built into the computer system. Furthermore, "computer-readable recording media" may include: media that dynamically store programs in a short period of time, such as a communication line when the program is transmitted via a network such as the Internet or a communication line such as a telephone line; media that store programs in a fixed period of time, such as a volatile memory inside a computer system that serves as a server or client in this case. In addition, the above-mentioned program may be a program for realizing a part of the aforementioned functions, or a program that can further realize the aforementioned functions by combining them with a program already recorded in a computer system.
[0589] In addition, part or all of the image encoding device 11 and the image decoding device 31 in the above-mentioned embodiment may be implemented as an integrated circuit such as LSI (Large Scale Integration). Each functional block of the image encoding device 11 and the image decoding device 31 may be individually processor-based, or part or all of them may be integrated to form a processor. In addition, the method of integrated circuitization is not limited to LSI, and it may be implemented by a dedicated circuit or a general-purpose processor. In addition, in the case where a technology for integrated circuitization that replaces LSI emerges due to the advancement of semiconductor technology, an integrated circuit based on the technology may also be used.
[0590] As mentioned above, one embodiment of the present invention has been described in detail with reference to the drawings, but the specific configuration is not limited to the above, and various design changes and the like can be made within the scope not departing from the gist of the present invention.
[0591] [Application Examples]
[0592] The above-mentioned image encoding device 11 and image decoding device 31 can be mounted on various devices for sending, receiving, recording, and reproducing moving images. It should be noted that the moving images can be natural moving images captured by a camera or the like, or artificial moving images (including CG and GUI) generated by a computer or the like.
[0593] First, refer to Fig.33 , a description will be given of a case where the above-mentioned image encoding device 11 and image decoding device 31 can be used for sending and receiving moving images.
[0594] Fig.33 (a) is a block diagram showing the structure of a transmitting device PROD_A equipped with an image coding device 11. Fig.33 As shown in (a), 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 modulated signal by modulating a carrier according to the encoded data obtained by the encoding unit PROD_A1, and a transmitting unit PROD_A3 that transmits the modulated signal obtained by the modulation unit PROD_A2. The above-mentioned image encoding device 11 is used as the encoding unit PROD_A1.
[0595] The transmitting device PROD_A may further include: a camera PROD_A4 for shooting moving images, a recording medium PROD_A5 recording moving images, an input terminal PROD_A6 for inputting moving images from the outside, and an image processing unit A7 for generating or processing images, as a supply source of moving images input to the encoding unit PROD_A1. Fig.33(a) illustrates that the transmission device PROD_A includes all of these components, but some of them may be omitted.
[0596] It should be noted that the recording medium PROD_A5 may be a medium for recording uncoded moving images, or a medium for recording moving images coded in a recording coding method different from a transmission coding method. In the latter case, it is preferred that a decoding unit (not shown) for decoding coded data read from the recording medium PROD_A5 in accordance with the recording coding method be interposed between the recording medium PROD_A5 and the coding unit PROD_A1.
[0597] Fig.33 (b) is a block diagram showing the structure of a receiving device PROD_B equipped with an image decoding device 31. Fig.33 As 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 demodulates the modulated signal received by the receiving unit PROD_B1 to obtain coded data, and a decoding unit PROD_B3 that decodes the coded data obtained by the demodulating unit PROD_B2 to obtain a moving image. The above-mentioned image decoding device 31 is used as the decoding unit PROD_B3.
[0598] The receiving device PROD_B may further include a display PROD_B4 for displaying moving images, a recording medium PROD_B5 for recording moving images, and an output terminal PROD_B6 for outputting moving images to the outside, as a supply destination for the moving images output by the decoding unit PROD_B3. Fig.33 (b) illustrates that the receiving device PROD_B includes all of these components, but some of them may be omitted.
[0599] It should be noted that the recording medium PROD_B5 may be a medium for recording uncoded moving images, or may be a medium coded in a recording coding method different from a transmission coding method. In the latter case, it is preferred that a coding unit (not shown) that codes the moving images obtained from the decoding unit PROD_B3 in a recording coding method is interposed between the decoding unit PROD_B3 and the recording medium PROD_B5.
[0600] It should be noted that the transmission medium for transmitting the modulated signal can be wireless or wired. In addition, the transmission scheme for transmitting the modulated signal can be broadcast (here, it refers to a transmission scheme in which the transmission destination is not pre-specified) or communication (here, it refers to a transmission scheme in which the transmission destination is pre-specified). That is, the transmission of the modulated signal can be achieved through any one of wireless broadcasting, wired broadcasting, wireless communication, and wired communication.
[0601] For example, a broadcasting station (broadcasting equipment, etc.) / receiving station (television receiver, etc.) of terrestrial digital broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives modulated signals via wireless broadcasting. In addition, a broadcasting station (broadcasting equipment, etc.) / receiving station (television receiver, etc.) of cable television broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives modulated signals via wired broadcasting.
[0602] In addition, a server (workstation, etc.) / client (television receiver, personal computer, smart phone, etc.) of a VOD (Video On Demand) service or a motion picture sharing service using the Internet is an example of a transmitter PROD_A / receiver PROD_B that transmits and receives a modulated signal by communication (usually, a wireless or wired transmission medium is used as a transmission medium in a LAN, and a wired transmission medium is used as a transmission medium in a WAN). Here, a personal computer includes a desktop PC, a laptop PC, and a tablet PC. In addition, a smart phone also includes a multifunctional portable phone terminal.
[0603] It should be noted that the client of the moving image sharing service has the function of decoding the coded data downloaded from the server and displaying it on the display, and also has the function of encoding the moving images captured by the camera and uploading them to the server. That is, the client of the moving image sharing service plays the role of both the sending device PROD_A and the receiving device PROD_B.
[0604] Next, refer to Fig.34 , a description will be given of a case where the above-mentioned image encoding device 11 and image decoding device 31 can be used for recording and reproducing moving images.
[0605] Fig.34 (a) is a block diagram showing the structure of a recording device PROD_C equipped with the above-mentioned image encoding device 11. Fig.34 As shown in (a), the recording device PROD_C includes a coding unit PROD_C1 for coding a moving image to obtain coded data, and a writing unit PROD_C2 for writing the coded data obtained by the coding unit PROD_C1 to the recording medium PROD_M. The above-mentioned image coding device 11 is used as the coding unit PROD_C1.
[0606] 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), or (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 memory, 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, a registered trademark).
[0607] In addition, the recording device PROD_C may further include: a camera PROD_C3 for shooting moving images, an input terminal PROD_C4 for inputting moving images from the outside, a receiving unit PROD_C5 for receiving moving images, and an image processing unit C6 for generating or processing images, as a supply source of moving images input to the encoding unit PROD_C1. Fig.34 (a) shows an example in which the recording device PROD_C includes all of these components, but some of them may be omitted.
[0608] It should be noted that the receiving unit PROD_C5 can receive uncoded moving images, or can receive coded data coded in a transmission coding method different from the recording coding method. In the latter case, it is preferable to place a transmission decoding unit (not shown) that decodes the coded data coded in the transmission coding method between the receiving unit PROD_C5 and the coding unit PROD_C1.
[0609] Examples of such recording device PROD_C include DVD recorders, BD recorders, and HDD (Hard Disk Drive) recorders (in this case, the input terminal PROD_C4 or the receiving unit PROD_C5 is the main source of motion images). In addition, portable cameras (in this case, the camera PROD_C3 is the main source of motion images), personal computers (in this case, the receiving unit PROD_C5 or the image processing unit C6 is the main source of motion images), and smart phones (in this case, the camera PROD_C3 or the receiving unit PROD_C5 is the main source of motion images) are also examples of such recording device PROD_C.
[0610] Fig.34(b) is a block diagram showing the structure of a reproduction device PROD_D equipped with the above-mentioned image decoding device 31. Fig.34 As shown in (b), the playback device PROD_D includes a reading unit PROD_D1 for reading coded data written in the recording medium PROD_M, and a decoding unit PROD_D2 for obtaining a moving image by decoding the coded data read by the reading unit PROD_D1. The above-mentioned image decoding device 31 is used as the decoding unit PROD_D2.
[0611] It should be noted that the recording medium PROD_M can be (1) a type of recording medium that is built into the reproduction device PROD_D, such as an HDD, SSD, etc., or (2) a type of recording medium that is connected to the reproduction device PROD_D, such as an SD memory card, USB flash memory, etc., or (3) a type of recording medium that is loaded into a drive device (not shown) built into the reproduction device PROD_D, such as a DVD, BD, etc.
[0612] In addition, the reproduction device PROD_D may further include a display PROD_D3 for displaying moving images, an output terminal PROD_D4 for outputting moving images to the outside, and a transmission unit PROD_D5 for transmitting moving images, as a supply destination of the moving images output by the decoding unit PROD_D2. Fig.34 (b) illustrates an example in which the playback device PROD_D includes all of these components, but some of them may be omitted.
[0613] It should be noted that the sending unit PROD_D5 can send uncoded moving images, or can send coded data coded in a transmission coding method different from the recording coding method. In the latter case, it is better to place a coding unit (not shown) that encodes moving images in a transmission coding method between the decoding unit PROD_D2 and the sending unit PROD_D5.
[0614] Examples of such a reproduction device PROD_D include a DVD player, a BD player, and an HDD player (in this case, the output terminal PROD_D4 connected to a television receiver or the like becomes the main supply destination of the motion image). In addition, a television receiver (in this case, the display PROD_D3 becomes the main supply destination of the motion image), a digital signage (also called an electronic billboard, an electronic bulletin board, etc., the display PROD_D3 or the transmission unit PROD_D5 becomes the main supply destination of the motion image), a desktop PC (in this case, the output terminal PROD_D4 or the transmission unit PROD_D5 becomes the main supply destination of the motion image), a laptop or tablet PC (in this case, the display PROD_D3 or the transmission unit PROD_D5 becomes the main supply destination of the motion image), and a smartphone (in this case, the display PROD_D3 or the transmission unit PROD_D5 becomes the main supply destination of the motion image) are also examples of such a reproduction device PROD_D.
[0615] (Hardware implementation and software implementation)
[0616] Furthermore, each block of the above-described image decoding device 31 and image encoding device 11 may be implemented in hardware by a logic circuit formed on an integrated circuit (IC chip), or may be implemented in software by a CPU (Central Processing Unit).
[0617] In the latter case, each of the above-mentioned devices has: a CPU that executes commands of a program that realizes each function, a ROM (Read Only Memory) that stores the above-mentioned program, a RAM (Random Access Memory) that expands the above-mentioned program, and a storage device (recording medium) such as a memory that stores the above-mentioned program and various data. Then, the purpose of the present invention can also be achieved in the following manner: the software that realizes the above-mentioned functions, that is, the recording medium that records the program code (executable form program, intermediate code program, source program) of the control program of each of the above-mentioned devices in a computer-readable manner is supplied to each of the above-mentioned devices, and the computer (or CPU, MPU) reads the program code recorded in the recording medium and executes it.
[0618] As the above-mentioned recording medium, for example, tapes such as magnetic tapes and cassette tapes, magnetic disks including floppy disks (registered trademark) / hard disks, disks including CD-ROM (Compact Disc Read-Only Memory) / MO disks (Magneto-Optical Disc) / MD (Mini Disc) / DVD (Digital Versatile Disc) / CD-R (CD Recordable) / Blu-ray Disc (registered trademark) and the like, cards such as IC cards (including memory cards) / optical cards, semiconductor memories such as mask ROM / EPROM (Erasable Programmable Read-Only Memory) / EEPROM (Electrically Erasable and Programmable Read-Only Memory, registered trademark) / flash ROM, or logic circuits such as PLD (Programmable logic device) and FPGA (Field Programmable Gate Array) and the like can be used.
[0619] In addition, each of the above-mentioned devices can also be configured to be connected to a communication network, and the above-mentioned program code can be supplied via the communication network. The communication network can transmit program codes without any 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 (Virtual Private Network), telephone line network, mobile communication network, satellite communication network, etc. can be used. In addition, the transmission medium constituting the communication network can be any medium that can transmit program codes, and is not limited to a specific structure or type. For example, it can be used in wired communication such as IEEE (Institute of Electrical and Electronic Engineers) 1394, USB, power line transmission, wired TV line, telephone line, ADSL (Asymmetric Digital Subscriber Line) line, or wireless communication such as IrDA (Infrared Data Association), infrared such as remote controller, 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 be implemented in the form of a computer data signal embedded in a carrier wave that embodies the above-mentioned program code through electronic transmission.
[0620] The present invention is not limited to the above-mentioned embodiments, and various modifications can be made within the scope of the claims. That is, embodiments obtained by combining technical solutions appropriately modified within the scope of the claims are also included in the technical scope of the present invention.
[0621] (CROSS-REFERENCE TO RELATED APPLICATIONS)
[0622] This application claims the benefit of priority based on Japanese Patent Application No. 2016-017444, filed on February 1, 2016, the entire contents of which are incorporated herein by reference.
[0623] Industrial Applicability
[0624] The present invention can be preferably applied to an image decoding device that decodes coded data obtained by encoding image data, and an image encoding device that generates coded data obtained by encoding image data. In addition, it can be preferably applied to the data structure of coded data generated by the image encoding device and referred to by the image decoding device.
[0625] Explanation of symbols
[0626] 11: Image coding device (motion image coding device)
[0627] 31: Image decoding device (moving image decoding device)
[0628] 302: Prediction parameter decoding unit (prediction image generation device)
[0629] 303: Inter-frame prediction parameter decoding unit (motion vector derivation unit)
[0630] 308: Prediction image generation unit (prediction image generation device)
[0631] 3031: Inter-frame prediction parameter decoding control unit (motion vector derivation unit)
[0632] 30912: Compensation filter unit (filter unit).
Claims
1. A prediction image generating device, for generating a prediction image, the prediction image generating device comprising: an inter-frame prediction parameter decoding control circuit that derives a differential motion vector by using an absolute value of a motion vector difference, and, if the differential motion vector is not equal to zero, decodes a flag indicating the accuracy of the motion vector from the encoded data; as well as a predicted image generating circuit that generates a predicted image by using a motion vector based on the differential motion vector, in, The inter prediction parameter decoding control circuit determines a shift value for a loop process of a motion vector by using the flag and the size of a prediction block.
2. A video decoding device, comprising: The predicted image generating device according to claim 1, in, The video decoding device decodes an encoding target image by adding a residual image to the predicted image or subtracting the residual image from the predicted image.
3. A video encoding device, comprising: The predicted image generating device according to claim 1, in, The video encoding device encodes a residual between the predicted image and the encoding target image.
Citation Information
Patent Citations
Compressor
JP2016017444A
Method and device for interpolating images by using a smoothing interpolation filter
CN103238320A
Video image coding method, video image coding device, video image decoding method, video image decoding device and video image coding / decoding device
CN103650507A