Image encoding device, image encoding method, image decoding device, image decoding method, transmission method, and recording method

By employing history prediction vector candidates and spatial merge candidates, the encoding process is optimized to reduce processing loads and enhance efficiency in image encoding and decoding, particularly for deformed objects.

JP7620857B2Active Publication Date: 2025-01-24GODO KAISHA IP BRIDGE 1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2024020097
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-09-20
Filing Date
2024-02-14
Publication Date
2025-01-24
Estimated Expiration
2039-12-27

AI Technical Summary

Technical Problem

Existing image encoding and decoding technologies face high processing loads due to image conversion processes, particularly when dealing with objects undergoing deformation such as enlargement, reduction, or rotation, which affect encoding efficiency.

Method used

The implementation of a low-load and efficient encoding technology that utilizes history prediction vector candidates, spatial merge candidates, and average merge candidates to optimize the encoding process by deriving and registering these candidates in specific lists, reducing the need for direct comparison of all prediction information.

Benefits of technology

This approach enables high-efficiency image encoding and decoding with reduced processing loads, improving overall encoding efficiency by leveraging historical and spatial merge candidates to predict image blocks effectively.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007620857000001
    Figure 0007620857000001
  • Figure 0007620857000002
    Figure 0007620857000002
  • Figure 0007620857000003
    Figure 0007620857000003
Patent Text Reader

Abstract

To provide technology for improving encoding efficiency by performing a block split suitable for picture encoding and decoding.SOLUTION: An image encoding device includes: an encoding information storage unit configured to store inter prediction information used in the inter prediction of an encoded block in a history-based motion vector predictor candidate list; a spatial inter prediction information candidate derivation unit configured to derive a spatial inter prediction information candidate and set the spatial inter prediction information candidate as an inter prediction information candidate of the encoding target block; and a history-based inter prediction information candidate derivation unit configured to derive a history-based inter prediction information candidate from the inter prediction information stored in the history-based motion vector predictor candidate list and set the history-based inter prediction information candidate as the inter prediction information candidate of the encoding target block. The history-based inter prediction information candidate derivation unit compares a predetermined number of inter prediction information elements from latest inter prediction information within the inter prediction information stored in the history-based motion vector predictor candidate list with the spatial inter prediction information candidate and sets the inter prediction information as the history-based inter prediction information candidate when a value of the inter prediction information is different.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an image encoding and decoding technique that divides an image into blocks and performs prediction. [Background technology]

[0002] In image encoding and decoding, the image to be processed is divided into blocks, which are collections of a certain number of pixels, and processed on a block-by-block basis. By dividing the image into appropriate blocks and appropriately setting intra-frame prediction (intra-prediction) and inter-frame prediction (inter-prediction), the encoding efficiency can be improved.

[0003] In video coding and decoding, coding efficiency is improved by inter-prediction, which predicts from pictures that have already been coded and decoded. Patent Document 1 describes a technique for applying affine transformation during inter-prediction. In video, it is not uncommon for objects to undergo transformations such as enlargement, reduction, and rotation, and applying the technique of Patent Document 1 enables efficient coding. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] Japanese Patent Application Publication No. 9-172644 Summary of the Invention [Problem to be solved by the invention]

[0005] However, the technique of Patent Document 1 involves image conversion, and therefore has the problem of a large processing load. In view of the above problem, the present invention provides an efficient encoding technique with a low load. [Means for solving the problem]

[0006] In order to solve the above problem, an image coding device according to a first aspect of the present invention includes: a coding information storage unit that stores inter-prediction information used in inter-prediction of a coded block in a history prediction motion vector candidate list; a spatial merge candidate derivation unit that derives spatial merge candidates from inter-prediction information of a block spatially adjacent to a block to be coded and registers the spatial merge candidates in a merge candidate list; a history merge candidate derivation unit that derives history merge candidates from inter-prediction information stored in the history prediction motion vector candidate list and registers the history merge candidates in the merge candidate list; and an average merge candidate derivation unit that derives an average merge candidate from the merge candidate list and registers the average merge candidate in the merge candidate list. The history merge candidate derivation unit compares a predetermined number of inter-prediction information from the back of the inter-prediction information stored in the history prediction motion vector candidate list with the inter-prediction information of the spatial merge candidate, and if the values ​​of the inter-prediction information are different, the history merge candidate is selected as the history merge candidate, and selects inter-prediction information ahead of the predetermined number from the back as the history merge candidate without comparing it with the inter-prediction information of the spatial merge candidate.

[0007] The image coding method of the second aspect of the present invention includes a coding information storing step of storing inter prediction information used in inter prediction of a coded block in a history prediction motion vector candidate list; a spatial merge candidate derivation step of deriving a spatial merge candidate from inter prediction information of a block spatially adjacent to a block to be coded and registering the spatial merge candidate in a merge candidate list; a history merge candidate derivation step of deriving a history merge candidate from the inter prediction information stored in the history prediction motion vector candidate list and registering the history merge candidate in the merge candidate list; and an average merge candidate derivation step of deriving an average merge candidate from the merge candidate list and registering it in the merge candidate list, in which the history merge candidate derivation step compares a predetermined number of inter prediction information from the back of the inter prediction information stored in the history prediction motion vector candidate list with the inter prediction information of the spatial merge candidate, and if the values ​​of the inter prediction information are different, the history merge candidate is selected as the history merge candidate, and the inter prediction information ahead of the predetermined number from the back is selected as the history merge candidate without comparing it with the inter prediction information of the spatial merge candidate.

[0008] An image decoding device according to a third aspect of the present invention includes: an encoding information storage unit that stores inter-prediction information used in inter-prediction of a decoded block in a history prediction motion vector candidate list; a spatial merge candidate derivation unit that derives spatial merge candidates from inter-prediction information of a block spatially adjacent to a block to be decoded and registers the spatial merge candidates in the merge candidate list; a history merge candidate derivation unit that derives history merge candidates from the inter-prediction information stored in the history prediction motion vector candidate list and registers the history merge candidates in the merge candidate list; and an average merge candidate derivation unit that derives an average merge candidate from the merge candidate list and registers it in the merge candidate list. The history merge candidate derivation unit compares a predetermined number of inter-prediction information from the back of the inter-prediction information stored in the history prediction motion vector candidate list with the inter-prediction information of the spatial merge candidate, and if values ​​of the inter-prediction information are different, selects the history merge candidate as the history merge candidate, and selects inter-prediction information ahead of the predetermined number from the back as the history merge candidate without comparing it with the inter-prediction information of the spatial merge candidate.

[0009] An image decoding method according to a fourth aspect of the present invention includes: an encoding information storing step of storing inter prediction information used in inter prediction of a decoded block in a history prediction motion vector candidate list; a spatial merge candidate derivation step of deriving a spatial merge candidate from inter prediction information of a block spatially adjacent to a block to be decoded, and registering the spatial merge candidate in a merge candidate list; a history merge candidate derivation step of deriving a history merge candidate from the inter prediction information stored in the history prediction motion vector candidate list, and registering the history merge candidate in the merge candidate list; and an average merge candidate derivation step of deriving an average merge candidate from the merge candidate list, and registering the average merge candidate in the merge candidate list. In the history merge candidate derivation step, a predetermined number of inter prediction information from the back of the inter prediction information stored in the history prediction motion vector candidate list are compared with the inter prediction information of the spatial merge candidate, and if values ​​of the inter prediction information are different, the history merge candidate is selected; and for inter prediction information further forward than the predetermined number from the back, the history merge candidate is selected without comparing it with the inter prediction information of the spatial merge candidate.

[0010] A transmission method according to a fifth aspect of the present invention includes a coding information storing step of storing inter prediction information used in inter prediction of a coded block in a history prediction motion vector candidate list, a spatial merge candidate derivation step of deriving spatial merge candidates from inter prediction information of a block spatially adjacent to a coding target block and registering the spatial merge candidates in a merge candidate list, a history merge candidate derivation step of deriving history merge candidates from the inter prediction information stored in the history prediction motion vector candidate list and registering the history merge candidates in the merge candidate list, and a history merge candidate derivation step of deriving an average merge candidate from the merge candidate list and registering the average merge candidate in the merge candidate list. the history merge candidate derivation step compares a predetermined number of inter prediction information from the back among the inter prediction information stored in the history prediction motion vector candidate list with the inter prediction information of the spatial merge candidate, and selects the history merge candidate when the values ​​of the inter prediction information are different, and selects inter prediction information further forward than the predetermined number from the back as the history merge candidate without comparing it with the inter prediction information of the spatial merge candidate.

[0011] A recording method according to a sixth aspect of the present invention includes a coding information storing step of storing inter prediction information used in inter prediction of a coded block in a history prediction motion vector candidate list, a spatial merge candidate derivation step of deriving spatial merge candidates from inter prediction information of a block spatially adjacent to a coding target block and registering the spatial merge candidates in a merge candidate list, a history merge candidate derivation step of deriving history merge candidates from the inter prediction information stored in the history prediction motion vector candidate list and registering the history merge candidates in the merge candidate list, and an average merge candidate derivation step of deriving an average merge candidate from the merge candidate list and registering it in the merge candidate list. The method includes a merge candidate derivation step, a bitstream generation step of encoding encoding information to generate a bitstream, and a bitstream recording step of recording the bitstream on the recording medium, in which the history merge candidate derivation step compares a predetermined number of inter prediction information from the back among the inter prediction information stored in the history prediction motion vector candidate list with the inter prediction information of the spatial merge candidate, and selects the inter prediction information as the history merge candidate if the values ​​of the inter prediction information are different, and selects inter prediction information further forward than the predetermined number from the back as the history merge candidate without comparing it with the inter prediction information of the spatial merge candidate. Effect of the Invention

[0012] According to the present invention, highly efficient image encoding / decoding processing can be realized with a low load. [Brief description of the drawings]

[0013] [Figure 1] 1 is a block diagram of an image encoding device according to an embodiment of the present invention. [Diagram 2] 1 is a block diagram of an image decoding device according to an embodiment of the present invention. [Diagram 3] 13 is a flowchart for explaining an operation of dividing a tree block. [Figure 4] FIG. 13 is a diagram showing how an input image is divided into tree blocks. [Diagram 5]FIG. 1 is a diagram illustrating a z-scan. [Figure 6A] FIG. 13 is a diagram showing the divided shapes of blocks. [Figure 6B] FIG. 13 is a diagram showing the divided shapes of blocks. [Figure 6C] FIG. 13 is a diagram showing the divided shapes of blocks. [Figure 6D] FIG. 13 is a diagram showing the divided shapes of blocks. [Figure 6E] FIG. 13 is a diagram showing the divided shapes of blocks. [Figure 7] 13 is a flowchart illustrating an operation of dividing a block into four. [Figure 8] 13 is a flowchart for explaining an operation of dividing a block into two or three. [Figure 9] This is a syntax for expressing the shape of block division. [Figure 10A] FIG. 1 is a diagram illustrating intra prediction. [Figure 10B] FIG. 1 is a diagram illustrating intra prediction. [Figure 11] FIG. 13 is a diagram for explaining reference blocks for inter prediction. [Figure 12] This is a syntax for expressing a coding block prediction mode. [Figure 13] FIG. 11 is a diagram showing the correspondence between syntax elements and modes relating to inter prediction. [Figure 14] FIG. 13 is a diagram for explaining affine transformation motion compensation of two control points. [Figure 15] FIG. 13 is a diagram for explaining affine transformation motion compensation of three control points. [Figure 16] FIG. 2 is a block diagram showing a detailed configuration of the inter prediction unit 102 in FIG. [Figure 17] 17 is a block diagram showing a detailed configuration of a normal predicted motion vector mode derivation unit 301 in FIG. 16. [Figure 18] 17 is a block diagram showing a detailed configuration of a normal merge mode derivation unit 302 in FIG. 16. [Figure 19]17 is a flowchart for explaining a normal predicted motion vector mode derivation process of the normal predicted motion vector mode derivation unit 301 of FIG. 16. [Figure 20] 13 is a flowchart showing a processing procedure of a normal predicted motion vector mode derivation process. [Figure 21] 13 is a flowchart illustrating a processing procedure for a normal merge mode derivation process. [Figure 22] FIG. 3 is a block diagram showing a detailed configuration of an inter prediction unit 203 in FIG. 2. [Figure 23] 23 is a block diagram showing a detailed configuration of a normal predicted motion vector mode derivation unit 401 in FIG. 22. [Figure 24] 23 is a block diagram showing a detailed configuration of a normal merge mode derivation unit 402 in FIG. 22. [Diagram 25] 23 is a flowchart for explaining a normal predicted motion vector mode derivation process of the normal predicted motion vector mode derivation unit 401 in FIG. 22. [Figure 26] FIG. 13 is a diagram illustrating a procedure for initializing and updating a history motion vector predictor candidate list. [Figure 27] 13 is a flowchart of a procedure of a process of checking identical elements in the procedure of a process of initializing and updating a history motion vector predictor candidate list. [Figure 28] 13 is a flowchart of an element shifting process procedure in the history motion vector predictor candidate list initialization / update process procedure. [Figure 29] 13 is a flowchart illustrating a procedure of a process of deriving a history predicted motion vector candidate. [Diagram 30] 13 is a flowchart illustrating a history merging candidate derivation process procedure. [Figure 31A] FIG. 11 is a diagram for explaining an example of a history motion vector predictor candidate list update process. [Figure 31B] FIG. 11 is a diagram for explaining an example of a history motion vector predictor candidate list update process. [Figure 31C] FIG. 11 is a diagram for explaining an example of a history motion vector predictor candidate list update process. [Diagram 32]FIG. 13 is a diagram illustrating motion compensation prediction in the case of L0 prediction in which an L0 reference picture (RefL0Pic) is located at a time earlier than a current picture (CurPic). [Diagram 33] 13 is a diagram for explaining motion compensation prediction in the case where L0 prediction is performed and a reference picture for L0 prediction is located at a later time than the current picture to be processed. FIG. [Diagram 34] FIG. 1 is a diagram for explaining the prediction direction of motion compensation prediction in a bi-predictive case where a reference picture for L0 prediction is at a time earlier than a current picture to be processed and a reference picture for L1 prediction is at a time later than a current picture to be processed. [Diagram 35] 13 is a diagram for explaining the prediction direction of motion compensation prediction in bi-prediction where the reference picture for L0 prediction and the reference picture for L1 prediction are located at a time earlier than the current picture to be processed. FIG. [Diagram 36] 13 is a diagram for explaining the prediction direction of motion compensation prediction in bi-prediction where the reference picture for L0 prediction and the reference picture for L1 prediction are at a time later than the current picture. FIG. [Figure 37] 1 is a diagram illustrating an example of a hardware configuration of a coding / decoding device according to an embodiment of the present invention; [Figure 38A] FIG. 13 is a diagram showing an example of elements of a history motion vector predictor candidate list when a coding block to be coded / decoded when a block is divided into four is the upper right block. [Figure 38B] FIG. 13 is a diagram showing an example of elements of a history motion vector predictor candidate list when a coding block to be coded / decoded is the bottom left block when a block is divided into four. [Figure 38C] FIG. 13 is a diagram showing an example of elements of a history motion vector predictor candidate list when a coding block to be coded / decoded is the bottom right block when a block is divided into four. [Figure 38D] FIG. 13 is a diagram for explaining confirmation and comparison of elements in a history predicted motion vector candidate list. [Figure 39] 13 is a flowchart illustrating a history merging candidate derivation process procedure according to the second embodiment of the present invention. [Diagram 40]13 is a flowchart of an identical element confirmation process procedure in the history motion vector predictor candidate list initialization / update process procedure according to the third embodiment of the present invention. [Diagram 41] 13 is a flowchart of an identical element confirmation process procedure in the history motion vector predictor candidate list initialization / update process procedure according to the fourth embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0014] The technologies and technical terms used in this embodiment will be defined below.

[0015] <Tree Block> In the embodiment, an image to be encoded / decoded is divided equally into a predetermined size. This unit is defined as a tree block. In FIG. 4, the size of the tree block is 128x128 pixels, but the size of the tree block is not limited to this and may be set to any size. The tree blocks to be processed (corresponding to the encoding target in the encoding process and the decoding target in the decoding process) are switched in raster scan order, that is, from left to right and from top to bottom. The inside of each tree block can be further divided recursively. A block to be encoded / decoded after the tree block is divided recursively is defined as an encoding block. In addition, the tree block and the encoding block are collectively defined as a block. Efficient encoding can be achieved by performing appropriate block division. The size of the tree block can be a fixed value previously determined by the encoding device and the decoding device, or a configuration can be adopted in which the size of the tree block determined by the encoding device is transmitted to the decoding device. Here, the maximum size of the tree block is 128x128 pixels, and the minimum size of the tree block is 16x16 pixels. Also, the maximum size of a coding block is set to 64x64 pixels, and the minimum size of a coding block is set to 4x4 pixels.

[0016] <Prediction mode> For each coding block to be processed, a switch is made between intra prediction (MODE_INTRA) in which prediction is made from the processed image signal of the image to be processed and inter prediction (MODE_INTER) in which prediction is made from the image signal of the processed image. In the encoding process, the processed image is used as an image, image signal, tree block, block, coding block, etc., obtained by decode a signal whose encoding has been completed, and in the decoding process, the processed image is used as an image, image signal, tree block, block, coding block, etc., after decoding has been completed. A mode for distinguishing between the intra prediction (MODE_INTRA) and the inter prediction (MODE_INTER) is defined as a prediction mode (PredMode). The prediction mode (PredMode) has intra prediction (MODE_INTRA) or inter prediction (MODE_INTER) as a value.

[0017] <Inter Prediction> In inter prediction, which performs prediction from an image signal of a processed image, multiple processed images can be used as reference pictures. In order to manage multiple reference pictures, two types of reference lists, L0 (reference list 0) and L1 (reference list 1), are defined, and each uses a reference index to identify a reference picture. L0 prediction (Pred_L0) is available in P slices. L0 prediction (Pred_L0), L1 prediction (Pred_L1), and bi-prediction (Pred_BI) are available in B slices. L0 prediction (Pred_L0) is inter prediction that refers to a reference picture managed in L0, and L1 prediction (Pred_L1) is inter prediction that refers to a reference picture managed in L1. Bi-prediction (Pred_BI) is inter prediction in which both L0 prediction and L1 prediction are performed, and one reference picture managed in each of L0 and L1 is referenced. Information that identifies L0 prediction, L1 prediction, and bi-prediction is defined as an inter prediction mode. In the subsequent processing, it is assumed that the constants and variables with the subscript LX in the output are processed for each L0 and L1.

[0018] <Predictive motion vector mode> The predicted motion vector mode is a mode in which an index for identifying a predicted motion vector, a differential motion vector, an inter prediction mode, and a reference index are transmitted to determine inter prediction information for a block to be processed. The predicted motion vector is derived from a predicted motion vector candidate derived from a processed block adjacent to the block to be processed, or a block belonging to a processed image that is located at the same position as the block to be processed or in the vicinity (neighborhood), and an index for identifying the predicted motion vector.

[0019] <Merge mode> Merge mode is a mode in which inter-prediction information for the block to be processed is derived from inter-prediction information for a processed block adjacent to the block to be processed, or a block belonging to a processed image that is located at the same position as the block to be processed or in its vicinity (vicinity), without transmitting differential motion vectors or reference indexes.

[0020] The spatial merge candidates are defined as processed blocks adjacent to the current block and the inter prediction information of the processed blocks. The temporal merge candidates are defined as blocks belonging to the processed image that are located at the same position as the current block or in its vicinity (neighborhood) and the inter prediction information derived from the inter prediction information of the blocks. Each merge candidate is registered in a merge candidate list, and a merge index is used to identify the merge candidate to be used in predicting the current block.

[0021] <Adjacent block> 11 is a diagram for explaining reference blocks to be referenced for deriving inter prediction information in the predicted motion vector mode and merge mode. A0, A1, A2, B0, B1, B2, and B3 are processed blocks adjacent to the processing target block. T0 is a block belonging to the processed image, and is located at the same position as the processing target block in the processing target image or in the vicinity (neighborhood).

[0022] A1 and A2 are blocks located to the left of the coding block to be processed and adjacent to the coding block to be processed. B1 and B3 are blocks located above the coding block to be processed and adjacent to the coding block to be processed. A0, B0, and B2 are blocks located at the bottom left, top right, and top left of the coding block to be processed, respectively.

[0023] How adjacent blocks are handled in the predicted motion vector mode and merge mode will be described in detail later.

[0024] <Affine transformation motion compensation> Affine transformation motion compensation is a method of dividing an encoding block into subblocks of a predetermined unit, determining a motion vector for each divided subblock individually, and performing motion compensation. The motion vector of each subblock is derived based on one or more control points derived from inter prediction information of a processed block adjacent to the processing target block, or a block belonging to a processed image that is located at the same position as the processing target block or in the vicinity (neighborhood). In this embodiment, the size of the subblock is 4x4 pixels, but the size of the subblock is not limited to this, and the motion vector may be derived in units of pixels.

[0025] Figure 14 shows an example of affine transformation motion compensation when there are two control points. In this case, the two control points have two parameters, a horizontal component and a vertical component. Therefore, the affine transformation when there are two control points is called a four-parameter affine transformation. CP1 and CP2 in Figure 14 are the control points. Figure 15 shows an example of affine transformation motion compensation when there are three control points. In this case, the three control points have two parameters, a horizontal component and a vertical component. Therefore, the affine transformation when there are three control points is called a six-parameter affine transformation. CP1, CP2, and CP3 in Figure 15 are the control points.

[0026] Affine transform motion compensation can be used in both the predictive motion vector mode and the merge mode. A mode in which affine transform motion compensation is applied in the predictive motion vector mode is defined as a sub-block predictive motion vector mode, and a mode in which affine transform motion compensation is applied in the merge mode is defined as a sub-block merge mode.

[0027] <Inter prediction syntax> The syntax relating to inter prediction will be described with reference to FIGS. In Fig. 12, merge_flag is a flag indicating whether the current coding block is to be in merge mode or predictive motion vector mode. merge_affine_flag is a flag indicating whether the sub-block merge mode is applied to the current coding block in merge mode. inter_affine_flag is a flag indicating whether the sub-block predictive motion vector mode is applied to the current coding block in predictive motion vector mode. cu_affine_type_flag is a flag for determining the number of control points in the sub-block predictive motion vector mode. FIG. 13 shows the value of each syntax element and the corresponding prediction method. merge_flag=1,merge_affine_flag=0 corresponds to the normal merge mode. The normal merge mode is a merge mode that is not a sub-block merge. merge_flag=1,merge_affine_flag=1 corresponds to the sub-block merge mode. merge_flag=0,inter_affine_flag=0 corresponds to the normal predicted motion vector mode. The normal predicted motion vector mode is a predicted motion vector merge that is not a sub-block predicted motion vector mode. merge_flag=0,inter_affine_flag=1 corresponds to the sub-block predicted motion vector mode. When merge_flag=0,inter_affine_flag=1, cu_affine_type_flag is further transmitted to determine the number of control points.

[0028] <poc> POC (Picture Order Count) is a variable associated with a picture to be coded, and is set to a value that increases by one according to the picture output order. The POC value can be used to determine whether the pictures are the same, to determine the order of pictures in the output order, and to derive the distance between pictures. For example, if two pictures have the same POC value, they can be determined to be the same picture. If two pictures have different POC values, it can be determined that the picture with the smaller POC value is the picture that will be output first, and the difference between the POCs of the two pictures indicates the distance between the pictures along the time axis.

[0029] (First embodiment) An image encoding device 100 and an image decoding device 200 according to a first embodiment of the present invention will be described.

[0030] 1 is a block diagram of an image coding device 100 according to a first embodiment. The image coding device 100 according to the embodiment includes a block division unit 101, an inter prediction unit 102, an intra prediction unit 103, a decoded image memory 104, a prediction method determination unit 105, a residual generation unit 106, an orthogonal transform / quantization unit 107, a bit string coding unit 108, an inverse quantization / inverse orthogonal transform unit 109, a decoded image signal superimposition unit 110, and a coding information storage memory 111.

[0031] The block division unit 101 recursively divides an input image to generate coding blocks. The block division unit 101 includes a 4-division unit that divides a block to be divided horizontally and vertically, and a 2-3 division unit that divides a block to be divided either horizontally or vertically. The block division unit 101 sets the generated coding block as a coding block to be processed, and supplies an image signal of the coding block to be processed to the inter prediction unit 102, the intra prediction unit 103, and the residual generation unit 106. The block division unit 101 also supplies information indicating the determined recursive division structure to the bit string coding unit 108. A detailed operation of the block division unit 101 will be described later.

[0032] The inter prediction unit 102 performs inter prediction of the coding block to be processed. The inter prediction unit 102 derives a plurality of inter prediction information candidates from the inter prediction information stored in the coding information storage memory 111 and the decoded image signal stored in the decoded image memory 104, selects an appropriate inter prediction mode from the derived plurality of candidates, and supplies the selected inter prediction mode and a predicted image signal according to the selected inter prediction mode to the prediction method determination unit 105. A detailed configuration and operation of the inter prediction unit 102 will be described later.

[0033] The intra prediction unit 103 performs intra prediction of the coding block to be processed. The intra prediction unit 103 refers to a decoded image signal stored in the decoded image memory 104 as a reference pixel, and generates a predicted image signal by intra prediction based on coding information such as an intra prediction mode stored in the coding information storage memory 111. In the intra prediction, the intra prediction unit 103 selects an appropriate intra prediction mode from a plurality of intra prediction modes, and supplies the selected intra prediction mode and a predicted image signal according to the selected intra prediction mode to the prediction method determination unit 105. 10A and 10B show examples of intra prediction. FIG. 10A shows the correspondence between the prediction direction of intra prediction and the intra prediction mode number. For example, the intra prediction mode 50 generates an intra prediction image by copying reference pixels in the vertical direction. The intra prediction mode 1 is a DC mode, and is a mode in which all pixel values ​​of the processing target block are the average value of the reference pixels. The intra prediction mode 0 is a planar mode, and is a mode in which a two-dimensional intra prediction image is created from reference pixels in the vertical and horizontal directions. FIG. 10B shows an example of generating an intra prediction image in the case of the intra prediction mode 40. The intra prediction unit 103 copies the value of the reference pixel in the direction indicated by the intra prediction mode to each pixel of the processing target block. When the reference pixel of the intra prediction mode is not an integer position, the intra prediction unit 103 determines the reference pixel value by interpolation from the reference pixel value of the surrounding integer positions.

[0034] The decoded image memory 104 stores the decoded image generated by the decoded image signal superimposing unit 110. The decoded image memory 104 supplies the stored decoded image to the inter prediction unit 102 and the intra prediction unit 103.

[0035] The prediction method determination unit 105 determines the optimal prediction mode for each of intra prediction and inter prediction by evaluating the coding information, the coding amount of residual, the distortion amount between the predicted image signal and the image signal to be processed, and the like. In the case of intra prediction, the prediction method determination unit 105 supplies intra prediction information such as an intra prediction mode as coding information to the bit string coding unit 108. In the case of a merge mode of inter prediction, the prediction method determination unit 105 supplies inter prediction information such as a merge index and information indicating whether or not a sub-block merge mode (sub-block merge flag) as coding information to the bit string coding unit 108. In the case of a predicted motion vector mode of inter prediction, the prediction method determination unit 105 supplies inter prediction information such as an inter prediction mode, a predicted motion vector index, reference indexes of L0 and L1, a difference motion vector, and information indicating whether or not a sub-block predicted motion vector mode (sub-block predicted motion vector flag) as coding information to the bit string coding unit 108. Furthermore, the prediction method determination unit 105 supplies the determined coding information to the coding information storage memory 111. The prediction method determination unit 105 supplies the residual generation unit 106 and the predicted image signal to the decoded image signal superimposition unit 110 .

[0036] The residual generation unit 106 generates a residual by subtracting the prediction image signal from the image signal to be processed, and supplies the residual to the orthogonal transformation / quantization unit 107 .

[0037] The orthogonal transform / quantization unit 107 performs orthogonal transform and quantization on the residual in accordance with the quantization parameter to generate an orthogonally transformed / quantized residual, and supplies the generated residual to the bit string coding unit 108 and the inverse quantization / inverse orthogonal transform unit 109.

[0038] The bitstream coding unit 108 codes coding information according to the prediction method determined by the prediction method determination unit 105 for each coding block, in addition to information in units of sequences, pictures, slices, and coding blocks. Specifically, the bitstream coding unit 108 codes the prediction mode PredMode for each coding block. When the prediction mode is inter prediction (MODE_INTER), the bitstream coding unit 108 codes coding information (inter prediction information) such as a flag for determining whether or not the merge mode is selected, a sub-block merge flag, a merge index in the merge mode, an inter prediction mode in the non-merge mode, a predicted motion vector index, information on a difference motion vector, and a sub-block predicted motion vector flag according to a specified syntax (syntax rules of the bitstream) to generate a first bitstream. When the prediction mode is intra prediction (MODE_INTRA), the bitstream coding unit 108 codes coding information (intra prediction information) such as an intra prediction mode according to a specified syntax (syntax rules of the bitstream) to generate a first bitstream. Furthermore, the bit string coding unit 108 entropy-codes the orthogonally transformed and quantized residual in accordance with a specified syntax to generate a second bit string. The bit string coding unit 108 multiplexes the first bit string and the second bit string in accordance with the specified syntax to output a bit stream.

[0039] The inverse quantization and inverse orthogonal transform unit 109 inverse quantizes and inverse orthogonal transforms the orthogonally transformed and quantized residual supplied from the orthogonal transform and quantization unit 107 to calculate a residual, and supplies the calculated residual to a decoded image signal superimposition unit 110.

[0040] The decoded image signal superimposing unit 110 superimposes the predicted image signal according to the determination by the prediction method determining unit 105 and the residual that has been inverse quantized and inverse orthogonal transformed by the inverse quantization and inverse orthogonal transform unit 109 to generate a decoded image, and stores the decoded image in the decoded image memory 104. Note that the decoded image signal superimposing unit 110 may store the decoded image in the decoded image memory 104 after performing a filtering process on the decoded image to reduce distortion such as block distortion caused by encoding.

[0041] The coding information storage memory 111 stores coding information such as a prediction mode (inter prediction or intra prediction) determined by the prediction method determination unit 105. In the case of inter prediction, the coding information stored in the coding information storage memory 111 includes inter prediction information such as a determined motion vector, reference indexes of reference lists L0 and L1, and a history prediction motion vector candidate list. In the case of a merge mode of inter prediction, the coding information stored in the coding information storage memory 111 includes inter prediction information such as a merge index and information indicating whether or not a sub-block merge mode (sub-block merge flag) in addition to the above-mentioned information. In the case of a predicted motion vector mode of inter prediction, the coding information stored in the coding information storage memory 111 includes inter prediction information such as an inter prediction mode, a predicted motion vector index, a differential motion vector, and information indicating whether or not a sub-block prediction motion vector mode (sub-block prediction motion vector flag) in addition to the above-mentioned information. In the case of intra prediction, the coding information stored in the coding information storage memory 111 includes intra prediction information such as a determined intra prediction mode.

[0042] Fig. 2 is a block diagram showing the configuration of an image decoding device according to an embodiment of the present invention, which corresponds to the image encoding device in Fig. 1. The image decoding device according to the embodiment includes a bitstream decoding unit 201, a block dividing unit 202, an inter prediction unit 203, an intra prediction unit 204, an encoded information storage memory 205, an inverse quantization and inverse orthogonal transform unit 206, a decoded image signal superimposition unit 207, and a decoded image memory 208.

[0043] 2 corresponds to the decoding process provided inside the image coding device of FIG. 1, and therefore each of the components of the coding information storage memory 205, the inverse quantization and inverse orthogonal transformation unit 206, the decoded image signal superimposition unit 207, and the decoded image memory 208 of FIG. 2 has a function corresponding to each of the components of the coding information storage memory 111, the inverse quantization and inverse orthogonal transformation unit 109, the decoded image signal superimposition unit 110, and the decoded image memory 104 of the image coding device of FIG. 1.

[0044] The bitstream supplied to the bitstream decoding unit 201 is separated according to the rules of a prescribed syntax. The bitstream decoding unit 201 decodes the separated first bitstream to obtain information on a sequence, a picture, a slice, and a coding block unit, and coding information on a coding block unit. Specifically, the bitstream decoding unit 201 decodes a prediction mode PredMode that determines whether the prediction mode is inter prediction (MODE_INTER) or intra prediction (MODE_INTRA) on a coding block unit basis. When the prediction mode is inter prediction (MODE_INTER), the bitstream decoding unit 201 decodes coding information (inter prediction information) related to a flag that determines whether the prediction mode is a merge mode or not, a merge index in the merge mode, a sub-block merge flag, an inter prediction mode in the predictive motion vector mode, a predictive motion vector index, a difference motion vector, a sub-block predictive motion vector flag, and the like, according to a prescribed syntax, and supplies the coding information (inter prediction information) to the inter prediction unit 203 and the coding information storage memory 205 via the block division unit 202. When the prediction mode is intra prediction (MODE_INTRA), coding information (intra prediction information) such as the intra prediction mode is decoded according to a specified syntax, and the coding information (intra prediction information) is supplied to the inter prediction unit 203 or the intra prediction unit 204, and to the coding information storage memory 205 via the block division unit 202. The bit string decoding unit 201 decodes the separated second bit string to calculate an orthogonally transformed and quantized residual, and supplies the orthogonally transformed and quantized residual to the inverse quantization and inverse orthogonal transformation unit 206.

[0045] When the prediction mode PredMode of the coding block to be processed is inter prediction (MODE_INTER) and a predicted motion vector mode, the inter prediction unit 203 derives a plurality of predicted motion vector candidates using the coding information of the already decoded image signal stored in the coding information storage memory 205, and registers the derived plurality of predicted motion vector candidates in a predicted motion vector candidate list described later. The inter prediction unit 203 selects a predicted motion vector according to a predicted motion vector index decoded and supplied by the bitstream decoding unit 201 from the plurality of predicted motion vector candidates registered in the predicted motion vector candidate list, calculates a motion vector from the difference motion vector decoded by the bitstream decoding unit 201 and the selected predicted motion vector, and stores the calculated motion vector in the coding information storage memory 205 together with other coding information. The coding information of the coding block supplied and stored here includes a prediction mode PredMode, flags predFlagL0[xP][yP] and predFlagL1[xP][yP] indicating whether to use L0 prediction and L1 prediction, reference indexes refIdxL0[xP][yP] and refIdxL1[xP][yP] of L0 and L1, motion vectors mvL0[xP][yP] and mvL1[xP][yP] of L0 and L1, etc. Here, xP and yP are indexes indicating the position of the upper left pixel of the coding block in a picture. When the prediction mode PredMode is inter prediction (MODE_INTER) and the inter prediction mode is L0 prediction (Pred_L0), the flag predFlagL0 indicating whether to use L0 prediction is 1, and the flag predFlagL1 indicating whether to use L1 prediction is 0. When the inter prediction mode is L1 prediction (Pred_L1), the flag predFlagL0 indicating whether or not to use L0 prediction is 0, and the flag predFlagL1 indicating whether or not to use L1 prediction is 1. When the inter prediction mode is bi-prediction (Pred_BI), the flag predFlagL0 indicating whether or not to use L0 prediction and the flag predFlagL1 indicating whether or not to use L1 prediction are both 1. Furthermore, when the prediction mode PredMode of the coding block to be processed is inter prediction (MODE_INTER) and a merge mode, merge candidates are derived.Using the coding information of the already decoded coding block stored in the coding information storage memory 205, a plurality of merge candidates are derived and registered in a merge candidate list described later, a merge candidate corresponding to a merge index decoded and supplied by the bitstream decoding unit 201 is selected from the plurality of merge candidates registered in the merge candidate list, and inter prediction information such as flags predFlagL0[xP][yP], predFlagL1[xP][yP] indicating whether or not to use L0 prediction and L1 prediction of the selected merge candidate, reference indexes refIdxL0[xP][yP], refIdxL1[xP][yP] of L0 and L1, and motion vectors mvL0[xP][yP], mvL1[xP][yP] of L0 and L1 are stored in the coding information storage memory 205. Here, xP and yP are indexes indicating the position of the upper left pixel of the coding block in the picture. A detailed configuration and operation of the inter prediction unit 203 will be described later.

[0046] The intra prediction unit 204 performs intra prediction when the prediction mode PredMode of the coding block to be processed is intra prediction (MODE_INTRA). The coding information decoded by the bitstream decoding unit 201 includes an intra prediction mode. The intra prediction unit 204 generates a prediction image signal by intra prediction from a decoded image signal stored in the decoded image memory 208 according to the intra prediction mode included in the coding information decoded by the bitstream decoding unit 201, and supplies the generated prediction image signal to the decoded image signal superimposition unit 207. The intra prediction unit 204 corresponds to the intra prediction unit 103 of the image coding device 100, and therefore performs the same process as the intra prediction unit 103.

[0047] The inverse quantization and inverse orthogonal transformation unit 206 performs inverse orthogonal transformation and inverse quantization on the orthogonally transformed and quantized residual decoded by the bit stream decoding unit 201 to obtain an inverse orthogonally transformed and inverse quantized residual.

[0048] The decoded image signal superimposition unit 207 decodes the decoded image signal by superimposing the predicted image signal inter predicted by the inter prediction unit 203 or the predicted image signal intra predicted by the intra prediction unit 204 on a residual that has been inverse orthogonally transformed and inverse quantized by the inverse quantization and inverse orthogonal transformation unit 206, and stores the decoded decoded image signal in the decoded image memory 208. When storing the decoded image in the decoded image memory 208, the decoded image signal superimposition unit 207 may perform a filtering process on the decoded image to reduce block distortion and the like caused by encoding, and then store the decoded image in the decoded image memory 208.

[0049] Next, the operation of the block division unit 101 in the image encoding device 100 will be described. Fig. 3 is a flowchart showing the operation of dividing an image into tree blocks and further dividing each tree block. First, an input image is divided into tree blocks of a predetermined size (step S1001). Each tree block is scanned in a predetermined order, i.e., in raster scan order (step S1002), and the inside of the tree block to be processed is divided (step S1003).

[0050] 7 is a flowchart showing the detailed operation of the division process in step S1003. First, it is determined whether or not the block to be processed is to be divided into four (step S1101).

[0051] If it is determined that the processing target block should be divided into four, the processing target block is divided into four (step S1102). Each block into which the processing target block is divided is scanned in Z scan order, that is, in the order of upper left, upper right, lower left, and lower right (step S1103). FIG. 5 is an example of Z scan order, and 601 in FIG. 6A is an example in which the processing target block is divided into four. Numbers 0 to 3 of 601 in FIG. 6A indicate the order of processing. Then, for each block divided in step S1101, the division process in FIG. 7 is recursively executed (step S1104).

[0052] If it is determined that the processing target block should not be divided into four, it is divided into two and three (step S1105).

[0053] 8 is a flowchart showing the detailed operation of the 2-3 division process in step S1105. First, it is determined whether or not the block to be processed is to be divided into 2-3, that is, whether or not to divide into 2 or 3 (step S1201).

[0054] If it is not determined that the block to be processed should be divided into 2 or 3, that is, if it is determined that the block should not be divided, the division is terminated (step S1211). In other words, no further recursive division is performed on the block that has been divided by the recursive division process.

[0055] If it is determined that the block to be processed is to be divided into 2 or 3, it is then determined whether or not the block to be processed is to be further divided into 2 (step S1202).

[0056] If it is determined that the processing target block should be divided into two, it is determined whether or not to divide the processing target block vertically (step S1203), and based on the result, the processing target block is divided into two vertically (step S1204) or divided left and right (step S1205). As a result of step S1204, the processing target block is divided into two vertically (as shown in 602 in Fig. 6B, and as a result of step S1205, the processing target block is divided into two horizontally (as shown in 604 in Fig. 6D).

[0057] In step S1202, if it is not determined that the block to be processed should be divided into two, that is, if it is determined that the block to be processed should be divided into three, it is determined whether to divide the block to be processed into top, middle, and bottom (vertical direction) (step S1206), and based on the result, the block to be processed is divided into three parts, top, middle, and bottom (vertical direction) (step S1207), or the block to be processed is divided into three parts, left, middle, and right (horizontal direction) (step S1208). As a result of step S1207, the block to be processed is divided into three parts, top, middle, and bottom (vertical direction), as shown in 603 in Fig. 6C, and as a result of step S1208, the block to be processed is divided into three parts, left, middle, and right (horizontal direction), as shown in 605 in Fig. 6E.

[0058] After executing any one of step S1204, step S1205, step S1207, and step S1208, each block divided from the processing target block is scanned in the order from left to right and top to bottom (step S1209). Numbers 0 to 2 of 602 to 605 in Figures 6B to 6E indicate the order of processing. For each divided block, the 2-3 division process in Figure 8 is recursively executed (step S1210).

[0059] The recursive block division described here may limit the necessity of division depending on the number of divisions, the size of the block to be processed, etc. The information limiting the necessity of division may be realized in a configuration in which no information is transmitted by making a prior arrangement between the encoding device and the decoding device, or may be realized in a configuration in which the encoding device determines information limiting the necessity of division and transmits it to the decoding device by recording it in a bit string.

[0060] When a block is divided, the block before the division is called a parent block, and each block after the division is called a child block.

[0061] Next, the operation of the block division unit 202 in the image decoding device 200 will be described. The block division unit 202 divides tree blocks in the same processing procedure as the block division unit 101 in the image encoding device 100. However, the difference is that the block division unit 101 in the image encoding device 100 determines the optimal block division shape by applying an optimization method such as optimal shape estimation by image recognition or distortion rate optimization, whereas the block division unit 202 in the image decoding device 200 determines the block division shape by decoding block division information recorded in a bit string.

[0062] The syntax (syntax rules for bit strings) related to block division in the first embodiment is shown in Fig. 9. coding_quadtree() represents syntax related to division of a block into four. multi_type_tree() represents syntax related to division of a block into two or three. qt_split is a flag indicating whether or not to divide a block into four. If the block is to be divided into four, qt_split=1 is set, and if not, qt_split=0 is set. If the block is to be divided into four (qt_split=1), each block is recursively divided into four (coding_quadtree(0), coding_quadtree(1), coding_quadtree(2), coding_quadtree(3), arguments 0 to 3 correspond to number 601 in Fig. 6A). If the block is not to be divided into four (qt_split=0), the subsequent division is determined according to multi_type_tree(). mtt_split is a flag indicating whether or not to divide the block further. When further division is required (mtt_split=1), mtt_split_vertical, a flag indicating whether to divide vertically or horizontally, and mtt_split_binary, a flag determining whether to divide into two or three, are transmitted. mtt_split_vertical=1 indicates division vertically, and mtt_split_vertical=0 indicates division horizontally. mtt_split_binary=1 indicates division into two, and mtt_split_binary=0 indicates division into three. When dividing into two (mtt_split_binary=1), division processing is performed recursively for each block divided into two (multi_type_tree(0), multi_type_tree(1), arguments 0 to 1 correspond to numbers 602 or 604 in Figures 6B to 6D). When splitting into three (mtt_split_binary=0), splitting processing is performed recursively for each of the three split blocks (multi_type_tree(0), multi_type_tree(1), multi_type_tree(2), where 0 to 2 correspond to numbers 603 in FIG. 6B or 605 in FIG. 6E).Hierarchical block division is performed by recursively calling multi_type_tree until mtt_split=0.

[0063] <Inter Prediction> The inter prediction method according to the embodiment is implemented in the inter prediction unit 102 of the image encoding device in FIG. 1 and the inter prediction unit 203 of the image decoding device in FIG.

[0064] An inter prediction method according to an embodiment will be described with reference to the drawings. The inter prediction method is performed in both encoding and decoding processes on a coding block basis.

[0065] <Description of the inter prediction unit 102 on the encoding side> Fig. 16 is a diagram showing a detailed configuration of the inter prediction unit 102 of the image encoding device of Fig. 1. The normal prediction motion vector mode derivation unit 301 derives a plurality of normal prediction motion vector candidates to select a prediction motion vector, and calculates a difference motion vector between the selected prediction motion vector and the detected motion vector. The detected inter prediction mode, reference index, motion vector, and calculated difference motion vector become inter prediction information of the normal prediction motion vector mode. This inter prediction information is supplied to the inter prediction mode determination unit 305. The detailed configuration and processing of the normal prediction motion vector mode derivation unit 301 will be described later.

[0066] The normal merge mode derivation unit 302 derives a plurality of normal merge candidates, selects a normal merge candidate, and obtains inter prediction information for the normal merge mode. This inter prediction information is supplied to the inter prediction mode determination unit 305. A detailed configuration and processing of the normal merge mode derivation unit 302 will be described later.

[0067] The sub-block predictive motion vector mode derivation unit 303 derives a plurality of sub-block predictive motion vector candidates to select a sub-block predictive motion vector, and calculates a differential motion vector between the selected sub-block predictive motion vector and the detected motion vector. The detected inter prediction mode, reference index, motion vector, and calculated differential motion vector become inter prediction information of the sub-block predictive motion vector mode. This inter prediction information is supplied to the inter prediction mode determination unit 305.

[0068] The subblock merging mode derivation unit 304 derives a plurality of subblock merging candidates, selects a subblock merging candidate, and obtains inter prediction information of the subblock merging mode. This inter prediction information is supplied to the inter prediction mode determination unit 305.

[0069] The inter prediction mode determination unit 305 determines inter prediction information based on the inter prediction information supplied from the normal prediction motion vector mode derivation unit 301, the normal merge mode derivation unit 302, the sub-block prediction motion vector mode derivation unit 303, and the sub-block merge mode derivation unit 304. The inter prediction mode determination unit 305 supplies inter prediction information according to the determination result to the motion compensation prediction unit 306.

[0070] Based on the determined inter prediction information, the motion compensation prediction unit 306 performs inter prediction on the reference image signal stored in the decoded image memory 104. The detailed configuration and processing of the motion compensation prediction unit 306 will be described later.

[0071] <Description of the Inter Prediction Unit 203 on the Decoding Side> FIG. 22 is a diagram showing a detailed configuration of the inter prediction unit 203 of the image decoding device in FIG.

[0072] The normal prediction motion vector mode derivation unit 401 derives a plurality of normal prediction motion vector candidates to select a prediction motion vector, and calculates the sum of the selected prediction motion vector and the decoded difference motion vector to obtain a motion vector. The decoded inter prediction mode, reference index, and motion vector become inter prediction information for the normal prediction motion vector mode. This inter prediction information is supplied to the motion compensation prediction unit 406 via a switch 408. The detailed configuration and processing of the normal prediction motion vector mode derivation unit 401 will be described later.

[0073] The normal merge mode derivation unit 402 derives a plurality of normal merge candidates, selects a normal merge candidate, and obtains inter prediction information for the normal merge mode. This inter prediction information is supplied to the motion compensation prediction unit 406 via a switch 408. The detailed configuration and processing of the normal merge mode derivation unit 402 will be described later.

[0074] The sub-block prediction motion vector mode derivation unit 403 derives a plurality of sub-block prediction motion vector candidates to select a sub-block prediction motion vector, and calculates the sum of the selected sub-block prediction motion vector and the decoded difference motion vector to obtain a motion vector. The decoded inter prediction mode, reference index, and motion vector become inter prediction information for the sub-block prediction motion vector mode. This inter prediction information is supplied to the motion compensation prediction unit 406 via the switch 408.

[0075] The subblock merging mode derivation unit 404 derives a plurality of subblock merging candidates, selects a subblock merging candidate, and obtains inter-prediction information for the subblock merging mode. This inter-prediction information is supplied to the motion compensation prediction unit 406 via the switch 408.

[0076] Based on the determined inter prediction information, the motion compensation prediction unit 406 performs inter prediction on the reference image signal stored in the decoded image memory 208. The detailed configuration and processing of the motion compensation prediction unit 406 are similar to those of the motion compensation prediction unit 306 on the encoding side.

[0077] <Normal predicted motion vector mode derivation part (normal AMVP)> The normal prediction motion vector mode derivation unit 301 in Figure 17 includes a spatial prediction motion vector candidate derivation unit 321, a temporal prediction motion vector candidate derivation unit 322, a history prediction motion vector candidate derivation unit 323, a prediction motion vector candidate supplementation unit 325, a normal motion vector detection unit 326, a prediction motion vector candidate selection unit 327, and a motion vector subtraction unit 328.

[0078] The normal predictor motion vector mode derivation unit 401 in Figure 23 includes a spatial predictor motion vector candidate derivation unit 421, a temporal predictor motion vector candidate derivation unit 422, a history predictor motion vector candidate derivation unit 423, a predictor motion vector candidate supplementation unit 425, a predictor motion vector candidate selection unit 426, and a motion vector addition unit 427.

[0079] The processing procedures of the normal prediction motion vector mode derivation unit 301 on the encoding side and the normal prediction motion vector mode derivation unit 401 on the decoding side will be described with reference to the flowcharts of Fig. 19 and Fig. 25. Fig. 19 is a flowchart showing the normal prediction motion vector mode derivation processing procedure by the normal motion vector mode derivation unit 301 on the encoding side, and Fig. 25 is a flowchart showing the normal prediction motion vector mode derivation processing procedure by the normal motion vector mode derivation unit 401 on the decoding side.

[0080] <Normal prediction motion vector mode derivation part (normal AMVP): Explanation on the encoding side> The normal predicted motion vector mode derivation process procedure on the encoding side will be described with reference to Fig. 19. In the description of the process procedure in Fig. 19, the term "normal" shown in Fig. 19 may be omitted.

[0081] First, the normal motion vector detection unit 326 detects a normal motion vector for each inter prediction mode and reference index (step S100 in FIG. 19).

[0082] Next, the spatial prediction motion vector candidate derivation unit 321, the temporal prediction motion vector candidate derivation unit 322, the history prediction motion vector candidate derivation unit 323, the prediction motion vector candidate supplementation unit 325, the prediction motion vector candidate selection unit 327, and the motion vector subtraction unit 328 calculate the difference motion vector of the motion vector used in the inter prediction of the normal prediction motion vector mode for each of L0 and L1 (steps S101 to S106 in FIG. 19). Specifically, when the prediction mode PredMode of the processing target block is inter prediction (MODE_INTER) and the inter prediction mode is L0 prediction (Pred_L0), the prediction motion vector candidate list mvpListL0 of L0 is calculated, the prediction motion vector mvpL0 is selected, and the difference motion vector mvdL0 of the motion vector mvL0 of L0 is calculated. When the inter prediction mode of the block to be processed is L1 prediction (Pred_L1), the L1 predicted motion vector candidate list mvpListL1 is calculated, the predicted motion vector mvpL1 is selected, and the differential motion vector mvdL1 of the motion vector mvL1 of L1 is calculated. When the inter prediction mode of the block to be processed is bi-prediction (Pred_BI), both L0 prediction and L1 prediction are performed, the L0 predicted motion vector candidate list mvpListL0 is calculated, the L0 predicted motion vector mvpL0 is selected, and the differential motion vector mvdL0 of the motion vector mvL0 of L0 is calculated, and the L1 predicted motion vector candidate list mvpListL1 is calculated, the L1 predicted motion vector mvpL1 is calculated, and the differential motion vector mvdL1 of the motion vector mvL1 of L1 is calculated.

[0083] A differential motion vector calculation process is performed for each of L0 and L1, but the process is common to both L0 and L1. Therefore, in the following description, L0 and L1 are represented as a common LX. In the process of calculating the differential motion vector of L0, X of LX is 0, and in the process of calculating the differential motion vector of L1, X of LX is 1. Furthermore, when referring to information of the other list instead of LX during the process of calculating the differential motion vector of LX, the other list is represented as LY.

[0084] When the motion vector mvLX of LX is used (step S102 in FIG. 19: YES), a candidate of the predicted motion vector of LX is calculated to construct a predicted motion vector candidate list mvpListLX of LX (step S103 in FIG. 19). A spatial predicted motion vector candidate derivation unit 321, a temporal predicted motion vector candidate derivation unit 322, a history predicted motion vector candidate derivation unit 323, and a predicted motion vector candidate supplementation unit 325 in the normal predicted motion vector mode derivation unit 301 derive multiple predicted motion vector candidates to construct the predicted motion vector candidate list mvpListLX. The detailed processing procedure of step S103 in FIG. 19 will be described later with reference to the flowchart in FIG. 20.

[0085] Next, the motion vector predictor candidate selection unit 327 selects the motion vector predictor mvpLX of LX from the motion vector predictor candidate list mvpListLX of LX (step S104 in FIG. 19). Here, one element (the i-th element counting from 0) in the motion vector predictor candidate list mvpListLX is represented as mvpListLX[i]. Each difference motion vector, which is the difference between the motion vector mvLX and each motion vector predictor candidate mvpListLX[i] stored in the motion vector predictor candidate list mvpListLX, is calculated. The amount of code when these difference motion vectors are coded is calculated for each element (motion vector predictor candidate) of the motion vector predictor candidate list mvpListLX. Then, among each element registered in the motion vector predictor candidate list mvpListLX, the motion vector predictor candidate mvpListLX[i] with the smallest amount of code for each motion vector predictor candidate is selected as the motion vector predictor mvpLX, and its index i is obtained. If there are multiple candidates for the predicted motion vector that will result in the smallest amount of generated code in the predicted motion vector candidate list mvpListLX, the predicted motion vector candidate mvpListLX[i] represented by the smallest index i in the predicted motion vector candidate list mvpListLX is selected as the optimal predicted motion vector mvpLX, and its index i is obtained.

[0086] Next, the motion vector subtraction unit 328 subtracts the selected predicted motion vector mvpLX of LX from the motion vector mvLX of LX, mvdLX = mvLX - mvpLX Then, the differential motion vector mvdLX of LX is calculated as (Step S105 in FIG. 19).

[0087] <Normal predicted motion vector mode derivation part (normal AMVP): Decoding side explanation> Next, the normal predicted motion vector mode processing procedure on the decoding side will be described with reference to Fig. 25. On the decoding side, the spatial predicted motion vector candidate derivation unit 421, the temporal predicted motion vector candidate derivation unit 422, the history predicted motion vector candidate derivation unit 423, and the predicted motion vector candidate supplement unit 425 calculate the motion vectors used in inter prediction of the normal predicted motion vector mode for each of L0 and L1 (steps S201 to S206 in Fig. 25). Specifically, when the prediction mode PredMode of the processing target block is inter prediction (MODE_INTER) and the inter prediction mode of the processing target block is L0 prediction (Pred_L0), the predicted motion vector candidate list mvpListL0 of L0 is calculated, the predicted motion vector mvpL0 is selected, and the motion vector mvL0 of L0 is calculated. When the inter prediction mode of the block to be processed is L1 prediction (Pred_L1), the L1 predicted motion vector candidate list mvpListL1 is calculated, the predicted motion vector mvpL1 is selected, and the motion vector mvL1 of L1 is calculated. When the inter prediction mode of the block to be processed is bi-prediction (Pred_BI), both L0 prediction and L1 prediction are performed, the L0 predicted motion vector candidate list mvpListL0 is calculated, the L0 predicted motion vector mvpL0 is selected, and the motion vector mvL0 of L0 is calculated, while the L1 predicted motion vector candidate list mvpListL1 is calculated, the L1 predicted motion vector mvpL1 is calculated, and the motion vector mvL1 of L1 is calculated.

[0088] As in the coding side, the decoding side also performs motion vector calculation processing for each of L0 and L1, but the processing is common to both L0 and L1. Therefore, in the following description, L0 and L1 are represented as a common LX. LX represents an inter-prediction mode used for inter-prediction of the coding block to be processed. In the processing to calculate the motion vector of L0, X is 0, and in the processing to calculate the motion vector of L1, X is 1. In addition, when the information of the other reference list is referred to during the processing to calculate the motion vector of LX, instead of the same reference list as the LX to be calculated, the other reference list is represented as LY.

[0089] When the motion vector mvLX of LX is used (step S202 in FIG. 25: YES), a candidate of the predicted motion vector of LX is calculated to construct a predicted motion vector candidate list mvpListLX of LX (step S203 in FIG. 25). A spatial predicted motion vector candidate derivation unit 421, a temporal predicted motion vector candidate derivation unit 422, a history predicted motion vector candidate derivation unit 423, and a predicted motion vector candidate supplementation unit 425 in the normal predicted motion vector mode derivation unit 401 calculate a plurality of predicted motion vector candidates to construct the predicted motion vector candidate list mvpListLX. A detailed processing procedure of step S203 in FIG. 25 will be described later with reference to the flowchart in FIG. 20.

[0090] Next, the predicted motion vector candidate selection unit 426 extracts the predicted motion vector candidate mvpListLX[mvpIdxLX] corresponding to the predicted motion vector index mvpIdxLX decoded and supplied by the bit string decoding unit 201 from the predicted motion vector candidate list mvpListLX as the selected predicted motion vector mvpLX (step S204 in Figure 25).

[0091] Next, the motion vector adder 427 adds the differential motion vector mvdLX of LX decoded and supplied by the bit stream decoder 201 and the predicted motion vector mvpLX of LX, mvLX = mvpLX + mvdLX Then, the motion vector mvLX of LX is calculated (step S205 in FIG. 25).

[0092] <Normal predicted motion vector mode derivation part (normal AMVP): Motion vector prediction method> Figure 20 is a flowchart showing the processing steps of a normal prediction motion vector mode derivation process having functions common to the normal prediction motion vector mode derivation unit 301 of the image encoding device and the normal prediction motion vector mode derivation unit 401 of the image decoding device according to an embodiment of the present invention.

[0093] The normal motion vector predictor mode derivation unit 301 and the normal motion vector predictor mode derivation unit 401 are provided with a motion vector predictor candidate list mvpListLX. The motion vector predictor candidate list mvpListLX has a list structure, and is provided with a storage area for storing a motion vector predictor index indicating a location in the motion vector predictor candidate list and a motion vector predictor candidate corresponding to the index as elements. The number of the motion vector predictor index starts from 0, and the motion vector predictor candidate is stored in the storage area of ​​the motion vector predictor candidate list mvpListLX. In this embodiment, it is assumed that the motion vector predictor candidate list mvpListLX can register at least two motion vector predictor candidates (inter prediction information). Furthermore, 0 is set to a variable numCurrMvpCand indicating the number of motion vector predictor candidates registered in the motion vector predictor candidate list mvpListLX.

[0094] The spatial prediction motion vector candidate derivation units 321 and 421 derive a candidate of a prediction motion vector from a block adjacent to the left. In this process, the prediction motion vector mvLXA is derived by referring to the inter prediction information of the block adjacent to the left (A0 or A1 in FIG. 11), that is, a flag indicating whether a prediction motion vector candidate is available, a motion vector, a reference index, and the like, and the derived mvLXA is added to the prediction motion vector candidate list mvpListLX (step S301 in FIG. 20). Note that X is 0 for L0 prediction, and X is 1 for L1 prediction (similar below). Next, the spatial prediction motion vector candidate derivation units 321 and 421 derive a candidate of a prediction motion vector from a block adjacent to the upper side. In this process, a predicted motion vector mvLXB is derived by referring to the inter prediction information of the adjacent block above (B0, B1, or B2 in FIG. 11), i.e., a flag indicating whether a predicted motion vector candidate is available, a motion vector, a reference index, etc., and if the derived mvLXA and mvLXB are not equal, mvLXB is added to the predicted motion vector candidate list mvpListLX (step S302 in FIG. 20). The processes of steps S301 and S302 in FIG. 20 are the same except that the positions and numbers of the adjacent blocks to be referenced are different, and a flag availableFlagLXN indicating whether a predicted motion vector candidate of the coding block is available, a motion vector mvLXN, and a reference index refIdxN (N indicates A or B, the same below) are derived.

[0095] Next, the temporal motion vector predictor candidate derivation units 322 and 422 derive candidates for motion vector predictors from blocks in pictures whose time is different from that of the currently processed picture. In this process, a flag availableFlagLXCol indicating whether a motion vector predictor candidate of an encoding block of a picture whose time is different is available or not, a motion vector mvLXCol, a reference index refIdxCol, and a reference list listCol are derived, and mvLXCol is added to the motion vector predictor candidate list mvpListLX (step S303 in FIG. 20).

[0096] It is assumed that the processing of the temporal motion vector predictor candidate derivation units 322 and 422 can be omitted in units of a sequence (SPS), a picture (PPS), or a slice.

[0097] Next, the history motion vector predictor candidate derivation units 323 and 423 add the history motion vector predictor candidates registered in the history motion vector predictor candidate list HmvpCandList to the motion vector predictor candidate list mvpListLX (step S304 in FIG. 20). Details of the registration process procedure in step S304 will be described later with reference to the flowchart in FIG. 29.

[0098] Next, the motion vector predictor candidate supplementation units 325 and 425 add motion vector predictor candidates of a predetermined value, such as (0, 0), until the motion vector predictor candidate list mvpListLX is filled (S305 in FIG. 20).

[0099] <Normal merge mode derivation part (normal merge)> The normal merge mode derivation unit 302 in FIG. 18 includes a spatial merge candidate derivation unit 341, a temporal merge candidate derivation unit 342, an average merge candidate derivation unit 344, a history merge candidate derivation unit 345, a merge candidate supplementation unit 346, and a merge candidate selection unit 347.

[0100] The normal merge mode derivation unit 402 in FIG. 24 includes a spatial merge candidate derivation unit 441, a temporal merge candidate derivation unit 442, an average merge candidate derivation unit 444, a history merge candidate derivation unit 445, a merge candidate supplementation unit 446, and a merge candidate selection unit 447.

[0101] FIG. 21 is a flowchart illustrating the procedure of a normal merge mode derivation process having a function common to the normal merge mode derivation unit 302 of the image encoding device and the normal merge mode derivation unit 402 of the image decoding device according to an embodiment of the present invention.

[0102] The various processes will be described below in order. In the following description, unless otherwise specified, the slice type slice_type is a B slice, but can also be applied to the case of a P slice. However, when the slice type slice_type is a P slice, there is only L0 prediction (Pred_L0) as an inter prediction mode, and there is no L1 prediction (Pred_L1) or bi-prediction (Pred_BI), so that the process related to L1 can be omitted.

[0103] The normal merge mode derivation unit 302 and the normal merge mode derivation unit 402 include a merge candidate list mergeCandList. The merge candidate list mergeCandList has a list structure and is provided with a merge index indicating a location in the merge candidate list and a storage area for storing merge candidates corresponding to the index as elements. The merge index number starts from 0, and merge candidates are stored in the storage area of ​​the merge candidate list mergeCandList. In the following processing, the merge candidate of the merge index i registered in the merge candidate list mergeCandList is represented as mergeCandList[i]. In this embodiment, it is assumed that the merge candidate list mergeCandList can register at least six merge candidates (inter prediction information). Furthermore, 0 is set to a variable numCurrMergeCand indicating the number of merge candidates registered in the merge candidate list mergeCandList.

[0104] The spatial merge candidate derivation unit 341 and the spatial merge candidate derivation unit 441 derive spatial merge candidates from each block adjacent to the processing target block (B1, A1, B0, A0, B2 in FIG. 11) in the order of B1, A1, B0, A0, B2 from the coding information stored in the coding information storage memory 111 of the image coding device or the coding information storage memory 205 of the image decoding device, and register the derived spatial merge candidates in the merge candidate list mergeCandList (step S401 in FIG. 21). Here, N indicating either B1, A1, B0, A0, B2 or the temporal merge candidate Col is defined. A flag availableFlagN indicating whether inter prediction information of block N can be used as a spatial merge candidate, an L0 reference index refIdxL0N and an L1 reference index refIdxL1N of spatial merge candidate N, an L0 prediction flag predFlagL0N indicating whether L0 prediction is performed and an L1 prediction flag predFlagL1N indicating whether L1 prediction is performed, an L0 motion vector mvL0N, and an L1 motion vector mvL1N are derived. However, in this embodiment, a merge candidate is derived without referring to inter prediction information of a block included in a coding block to be processed, so a spatial merge candidate using inter prediction information of a block included in a coding block to be processed is not derived.

[0105] Next, the temporal merge candidate derivation unit 342 and the temporal merge candidate derivation unit 442 derive temporal merge candidates from pictures of different times and register the derived temporal merge candidates in a merge candidate list mergeCandList (step S402 in FIG. 21). A flag availableFlagCol indicating whether the temporal merge candidate is available, an L0 prediction flag predFlagL0Col indicating whether L0 prediction of the temporal merge candidate is performed, an L1 prediction flag predFlagL1Col indicating whether L1 prediction is performed, and a motion vector mvL0Col and a motion vector mvL1Col of L0 and L1 are derived.

[0106] It is assumed that the processing of the temporal merge candidate derivation unit 342 and the temporal merge candidate derivation unit 442 can be omitted in units of a sequence (SPS), a picture (PPS), or a slice.

[0107] Next, the history merge candidate derivation unit 345 and the history merge candidate derivation unit 445 register the history predictor motion vector candidates registered in the history predictor motion vector candidate list HmvpCandList in the merge candidate list mergeCandList (step S403 in FIG. 21). In addition, if the number of merge candidates registered in the merge candidate list mergeCandList, numCurrMergeCand, is smaller than the maximum number of merge candidates, MaxNumMergeCand, the number of merge candidates registered in the merge candidate list mergeCandList is set to an upper limit of the maximum number of merge candidates, MaxNumMergeCand, and historical merge candidates are derived and registered in the merge candidate list mergeCandList.

[0108] Next, the average merge candidate derivation unit 344 and the average merge candidate derivation unit 444 derive average merge candidates from the merge candidate list mergeCandList, and add the derived average merge candidates to the merge candidate list mergeCandList (step S404 in FIG. 21). In addition, if the number of merge candidates registered in the merge candidate list mergeCandList, numCurrMergeCand, is smaller than the maximum number of merge candidates, MaxNumMergeCand, the average merge candidate is derived with the number of merge candidates registered in the merge candidate list mergeCandList, numCurrMergeCand, as an upper limit, up to the maximum number of merge candidates, MaxNumMergeCand, and registered in the merge candidate list mergeCandList. Here, the average merge candidate is a new merge candidate having a motion vector obtained by averaging the motion vectors of the first merge candidate and the second merge candidate registered in the merge candidate list mergeCandList for each L0 prediction and L1 prediction.

[0109] Next, in the merge candidate supplementation unit 346 and the merge candidate supplementation unit 446, when the number of merge candidates registered in the merge candidate list mergeCandList, numCurrMergeCand, is smaller than the maximum number of merge candidates, MaxNumMergeCand, the number of merge candidates registered in the merge candidate list mergeCandList, numCurrMergeCand is set as an upper limit of the maximum number of merge candidates, MaxNumMergeCand, and additional merge candidates are derived and registered in the merge candidate list mergeCandList (step S405 in FIG. 21). With the maximum number of merge candidates, MaxNumMergeCand, a merge candidate having a motion vector of (0,0) and a prediction mode of L0 prediction (Pred_L0) is added to the P slice. A merge candidate having a motion vector of (0,0) and a prediction mode of bi-prediction (Pred_BI) is added to the B slice. A reference index when adding a merge candidate is different from a reference index already added.

[0110] Next, the merge candidate selection unit 347 and the merge candidate selection unit 447 select a merge candidate from among the merge candidates registered in the merge candidate list mergeCandList. The merge candidate selection unit 347 on the encoding side selects a merge candidate by calculating the code amount and the distortion amount, and supplies a merge index indicating the selected merge candidate and inter prediction information of the merge candidate to the motion compensation prediction unit 306 via the inter prediction mode determination unit 305. On the other hand, the merge candidate selection unit 447 on the decoding side selects a merge candidate based on the decoded merge index, and supplies the selected merge candidate to the motion compensation prediction unit 406.

[0111] When the size (product of width and height) of a coding block is less than 32, the normal merge mode derivation unit 302 and the normal merge mode derivation unit 402 derive merge candidates for the parent block of the coding block. Then, for all child blocks, the merging candidates derived for the parent block are used, but only if the size of the parent block is 32 or more and fits within the screen.

[0112] <Update of historical motion vector prediction candidate list> Next, a detailed description will be given of a method for initializing and updating the historical motion vector predictor candidate list HmvpCandList provided in the encoding information storage memory 111 on the encoding side and the encoding information storage memory 205 on the decoding side. Fig. 26 is a flowchart illustrating the procedure of the historical motion vector predictor candidate list initialization / update process.

[0113] In this embodiment, the history prediction motion vector candidate list HmvpCandList is updated in the coding information storage memory 111 and the coding information storage memory 205. A history prediction motion vector candidate list update unit may be provided in the inter prediction unit 102 and the inter prediction unit 203 to update the history prediction motion vector candidate list HmvpCandList.

[0114] The historical prediction motion vector candidate list HmvpCandList is initially set at the beginning of the slice, and on the encoding side, the historical prediction motion vector candidate list HmvpCandList is updated when the prediction method determination unit 105 selects the normal prediction motion vector mode or the normal merge mode, and on the decoding side, the historical prediction motion vector candidate list HmvpCandList is updated when the prediction information decoded by the bit string decoding unit 201 is the normal prediction motion vector mode or the normal merge mode.

[0115] Inter prediction information used when performing inter prediction in normal prediction motion vector mode or normal merge mode is registered as an inter prediction information candidate hMvpCand in a history prediction motion vector candidate list HmvpCandList. The inter prediction information candidate hMvpCand includes an L0 reference index refIdxL0 and an L1 reference index refIdxL1, an L0 prediction flag predFlagL0 indicating whether or not L0 prediction is performed, an L1 prediction flag predFlagL1 indicating whether or not L1 prediction is performed, an L0 motion vector mvL0, and an L1 motion vector mvL1.

[0116] The elements (i.e., inter prediction information) registered in the history prediction motion vector candidate list HmvpCandList provided in the encoding information storage memory 111 on the encoding side and the encoding information storage memory 205 on the decoding side are checked in order from the top to the bottom of the history prediction motion vector candidate list HmvpCandList to see if there is inter prediction information with the same value as the inter prediction information candidate hMvpCand. If there is inter prediction information with the same value as the inter prediction information candidate hMvpCand, the element is deleted from the history prediction motion vector candidate list HmvpCandList. On the other hand, if there is no inter prediction information with the same value as the inter prediction information candidate hMvpCand, the first element of the history prediction motion vector candidate list HmvpCandList is deleted, and the inter prediction information candidate hMvpCand is added to the end of the history prediction motion vector candidate list HmvpCandList.

[0117] The size of the maximum history motion vector predictor candidate list, which is the maximum number provided in the encoding information storage memory 111 on the encoding side and the encoding information storage memory 205 on the decoding side in the present invention, i.e., the maximum number of elements (maximum number of candidates) MaxNumHmvpCand of the history motion vector predictor candidate list HmvpCandList, is set to 6. Note that MaxNumHmvpCand may be set to the same value as the maximum number of merge candidates MaxNumMergeCand - 1, or may be set to the same value as the maximum number of merge candidates MaxNumMergeCand, or may be a predetermined fixed value such as 5 or 6.

[0118] First, the historical motion vector predictor candidate list HmvpCandList is initialized in units of slices (step S2101 in FIG. 26). All elements of the historical motion vector predictor candidate list HmvpCandList are cleared at the beginning of the slice, and the value of the number of historical motion vector predictor candidates (current number of candidates) NumHmvpCand registered in the historical motion vector predictor candidate list HmvpCandList is set to 0.

[0119] Furthermore, a predetermined value is set to the offset value hMvpIdxOffset. The value set to the offset value hMvpIdxOffset is set to any predetermined value between 0 and (the size of the historical motion vector predictor candidate list MaxNumHmvpCand-1). By setting the offset value hMvpIdxOffset to a value smaller than the maximum number of elements of the historical motion vector predictor candidate list HmvpCandList, it is possible to reduce the number of comparisons between elements, which will be described later. The offset value hMvpIdxOffset is a predetermined value, but the value of the offset value hMvpIdxOffset may be set by encoding / decoding in sequence units, or may be set by encoding / decoding in slice units. The offset value hMvpIdxOffset will be described in detail later.

[0120] Note that, although the initialization of the historical motion vector predictor candidate list HmvpCandList is performed on a slice-by-slice basis (the first coding block of a slice), it may be performed on a picture-by-picture basis, a tile-by-tile basis, or a tree block row-by-tree block basis.

[0121] Next, the following update process of the historical motion vector predictor candidate list HmvpCandList is repeatedly performed for each coding block in the slice (steps S2102 to S2107 in FIG. 26).

[0122] First, initial settings are made for each coding block. A value of FALSE is set to a flag identicalCandExist indicating whether an identical candidate exists, and 0 is set to a deletion target index removeIdx indicating a candidate to be deleted (step S2103 in FIG. 26).

[0123] It is determined whether or not there is inter prediction information with the same value as the inter prediction information candidate hMvpCand to be registered in the history prediction motion vector candidate list HmvpCandList (step S2104 in FIG. 26). If the prediction method determination unit 105 on the encoding side determines that the mode is the normal prediction motion vector mode or the normal merge mode, or if the bit string decoding unit 201 on the decoding side decodes the inter prediction information as the normal prediction motion vector mode or the normal merge mode, the inter prediction information is set as the inter prediction information candidate hMvpCand to be registered. If the prediction method determination unit 105 on the encoding side determines that the mode is the intra prediction mode, the sub-block prediction motion vector mode, or the sub-block merge mode, or if the bit string decoding unit 201 on the decoding side decodes the intra prediction mode, the sub-block prediction motion vector mode, or the sub-block merge mode, the update process of the history prediction motion vector candidate list HmvpCandList is not performed, and the inter prediction information candidate hMvpCand to be registered does not exist. If there is no inter-prediction information candidate hMvpCand to be registered, steps S2105 to S2106 are skipped (step S2104 in FIG. 26: NO). If there is an inter-prediction information candidate hMvpCand to be registered, the processes in and after step S2105 are performed (step S2104 in FIG. 26: YES).

[0124] Next, it is determined whether or not an element (inter prediction information) having the same value as the inter prediction information candidate hMvpCand to be registered, that is, an identical element, exists among the elements of the history prediction motion vector candidate list HmvpCandList (step S2105 in FIG. 26). FIG. 27 is a flowchart of the identical element confirmation process. If the value of the number of history prediction motion vector candidates NumHmvpCand is 0 (step S2121: NO in FIG. 27), the history prediction motion vector candidate list HmvpCandList is empty and no identical candidate exists, so steps S2122 to S2125 in FIG. 27 are skipped and the identical element confirmation process ends. If the value of the number of history prediction motion vector candidates NumHmvpCand is greater than 0 (step S2121: YES in FIG. 27), it is confirmed in order from the top of the history prediction motion vector candidate list HmvpCandList to the back whether or not inter prediction information having the same value as the inter prediction information candidate hMvpCand to be registered exists. The process of step S2123 is repeated for historical predicted motion vector index hMvpIdx from 0 to NumHmvpCand-1 (steps S2122 to S2125 in FIG. 27). First, a comparison is made to see whether the hMvpIdx-th element HmvpCandList[hMvpIdx] counting from 0 in the historical predicted motion vector candidate list is identical to the inter-prediction information candidate hMvpCand (step S2123 in FIG. 27). If they are identical (step S2123 in FIG. 27: YES), a value of TRUE is set to a flag identicalCandExist indicating whether an identical candidate exists, the value of the current historical predicted motion vector index hMvpIdx is set to a deletion target index removeIdx indicating the position of the element to be deleted, and this identical element confirmation process is terminated. If they are not identical (step S2123 in FIG. 27: NO), the flag identicalCandExist indicating whether an identical candidate exists remains FALSE, hMvpIdx is incremented by 1, and if the historical predicted motion vector index hMvpIdx is equal to or smaller than NumHmvpCand-1, the processes from step S2123 onwards are performed (steps S2122 to S2125 in FIG. 27).

[0125] Returning to the flowchart of FIG. 26 again, a shift and addition process of elements of the history motion vector predictor candidate list HmvpCandList is performed (step S2106 of FIG. 26). FIG. 28 is a flowchart of an element shift / addition process procedure of the history motion vector predictor candidate list HmvpCandList in step S2106 of FIG. 26. First, it is determined whether to remove elements stored in the history motion vector predictor candidate list HmvpCandList and then add a new element, or to add a new element without removing elements. Specifically, it is compared whether a flag identicalCandExist indicating whether an identical candidate exists is TRUE (true) or whether the current number of candidates NumHmvpCand has reached the maximum number of candidates MaxNumHmvpCand (step S2141 of FIG. 28). If the current number of candidates NumHmvpCand is the same value as the maximum number of candidates MaxNumHmvpCand, it indicates that the maximum number of elements has been added to the history motion vector predictor candidate list HmvpCandList. When the flag identicalCandExist indicating whether or not an identical candidate exists is TRUE (true) or NumHmvpCand is the same value as MaxNumHmvpCand (step S2141 in FIG. 28 : YES), the element stored in the historical motion vector predictor candidate list HmvpCandList is deleted and then a new element is added. Specifically, when the flag identicalCandExist indicating whether or not an identical candidate exists is TRUE (true), the identical candidate is deleted from the historical motion vector predictor candidate list HmvpCandList. When NumHmvpCand is the same value as MaxNumHmvpCand, the top candidate (element) is deleted from the historical motion vector predictor candidate list HmvpCandList. The initial value of index i is set to the value of removeIdx+1. removeIdx is a deletion target index indicating the candidate to be deleted. The element shift process of step S2143 is repeated for this index i from the initial value removeIdx+1 to NumHmvpCand-1. (Steps S2142 to S2144 in Figure 28).The elements of HmvpCandList[i] are copied to HmvpCandList[i - 1] to shift the elements forward (step S2143 in FIG. 28), and i is incremented by 1 (steps S2142 to S2144 in FIG. 28). When index i becomes NumHmvpCand and the element shift process of step S2143 is completed, the inter prediction information candidate hMvpCand is added to the end of the history prediction motion vector candidate list (step S2145 in FIG. 28). Here, the end of the history prediction motion vector candidate list is the (NumHmvpCand-1)-th HmvpCandList[NumHmvpCand-1] counting from 0. This ends the element shift / addition process of the history prediction motion vector candidate list HmvpCandList. On the other hand, when neither of the conditions that the flag identicalCandExist indicating whether or not an identical candidate exists is TRUE (true) and NumHmvpCand is the same value as MaxNumHmvpCand is satisfied (step S2141 in FIG. 28: NO), that is, when the flag identicalCandExist indicating whether or not an identical candidate exists is FALSE (false) and NumHmvpCand is smaller than MaxNumHmvpCand, the inter prediction information candidate hMvpCand is added to the position next to the last element of the history prediction motion vector candidate list without removing the elements stored in the history prediction motion vector candidate list HmvpCandList (step S2146 in FIG. 28). Here, the position next to the last element of the history prediction motion vector candidate list is the NumHmvpCand-th HmvpCandList[NumHmvpCand] counting from 0. If no element has been added to the history prediction motion vector candidate list, it is the 0th position. Moreover, NumHmvpCand is incremented by 1, and the element shift / addition process of the historical motion vector predictor candidate list HmvpCandList ends.

[0126] Figures 31A to 31C are diagrams for explaining an example of a process of updating a history prediction motion vector candidate list. When six elements (inter prediction information) of the size MaxNumHmvpCand of the history prediction motion vector candidate list are registered in the history prediction motion vector candidate list HmvpCandList, if a new element is added, the elements in the history prediction motion vector candidate list HmvpCandList are compared with the new inter prediction information in order from the front (Figure 31A), and if the new element has the same value as the third element HMVP2 from the top of the history prediction motion vector candidate list HmvpCandList, the element HMVP2 is deleted from the history prediction motion vector candidate list HmvpCandList, and the rear elements HMVP3 to HMVP5 are shifted (copied) forward one by one, and the new element is added to the end of the history prediction motion vector candidate list HmvpCandList (Figure 31B), and the update of the history prediction motion vector candidate list HmvpCandList is completed (Figure 31C).

[0127] <Historical Prediction Motion Vector Candidate Derivation Process> Next, a detailed description will be given of a method for deriving a historical prediction motion vector candidate from the historical prediction motion vector candidate list HmvpCandList, which is a processing procedure of step S304 in Fig. 20 and is common to the historical prediction motion vector candidate derivation unit 323 of the normal prediction motion vector mode derivation unit 301 on the encoding side and the historical prediction motion vector candidate derivation unit 423 of the normal prediction motion vector mode derivation unit 401 on the decoding side. Fig. 29 is a flowchart illustrating the historical prediction motion vector candidate derivation processing procedure.

[0128] If the number of current motion vector predictor candidates numCurrMvpCand is equal to or greater than the maximum number of elements in the motion vector predictor candidate list mvpListLX (2 here) or the number of history motion vector predictor candidates (the number of elements registered in the history motion vector predictor list) NumHmvpCand is 0 (step S2201: NO in FIG. 29), steps S2202 to S2210 in FIG. 29 are omitted and the history motion vector predictor candidate derivation procedure is terminated. If the number of current motion vector predictor candidates numCurrMvpCand is smaller than 2, which is the maximum number of elements in the motion vector predictor candidate list mvpListLX, and the number of history motion vector predictor candidates NumHmvpCand is greater than 0 (step S2201: YES in FIG. 29), steps S2202 to S2210 in FIG. 29 are performed.

[0129] Next, the process of steps S2203 to S2209 in FIG. 29 is repeated from index i 1 to the smaller value of either the predetermined upper limit value 4 or the number of historical motion vector predictor candidates NumHmvpCand (steps S2202 to S2210 in FIG. 29). If the number of current motion vector predictor candidates numCurrMvpCand is equal to or greater than 2, which is the maximum number of elements in the motion vector predictor candidate list mvpListLX (step S2203 in FIG. 29: NO), the process of steps S2204 to S2210 in FIG. 29 is omitted, and the historical motion vector predictor candidate derivation process procedure is terminated. If the number of current motion vector predictor candidates numCurrMvpCand is smaller than 2, which is the maximum number of elements in the motion vector predictor candidate list mvpListLX (step S2203 in FIG. 29: YES), the process of step S2204 and subsequent steps in FIG. 29 is performed.

[0130] Next, the processes from steps S2205 to S2208 are performed when the reference list LY of each element of the historical motion vector predictor candidate list HmvpCandList is L0 and L1 (steps S2204 to S2209 in FIG. 29). It shows that the processes from steps S2205 to S2208 in FIG. 29 are performed for L0 and L1 of the historical motion vector predictor candidate list HmvpCandList. If the number of current motion vector predictor candidates numCurrMvpCand is equal to or greater than 2, which is the maximum number of elements in the motion vector predictor candidate list mvpListLX (step S2205: NO in FIG. 29), the processes from steps S2206 to S2210 in FIG. 29 are omitted, and the historical motion vector predictor candidate derivation process procedure ends. If the current number of motion vector predictor candidates numCurrMvpCand is smaller than 2 which is the maximum number of elements in the motion vector predictor candidate list mvpListLX (step S2205 in FIG. 29: YES), the processes in and after step S2206 in FIG. 29 are performed.

[0131] Next, the motion vector of the element of the history prediction motion vector candidate list is added to the prediction motion vector candidate list as a prediction motion vector candidate. At this time, for the number of elements specified by the offset value hMvpIdxOffset from the rear of the history prediction motion vector candidate list, it is confirmed in descending order whether the element is not included in the prediction motion vector candidate list, and the element not included in the prediction motion vector candidate list is added to the prediction motion vector candidate list, and then the element of the history prediction motion vector candidate list is added to the prediction motion vector candidate list without confirming whether the element is not included in the prediction motion vector candidate list in descending order. By setting a value smaller than the maximum number of elements of the history prediction motion vector candidate list HmvpCandList to the offset value hMvpIdxOffset, it is possible to reduce the number of comparisons between elements described later. When checking the history prediction motion vector candidate list, the reason why only the number of elements specified by the offset value hMvpIdxOffset from the rear of the history prediction motion vector candidate list are compared will be described with reference to FIG. 38A to FIG. 38D.

[0132] FIG. 38A to FIG. 38D show three examples of a block divided into four and the relationship with the history prediction motion vector candidate list. The case where each coding block is coded in the normal prediction motion vector mode or the normal merge mode will be described. FIG. 38A is a diagram showing a case where the coding block to be coded / decoded is the upper right block. In this case, the inter prediction information of the block on the left side of the coding block to be coded / decoded is highly likely to be the last element HMVP5 of the history prediction motion vector candidate list. FIG. 38B is a diagram showing a case where the coding block to be coded / decoded is the lower left block. In this case, the inter prediction information of the block on the upper right side of the coding block to be coded / decoded is highly likely to be the last element HMVP5 of the history prediction motion vector candidate list, and the inter prediction information of the block above the coding block to be coded / decoded is highly likely to be the penultimate element HMVP4 of the history prediction motion vector candidate list.

[0133] Figure 38C is a diagram of the case where the coding block to be coded / decoded is the lower right block. In this case, the inter prediction information of the left block of the coding block to be coded / decoded is likely to be the last element HMVP5 of the history prediction motion vector candidate list, the inter prediction information of the block above the coding block to be coded / decoded is likely to be the penultimate element HMVP4 of the history prediction motion vector candidate list, and the inter prediction information of the upper left block of the coding block to be coded / decoded is likely to be the penultimate element HMVP3 of the history prediction motion vector candidate list. That is, the last element of the history prediction motion vector candidate list is most likely to be derived as a spatial prediction motion vector candidate.

[0134] As shown in FIG. 38D, in order to compare only the last element HMVP5 of the history prediction motion vector candidate list that is most likely to be derived as a spatial prediction motion vector candidate, the offset value hMvpIdxOffset is set to 1. Furthermore, in order to compare the penultimate element of the history prediction motion vector candidate list that is second most likely to be derived as a spatial prediction motion vector candidate, the offset value hMvpIdxOffset can also be set to 2. Furthermore, in order to compare the penultimate element of the history prediction motion vector candidate list that is third most likely to be derived as a spatial prediction motion vector candidate, the offset value hMvpIdxOffset can also be set to 3. In this way, by setting the offset value hMvpIdxOffset to a value of 1 or more, the maximum number of times that elements of the history prediction motion vector candidate list are compared is reduced, and the maximum amount of processing is reduced. Note that, by setting the offset value hMvpIdxOffset to 0, the number of times that elements of the history prediction motion vector candidate list are compared is 0, and the comparison process is omitted.

[0135] If the index i is smaller than the offset value hMvpIdxOffset, that is, if it is being checked whether or not the element is not included in the motion vector predictor candidate list (step S2206 in FIG. 29: YES), if the reference index of LY in the history motion vector predictor candidate list HmvpCandList[NumHmvpCand − i] is the same value as the reference index refIdxLX of the motion vector to be encoded / decoded and the LY of the element HmvpCandList[NumHmvpCand − i] of the history motion vector predictor candidate list is an element different from any element in the motion vector predictor candidate list mvpListLX (step S2207 in FIG. 29: YES), the history motion vector predictor candidate HmvpCandList[NumHmvpCand − i] is added to the numCurrMvpCand-th element mvpListLX[numCurrMvpCand] counting from 0 in the motion vector predictor candidate list as the last element of the motion vector predictor candidate list. The motion vector of LY [i] is added to the motion vector predictor candidate list mvpListLX (step S2208 in FIG. 29), and the number of current motion vector predictor candidates numCurrMvpCand is incremented by 1. If there is no element in the history motion vector predictor candidate list HmvpCandList that has the same reference index as the reference index refIdxLX of the motion vector to be encoded / decoded and that is different from any element in the motion vector predictor list mvpListLX (step S2207 in FIG. 29: NO), the addition process of step S2208 is skipped.

[0136] On the other hand, if index i is not smaller than the offset value hMvpIdxOffset, i.e., if it is not confirmed whether the element is not included in the predictor motion vector candidate list (step S2206: NO in Figure 29), the motion vector of LY in the history predictor motion vector candidate HmvpCandList[NumHmvpCand - i] is added to the numCurrMvpCand-th element mvpListLX[numCurrMvpCand] counting from 0 in the predictor motion vector candidate list as the last element of the predictor motion vector candidate list (step S2208 in Figure 29), and the number of current predictor motion vector candidates numCurrMvpCand is incremented by 1.

[0137] The above-mentioned processing from steps S2205 to S2208 in FIG. 29 is performed for both L0 and L1 (steps S2204 to S2209 in FIG. 29).

[0138] Index i is incremented by 1 (steps S2202 and S2210 in FIG. 29). If index i is equal to or less than the smaller value of a predetermined upper limit value of 4 or the number NumHmvpCand of historical motion vector predictor candidates, processing from step S2203 onwards is performed again (steps S2202 to S2210 in FIG. 29).

[0139] <History merge candidate derivation process> Next, a detailed description will be given of a method for deriving history merge candidates from the history merge candidate list HmvpCandList, which is a processing procedure in step S404 in Fig. 21 and is common to the history merge candidate derivation unit 345 of the normal merge mode derivation unit 302 on the encoding side and the history merge candidate derivation unit 445 of the normal merge mode derivation unit 402 on the decoding side. Fig. 30 is a flowchart illustrating the history merge candidate derivation processing procedure.

[0140] First, an initialization process is performed (step S2301 in FIG. 30). A value of FALSE is set for each of the 0th to (numCurrMergeCand - 1)th elements of the flag isPruned[i], and the number of elements currently registered in the merge candidate list, numCurrMergeCand, is set to the variable numOrigMergeCand.

[0141] Next, elements of the history prediction motion vector list that are not included in the merge candidate list are added to the merge candidate list. At this time, the history prediction motion vector list is checked and added in descending order from the end. The initial value of the index hMvpIdx is set to 1, and the addition process from step S2303 to step S2311 in FIG. 30 is repeated from this initial value to NumHmvpCand (steps S2302 to S2312 in FIG. 30). If the number of elements registered in the current merge candidate list, numCurrMergeCand, is not less than or equal to (maximum number of merge candidates, MaxNumMergeCand-1), that is, if the number of elements registered in the current merge candidate list, numCurrMergeCand, has reached the maximum number of merge candidates, MaxNumMergeCand, merge candidates have been added to all elements in the merge candidate list, so this history merge candidate derivation process is terminated (step S2303: NO in FIG. 30). If the number of elements registered in the current merge candidate list, numCurrMergeCand, is equal to or less than the maximum number of merge candidates, MaxNumMergeCand-1 (YES in step S2303 in FIG. 30), processing from step S2304 onwards is carried out.

[0142] A value of FALSE is set to the variable sameMotion indicating the same motion information (step S2304 in FIG. 30). Next, the inter prediction information, which is an element of the history prediction motion vector candidate list, is added to the merge candidate list as a merge candidate. At this time, for the number of elements specified by the offset value hMvpIdxOffset from the last element (the most recently added element) of the history prediction motion vector candidate list, it is checked in descending order whether the element is not included in the merge candidate list, and the elements not included in the merge candidate list are added to the merge candidate list, and thereafter, the elements of the history prediction motion vector candidate list are added to the merge candidate list in descending order without checking whether the element is not included in the merge candidate list. By setting a value smaller than the maximum number of elements of the history prediction motion vector candidate list HmvpCandList to the offset value hMvpIdxOffset, it is possible to reduce the number of comparisons between elements, which will be described later. The reason why only the number of elements specified by the offset value hMvpIdxOffset from the last element (the most recently added element) of the history prediction motion vector candidate list is compared when checking the history prediction motion vector candidate list will be described with reference to FIG. 38A to FIG. 38D. FIG. 38A to FIG. 38D show three examples of a block divided into four and the relationship with the history prediction motion vector candidate list. The case where each coding block is coded in the normal prediction motion vector mode or the normal merge mode will be described. FIG. 38A is a diagram showing a case where the coding block to be coded / decoded is the upper right block. In this case, the inter prediction information of the block on the left side of the coding block to be coded / decoded is highly likely to be the last element HMVP5 of the history prediction motion vector candidate list. FIG. 38B is a diagram showing a case where the coding block to be coded / decoded is the lower left block. In this case, the inter prediction information of the block on the upper right side of the coding block to be coded / decoded is highly likely to be the last element HMVP5 of the history prediction motion vector candidate list, and the inter prediction information of the block above the coding block to be coded / decoded is highly likely to be the penultimate element HMVP4 of the history prediction motion vector candidate list. FIG. 38C shows a case where the coding block to be coded / decoded is the bottom right block.In this case, the inter prediction information of the block to the left of the coding block to be coded / decoded is likely to be the last element HMVP5 of the history prediction motion vector candidate list, the inter prediction information of the block above the coding block to be coded / decoded is likely to be the penultimate element HMVP4 of the history prediction motion vector candidate list, and the inter prediction information of the block to the upper left of the coding block to be coded / decoded is likely to be the penultimate element HMVP3 of the history prediction motion vector candidate list. That is, the last element of the history prediction motion vector candidate list is most likely to be derived as a spatial merge candidate. In order to compare only the last element HMVP5 of the history prediction motion vector candidate list that is most likely to be derived as a spatial merge candidate as shown in FIG. 38D, the offset value hMvpIdxOffset is set to 1. Furthermore, in order to compare the penultimate element of the history prediction motion vector candidate list that is second most likely to be derived as a spatial merge candidate, the offset value hMvpIdxOffset can also be set to 2. Furthermore, in order to also compare the third-to-last element of the historical motion vector predictor candidate list that is third most likely to be derived as a spatial merge candidate, the offset value hMvpIdxOffset can be set to 3. In this way, by setting a value from 1 to 3 as a predetermined value for the offset value hMvpIdxOffset and comparing only the number of elements from the end of the historical motion vector predictor candidate list (the most recently added element) specified by the offset value hMvpIdxOffset with spatial merge candidates or elements stored in the merge candidate list, the maximum number of times elements of the historical motion vector predictor candidate list are compared is reduced, and therefore the maximum amount of processing is reduced.

[0143] If index hMvpIdx is equal to or smaller than a predetermined offset value hMvpIdxOffset, that is, to check whether the element is not included in the merge candidate list (step S2305: YES in FIG. 30), the initial value of index i is set to 0, and steps S2307 and S2308 in FIG. 30 are performed from this initial value to numOrigMergeCand-1 (S2306 to S2309 in FIG. 30). A comparison is made to see whether the (NumHmvpCand-hMvpIdx)th element HmvpCandList[NumHmvpCand-hMvpIdx] counting from 0 in the history predictor motion vector candidate list is the same value as the i-th element mergeCandList[i] counting from 0 in the merge candidate list (step S2307 in FIG. 30). The same value of the merge candidate indicates that the values ​​of all the components of the inter prediction information (inter prediction mode, reference indexes of L0 and L1, motion vectors of L0 and L1) of the merge candidate are the same. Therefore, in the comparison process of this step S2307, when isPruned[i] is FALSE, it is compared whether the values ​​of all the components (inter prediction mode, reference indexes of L0 and L1, motion vectors of L0 and L1) of mergeCandList[i] and HmvpCandList[NumHmvpCand-hMvpIdx] are the same. If the values ​​are the same (step S2307 in FIG. 30: YES), both sameMotion and isPruned[i] are set to TRUE (step S2308 in FIG. 30). Note that the flag isPruned[i] is a flag indicating that the i-th element counting from 0 of the merge candidate list is the same value as any element of the history predicted motion vector candidate list. If the values ​​are not the same (step S2307 in FIG. 30: NO), the process of step S2308 is skipped.When the repeated processing from step S2306 to step S2309 in FIG. 30 is completed, a comparison is made to see whether sameMotion is FALSE (step S2310 in FIG. 30). If sameMotion is FALSE (step S2310 in FIG. 30: YES), that is, the (NumHmvpCand - hMvpIdx)-th element HmvpCandList[NumHmvpCand - hMvpIdx] counting from 0 in the history motion vector predictor candidate list does not exist in mergeCandList, so the (NumHmvpCand - hMvpIdx)-th element HmvpCandList[NumHmvpCand - hMvpIdx] and increment numCurrMergeCand by 1 (step S2311 in FIG. 30). On the other hand, if index hMvpIdx is not smaller than offset value hMvpIdxOffset, i.e., if it is not confirmed whether the element is not included in the merge candidate list (step S2305: NO in FIG. 30), the (NumHmvpCand - hMvpIdx)th element HmvpCandList[NumHmvpCand - hMvpIdx], counting from 0, of the historical predicted motion vector candidate list is added to the numCurrMergeCand-th mergeCandList[numCurrMergeCand] of the merge candidate list as the last element of the merge candidate list, and numCurrMergeCand is incremented by 1 (step S2312 in FIG. 30).

[0144] Furthermore, the index hMvpIdx is incremented by 1 (step S2302 in FIG. 30), and steps S2302 to S2312 in FIG. 30 are repeated.

[0145] When all elements in the history motion vector predictor candidate list have been checked, or when merge candidates have been added to all elements in the merge candidate list, this history merge candidate derivation process is completed.

[0146] <Motion compensation prediction processing> The motion compensation prediction unit 306 acquires the position and size of a block currently being subjected to prediction processing in encoding. The motion compensation prediction unit 306 also acquires inter prediction information from the inter prediction mode determination unit 305. A reference index and a motion vector are derived from the acquired inter prediction information, and a prediction signal is generated after acquiring an image signal of a reference picture specified by the reference index in the decoded image memory 104, which is moved by the amount of the motion vector from the same position as the image signal of the prediction block.

[0147] In the case where the inter prediction mode in the inter prediction is prediction from a single reference picture such as L0 prediction or L1 prediction, the prediction signal obtained from one reference picture is used as a motion compensation prediction signal, and in the case where the inter prediction mode is prediction from two reference pictures such as BI prediction, the weighted average of the prediction signals obtained from the two reference pictures is used as a motion compensation prediction signal, and the motion compensation prediction signal is supplied to the prediction method determination unit 105. Here, the ratio of the weighted average of the bi-prediction is set to 1:1, but the weighted average may be performed using other ratios. For example, the weighting ratio may be set to be larger as the picture interval between the picture to be predicted and the reference picture becomes closer. In addition, the weighting ratio may be calculated using a correspondence table of combinations of picture intervals and weighting ratios.

[0148] The motion compensation prediction unit 406 has the same function as the motion compensation prediction unit 306 on the encoding side. The motion compensation prediction unit 406 obtains inter prediction information from a normal prediction motion vector mode derivation unit 401, a normal merge mode derivation unit 402, a sub-block prediction motion vector mode derivation unit 403, and a sub-block merge mode derivation unit 404 via a switch 408. The motion compensation prediction unit 406 supplies the obtained motion compensation prediction signal to the decoded image signal superimposition unit 207.

[0149] <Inter prediction mode> The process of making predictions from a single reference picture is defined as uni-prediction, and in the case of uni-prediction, predictions are made using one of two reference pictures registered in the reference lists L0 and L1, called L0 prediction or L1 prediction.

[0150] Fig. 32 shows a case where the L0 reference picture (RefL0Pic) is located before the current picture (CurPic) in uni-prediction. Fig. 33 shows a case where the L0 prediction reference picture is located after the current picture. Similarly, uni-prediction can be performed by replacing the L0 prediction reference picture in Fig. 32 and Fig. 33 with the L1 prediction reference picture (RefL1Pic).

[0151] A process of making predictions from two reference pictures is defined as bi-prediction, and in the case of bi-prediction, both L0 prediction and L1 prediction are used and expressed as BI prediction. Figure 34 shows a case of bi-prediction where the reference picture for L0 prediction is at a time before the picture to be processed and the reference picture for L1 prediction is at a time after the picture to be processed. Figure 35 shows a case of bi-prediction where the reference picture for L0 prediction and the reference picture for L1 prediction are at a time before the picture to be processed. Figure 36 shows a case of bi-prediction where the reference picture for L0 prediction and the reference picture for L1 prediction are at a time after the picture to be processed.

[0152] In this way, the relationship between the prediction type and time of L0 / L1 can be used without being limited to L0 being the past direction and L1 being the future direction. In the case of bi-prediction, the same reference picture may be used to perform both L0 prediction and L1 prediction. Note that the decision as to whether to perform motion compensation prediction in uni-prediction or bi-prediction is made based on information (e.g., a flag) indicating whether to use L0 prediction and whether to use L1 prediction, for example.

[0153] <About reference indexes> In the embodiment of the present invention, in order to improve the accuracy of motion compensation prediction, it is possible to select an optimal reference picture from among multiple reference pictures in motion compensation prediction. To this end, the reference picture used in the motion compensation prediction is used as a reference index, and the reference index is coded into the bitstream together with a differential motion vector.

[0154] <Motion compensation process based on normal predicted motion vector mode> 16 , when inter prediction information by the normal prediction motion vector mode derivation unit 301 is selected in the inter prediction mode determination unit 305, the motion compensation prediction unit 306 acquires this inter prediction information from the inter prediction mode determination unit 305, derives the inter prediction mode, reference index, and motion vector of the block currently being processed, and generates a motion compensation prediction signal. The generated motion compensation prediction signal is supplied to the prediction method determination unit 105.

[0155] 22, when a switch 408 is connected to the normal prediction motion vector mode derivation unit 401 during the decoding process, the motion compensation prediction unit 406 obtains inter prediction information from the normal prediction motion vector mode derivation unit 401, derives the inter prediction mode, reference index, and motion vector of the block currently being processed, and generates a motion compensation prediction signal. The generated motion compensation prediction signal is supplied to the decoded image signal superimposition unit 207.

[0156] <Motion compensation processing based on normal merge mode> 16 , when inter prediction information by the normal merge mode derivation unit 302 is selected in the inter prediction mode determination unit 305, the motion compensation prediction unit 306 acquires this inter prediction information from the inter prediction mode determination unit 305, derives the inter prediction mode, reference index, and motion vector of the block currently being processed, and generates a motion compensation prediction signal. The generated motion compensation prediction signal is supplied to the prediction method determination unit 105.

[0157] 22, when a switch 408 is connected to the normal merge mode derivation unit 402 during the decoding process, the motion compensation prediction unit 406 obtains inter prediction information from the normal merge mode derivation unit 402, derives an inter prediction mode, a reference index, and a motion vector of the block currently being processed, and generates a motion compensation prediction signal. The generated motion compensation prediction signal is supplied to the decoded image signal superimposition unit 207.

[0158] <Motion compensation process based on sub-block predicted motion vector mode> 16 , when inter prediction information is selected by the sub-block prediction motion vector mode derivation unit 303 in the inter prediction mode determination unit 305, the motion compensation prediction unit 306 acquires the inter prediction information from the inter prediction mode determination unit 305, derives the inter prediction mode, reference index, and motion vector of the block currently being processed, and generates a motion compensation prediction signal. The generated motion compensation prediction signal is supplied to the prediction method determination unit 105.

[0159] 22, when a switch 408 is connected to the sub-block prediction motion vector mode derivation unit 403 during the decoding process, the motion compensation prediction unit 406 obtains inter prediction information from the sub-block prediction motion vector mode derivation unit 403, derives the inter prediction mode, reference index, and motion vector of the block currently being processed, and generates a motion compensation prediction signal. The generated motion compensation prediction signal is supplied to the decoded image signal superimposition unit 207.

[0160] <Motion compensation processing based on sub-block merge mode> 16 , when inter prediction information is selected by the sub-block merge mode derivation unit 304 in the inter prediction mode determination unit 305, the motion compensation prediction unit 306 acquires the inter prediction information from the inter prediction mode determination unit 305, derives the inter prediction mode, reference index, and motion vector of the block currently being processed, and generates a motion compensation prediction signal. The generated motion compensation prediction signal is supplied to the prediction method determination unit 105.

[0161] 22, when a switch 408 is connected to the sub-block merging mode derivation unit 404 during the decoding process, the motion compensation prediction unit 406 obtains inter prediction information from the sub-block merging mode derivation unit 404, derives the inter prediction mode, reference index, and motion vector of the block currently being processed, and generates a motion compensation prediction signal. The generated motion compensation prediction signal is supplied to the decoded image signal superimposition unit 207.

[0162] <Motion compensation processing based on affine transformation prediction> In the normal prediction motion vector mode and normal merge mode, motion compensation using an affine model can be used based on the following flags. The following flags are reflected in the following flags based on the inter prediction conditions determined by the inter prediction mode determination unit 305 in the encoding process, and are encoded in the bitstream. In the decoding process, whether or not to perform motion compensation using an affine model is specified based on the following flags in the bitstream.

[0163] sps_affine_enabled_flag indicates whether or not motion compensation based on an affine model can be used in inter prediction. If sps_affine_enabled_flag is 0, motion compensation based on an affine model is suppressed on a sequence-by-sequence basis. In addition, inter_affine_flag and cu_affine_type_flag are not transmitted in the CU (coding block) syntax of the coded video sequence. If sps_affine_enabled_flag is 1, motion compensation based on an affine model can be used in the coded video sequence.

[0164] sps_affine_type_flag indicates whether or not motion compensation based on a 6-parameter affine model can be used in inter prediction. If sps_affine_type_flag is 0, motion compensation based on a 6-parameter affine model is suppressed. In addition, cu_affine_type_flag is not transmitted in the CU syntax of the coded video sequence. If sps_affine_type_flag is 1, motion compensation based on a 6-parameter affine model can be used in the coded video sequence. If sps_affine_type_flag does not exist, it is assumed to be 0.

[0165] When decoding a P or B slice, if inter_affine_flag is 1 in the currently processed CU, motion compensation based on the affine model is used to generate a motion compensation prediction signal for the currently processed CU. If inter_affine_flag is 0, the affine model is not used for the currently processed CU. If inter_affine_flag is not present, it is assumed to be 0.

[0166] When decoding a P or B slice, if cu_affine_type_flag is 1 for the currently processed CU, motion compensation based on a 6-parameter affine model is used to generate a motion compensation prediction signal for the currently processed CU. If cu_affine_type_flag is 0, motion compensation based on a 4-parameter affine model is used to generate a motion compensation prediction signal for the currently processed CU.

[0167] In motion compensation based on the affine model, reference indexes and motion vectors are derived for each subblock, and therefore a motion compensation prediction signal is generated using the reference indexes and motion vectors to be processed for each subblock.

[0168] The four-parameter affine model is a mode in which a motion vector for a subblock is derived from four parameters, the horizontal and vertical components of each motion vector of two control points, and motion compensation is performed on a subblock basis.

[0169] (Second embodiment)

[0170] Next, an image encoding device and an image decoding device according to a second embodiment will be described. The image encoding device and the image decoding device according to the first embodiment have the same configuration, but differ in the processing procedure of the history merging candidate derivation units 345 and 445. The processing procedure of the history merging candidate derivation units 345 and 445 is as shown in the flowchart of Fig. 39 instead of the flowchart of Fig. 30, and the differences will be described.

[0171] <History Merge Candidate Deriving Process in the Second Embodiment> The history merging candidate derivation process of the image encoding device and the image decoding device according to the second embodiment will be described with reference to the flowchart of FIG.

[0172] The second embodiment differs from the first embodiment in that only the spatial merge candidate A1 derived from the block A1 adjacent to the left side of the coding block to be processed and the spatial merge candidate B1 derived from the block B1 adjacent to the upper side are compared with the number of elements designated by the offset value hMvpIdxOffset from the last element (the most recently added element) of the history prediction motion vector candidate list. The flowchart of FIG. 30 showing the history merge candidate derivation process of the image coding device and the image decoding device according to the first embodiment is different in that steps S2306, S2307, and S2309 in FIG. 30 are changed to steps S2326, S2327, and S2329 in FIG. 39, respectively, and the other steps are the same. In the second embodiment, an initialization process is first performed (step S2301 in FIG. 39). A value of FALSE is set to each of the 0th to (numCurrMergeCand -1)th elements of isPruned[i], and the variable numOrigMergeCand is set to the number of elements currently registered in the merge candidate list, numCurrMergeCand.

[0173] Next, the initial value of index hMvpIdx is set to 1, and the addition process from step S2303 to step S2311 in FIG. 39 is repeated from this initial value to NumHmvpCand (steps S2302 to S2312 in FIG. 39). If the number of elements registered in the current merge candidate list, numCurrMergeCand, is not equal to or less than (maximum number of merge candidates, MaxNumMergeCand-1), merge candidates have been added to all elements in the merge candidate list, so this history merge candidate derivation process is terminated (step S2303 in FIG. 39: NO). If the number of elements registered in the current merge candidate list, numCurrMergeCand, is equal to or less than (maximum number of merge candidates, MaxNumMergeCand-1) (step S2303 in FIG. 39: YES), processing from step S2304 onwards is performed.

[0174] First, set the value of sameMotion to FALSE (step S2304 in FIG. 39). Next, when the index hMvpIdx is equal to or less than a predetermined offset value hMvpIdxOffset, that is, when checking whether the index is not included in the merge candidate list (step S2305 in FIG. 39: YES), set the initial value of the index i to 0, and perform the processes of steps S2327 and S2308 in FIG. 39 from this initial value to the smaller value of a predetermined upper limit value of 1 or numOrigMergeCand-1 (S2326 to S2329 in FIG. 39). Here, in the second embodiment, only the spatial merge candidate A1 derived from the block A1 adjacent to the left of the coding block to be processed and the spatial merge candidate B1 adjacent to the upper side are compared with the elements at the end of the history prediction motion vector candidate list (the most recently added elements) in the number of elements designated by the offset value hMvpIdxOffset. The reason why the predetermined upper limit is 1 is that the spatial merge candidate A1 derived from the block A1 adjacent to the left side of the coding block to be processed or the spatial merge candidate B1 adjacent to the upper side can only be stored at the 0th and 1st positions counting from 0 in the merge candidate list. The (NumHmvpCand-hMvpIdx)th element HmvpCandList[NumHmvpCand-hMvpIdx] counting from 0 in the history prediction motion vector candidate list is compared with the spatial merge candidates A1 and B1 (step S2327 in FIG. 39). It is compared whether the values ​​of all the components (inter prediction mode, reference indexes of L0 and L1, motion vectors of L0 and L1) of the merge candidates are the same. Here, the same value of the merge candidates indicates that the values ​​of all the components (inter prediction mode, reference indexes of L0 and L1, motion vectors of L0 and L1) of the merge candidates are the same.Therefore, in the comparison process of step S2327, when the i-th element mergeCandList[i] counting from 0 of the merge candidate list is the spatial merge candidate A1 derived from the adjacent block A1 on the left side or the spatial merge candidate B1 adjacent on the upper side, and isPruned[i] is FALSE, it is compared whether the values ​​of all the components (inter prediction mode, reference indexes of L0 and L1, motion vectors of L0 and L1) of mergeCandList[i] and HmvpCandList[NumHmvpCand-hMvpIdx] are the same. If the values ​​are the same (step S2327 in FIG. 39: YES), both sameMotion and isPruned[i] are set to TRUE (step S2308 in FIG. 39). Note that the flag isPruned[i] is a flag indicating that the i-th element counting from 0 of the merge candidate list is the same value as any element of the history predicted motion vector candidate list. If the values ​​are not the same (step S2327 in FIG. 39: NO), the process of step S2308 is skipped. After the repeated processes of steps S2326 to S2329 in FIG. 39 are completed, a comparison is made to see whether sameMotion is FALSE (step S2310 in FIG. 39), and if sameMotion is FALSE (step S2310 in FIG. 39: YES), the (NumHmvpCand - hMvpIdx)-th element HmvpCandList[NumHmvpCand - hMvpIdx] counting from 0 of the history motion vector predictor candidate list is added to the numCurrMergeCand-th mergeCandList[numCurrMergeCand] of the merge candidate list, and numCurrMergeCand is incremented by 1 (step S2311 in FIG. 39). The index hMvpIdx is incremented by 1 (step S2302 in FIG. 39), and steps S2302 to S2312 in FIG. 39 are repeated.

[0175] When all elements in the history motion vector predictor candidate list have been checked, or when merge candidates have been added to all elements in the merge candidate list, this history merge candidate derivation process is completed.

[0176] In the second embodiment, the spatial merge candidates A1 and B1 stored in the merge candidate list are compared with elements of the historical prediction motion vector candidate list. However, the spatial merge candidates A1 and B1 may be stored in a memory other than the merge candidate list, and the spatial merge candidates A1 and B1 stored in the memory other than the merge candidate list may be compared with elements of the historical prediction motion vector candidate list.

[0177] (Third embodiment) Next, an image encoding device and an image decoding device according to the third embodiment will be described. The image encoding device and the image decoding device according to the first embodiment have the same configuration, but are different in the same element confirmation processing procedure in the history prediction motion vector candidate list initialization / update processing procedure provided in the encoding side encoding information storage memory 111 and the decoding side encoding information storage memory 205. Instead of the same element confirmation processing procedure in the history prediction motion vector candidate list initialization / update processing procedure of the first embodiment shown in the flowchart of FIG. 27, the same element confirmation processing procedure in the history prediction motion vector candidate list initialization / update processing procedure of the third embodiment is as shown in the flowchart of FIG. 40, and the differences between them will be described.

[0178] <Procedure for checking identical elements in procedure for initializing and updating a history predicted motion vector candidate list in the third embodiment> The procedure of the identical element checking process in the procedure of the historical motion vector predictor candidate list initialization / update process in the image encoding device and the image decoding device according to the third embodiment will be described with reference to the flowchart in FIG.

[0179] In the third embodiment, in the history motion vector predictor candidate list update process, when the maximum number of elements is added to the history motion vector predictor candidate list HmvpCandList, that is, when the current number of history motion vector predictor candidates NumHmvpCand reaches the maximum number of history motion vector predictor candidates MaxNumHmvpCand, the first element included in the history motion vector predictor candidate list, that is, the 0th element counting from 0 (history motion vector predictor candidate) is not compared, and only the first and subsequent elements are compared, which is different from the first embodiment. The elements included in the history motion vector predictor candidate list are composed of an inter prediction mode, a reference index, and a motion vector. By not comparing the first element included in the history motion vector predictor candidate list, the number of times elements are compared is limited to a maximum of (MaxNumHmvpCand - 1), thereby reducing the maximum amount of processing involved in comparing elements. 40 is the same process as that in the flowchart of Figure 27, which is the same element confirmation processing procedure in the history predicted motion vector candidate list initialization / update processing procedure of the first embodiment, except that steps S2122 and S2125 in Figure 27 are changed to steps S2132 and S2135 in Figure 40, respectively.

[0180] Also in the third embodiment, when the value of the number of history motion vector predictor candidates NumHmvpCand is 0 (step S2121 in FIG. 40: NO), the history motion vector predictor candidate list HmvpCandList is empty and no identical candidates exist, so steps S2132 to S2135 in FIG. 40 are skipped and the identical element confirmation process procedure ends. When the value of the number of history motion vector predictor candidates NumHmvpCand is greater than 0 (step S2121 in FIG. 40: YES), the process of step S2123 is repeated from 0 or 1 to NumHmvpCand-1 for the history motion vector predictor index hMvpIdx (steps S2132 to S2135 in FIG. 40). First, when the current number of history prediction motion vector candidates NumHmvpCand is less than the maximum number of history prediction motion vector candidates MaxNumHmvpCand, the first element included in the history prediction motion vector candidate list, i.e., the 0th element counting from 0 (history prediction motion vector candidate), is compared, so hMvpIdx is set to 0. On the other hand, when the current number of history prediction motion vector candidates NumHmvpCand has reached the maximum number of history prediction motion vector candidates MaxNumHmvpCand, the first element included in the history prediction motion vector candidate list, i.e., the 0th element counting from 0 (history prediction motion vector candidate), is not compared, so hMvpIdx is set to 1 (step S2132 in FIG. 40). Next, a comparison is made as to whether or not the hMvpIdx-th element HmvpCandList[hMvpIdx] counting from 0 of the history prediction motion vector candidate list is the same as the inter prediction information candidate hMvpCand to be registered (step S2123 in FIG. 40). If they are identical (step S2123 in FIG. 40: YES), a flag identicalCandExist indicating whether an identical candidate exists is set to TRUE, the deletion target index removeIdx is set to the value of hMvpIdx, and this identical element confirmation process ends. If they are not identical (step S2123 in FIG. 40: NO), hMvpIdx is incremented by 1, and if the historical predicted motion vector index hMvpIdx is equal to or less than NumHmvpCand-1, the processes from step S2123 onwards are performed (steps S2132 to S2135 in FIG. 40).

[0181] (Fourth embodiment) Next, an image encoding device and an image decoding device according to a fourth embodiment will be described. The image encoding device and the image decoding device according to the fourth embodiment have the same configuration, but are different in the same element confirmation processing procedure in the history prediction motion vector candidate list initialization / update processing procedure provided in the encoding side encoding information storage memory 111 and the decoding side encoding information storage memory 205. Instead of the same element confirmation processing procedure in the history prediction motion vector candidate list initialization / update processing procedure of the first embodiment shown in the flowchart of FIG. 27, the same element confirmation processing procedure in the history prediction motion vector candidate list initialization / update processing procedure of the fourth embodiment is as shown in the flowchart of FIG. 41, and the differences between them will be described.

[0182] <Procedure for checking identical elements in procedure for initializing and updating the history predicted motion vector candidate list in the fourth embodiment> The procedure of the identical element checking process in the procedure of the historical motion vector predictor candidate list initialization / update process in the image encoding device and the image decoding device according to the fourth embodiment will be described with reference to the flowchart in FIG.

[0183] The fourth embodiment differs from the first and third embodiments in that, in the history motion vector predictor candidate list update process, elements are compared in descending order from the last element of the history motion vector predictor candidate list. Furthermore, in the history motion vector predictor candidate list update process, when the maximum number of elements is added to the history motion vector predictor candidate list HmvpCandList, the first element included in the history motion vector predictor candidate list, that is, the 0th element counting from 0, is not compared, and only the first and subsequent elements are compared. The elements included in the history motion vector predictor candidate list are composed of an inter prediction mode, a reference index, and a motion vector. By not comparing the first element included in the history motion vector predictor candidate list, the number of comparisons of elements is limited to a maximum of (MaxNumHmvpCand - 1), thereby reducing the maximum amount of processing involved in comparing elements.

[0184] Also in the fourth embodiment, when the value of the number of history motion vector predictor candidates NumHmvpCand is 0 (step S2151 in FIG. 41: NO), the history motion vector predictor candidate list HmvpCandList is empty and no identical candidates exist, so steps S2152 to S2155 in FIG. 41 are skipped and the identical element confirmation process procedure is terminated. When the value of the number of history motion vector predictor candidates NumHmvpCand is greater than 0 (step S2152 in FIG. 41: YES), the process of step S2153 is repeated from 1 until the index i becomes the smaller value of the maximum number of history motion vector predictor candidates MaxNumHmvpCand-1 or the number of history motion vector predictor candidates NumHmvpCand (steps S2152 to S2155 in FIG. 41). First, the NumHmvpCand-i-th element HmvpCandList[NumHmvpCand-i] of the history predicted motion vector candidate list, counting from 0, is compared to determine whether it is identical to the inter prediction information candidate hMvpCand to be registered (step S2153 in FIG. 41). If they are identical (step S2153 in FIG. 41: YES), a flag identicalCandExist indicating whether an identical candidate exists is set to TRUE, a deletion target index removeIdx is set to the value of NumHmvpCand-i, and this identical element confirmation process is terminated (step S2154 in FIG. 41). If they are not the same (step S2153 in FIG. 41: NO), i is incremented by 1, and if i is equal to or less than the smaller value of the maximum number of historical motion vector predictor candidates MaxNumHmvpCand-1 or the number of historical motion vector predictor candidates NumHmvpCand, processing from step S2153 onwards is performed (steps S2152 to S2155 in FIG. 41). Note that when index i is the initial value 1, the NumHmvpCand-i-th element HmvpCandList[NumHmvpCand-i] counting from 0 in the historical motion vector predictor candidate list indicates the last element registered in the historical motion vector predictor candidate list, and as index i is incremented by 1, the elements of the historical motion vector predictor candidate list are displayed in descending order.By setting the index i to a maximum of (MaxNumHmvpCand - 1), the first element HMVPCandList[0] of the historical motion vector predictor candidates is not compared.

[0185] All of the above-described embodiments may be combined in multiple forms.

[0186] In all the embodiments described above, the bit stream output by the image coding device has a specific data format so that it can be decoded according to the coding method used in the embodiment, and the image decoding device corresponding to the image coding device can decode the bit stream in the specific data format.

[0187] When a wired or wireless network is used to exchange a bitstream between an image encoding device and an image decoding device, the bitstream may be converted into a data format suitable for the transmission mode of the communication channel before being transmitted. In this case, a transmitting device is provided that converts the bitstream output by the image encoding device into coded data in a data format suitable for the transmission mode of the communication channel and transmits the coded data to the network, and a receiving device is provided that receives the coded data from the network, restores the coded data to a bitstream, and supplies the bitstream to the image decoding device. The transmitting device includes a memory that buffers the bitstream output by the image encoding device, a packet processing unit that packetizes the bitstream, and a transmitting unit that transmits the packetized coded data via the network. The receiving device includes a receiving unit that receives the packetized coded data via the network, a memory that buffers the received coded data, and a packet processing unit that packetizes the coded data to generate a bitstream and provides it to the image decoding device.

[0188] Moreover, a display unit for displaying an image decoded by the image decoding device may be added to the configuration to form a display device. In this case, the display unit reads out the decoded image signal generated by the decoded image signal superimposition unit 207 and stored in the decoded image memory 208, and displays it on a screen.

[0189] Moreover, an imaging unit may be added to the configuration and the captured image may be input to the image coding device to form an imaging device. In this case, the imaging unit inputs a captured image signal to the block division unit 101.

[0190] 37 shows an example of a hardware configuration of a coding / decoding device according to the present embodiment. The coding / decoding device includes the configurations of an image coding device and an image decoding device according to the embodiment of the present invention. The coding / decoding device 9000 includes a CPU 9001, a codec IC 9002, an I / O interface 9003, a memory 9004, an optical disk drive 9005, a network interface 9006, and a video interface 9009, and each unit is connected by a bus 9010.

[0191] The image encoding unit 9007 and the image decoding unit 9008 are typically implemented as a codec IC 9002. The image encoding process of the image encoding device according to the embodiment of the present invention is executed by the image encoding unit 9007, and the image decoding process of the image decoding device according to the embodiment of the present invention is executed by the image decoding unit 9008. The I / O interface 9003 is realized by, for example, a USB interface, and is connected to an external keyboard 9104, mouse 9105, etc. The CPU 9001 controls the encoding / decoding device 9000 so as to execute an operation desired by the user based on a user operation input via the I / O interface 9003. The user operation by the keyboard 9104, mouse 9105, etc. includes a selection of whether to execute an encoding or decoding function, a setting of encoding quality, an input / output destination of a bit stream, an input / output destination of an image, etc.

[0192] When a user desires to play back an image recorded on the disc recording medium 9100, the optical disc drive 9005 reads a bit stream from the inserted disc recording medium 9100 and sends the read bit stream to an image decoding unit 9008 of the codec IC 9002 via a bus 9010. The image decoding unit 9008 executes image decoding processing in the image decoding device according to the embodiment of the present invention on the input bit stream, and sends the decoded image to an external monitor 9103 via a video interface 9009. The encoding / decoding device 9000 also has a network interface 9006, and can be connected to an external distribution server 9106 or a mobile terminal 9107 via a network 9101. When a user desires to play back an image recorded on the distribution server 9106 or the mobile terminal 9107 instead of the image recorded on the disc recording medium 9100, the network interface 9006 acquires the bit stream from the network 9101 instead of reading the bit stream from the input disc recording medium 9100. Furthermore, when a user wishes to play back the image recorded in memory 9004, an image decoding process is executed on the bitstream recorded in memory 9004 in an image decoding device according to an embodiment of the present invention.

[0193] When a user desires to encode an image captured by an external camera 9102 and record the encoded image in memory 9004, the video interface 9009 inputs the image from the camera 9102 and sends the image to an image encoding unit 9007 of the codec IC 9002 via a bus 9010. The image encoding unit 9007 executes image encoding processing in the image encoding device according to the embodiment of the present invention on the image input via the video interface 9009 to generate a bitstream. The image encoding unit 9007 then sends the bitstream to the memory 9004 via the bus 9010. When a user desires to record the bitstream in the disc recording medium 9100 instead of the memory 9004, the optical disc drive 9005 writes the bitstream to the inserted disc recording medium 9100.

[0194] It is also possible to realize a hardware configuration having an image encoding device but not an image decoding device, or a hardware configuration having an image decoding device but not an image encoding device. Such a hardware configuration can be realized, for example, by replacing the codec IC 9002 with an image encoding unit 9007 or an image decoding unit 9008, respectively.

[0195] The above-mentioned encoding and decoding processes may be realized not only as a transmission, storage, and receiving device using hardware, but also as firmware stored in a ROM (read-only memory) or flash memory, or as software for a computer, etc. The firmware program or software program may be provided by recording it on a recording medium readable by a computer, etc., or may be provided from a server via a wired or wireless network, or may be provided as data broadcasting of terrestrial or satellite digital broadcasting.

[0196] The present invention has been described above based on the embodiments. The embodiments are merely examples, and it will be understood by those skilled in the art that various modifications are possible in the combination of each component and each treatment process, and that such modifications are also within the scope of the present invention. [Explanation of symbols]

[0197] 100 image encoding device, 101 block division unit, 102 inter prediction unit, 103 intra prediction unit, 104 decoded image memory, 105 prediction method determination unit, 106 residual generation unit, 107 orthogonal transform / quantization unit, 108 bit string encoding unit, 109 inverse quantization / inverse orthogonal transform unit, 110 decoded image signal superposition unit, 111 encoded information storage memory, 200 image decoding device, 201 bit string decoding unit, 202 block division unit, 203 inter prediction unit 204 intra prediction unit, 205 encoded information storage memory 206 inverse quantization / inverse orthogonal transform unit, 207 decoded image signal superposition unit, 208 decoded image memory.< / poc>

Claims

1. An image encoding device that encodes a moving image by using inter prediction based on inter prediction information on a block-by-block basis to generate a bit stream, comprising: an encoding information storage unit that stores inter prediction information used in inter prediction of an encoded block in a history predicted motion vector candidate list; a spatial merge candidate derivation unit that derives spatial merge candidates from inter prediction information of blocks spatially adjacent to the block to be encoded, and registers the spatial merge candidates in a merge candidate list; a history merge candidate derivation unit that derives history merge candidates from the inter prediction information stored in the history predicted motion vector candidate list, and registers the history merge candidates in the merge candidate list; an average merge candidate derivation unit that derives an average merge candidate from the merge candidate list and registers the average merge candidate in the merge candidate list; Equipped with The history merge candidate derivation unit compares a predetermined number of inter prediction information from the back among the inter prediction information stored in the history predicted motion vector candidate list with the inter prediction information of the spatial merge candidate, and when values ​​of the inter prediction information are different, selects the inter prediction information as the history merge candidate, and selects inter prediction information further forward than the predetermined number from the back as the history merge candidate without comparing the inter prediction information of the spatial merge candidate.

1. An image encoding device comprising:

2. 1. An image coding method for coding a moving image on a block-by-block basis using inter prediction based on inter prediction information to generate a bit stream, comprising: an encoding information storing step of storing inter prediction information used in the inter prediction of the encoded block in a history predicted motion vector candidate list; a spatial merge candidate derivation step of deriving spatial merge candidates from inter prediction information of blocks spatially adjacent to the encoding target block, and registering the spatial merge candidates in a merge candidate list; a history merge candidate derivation step of deriving a history merge candidate from the inter prediction information stored in the history predicted motion vector candidate list, and registering the history merge candidate in the merge candidate list; an average merging candidate derivation step of deriving an average merging candidate from the merging candidate list and registering the average merging candidate in the merging candidate list; Equipped with The history merge candidate derivation step compares a predetermined number of inter prediction information from the back among the inter prediction information stored in the history predicted motion vector candidate list with the inter prediction information of the spatial merge candidate, and when values ​​of the inter prediction information are different, selects the inter prediction information as the history merge candidate, and selects inter prediction information further forward than the predetermined number from the back as the history merge candidate without comparing the inter prediction information with the inter prediction information of the spatial merge candidate.

13. An image coding method comprising:

3. An image decoding device that decodes an encoded bit string obtained by encoding a moving image block by block using inter prediction, comprising: an encoding information storage unit that stores inter prediction information used in inter prediction of a decoded block in a history predicted motion vector candidate list; a spatial merge candidate derivation unit that derives spatial merge candidates from inter prediction information of blocks spatially adjacent to the block to be decoded, and registers the spatial merge candidates in a merge candidate list; a history merge candidate derivation unit that derives history merge candidates from the inter prediction information stored in the history predicted motion vector candidate list, and registers the history merge candidates in the merge candidate list; an average merge candidate derivation unit that derives an average merge candidate from the merge candidate list and registers the average merge candidate in the merge candidate list; Equipped with The history merge candidate derivation unit compares a predetermined number of inter prediction information from the back among the inter prediction information stored in the history predicted motion vector candidate list with the inter prediction information of the spatial merge candidate, and when values ​​of the inter prediction information are different, selects the inter prediction information as the history merge candidate, and selects inter prediction information further forward than the predetermined number from the back as the history merge candidate without comparing the inter prediction information of the spatial merge candidate.

2. An image decoding device comprising:

4. 1. An image decoding method for decoding an encoded bitstream obtained by encoding a moving image block by block using inter prediction, comprising: an encoding information storing step of storing inter prediction information used in the inter prediction of the decoded block in a history predicted motion vector candidate list; a spatial merge candidate derivation step of deriving spatial merge candidates from inter prediction information of blocks spatially adjacent to the block to be decoded and registering the spatial merge candidates in a merge candidate list; a history merge candidate derivation step of deriving a history merge candidate from the inter prediction information stored in the history predicted motion vector candidate list, and registering the history merge candidate in the merge candidate list; an average merging candidate derivation step of deriving an average merging candidate from the merging candidate list and registering the average merging candidate in the merging candidate list; Equipped with The history merge candidate derivation step compares a predetermined number of inter prediction information from the back among the inter prediction information stored in the history predicted motion vector candidate list with the inter prediction information of the spatial merge candidate, and when values ​​of the inter prediction information are different, selects the inter prediction information as the history merge candidate, and selects inter prediction information further forward than the predetermined number from the back as the history merge candidate without comparing the inter prediction information with the inter prediction information of the spatial merge candidate.

2. An image decoding method comprising:

5. A transmission method for transmitting a bitstream generated by an image encoding device, comprising the steps of: an encoding information storing step of storing inter prediction information used in the inter prediction of the encoded block in a history predicted motion vector candidate list; a spatial merge candidate derivation step of deriving spatial merge candidates from inter prediction information of blocks spatially adjacent to the encoding target block, and registering the spatial merge candidates in a merge candidate list; a history merge candidate derivation step of deriving a history merge candidate from the inter prediction information stored in the history predicted motion vector candidate list, and registering the history merge candidate in the merge candidate list; an average merging candidate derivation step of deriving an average merging candidate from the merging candidate list and registering the average merging candidate in the merging candidate list; a bitstream generating step of encoding the encoding information to generate a bitstream; a bitstream transmission step of transmitting the bitstream; Equipped with The history merge candidate derivation step compares a predetermined number of inter prediction information from the back among the inter prediction information stored in the history predicted motion vector candidate list with the inter prediction information of the spatial merge candidate, and when values ​​of the inter prediction information are different, selects the inter prediction information as the history merge candidate, and selects inter prediction information further forward than the predetermined number from the back as the history merge candidate without comparing the inter prediction information with the inter prediction information of the spatial merge candidate. A transmission method comprising:

6. A recording method for recording a bit stream generated by an image encoding device onto a recording medium, comprising the steps of: an encoding information storing step of storing inter prediction information used in the inter prediction of the encoded block in a history predicted motion vector candidate list; a spatial merge candidate derivation step of deriving spatial merge candidates from inter prediction information of blocks spatially adjacent to the encoding target block, and registering the spatial merge candidates in a merge candidate list; a history merge candidate derivation step of deriving a history merge candidate from the inter prediction information stored in the history predicted motion vector candidate list, and registering the history merge candidate in the merge candidate list; an average merging candidate derivation step of deriving an average merging candidate from the merging candidate list and registering the average merging candidate in the merging candidate list; a bitstream generating step of encoding the encoding information to generate a bitstream; a bitstream recording step of recording the bitstream on the recording medium; Equipped with The history merge candidate derivation step compares a predetermined number of inter prediction information from the back among the inter prediction information stored in the history predicted motion vector candidate list with the inter prediction information of the spatial merge candidate, and when values ​​of the inter prediction information are different, selects the inter prediction information as the history merge candidate, and selects inter prediction information further forward than the predetermined number from the back as the history merge candidate without comparing the inter prediction information with the inter prediction information of the spatial merge candidate. A recording method comprising:

Citation Information

Patent Citations

  • Moving image coding / decoding device using moving compensation inter-frame prediction system employing affine transformation

    JP1997172644A

  • Step motor and indicator instrument for vehicle

    US20200003278A1

  • Update of look up table: FIFO, constrained FIFO

    WO2020003278A1

  • Simplified history based motion vector prediction

    WO2020065517A1

  • Method and device for processing video signal on basis of history-based motion vector prediction

    WO2020122640A1