Moving image encoding device, moving image encoding method, moving image decoding device, moving image decoding method, transmission method, and storage method

The method addresses high processing loads in image encoding by adding temporal and historical motion information candidates to a list without comparison, resulting in efficient image encoding and decoding.

JP2025169398AActive Publication Date: 2025-11-12GODO KAISHA IP BRIDGE 1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2025137086
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2019-04-24
Filing Date
2025-08-20
Publication Date
2025-11-12
Estimated Expiration
2039-12-27

Smart Images

  • Figure 2025169398000001_ABST
    Figure 2025169398000001_ABST
Patent Text Reader

Abstract

To provide a technique to improve encoding efficiency by performing block division suitable for image encoding and decoding.SOLUTION: A moving image encoding device encodes moving images block by block to generate a bit stream, and comprises: a temporal motion information candidate derivation unit that adds, to a motion information candidate list, temporal motion information candidates derived from motion information of a block in a picture that is different in time from a block to be encoded; a history motion information candidate derivation unit that adds, to the motion information candidate list, history motion information candidates registered in a history motion information candidate list; and a predicted motion information candidate replenishment unit that adds motion information with a predetermined value until the number of pieces of motion information registered in the motion information candidate list reaches a predetermined number. The history motion information candidate derivation unit does not compare the motion information with the motion information candidate list, and adds, to the motion information candidate list, the history motion information candidate registered in the history motion information candidate list, in the order from old motion information to new motion information.SELECTED DRAWING: Figure 1
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 sets of a predetermined 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), encoding efficiency can be improved.

[0003] In video encoding and decoding, coding efficiency is improved by inter-prediction, which predicts from pictures that have already been encoded and decoded. Patent Document 1 describes a technique for applying affine transformation during inter-prediction. It is not uncommon for objects in video to undergo deformations such as scaling and rotation, and applying the technique in Patent Document 1 enables efficient encoding. [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, which results in 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, a video encoding device of one embodiment of the present invention is a video encoding device that encodes images on a block-by-block basis and generates a bitstream, and is equipped with a temporal motion information candidate derivation unit that adds temporal motion information candidates derived from motion information of blocks in a picture that is at a different time from the block to be encoded to a motion information candidate list, a historical motion information candidate derivation unit that adds historical motion information candidates registered in the historical motion information candidate list to the motion information candidate list, and a predicted motion information candidate supplementation unit that adds motion information of a predetermined value until the number of motion information registered in the motion information candidate list reaches a predetermined number, and the historical motion information candidate derivation unit does not compare motion information with the motion information candidate list, but adds the historical motion information candidates to the motion information candidate list in order from oldest to newest among the motion information registered in the historical motion information candidate list.

[0007] Another aspect of the video encoding method of the present invention is a video encoding method that encodes video on a block-by-block basis and generates a bitstream, and includes a temporal motion information candidate derivation step that adds temporal motion information candidates derived from motion information of blocks in a picture that is at a different time from the block to be encoded to a motion information candidate list; a historical motion information candidate derivation step that adds historical motion information candidates registered in the historical motion information candidate list to the motion information candidate list; and a predictive motion information candidate supplementation step that adds motion information of a predetermined value until the number of motion information registered in the motion information candidate list reaches a predetermined number.In the historical motion information candidate derivation step, no comparison of motion information with the motion information candidate list is performed, and the historical motion information candidates are added to the motion information candidate list in order from oldest to newest of the motion information registered in the historical motion information candidate list.

[0008] Another aspect of the video decoding device of the present invention is a video decoding device that decodes an encoded bit sequence in which a video is encoded on a block-by-block basis, and includes a temporal motion information candidate derivation unit that adds temporal motion information candidates derived from motion information of blocks in a picture that is at a different time from the block to be decoded to a motion information candidate list, a historical motion information candidate derivation unit that adds historical motion information candidates registered in the historical motion information candidate list to the motion information candidate list, and a predicted motion information candidate supplementation unit that adds motion information of a predetermined value until the number of motion information registered in the motion information candidate list reaches a predetermined number, and the historical motion information candidate derivation unit does not compare motion information with the motion information candidate list, but adds the historical motion information candidates to the motion information candidate list in order from oldest to newest among the motion information registered in the historical motion information candidate list.

[0009] Another aspect of the video decoding method of the present invention is a video decoding method for decoding an encoded bit sequence in which a video is encoded on a block-by-block basis, and includes a temporal motion information candidate derivation step for adding a temporal motion information candidate derived from motion information of a block in a picture that is at a different time from the block to be decoded to a motion information candidate list; a historical motion information candidate derivation step for adding historical motion information candidates registered in the historical motion information candidate list to the motion information candidate list; and a predictive motion information candidate supplementation step for adding motion information of a predetermined value until the number of motion information registered in the motion information candidate list reaches a predetermined number, wherein in the historical motion information candidate derivation step, no comparison of motion information with the motion information candidate list is performed, and the historical motion information candidates are added to the motion information candidate list in order from oldest to newest of the motion information registered in the historical motion information candidate list.

[0010] Another aspect of the transmission method of the present invention is a transmission method for transmitting a bitstream, comprising: a temporal motion information candidate derivation step for adding a temporal motion information candidate derived from motion information of a block in a picture that is at a different time from the block to be encoded to a motion information candidate list; a historical motion information candidate derivation step for adding historical motion information candidates registered in the historical motion information candidate list to the motion information candidate list; a predictive motion information candidate supplementation step for adding motion information of a predetermined value until the number of motion information registered in the motion information candidate list reaches a predetermined number; an encoding step for encoding information indicating the prediction mode of the block to generate a bitstream; and a transmission step for transmitting the bitstream, wherein in the historical motion information candidate derivation step, no comparison of motion information with the motion information candidate list is performed, and the historical motion information candidates are added to the motion information candidate list in order from oldest to newest among the motion information registered in the historical motion information candidate list.

[0011] Another aspect of the storage method of the present invention is a storage method for storing a bitstream on a recording medium, comprising: a temporal motion information candidate derivation step for adding temporal motion information candidates derived from motion information of blocks in a picture that is time different from the block to be encoded to a motion information candidate list; a historical motion information candidate derivation step for adding historical motion information candidates registered in the historical motion information candidate list to the motion information candidate list; a predictive motion information candidate supplementation step for adding motion information of predetermined values ​​until the number of motion information registered in the motion information candidate list reaches a predetermined number; an encoding step for encoding information indicating the prediction mode of the block to generate a bitstream; and a storage step for storing the bitstream on a recording medium, wherein in the historical motion information candidate derivation step, no comparison of motion information with the motion information candidate list is performed, and the historical motion information candidates are added to the motion information candidate list in order from oldest to newest among the motion information registered in the historical motion information candidate list. [Effects of the Invention]

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

[0013] [Figure 1] 1 is a block diagram of an image encoding device according to an embodiment of the present invention; [Figure 2] 1 is a block diagram of an image decoding device according to an embodiment of the present invention. [Figure 3] 10 is a flowchart illustrating an operation of dividing a tree block. [Figure 4] FIG. 10 is a diagram illustrating how an input image is divided into tree blocks. [Figure 5] FIG. 1 is a diagram illustrating a z-scan. [Figure 6A] FIG. 10 is a diagram showing the divided shapes of blocks. [Figure 6B] FIG. 10 is a diagram showing the divided shapes of blocks. [Figure 6C] FIG. 10 is a diagram showing the divided shapes of blocks. [Figure 6D] FIG. 10 is a diagram showing the divided shapes of blocks. [Figure 6E] FIG. 10 is a diagram showing the divided shapes of blocks. [Figure 7] 10 is a flowchart illustrating an operation of dividing a block into four parts. [Figure 8] 10 is a flowchart illustrating an operation of dividing a block into two or three parts. [Figure 9] This is a syntax for expressing the shape of block division. [Figure 10A] FIG. 10 is a diagram illustrating intra prediction. [Figure 10B] FIG. 10 is a diagram illustrating intra prediction. [Figure 11] FIG. 10 is a diagram illustrating a reference block for inter prediction. [Figure 12] This is a syntax for expressing a coding block prediction mode. [Figure 13]FIG. 10 is a diagram showing correspondence between syntax elements and modes related to inter prediction. [Figure 14] FIG. 10 is a diagram for explaining affine transformation motion compensation of two control points. [Figure 15] FIG. 10 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] FIG. 17 is a block diagram showing a detailed configuration of a normal predicted motion vector mode derivation unit 301 in FIG. [Figure 18] FIG. 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] 10 is a flowchart showing a processing procedure of a normal predicted motion vector mode derivation process. [Figure 21] 10 is a flowchart illustrating a processing procedure for normal merge mode derivation processing. [Figure 22] FIG. 3 is a block diagram showing a detailed configuration of an inter prediction unit 203 in FIG. 2. [Figure 23] FIG. 23 is a block diagram showing a detailed configuration of a normal predicted motion vector mode derivation unit 401 in FIG. 22. [Figure 24] FIG. 23 is a block diagram showing a detailed configuration of a normal merge mode derivation unit 402 in FIG. 22. [Figure 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 of FIG. 22. [Figure 26] FIG. 10 is a diagram illustrating a procedure for initializing and updating a history motion vector predictor candidate list. [Figure 27] 10 is a flowchart of a procedure for checking identical elements in the procedure for initializing and updating a history motion vector predictor candidate list. [Figure 28]10 is a flowchart of an element shifting process procedure in the history motion vector predictor candidate list initialization / update process procedure. [Figure 29] 10 is a flowchart illustrating a procedure for deriving a historical motion vector predictor candidate. [Figure 30] 10 is a flowchart illustrating a history merge candidate derivation process procedure. [Figure 31A] FIG. 10 is a diagram illustrating an example of a history motion vector predictor candidate list update process. [Figure 31B] FIG. 10 is a diagram illustrating an example of a history motion vector predictor candidate list update process. [Figure 31C] FIG. 10 is a diagram illustrating an example of a history motion vector predictor candidate list update process. [Figure 32] FIG. 10 is a diagram illustrating motion compensation prediction in the case of L0 prediction in which the L0 reference picture (RefL0Pic) is located at a time earlier than the current picture (CurPic). [Figure 33] FIG. 10 is a diagram illustrating motion compensation prediction in the case where L0 prediction is performed and the reference picture for L0 prediction is located at a later time than the current picture. [Figure 34] FIG. 10 is a diagram illustrating the prediction direction of motion compensation prediction in bi-prediction, where the reference picture for L0 prediction is located at a time earlier than the current picture to be processed, and the reference picture for L1 prediction is located at a time later than the current picture to be processed. [Figure 35] FIG. 10 is a diagram illustrating the prediction direction of motion compensation prediction in bi-prediction when the reference picture for L0 prediction and the reference picture for L1 prediction are located at a time earlier than the current picture. [Figure 36] FIG. 10 is a diagram illustrating the prediction direction of motion compensation prediction in bi-prediction when the reference picture for L0 prediction and the reference picture for L1 prediction are located at a time later than the current picture. [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 38]This is a flowchart explaining the procedure for deriving a historical predicted motion vector candidate when a historical predicted motion vector candidate list is used while sequentially referring to motion information from the oldest to the most recently added motion information, and the same candidate deletion process is not performed. [Figure 39] 10 is a flowchart of an element shift / addition process procedure for a history motion vector predictor candidate list. [Figure 40] This is a flowchart explaining the procedure for deriving a history merge candidate when a history predicted motion vector candidate list is used while sequentially referring to motion information from the oldest to the most recently added motion information, and the same candidate deletion process is not performed. [Figure 41] FIG. 10 is a diagram illustrating the configuration of a history motion vector predictor candidate list. [Figure 42] FIG. 10 is a diagram for explaining how the top element is deleted when adding to a history motion vector predictor candidate list. [Figure 43] FIG. 10 is a diagram for explaining how elements are shifted within a list when adding to a history motion vector predictor candidate list. [Figure 44] FIG. 10 is a diagram for explaining how a new element is added to a historical motion vector predictor candidate list. [Figure 45] FIG. 10 is a diagram for explaining the reference order of a historical motion vector predictor candidate list. [Figure 46] FIG. 10 is a diagram for explaining the reference order of a historical motion vector predictor candidate list. [Figure 47] 10 is a flowchart illustrating a procedure for deriving a historical motion vector predictor candidate when a historical motion vector predictor candidate list is used while being referenced in the reverse order of storage, and a configuration is configured such that identical candidate deletion processing is not performed. [Figure 48] 10 is a flowchart illustrating a procedure for deriving a historical motion vector predictor candidate when a configuration is configured to perform identical candidate deletion processing by using a historical motion vector predictor candidate list while referring to the list in the reverse order to the storage order. DETAILED DESCRIPTION OF THE INVENTION

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

[0015] <Tree Block> In this embodiment, an image to be encoded or decoded is divided equally into predetermined units. These units are defined as tree blocks. In FIG. 4, the size of the tree blocks is 128x128 pixels, but the size of the tree blocks is not limited to this and may be set to any size. The tree blocks to be processed (corresponding to the target to be encoded in the encoding process and the target to be decoded in the decoding process) are switched in raster scan order, i.e., from left to right and from top to bottom. Each tree block can be further recursively divided. A block to be encoded or decoded after recursively dividing a tree block is defined as a coding block. Furthermore, tree blocks and coding blocks are collectively defined as blocks. Efficient coding is achieved by appropriate block division. The size of the tree blocks can be a fixed value pre-determined between the encoding device and the decoding device, or the tree block size determined by the encoding device can be transmitted to the decoding device. Here, the maximum tree block size is 128x128 pixels, and the minimum tree block size 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, switching is performed between intra prediction (MODE_INTRA) that performs prediction from the processed image signal of the image to be processed and inter prediction (MODE_INTER) that performs prediction 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 decoded a signal for which encoding has been completed, and in the decoding process, it is used as an image, image signal, tree block, block, coding block, etc., for which decoding has been completed. A mode that distinguishes between the intra prediction (MODE_INTRA) and the inter prediction (MODE_INTER) is defined as a prediction mode (PredMode). The prediction mode (PredMode) has either the intra prediction (MODE_INTRA) or the inter prediction (MODE_INTER) as a value.

[0017] <Inter prediction> Inter prediction, which performs prediction from the image signal of a processed image, can use multiple processed images as reference pictures. 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 the reference picture. L0 prediction (Pred_L0) is available for P slices. L0 prediction (Pred_L0), L1 prediction (Pred_L1), and bi-prediction (Pred_BI) are available for B slices. L0 prediction (Pred_L0) is inter-prediction that references a reference picture managed by L0, while L1 prediction (Pred_L1) is inter-prediction that references a reference picture managed by L1. Bi-prediction (Pred_BI) is inter-prediction in which both L0 prediction and L1 prediction are performed, referencing one reference picture managed by L0 and one reference picture managed by L1. Information specifying L0 prediction, L1 prediction, or bi-prediction is defined as the inter-prediction mode. In the following 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 specifying 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 candidate predicted motion vector 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 (vicinity) of the block to be processed, and an index for specifying 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] Spatial merge candidates are defined as processed blocks adjacent to the current block and their inter-prediction information. Temporal merge candidates are defined as blocks in the processed image that are located at or near the same position as the current block and their inter-prediction information. Each merge candidate is registered in a merge candidate list, and a merge index identifies the merge candidate to be used in predicting the current block.

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

[0022] A1 and A2 are blocks located to the left of the current coding block and adjacent to the current coding block. B1 and B3 are blocks located above the current coding block and adjacent to the current coding block. A0, B0, and B2 are blocks located at the bottom left, top right, and top left of the current coding block, 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 involves dividing a coding block into sub-blocks of a predetermined unit, determining a motion vector for each divided sub-block individually, and performing motion compensation. The motion vector for each sub-block is derived based on one or more control points derived from inter-prediction information of a processed block adjacent to the block to be processed, or a block belonging to the processed image that is located at the same position as the block to be processed or in the vicinity (vicinity). In this embodiment, the size of the sub-block is 4x4 pixels, but the size of the sub-block is not limited to this, and the motion vector may be derived in pixel units.

[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. For this reason, 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. For this reason, 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. The 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 the 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 related 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 processed in merge mode or predictive motion vector mode. merge_affine_flag is a flag indicating whether the sub-block merge mode is to be 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 to be 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. Figure 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 also 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's output order. The POC value can be used to determine whether the pictures are the same, determine the order of pictures in the output order, and 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, the picture with the smaller POC value can be determined to be 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 and quantization unit 107, a bitstream coding unit 108, an inverse quantization and 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 the block to be divided horizontally and vertically, and a 2-3 division unit that divides the 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 bitstream coding unit 108. The detailed operation of the block division unit 101 will be described later.

[0032] The inter prediction unit 102 performs inter prediction on the coding block to be processed. The inter prediction unit 102 derives multiple 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 multiple derived candidates, and supplies the selected inter prediction mode and a predicted image signal corresponding to the selected inter prediction mode to the prediction method determination unit 105. The 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 the decoded image signal stored in the decoded image memory 104 as reference pixels, 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 corresponding 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 prediction directions of intra prediction and intra prediction mode numbers. For example, intra prediction mode 50 generates an intra predicted image by copying reference pixels in the vertical direction. Intra prediction mode 1 is DC mode, a mode in which all pixel values ​​of the current block are set to the average value of the reference pixels. Intra prediction mode 0 is Planar mode, a mode in which a two-dimensional intra predicted image is created from reference pixels in the vertical and horizontal directions. FIG. 10B shows an example of generating an intra predicted image in 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 current block. When the reference pixel in the intra prediction mode is not at an integer position, the intra prediction unit 103 determines the reference pixel value by interpolation from the reference pixel values ​​of 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 an optimal prediction mode for each of intra prediction and inter prediction by evaluating the coding information, the coding amount of residuals, the amount of distortion 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 bitstream coding unit 108. In the case of inter prediction merge mode, 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 bitstream coding unit 108. In the case of inter prediction predictive motion vector mode, the prediction method determination unit 105 supplies inter prediction information such as an inter prediction mode, a predictive motion vector index, L0 and L1 reference indexes, a differential motion vector, and information indicating whether or not a sub-block predictive motion vector mode (sub-block predictive motion vector flag) as coding information to the bitstream 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 predicted image signal from the image signal to be processed, and supplies the residual to the orthogonal transformation and quantization unit 107 .

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

[0038] The bitstream encoding unit 108 encodes encoding 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 encoding unit 108 encodes the prediction mode PredMode for each coding block. When the prediction mode is inter prediction (MODE_INTER), the bitstream encoding unit 108 encodes encoding information (inter prediction information) such as a flag for determining whether or not the mode is a merge mode, 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 about a differential motion vector, and a sub-block predicted motion vector flag according to a specified syntax (syntax rules for bitstreams) to generate a first bitstream. When the prediction mode is intra prediction (MODE_INTRA), the bitstream encoding unit 108 encodes encoding information (intra prediction information) such as an intra prediction mode according to a specified syntax (syntax rules for bitstreams) to generate a first bitstream. The bitstream coding unit 108 then entropy-codes the orthogonally transformed and quantized residuals in accordance with a specified syntax to generate a second bitstream. The bitstream coding unit 108 then multiplexes the first and second bitstreams in accordance with the specified syntax to output a bitstream.

[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 the decoded image signal superimposition unit 110.

[0040] The decoded image signal superimposing unit 110 superimposes the predicted image signal determined by the prediction method determining unit 105 with the residual that has been inversely quantized and inversely 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 distortions such as block distortions caused by encoding.

[0041] The coding information storage memory 111 stores coding information such as the 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 the determined motion vector, reference indexes of reference lists L0 and L1, and a historical predicted motion vector candidate list. In the case of inter prediction merge mode, the coding information stored in the coding information storage memory 111 includes, in addition to the above-mentioned information, inter prediction information such as a merge index and information indicating whether or not a sub-block merge mode is in effect (a sub-block merge flag). In the case of inter prediction predicted motion vector mode, the coding information stored in the coding information storage memory 111 includes, in addition to the above-mentioned information, 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 predicted motion vector mode is in effect (a sub-block predicted motion vector flag). In the case of intra prediction, the coding information stored in the coding information storage memory 111 includes, in addition to the above-mentioned information, intra prediction information such as the 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] The decoding process of the image decoding device of Figure 2 corresponds to the decoding process provided inside the image coding device of Figure 1, and therefore each of the components of the coding information storage memory 205, the inverse quantization and inverse orthogonal transform unit 206, the decoded image signal superimposition unit 207, and the decoded image memory 208 of Figure 2 has functions corresponding to each of the components of the coding information storage memory 111, the inverse quantization and inverse orthogonal transform unit 109, the decoded image signal superimposition unit 110, and the decoded image memory 104 of the image coding device of Figure 1, respectively.

[0044] The bitstream supplied to the bitstream decoding unit 201 is separated according to a specified syntax rule. The bitstream decoding unit 201 decodes the separated first bitstream to obtain information on a sequence, picture, slice, and coding block basis, and coding information on a coding block basis. 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 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 determining whether the prediction mode is a merge mode, a merge index and a sub-block merge flag in the merge mode, and an inter prediction mode, a predicted motion vector index, a differential motion vector, and a sub-block predicted motion vector flag in the predicted motion vector mode, according to a specified 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 dividing 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 bitstream decoding unit 201 decodes the separated second bitstream to calculate an orthogonally transformed and quantized residual, and supplies the orthogonally transformed and quantized residual to the inverse quantization and inverse orthogonal transform unit 206.

[0045] When the prediction mode PredMode of the coding block to be processed is inter prediction (MODE_INTER) and the predicted motion vector mode, the inter prediction unit 203 derives multiple candidate predicted motion vectors using coding information of an already decoded image signal stored in the coding information storage memory 205, and registers the derived multiple candidate predicted motion vectors in a candidate predicted motion vector list (described later). The inter prediction unit 203 selects a predictive motion vector from the multiple candidate predicted motion vectors registered in the candidate predicted motion vector list according to a predictive motion vector index decoded and supplied by the bitstream decoding unit 201, calculates a motion vector from the differential motion vector decoded by the bitstream decoding unit 201 and the selected predictive 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 provided and stored here includes the prediction mode PredMode, flags predFlagL0[xP][yP] and predFlagL1[xP][yP] indicating whether to use L0 prediction and L1 prediction, L0 and L1 reference indices refIdxL0[xP][yP] and refIdxL1[xP][yP], and L0 and L1 motion vectors mvL0[xP][yP] and mvL1[xP][yP]. Here, xP and yP are indices indicating the position of the upper left pixel of the coding block within 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.The coding information of already decoded coding blocks stored in the coding information storage memory 205 is used to derive multiple merge candidates and register them in a merge candidate list (described later). From the multiple merge candidates registered in the merge candidate list, a merge candidate corresponding to a merge index decoded and supplied by the bitstream decoding unit 201 is selected. Inter-prediction information, such as flags predFlagL0[xP][yP] and predFlagL1[xP][yP] indicating whether L0 prediction and L1 prediction of the selected merge candidate are to be used, L0 and L1 reference indexes refIdxL0[xP][yP] and refIdxL1[xP][yP], and L0 and L1 motion vectors mvL0[xP][yP] and mvL1[xP][yP], 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 within a picture. The 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 predicted image signal by intra prediction from the 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 predicted 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 processing 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 bitstream decoding unit 201, thereby obtaining an inverse orthogonally transformed and inverse quantized residual.

[0048] The decoded image signal superimposing 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 the 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 superimposing unit 207 may perform a filtering process on the decoded image to reduce block artifacts 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., 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 S 1003. 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 divided block of the processing target block 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 shows an example of Z scan order, and 601 in FIG. 6A is an example of the processing target block divided into four. Numbers 0 to 3 of 601 in FIG. 6A indicate the order of processing. Then, the division process of FIG. 7 is recursively executed for each block divided in step S1101 (step S1104).

[0052] If it is determined that the block to be processed is not to be divided into four, it is divided into two or 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 to divide the block to be processed into 2-3, that is, whether 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 parts, i.e., if it is determined that no division should be made, the division is terminated (step S1211). In other words, no further recursive division is made on the blocks that have been divided by the recursive division process.

[0055] If it is determined that the block to be processed should be divided into 2 or 3 parts, it is further determined whether or not the block to be processed should be divided into 2 parts (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 into top, middle, and bottom (vertical direction) (step S1207) or the block to be processed is divided into three parts into left, middle, and right (horizontal direction) (step S1208). As a result of step S1207, the block to be processed is divided into three parts into top, middle, and bottom (vertical direction) as shown in 603 of Fig. 6C, and as a result of step S1208, the block to be processed is divided into three parts into left, middle, and right (horizontal direction) as shown in 605 of Fig. 6E.

[0058] After executing any one of step S1204, step S1205, step S1207, and step S1208, each of the blocks divided from the target block is scanned from left to right and top to bottom (step S1209). The 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 by a configuration in which no information is transmitted by making a prior agreement between the encoding device and the decoding device, or may be realized by a configuration in which the encoding device determines the information limiting the necessity of division and records it in a bit string to transmit it to the decoding device.

[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, we will explain the operation of the block division unit 202 in the image decoding device 200. The block division unit 202 divides tree blocks using 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 optimization techniques such as optimal shape estimation through image recognition and 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 (bit string syntax rules) for block division in the first embodiment is shown in Figure 9. coding_quadtree() represents the syntax for dividing a block into four. multi_type_tree() represents the syntax for dividing a block into two or three. qt_split is a flag indicating whether to divide a block into four. If the block is to be divided into four, qt_split = 1 is set; 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); the arguments 0 to 3 correspond to the number 601 in Figure 6A). If the block is not to be divided into four (qt_split = 0), subsequent divisions are determined according to multi_type_tree(). mtt_split is a flag indicating whether to further divide the block. If 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 vertical division, and mtt_split_vertical=0 indicates horizontal division. mtt_split_binary=1 indicates division into two, and mtt_split_binary=0 indicates division into three. If dividing into two (mtt_split_binary=1), recursive division processing is performed on each of the divided blocks (multi_type_tree(0), multi_type_tree(1), the arguments 0 to 1 correspond to numbers 602 or 604 in Figures 6B to 6D). When dividing into three parts (mtt_split_binary=0), the division process is recursively performed for each of the three divided blocks (multi_type_tree(0), multi_type_tree(1), multi_type_tree(2), where 0 to 2 correspond to numbers 603 in Figure 6B or 605 in Figure 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 in units of coding blocks.

[0065] <Explanation of the Inter Prediction Unit 102 on the Encoding Side> Figure 16 is a diagram showing a detailed configuration of the inter prediction unit 102 of the image encoding device of Figure 1. The normal predicted motion vector mode derivation unit 301 derives a plurality of normal predicted motion vector candidates, selects a predicted motion vector, and calculates a differential motion vector between the selected predicted 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 for the normal predicted 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 predicted motion vector mode derivation unit 301 will be described later.

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

[0067] The sub-block predictor motion vector mode derivation unit 303 derives multiple sub-block predictor motion vector candidates, selects a sub-block predictor motion vector, and calculates a differential motion vector between the selected sub-block predictor 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 for the sub-block predictor 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 for 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 of FIG.

[0072] The normal predicted motion vector mode derivation unit 401 derives multiple normal predicted motion vector candidates, selects a predicted motion vector, and calculates the sum of the selected predicted motion vector and the decoded differential motion vector to obtain a motion vector. The decoded inter prediction mode, reference index, and motion vector become inter prediction information for the normal predicted 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 predicted motion vector mode derivation unit 401 will be described later.

[0073] The normal merge mode derivation unit 402 derives multiple normal merge candidates, selects one, 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 predictor motion vector mode derivation unit 403 derives multiple sub-block predictor motion vector candidates, selects a sub-block predictor motion vector, and calculates the sum of the selected sub-block predictor motion vector and the decoded differential 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 predictor motion vector mode. This inter-prediction information is supplied to the motion compensation prediction unit 406 via a switch 408.

[0075] The subblock merging mode derivation unit 404 derives multiple subblock merging candidates, selects one, 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 the same as 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 predicted motion vector mode derivation unit 401 in Figure 23 includes 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, a predicted motion vector candidate supplementation unit 425, a predicted motion vector candidate selection unit 426, and a motion vector addition unit 427.

[0079] The processing procedures of the normal predictor motion vector mode derivation unit 301 on the encoding side and the normal predictor motion vector mode derivation unit 401 on the decoding side will be described using the flowcharts of Fig. 19 and Fig. 25. Fig. 19 is a flowchart showing the normal predictor 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 predictor 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" used 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 predictor motion vector candidate derivation unit 321, temporal predictor motion vector candidate derivation unit 322, history predictor motion vector candidate derivation unit 323, predictor motion vector candidate supplementation unit 325, predictor motion vector candidate selection unit 327, and motion vector subtraction unit 328 calculate differential motion vectors for motion vectors used in inter prediction in normal predictor motion vector mode for each of L0 and L1 (steps S101 to S106 in FIG. 19). Specifically, when the prediction mode PredMode of the block to be processed is inter prediction (MODE_INTER) and the inter prediction mode is L0 prediction (Pred_L0), the predictor motion vector candidate list mvpListL0 of L0 is calculated, the predictor motion vector mvpL0 is selected, and the differential 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), an L1 predicted motion vector candidate list mvpListL1 is calculated, a predicted motion vector mvpL1 is selected, and a differential motion vector mvdL1 of the L1 motion vector mvL1 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, an L0 predicted motion vector candidate list mvpListL0 is calculated, an L0 predicted motion vector mvpL0 is selected, and a differential motion vector mvdL0 of the L0 motion vector mvL0 is calculated. An L1 predicted motion vector candidate list mvpListL1 is calculated, and an L1 predicted motion vector mvpL1 is calculated, and a differential motion vector mvdL1 of the L1 motion vector mvL1 is calculated.

[0083] Although differential motion vector calculation processing is performed for each of L0 and L1, the processing is common to both L0 and L1. Therefore, in the following explanation, L0 and L1 are represented as a common list LX. In the processing for calculating the differential motion vector for L0, X of LX is 0, and in the processing for calculating the differential motion vector for L1, X of LX is 1. Furthermore, when referencing information from another list instead of LX during the processing for calculating the differential motion vector for LX, the other list is represented as LY.

[0084] When the motion vector mvLX of LX is used (step S102: YES in FIG. 19), candidates for the motion vector predictor of LX are calculated, and a motion vector predictor candidate list mvpListLX for LX is constructed (step S103 in FIG. 19). A plurality of motion vector predictor candidates are derived by the spatial motion vector predictor candidate derivation unit 321, the temporal motion vector predictor candidate derivation unit 322, the history motion vector predictor candidate derivation unit 323, and the motion vector predictor candidate supplementation unit 325 in the normal motion vector predictor mode derivation unit 301, and the motion vector predictor candidate list mvpListLX is constructed. The detailed processing procedure of step S103 in FIG. 19 will be described later using the flowchart in FIG. 20.

[0085] Next, the motion vector predictor candidate selection unit 327 selects a motion vector predictor mvpLX of LX from the motion vector predictor candidate list mvpListLX of LX (step S104 in FIG. 19 ). Here, a certain element (the i-th element counting from 0) in the motion vector predictor candidate list mvpListLX is represented as mvpListLX[i]. Each differential motion vector is calculated as the difference between the motion vector mvLX and each motion vector predictor candidate mvpListLX[i] stored in the motion vector predictor candidate list mvpListLX. The amount of code when these differential motion vectors are coded is calculated for each element (motion vector predictor candidate) of the motion vector predictor candidate list mvpListLX. Then, among the elements 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 result in the smallest amount of generated code in the predicted motion vector candidate list mvpListLX, the candidate predicted motion vector 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 The differential motion vector mvdLX of LX is calculated as follows (step S105 in FIG. 19).

[0087] <Normal predicted motion vector mode derivation unit (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 supplementation unit 425 calculate motion vectors used in inter prediction in 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 block to be processed is inter prediction (MODE_INTER) and the inter prediction mode of the block to be processed 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), an L1 predicted motion vector candidate list mvpListL1 is calculated, a predicted motion vector mvpL1 is selected, and a 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, an L0 predicted motion vector candidate list mvpListL0 is calculated, an L0 predicted motion vector mvpL0 is selected, and a motion vector mvL0 of L0 is calculated, and an L1 predicted motion vector candidate list mvpListL1 is calculated, and a predicted motion vector mvpL1 of L1 is calculated, and a motion vector mvL1 of L1 is calculated.

[0088] As with the encoding 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 the inter prediction mode used for inter prediction of the encoding block to be processed. In the processing for calculating the motion vector of L0, X is 0, and in the processing for calculating the motion vector of L1, X is 1. Furthermore, when the processing for calculating the motion vector of LX refers to information in another reference list rather than 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: YES in FIG. 25), candidates for the motion vector predictor of LX are calculated and a motion vector predictor candidate list mvpListLX for LX is constructed (step S203 in FIG. 25). A plurality of motion vector predictor candidates are calculated by the spatial motion vector predictor candidate derivation unit 421, the temporal motion vector predictor candidate derivation unit 422, the history motion vector predictor candidate derivation unit 423, and the motion vector predictor candidate supplementation unit 425 in the normal motion vector predictor mode derivation unit 401, and the motion vector predictor candidate list mvpListLX is constructed. The detailed processing procedure of step S203 in FIG. 25 will be described later using 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 bitstream 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 bitstream decoder 201 to the predicted motion vector mvpLX of LX, mvLX = mvpLX + mvdLX The motion vector mvLX of LX is calculated as follows (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 each include 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, as elements, a motion vector predictor index indicating a location within the motion vector predictor candidate list and a motion vector predictor candidate corresponding to the index. The motion vector predictor index number 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, the motion vector predictor candidate list mvpListLX is assumed to be capable of registering at least two motion vector predictor candidates (inter prediction information). Furthermore, a variable numCurrMvpCand indicating the number of motion vector predictor candidates registered in the motion vector predictor candidate list mvpListLX is set to 0.

[0094] The spatial motion vector predictor candidate derivation units 321 and 421 derive a candidate motion vector predictor from the adjacent block on the left. In this process, the spatial motion vector predictor candidate derivation units 321 and 421 derive a candidate motion vector predictor from the adjacent block on the left (A0 or A1 in FIG. 11 ) by referring to the inter prediction information of the adjacent block on the left (i.e., a flag indicating whether a candidate motion vector predictor is available, a motion vector, a reference index, etc.), and add the derived mvLXA to the motion vector predictor candidate list mvpListLX (step S301 in FIG. 20 ). Note that X is 0 for L0 prediction, and X is 1 for L1 prediction (the same applies below). Next, the spatial motion vector predictor candidate derivation units 321 and 421 derive a candidate motion vector predictor from the adjacent block above. 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 common except for the positions and number of adjacent blocks to be referenced, 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, same below) are derived.

[0095] Next, the temporal motion vector predictor candidate derivation units 322 and 422 derive motion vector predictor candidates from blocks in pictures whose time periods are different from the current picture to be processed. In this process, a flag availableFlagLXCol indicating whether a motion vector predictor candidate of a coding block in a picture whose time period is different is available, 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 sequences (SPS), pictures (PPS), or slices.

[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 using the flowchart in FIG. 29.

[0098] Next, the motion vector predictor candidate supplementing units 325 and 425 add motion vector predictor candidates of predetermined values, 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. Note that, unless otherwise specified, the following description will be given assuming that the slice type slice_type is a B slice, but the description can also be applied to a P slice. However, when the slice type slice_type is a P slice, only L0 prediction (Pred_L0) is available as an inter prediction mode, and L1 prediction (Pred_L1) and bi-prediction (Pred_BI) are not available, so processing related to L1 can be omitted.

[0103] The normal merge mode derivation unit 302 and the normal merge mode derivation unit 402 each include a merge candidate list mergeCandList. The merge candidate list mergeCandList has a list structure and includes a merge index indicating a location within the merge candidate list and a storage area for storing merge candidates corresponding to the index as elements. The merge index numbers start from 0, and merge candidates are stored in the storage area of ​​the merge candidate list mergeCandList. In the following processing, the merge candidate with merge index i registered in the merge candidate list mergeCandList will be represented as mergeCandList[i]. In this embodiment, the merge candidate list mergeCandList is capable of registering at least six merge candidates (inter-prediction information). Furthermore, a variable numCurrMergeCand indicating the number of merge candidates registered in the merge candidate list mergeCandList is set to 0.

[0104] The spatial merge candidate derivation unit 341 and the spatial merge candidate derivation unit 441 derive spatial merge candidates from the adjacent blocks (B1, A1, B0, A0, B2 in FIG. 11) to the left and above the target block 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 a merge candidate list mergeCandList (step S401 in FIG. 21). Here, N is defined to indicate either the spatial merge candidates B1, A1, B0, A0, B2 or the temporal merge candidate Col. The following are derived: a flag availableFlagN indicating whether the 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; an L1 prediction flag predFlagL1N indicating whether L1 prediction is performed; an L0 motion vector mvL0N; and an L1 motion vector mvL1N. However, in this embodiment, merge candidates are derived without reference to the inter prediction information of blocks included in the coding block to be processed, and therefore spatial merge candidates using the inter prediction information of blocks included in the coding block to be processed are 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 an L0 motion vector mvL0Col and an L1 motion vector mvL1Col 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 sequences (SPS), pictures (PPS), or slices.

[0107] Next, the history merge candidate derivation unit 345 and the history merge candidate derivation unit 445 register the history motion vector predictor candidates registered in the history motion vector predictor 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, historical merge candidates are derived with the number of merge candidates registered in the merge candidate list mergeCandList, numCurrMergeCand set as an upper limit to the maximum number of merge candidates, MaxNumMergeCand, 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 set as an upper limit 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 of the L0 prediction and the L1 prediction.

[0109] Next, 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 merge candidate supplementation unit 346 and the merge candidate supplementation unit 446 derive additional merge candidates with the number of merge candidates registered in the merge candidate list mergeCandList set to an upper limit of the maximum number of merge candidates MaxNumMergeCand, and register the additional merge candidates in the merge candidate list mergeCandList (step S405 in FIG. 21 ). For P slices, merge candidates with a motion vector of (0,0) and a prediction mode of L0 prediction (Pred_L0) are added, with the maximum number of merge candidates MaxNumMergeCand set to an upper limit. For B slices, merge candidates with a motion vector of (0,0) and a prediction mode of bi-prediction (Pred_BI) are added. The reference index used when adding a merge candidate is different from the reference index used when adding a merge candidate.

[0110] Next, the merge candidate selection unit 347 and the merge candidate selection unit 447 select a merge candidate from those 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 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. Meanwhile, 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] <Update of historical motion vector predictor candidate list> Next, a detailed description will be given of methods for initializing and updating the historical motion vector predictor candidate list HmvpCandList provided in the encoding-side encoding information storage memory 111 and the decoding-side encoding information storage memory 205. Fig. 26 is a flowchart illustrating the procedure for initializing and updating the historical motion vector predictor candidate list.

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

[0113] 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 bitstream decoding unit 201 is the normal prediction motion vector mode or the normal merge mode.

[0114] Inter prediction information used when performing inter prediction in normal predicted motion vector mode or normal merge mode is registered as an inter prediction information candidate hMvpCand in a history predicted 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 L0 prediction is performed, an L1 prediction flag predFlagL1 indicating whether L1 prediction is performed, an L0 motion vector mvL0, and an L1 motion vector mvL1.

[0115] If inter prediction information with the same value as the inter prediction information candidate hMvpCand exists among the elements (i.e., inter prediction information) registered in the history motion vector candidate list HmvpCandList provided in the encoding information storage memory 111 on the encoding side and the decoding information storage memory 205, that element is deleted from the history motion vector candidate list HmvpCandList. On the other hand, if inter prediction information with the same value as the inter prediction information candidate hMvpCand does not exist, the first element of the history motion vector candidate list HmvpCandList is deleted, and the inter prediction information candidate hMvpCand is added to the end of the history motion vector candidate list HmvpCandList.

[0116] The number of elements in 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 of the present invention is assumed to be six.

[0117] First, the historical motion vector predictor candidate list HmvpCandList is initialized for each slice (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 NumHmvpCand, which is the number of historical motion vector predictor candidates (current number of candidates) registered in the historical motion vector predictor candidate list HmvpCandList, is set to 0.

[0118] Note that although the initialization of the historical motion vector predictor candidate list HmvpCandList is performed in units of slices (first coding block of a slice), it may also be performed in units of pictures, tiles, or tree block rows.

[0119] 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).

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

[0121] It is determined whether or not there is an inter-prediction information candidate hMvpCand to be registered (step S2104 in FIG. 26 ). If the prediction method determination unit 105 on the encoding side determines the normal prediction motion vector mode or normal merge mode, or if the bitstream decoding unit 201 on the decoding side decodes the inter-prediction information as the normal prediction motion vector mode or normal merge mode, the inter-prediction information is designated as the inter-prediction information candidate hMvpCand to be registered. If the prediction method determination unit 105 on the encoding side determines the intra prediction mode, sub-block prediction motion vector mode, or sub-block merge mode, or if the bitstream decoding unit 201 on the decoding side decodes the intra prediction mode, sub-block prediction motion vector mode, or sub-block merge mode, the history prediction motion vector candidate list HmvpCandList is not updated, and there is no inter-prediction information candidate hMvpCand to be registered. If there is no inter-prediction information candidate hMvpCand to be registered, steps S2105 to S2106 are skipped (step S2104: NO in FIG. 26 ). If there is an inter-prediction information candidate hMvpCand to be registered, the processes in step S2105 and thereafter are performed (step S2104 in FIG. 26: YES).

[0122] Next, it is determined whether each element in the history motion vector candidate list HmvpCandList contains an element (inter-prediction information) with the same value as the inter-prediction information candidate hMvpCand to be registered, i.e., whether an identical element exists (step S2105 in FIG. 26). FIG. 27 is a flowchart of this identical element checking process. If the value of the number of history motion vector candidate predictors NumHmvpCand is 0 (step S2121: NO in FIG. 27), the history motion vector candidate predictor list HmvpCandList is empty and no identical candidate exists, so steps S2122 to S2125 in FIG. 27 are skipped and this identical element checking process ends. If the value of the number of history motion vector candidate predictors NumHmvpCand is greater than 0 (step S2121: YES in FIG. 27), the process in step S2123 is repeated for the history motion vector index hMvpIdx from 0 to NumHmvpCand-1 (steps S2122 to S2125 in FIG. 27). First, the hMvpIdx-th element HmvpCandList[hMvpIdx], counting from 0 in the history motion vector predictor candidate list, is compared with the inter-prediction information candidate hMvpCand to determine whether they are identical (step S2123 in FIG. 27). If they are identical (step S2123 in FIG. 27: YES), the flag identicalCandExist, which indicates whether an identical candidate exists, is set to TRUE, the deletion target index removeIdx, which indicates the position of the element to be removed, is set to the current value of the history motion vector predictor index hMvpIdx, and this identical element confirmation process ends. If they are not identical (step S2123 in FIG. 27: NO), hMvpIdx is incremented by 1, and if the history motion vector predictor index hMvpIdx is equal to or less than NumHmvpCand-1, the processes from step S2123 onwards are performed.

[0123] Returning to the flowchart of FIG. 26 again, a process of shifting and adding elements in the historical motion vector predictor candidate list HmvpCandList is performed (step S2106 in FIG. 26). FIG. 28 is a flowchart of the process procedure of shifting / adding elements in the historical motion vector predictor candidate list HmvpCandList in step S2106 in FIG. 26. First, it is determined whether to remove elements stored in the historical motion vector predictor candidate list HmvpCandList and then add a new element, or to add a new element without removing any elements. Specifically, it is compared whether the flag identicalCandExist indicating whether an identical candidate exists is TRUE or NumHmvpCand is 6 (step S2141 in FIG. 28). If either the condition that the flag identicalCandExist indicating whether an identical candidate exists is TRUE or the current number of candidates NumHmvpCand is 6 is met (step S2141: YES in FIG. 28), the elements stored in the historical motion vector predictor candidate list HmvpCandList are removed and then a new element is added. The initial value of index i is set to the value of removeIdx + 1. The element shifting process of step S2143 is repeated from this initial value to NumHmvpCand (steps S2142 to S2144 in FIG. 28). The elements of HmvpCandList[i] are shifted forward by copying them to HmvpCandList[i - 1] (step S2143 in FIG. 28), and i is incremented by 1 (steps S2142 to S2144 in FIG. 28). Next, the inter prediction information candidate hMvpCand is added to the (NumHmvpCand-1)-th HmvpCandList[NumHmvpCand-1], counting from 0 and corresponding to the end of the history motion vector predictor candidate list (step S2145 in FIG. 28), and the element shifting and addition process of this history motion vector predictor candidate list HmvpCandList is terminated.On the other hand, if neither of the conditions that the flag identicalCandExist indicating whether or not an identical candidate exists is TRUE and NumHmvpCand is 6 is satisfied (step S2141: NO in FIG. 28 ), the inter prediction information candidate hMvpCand is added to the end of the history motion vector predictor candidate list HmvpCandList without removing any elements stored in the history motion vector predictor candidate list HmvpCandList (step S2146 in FIG. 28 ). Here, the end of the history motion vector predictor candidate list is the NumHmvpCand-th HmvpCandList[NumHmvpCand] counting from 0. Furthermore, NumHmvpCand is incremented by 1, and the element shift and addition process of this history motion vector predictor candidate list HmvpCandList is terminated.

[0124] Fig. 31 is a diagram illustrating an example of a process for updating a history motion vector predictor candidate list. When adding new elements to a registered history motion vector predictor candidate list HmvpCandList of six elements (inter prediction information), the elements in the history motion vector predictor candidate list HmvpCandList are compared with the new inter prediction information, starting from the first element (Fig. 31A). If the new element has the same value as the third element HMVP2 from the top of the history motion vector predictor candidate list HmvpCandList, the element HMVP2 is deleted from the history motion vector predictor candidate list HmvpCandList, and the subsequent elements HMVP3 to HMVP5 are shifted (copied) forward one by one, and the new element is added to the end of the history motion vector predictor candidate list HmvpCandList (Fig. 31B), completing the update of the history motion vector predictor candidate list HmvpCandList (Fig. 31C).

[0125] <Historical motion vector predictor 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 the 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.

[0126] If the current number of motion vector predictor candidates numCurrMvpCand is greater than or equal to the maximum number of elements in the motion vector predictor candidate list mvpListLX (2 here) or the number of historical motion vector predictor candidates NumHmvpCand is 0 (NO in step S2201 in Figure 29), steps S2202 to S2209 in Figure 29 are omitted and the historical motion vector predictor candidate derivation procedure is terminated. If the current number of motion vector predictor candidates numCurrMvpCand is less than 2, which is the maximum number of elements in the motion vector predictor candidate list mvpListLX, and the number of historical motion vector predictor candidates NumHmvpCand is greater than 0 (YES in step S2201 in Figure 29), steps S2202 to S2209 in Figure 29 are performed.

[0127] Next, the processes of steps S2203 to S2208 in FIG. 29 are repeated for index i from 1 to the smaller of 4 and the number of history motion vector predictor candidates, numCheckedHMVPCand (steps S2202 to S2209 in FIG. 29). If the current number of 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: NO in FIG. 29), steps S2204 to S2209 in FIG. 29 are omitted, and the history motion vector predictor candidate derivation process procedure ends. If the current number of motion vector predictor candidates, numCurrMvpCand, is less than 2, which is the maximum number of elements in the motion vector predictor candidate list, mvpListLX (step S2203: YES in FIG. 29), the processes of step S2204 and subsequent steps in FIG. 29 are performed.

[0128] Next, the processes from steps S2205 to S2207 are performed for Y=0 and 1 (L0 and L1), respectively (steps S2204 to S2208 in FIG. 29). If the current number of 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), steps S2206 to S2209 in FIG. 29 are omitted, and the history motion vector predictor candidate derivation process procedure ends. If the current number of motion vector predictor candidates numCurrMvpCand is less than 2, which is the maximum number of elements in the motion vector predictor candidate list mvpListLX (step S2205: YES in FIG. 29), the processes from step S2206 onwards in FIG. 29 are performed.

[0129] Next, if the history predicted motion vector candidate list HmvpCandList contains an element with the same reference index as the reference index refIdxLX of the motion vector to be encoded / decoded, and is different from any element in the predicted motion vector list mvpListLX (step S2206: YES in Figure 29), the motion vector LY of the history predicted motion vector candidate HmvpCandList[NumHmvpCand - i] is added to the numCurrMvpCand-th element mvpListLX[numCurrMvpCand] counting from 0 in the predicted motion vector candidate list (step S2207 in Figure 29), and the number of current predicted motion vector candidates numCurrMvpCand is incremented by 1. If there is no element in the history predicted motion vector 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 predicted motion vector list mvpListLX (step S2206: NO in Figure 29), the additional processing of step S2207 is skipped.

[0130] The above processing of steps S2205 to S2207 in Fig. 29 is performed for both L0 and L1 (steps S2204 to S2208 in Fig. 29). Index i is incremented by 1, and if index i is equal to or less than the smaller value of 4 or the number NumHmvpCand of historical motion vector predictor candidates, processing from step S2203 onwards is performed again (steps S2202 to S2209 in Fig. 29).

[0131] <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 the processing procedure in step S404 of 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 explaining the history merge candidate derivation processing procedure.

[0132] First, initialization processing is performed (step S2301 in FIG. 30). The value FALSE is set for each of the elements from 0 to (numCurrMergeCand - 1) of isPruned[i], and the variable numOrigMergeCand is set to the number of elements currently registered in the merge candidate list, numCurrMergeCand.

[0133] Next, the initial value of index hMvpIdx is set to 1, and the addition process from step S2303 to step S2310 in Figure 30 is repeated from this initial value to NumHmvpCand (steps S2302 to S2311 in Figure 30). If the number of elements registered in the current merge candidate list, numCurrMergeCand, is not 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 ends (NO in step S2303 in Figure 30). If the number of elements registered in the current merge candidate list, numCurrMergeCand, is less than (maximum number of merge candidates, MaxNumMergeCand-1) (YES in step S2303 in Figure 30), processing from step S2304 onwards is carried out.

[0134] First, the value FALSE is set for sameMotion (step S2304 in FIG. 30). Next, the initial value of index i is set to 0, and the processes of steps S2306 and S2307 in FIG. 30 are performed from this initial value to 1 (S2305 to S2308 in FIG. 30).

[0135] Next, the (NumHmvpCand - hMvpIdx)th element, counting from 0, of the history motion vector prediction candidate list, HmvpCandList[NumHmvpCand-hMvpIdx], is compared with the i-th element, counting from 0, mergeCandList[i], of the merge candidate list, to determine whether they have the same value (step S2306 in FIG. 30). Here, merge candidates with the same value indicate that all of the components (inter prediction mode, reference index, motion vector) possessed by the merge candidates have the same values. Note that the processing of step S2306 is limited to the case where hMvpIdx is greater than NumHmvpCand-2, mergeCandList[i] is a spatial merge candidate, and isPruned[i] is FALSE. If the values ​​are the same (YES in step S2306 in FIG. 30), both sameMotion and isPruned[i] are set to TRUE (step S2307 in FIG. 30). If the values ​​are not the same (NO in step S2306 in Figure 30), the processing of step S2307 is skipped. After the repeated processing from step S2305 to step S2308 in Figure 30 is completed, a comparison is made to determine whether sameMotion is FALSE (step S2309 in Figure 30). If sameMotion is FALSE (YES in step S2309 in Figure 30), the (NumHmvpCand - hMvpIdx)-th element HmvpCandList[NumHmvpCand - hMvpIdx], counting from 0, of the history motion vector predictor candidate list is added to mergeCandList[numCurrMergeCand], which is the numCurrMergeCand-th element of the merge candidate list, and numCurrMergeCand is incremented by 1 (step S2310 in Figure 30). The index hMvpIdx is incremented by 1 (step S2302 in FIG. 30), and steps S2302 to S2311 in FIG. 30 are repeated.

[0136] 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 complete.

[0137] <Motion compensation prediction processing> The motion compensation prediction unit 306 acquires the position and size of the block currently being predicted in encoding. The motion compensation prediction unit 306 also acquires inter prediction information from the inter prediction mode determination unit 305. The motion compensation prediction unit 306 derives a reference index and a motion vector from the acquired inter prediction information, acquires an image signal of a reference picture identified by the reference index in the decoded image memory 104, moved by the amount of the motion vector from the same position as the image signal of the prediction block, and then generates a prediction signal.

[0138] When the inter prediction mode in 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 the motion-compensated prediction signal. When the inter prediction mode is prediction from two reference pictures, such as BI prediction, the prediction signals obtained from the two reference pictures are weighted and averaged to obtain the motion-compensated prediction signal, which is then supplied to the prediction method determination unit 105. Here, the weighted average ratio for bi-prediction is set to 1:1, but weighted averaging may be performed using other ratios. For example, the closer the picture interval between the picture to be predicted and the reference picture, the larger the weighting ratio may be. Furthermore, the weighting ratio may be calculated using a correspondence table of combinations of picture intervals and weighting ratios.

[0139] 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 via a switch 408 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. The motion compensation prediction unit 406 supplies the obtained motion compensation prediction signal to the decoded image signal superimposition unit 207.

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

[0141] Figure 32 shows a case where uni-prediction is performed and the L0 reference picture (RefL0Pic) is located at a time earlier than the current picture (CurPic). Figure 33 shows a case where uni-prediction is performed and the L0 prediction reference picture is located at a time later than the current picture. Similarly, uni-prediction can be performed by replacing the L0 prediction reference picture in Figures 32 and 33 with the L1 prediction reference picture (RefL1Pic).

[0142] The 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 in which the reference picture for L0 prediction is located earlier than the current picture, and the reference picture for L1 prediction is located later than the current picture. Figure 35 shows a case in which the reference picture for L0 prediction and the reference picture for L1 prediction are located earlier than the current picture. Figure 36 shows a case in which the reference picture for L0 prediction and the reference picture for L1 prediction are located later than the current picture.

[0143] In this way, the relationship between the L0 / L1 prediction type and time 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 for both L0 prediction and L1 prediction. Whether motion compensation prediction is performed in uni-prediction or bi-prediction is determined based on, for example, information (e.g., a flag) indicating whether L0 prediction and L1 prediction are to be used.

[0144] <About reference indexes> In an 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 multiple reference pictures in motion compensation prediction. To this end, the reference picture used in motion compensation prediction is used as a reference index, and the reference index is coded into the bitstream together with a differential motion vector.

[0145] <Motion compensation processing based on normal predicted motion vector mode> 16 , when the inter prediction mode determination unit 305 selects inter prediction information by the normal prediction motion vector mode derivation unit 301, 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.

[0146] 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.

[0147] <Motion compensation processing based on normal merge mode> 16 , when the inter prediction mode determination unit 305 selects inter prediction information by the normal merge mode derivation unit 302, 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.

[0148] 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 acquires inter prediction information from the normal merge mode derivation unit 402, 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.

[0149] <Motion compensation processing 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 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.

[0150] 22 , when a switch 408 is connected to the sub-block prediction motion vector mode derivation unit 403 during decoding, 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.

[0151] <Motion compensation processing based on sub-block merge mode> 16 , when the inter prediction mode determination unit 305 selects inter prediction information by the sub-block merge mode derivation unit 304, 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.

[0152] 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.

[0153] <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 during the encoding process, and are encoded in the bitstream. During the decoding process, whether or not motion compensation using an affine model is performed is determined based on the following flags in the bitstream.

[0154] sps_affine_enabled_flag indicates whether or not affine model motion compensation is available for inter prediction. If sps_affine_enabled_flag is 0, affine model motion compensation is suppressed on a sequence-by-sequence basis. Also, 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, affine model motion compensation is available for the coded video sequence.

[0155] sps_affine_type_flag indicates whether motion compensation using a 6-parameter affine model is available in inter prediction. If sps_affine_type_flag is 0, motion compensation using a 6-parameter affine model is suppressed. Furthermore, 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 using a 6-parameter affine model is available in the coded video sequence. If sps_affine_type_flag does not exist, it is assumed to be 0.

[0156] When decoding a P or B slice, if inter_affine_flag is 1 for the current CU, motion compensation using an affine model is used to generate a motion compensation prediction signal for the current CU. If inter_affine_flag is 0, the affine model is not used for the current CU. If inter_affine_flag does not exist, it is assumed to be 0.

[0157] 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-compensated 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-compensated prediction signal for the currently processed CU.

[0158] In motion compensation using an affine model, reference indices and motion vectors are derived for each subblock, and therefore a motion compensation prediction signal is generated using the reference indices and motion vectors being processed for each subblock.

[0159] 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 the motion vectors of the two control points, and motion compensation is performed on a subblock-by-subblock basis.

[0160] In this embodiment, the reference order when using the history motion vector predictor candidate list may be configured to be reverse to the storage order. Here, if the history motion vector predictor candidate list is stored from the end and the motion information at the beginning of the history motion vector predictor candidate list is stored in an order in which it is older than the motion information at the end, the same storage state as in this embodiment will be obtained. Also, if the history motion vector predictor candidate list is stored in an order in which it is newer than the motion information at the beginning of the history motion vector predictor candidate list, the storage state will be reverse to that shown in this embodiment. Even in such a reverse storage state, by performing the reference order in the reverse order to the storage order, it is possible to achieve the reference content shown in this embodiment, that is, when referring to the history motion vector predictor candidate list, reference can be made in order from older motion information to newly added motion information. Furthermore, when using the history motion vector predictor candidate list, the reference order may be configured to be either the same as the storage order or the reverse of the storage order. In other words, when using the historical prediction motion vector candidate list, it may be configured to selectively use either a case where the motion information stored in the historical prediction motion vector candidate list can be referenced in order from the oldest motion information to the most recently added motion information, or a case where the motion information stored in the historical prediction motion vector candidate list can be referenced in order from the most recently added motion information to the oldest motion information.

[0161] Furthermore, when a new element is added to the historical motion vector predictor candidate list, the historical motion vector predictor candidate list may be searched for an element having the same information, and the process of deleting the element may not be performed.

[0162] Furthermore, in the normal predicted motion vector mode, when deriving a normal predicted motion vector candidate using the historical predicted motion vector candidate list HmvpCandList, it is possible to configure the system so that an element having the same information is searched for from the historical predicted motion vector candidate list, and the process of not selecting the element having the same information as a normal predicted motion vector candidate is not performed.

[0163] <Historical predicted motion vector candidate list> Here, the configuration and operation of the historical motion vector predictor candidate list will be described.

[0164] As shown in Fig. 41, the inter prediction information used by inter prediction in the current block to be coded is set as the inter prediction information candidate hMvpCand to be registered, and is registered in the history motion vector predictor candidate list HmvpCandList as a history of past use. In Fig. 41, the history motion vector predictor candidate list has a list structure that can store six elements, and the basic storage operation is a first-in, first-out (FIFO) method in which the elements stored first are extracted in order.

[0165] Here, as an example, the maximum number of elements that can be stored in HmvpCandList is described as six, as agreed upon between the encoding side and the decoding side. However, this is not particularly limited and may be six or more. Furthermore, the maximum number of elements that can be stored in HmvpCandList may be configured as five or fewer elements. For example, HmvpCandList may be configured with a maximum number of elements equal to the maximum number of elements of inter prediction information candidates, such as the maximum number of elements of the predicted motion vector list mvpListLX, the maximum number of merge candidates, or the maximum number of sub-block merge candidates. Furthermore, HmvpCandList may be configured to be linked to the maximum number of elements of inter prediction information candidates for each mode.

[0166] The maximum number of elements in HmvpCandList may be included in the syntax elements of the coded bitstream, so that it can be transmitted from the coding side to the decoding side.

[0167] As shown in Fig. 41, HmvpCandList can store six elements, from position 0 at the beginning of the list to position 5 at the end of the list, and elements can be filled from position 0 to position 5. Positions 0 to 5 are managed as a historical motion vector predictor index hMvpIdx. For example, position 0 can be expressed as hMVpIdx[0], and position 5 can be expressed as hMVpIdx[5]. The number of elements stored in HmvpCandList is managed by NumHmvpCand, and an increase or decrease in the number of stored elements is managed within the range from 0 to the maximum number of elements, 6.

[0168] A case will be described where a new element is added from the end when the maximum number of elements is stored in HmvpCandList. As shown in Fig. 42, when a new inter-prediction information candidate hMvpCand is to be registered as a history, the element at position 0, which is the beginning, is deleted, and the positions of each element are shifted one by one toward the beginning. As a result of the shift, the number of stored elements is reduced by one, as shown in Fig. 43, making it possible to store a new element at position 5 at the end. Therefore, by storing the inter-prediction information candidate hMvpCand at position 5 at the end, a new element is added to HmvpCandList, as shown in Fig. 44.

[0169] (Variation 1) As a modification of the first embodiment, the following processing is performed on the historical motion vector predictor candidate list. <Searching for the same candidate in the historical predicted motion vector candidate list> When the historical motion vector predictor candidate list HmvpCandList is used in the reference order shown in Fig. 45, if inter-prediction information registered in the historical motion vector predictor candidate list HmvpCandList contains inter-prediction with the same value as the inter-prediction information candidate hMvpCand to be registered, that element (inter-prediction information) is deleted from the historical motion vector predictor candidate list HmvpCandList. Such a process of deleting identical candidates is hereinafter referred to as identical candidate deletion process. When an element is added to the historical motion vector predictor candidate list HmvpCandList, the identical candidate deletion process is not performed. Furthermore, when the historical motion vector predictor candidate list HmvpCandList is used while referring to the historical motion vector predictor candidate list HmvpCandList in the reverse order of storage, in which new elements are added to the end of the historical motion vector predictor candidate list as shown in Fig. 46, the identical candidate deletion process is not performed. Figure 38 is a flowchart explaining the procedure for deriving a history prediction motion vector candidate when the motion information that is the history prediction motion vector candidate stored in the history prediction motion vector candidate list HmvpCandList is referenced in the reverse order of storage, in which the information is added from the end, in order from the oldest motion information to the most recently added motion information, and is used without performing the same candidate deletion process. The inter prediction information used when performing inter prediction in the normal prediction vector mode or normal merge mode is designated as the inter prediction information candidate hMvpCand to be registered. Regardless of whether or not there is an inter prediction with the same value as the inter prediction information candidate hMvpCand to be registered among the inter prediction information registered in the history prediction motion vector candidate list HmvpCandList provided in the encoding-side coding information storage memory 111 and the decoding-side coding information storage memory 205, the inter prediction information candidate hMvpCand to be registered is added in order from the empty position closest to the beginning. When HmvpCandList is filled up to the maximum number of elements, the first element (inter prediction information) of the history prediction motion vector candidate list HmvpCandList is deleted, and the inter prediction information candidate hMvpCand to be registered is added to the end of the history prediction motion vector candidate list HmvpCandList. In this embodiment, the number of elements of the history prediction motion vector candidate list HmvpCandList provided in the encoding-side coding information storage memory 111 and the decoding-side coding information storage memory 205 is set to 6. First, initial setting is performed in units of slices. The historical motion vector predictor candidate list HmvpCandList is initialized at the beginning of the slice, and the value of the number of historical motion vector predictor candidates NumHmvpCand registered in the historical motion vector predictor candidate list HmvpCandList is set to 0 (step S2401 in FIG. 38). Next, the following update process of the history prediction motion vector candidate list HmvpCandList is repeatedly performed for each coding block in the slice (steps S2402 to S2407 in FIG. 38). It is determined whether or not there is an inter prediction information candidate hMvpCand to be registered in the history prediction motion vector candidate list HmvpCandList (step S2404 in FIG. 38). If the prediction method determination unit 105 on the encoding side determines the normal prediction motion vector mode or the normal merge mode, or if the bitstream decoding unit on the decoding side decodes the normal prediction motion vector mode or the normal merge mode, the inter prediction mode is set to hMvpCand. If the prediction method determination unit 105 on the encoding side determines the intra prediction mode, sub-block prediction motion vector mode, or sub-block merge mode, or if the bitstream decoding unit on the decoding side decodes the intra prediction mode, sub-block prediction motion vector mode, or sub-block merge mode, the update process of the history prediction motion vector candidate list HmvpCandList is not performed, and there is no inter prediction information candidate hMvpCand to be registered. If there is no inter-prediction information candidate hMvpCand to be registered, step S2406 is skipped (step S2404 in FIG. 38: NO). If there is an inter-prediction information candidate hMvpCand to be registered, the processes from step S2406 onwards are performed (step S2404 in FIG. 38: YES). Next, the elements of the historical motion vector predictor candidate list HmvpCandList are shifted and added (Step S2406 in FIG. 38). By performing the process shown in FIG. 38, it is possible to omit the process of checking for and deleting identical candidates, as well as the process of setting variables and comparing variables to execute that process, thereby reducing the amount of processing. Furthermore, even if the same candidate deletion process is not performed on the historical predicted motion vector candidate list HmvpCandList when adding an element to the historical predicted motion vector candidate list, it is possible to reduce the possibility of the same candidate being added to the predicted motion vector candidate list by making it possible to refer to the older motion information in order to the newly added motion information.

[0170] (Variation 2) As a modification of the first embodiment, the element shift / addition process procedure of the historical motion vector predictor candidate list HmvpCandList in step S2406 of FIG. 38 is configured as follows. FIG. 39 is a flowchart of the element shift / addition process procedure for the historical motion vector predictor candidate list HmvpCandList in step S2406 of FIG. First, it is determined whether to remove the first element stored in the history motion vector predictor candidate list HmvpCandList before adding a new element, or to add a new element without removing any elements. Specifically, it compares whether NumHmvpCand is 6 (step S2541 in FIG. 39). If NumHmvpCand is 6 (step S2541 in FIG. 39: YES), the first element stored in the history motion vector predictor candidate list HmvpCandList is removed before adding a new element. The initial value of index i is set to 1. The element shifting process of step S2543 is repeated from this initial value to NumHmvpCand (steps S2542 to S2544 in FIG. 39). The elements of HmvpCandList[i] are copied to HmvpCandList[i - 1] to shift the elements forward (step S2543 in FIG. 39), and i is incremented by 1 (steps S2542 and S2544 in FIG. 39). Next, the inter prediction information candidate hMvpCand is added to the (NumHmvpCand-1)th HmvpCandList[NumHmvpCand-1], counting from 0, which corresponds to the end of the historical motion vector predictor candidate list (step S2545 in Figure 39), and the element shifting and adding process for the historical motion vector predictor candidate list HmvpCandList ends. On the other hand, if NumHmvpCand is not 6 (step S2541 in Figure 39: NO), a new element is added without removing any elements stored in the historical motion vector predictor candidate list HmvpCandList. The inter prediction information candidate hMvpCand is added to the (NumHmvpCand-1)th HmvpCandList [NumHmvpCand], counting from 0, which corresponds to the end of the history prediction motion vector candidate list, and NumHmvpCand is incremented by 1 (step S2546 in Figure 39), thereby completing the element shift and addition process of this history prediction motion vector candidate list HmvpCandList. By performing the process shown in FIG. 39, it is possible to omit the process of checking for and deleting identical candidates, as well as the process of setting variables and comparing variables for executing that process, thereby reducing the amount of processing.

[0171] (Variation 3) In this embodiment, we describe a configuration in which the history prediction motion vector candidate list HmvpCandList is used while referencing it in the reverse order of storage in which new motion information is added from the end, and the motion information that is the history prediction motion vector candidate stored in HmvpCandList is used while referencing it in order from the oldest motion information to the newly added motion information, without performing the same candidate deletion process. In a modified example of the first embodiment, a forward order mode is provided in which the reference order is the same as the storage order in which the motion information is added from the end, and older motion information is referenced from newly added motion information, and a reverse order mode is provided in which the reference order is the opposite to the storage order in which new motion information is added from the end, and older motion information is referenced from newly added motion information, and the forward order mode and reverse order mode can be switched using history reference flag information for switching the reference order of the history motion vector predictor candidate list HmvpCandList.This history reference flag is included in a syntax element of the coded bitstream and transmitted to the decoding side, and the decoding side obtains the coded bitstream having this history reference flag in its syntax element so that it can be decoded.

[0172] (Second embodiment) As a second embodiment, when deriving the motion vector predictor candidate list mvpListLX, the following configuration is adopted. In particular, when deriving the motion vector predictor candidate list mvpListLX, the historical motion vector predictor candidate list HmvpCandList is used while being referenced from the beginning in the reverse order of storage to the order in which new motion vectors are added from the end, and in the process of adding motion vector predictor candidates from the historical motion vector predictor candidate list to the motion vector predictor candidate list, the configuration is such that the process of determining whether the same motion vector predictor candidate list is included in the motion vector predictor candidate list is not performed.

[0173] The historical motion vector predictor candidate derivation process of this embodiment will be described below.

[0174] <Process for deriving historical motion vector predictor candidates without duplicate candidate deletion process> Here, a description will be given of a process for deriving a historical motion vector predictor candidate that does not involve a process for deleting identical candidates.

[0175] Figure 47 is a flowchart that explains the procedure for deriving a historical predicted motion vector candidate when deriving a predicted motion vector candidate list mvpListLX by using the historical predicted motion vector candidate list HmvpCandList while referring to the list in the reverse order of storage, and by configuring the system so that the same candidate deletion process is not performed.

[0176] If the current number of motion vector predictor candidates numCurrMvpCand is greater than or equal to the maximum number of elements in the motion vector predictor list mvpListLX (2 here) or the number of history motion vector predictor candidates NumHmvpCand is 0 (step S2601: NO in Figure 47), steps S2602 to S2609 in Figure 47 are omitted and the history motion vector predictor candidate derivation procedure ends. If the current number of motion vector predictor candidates numCurrMvpCand is less than 2, which is the maximum number of elements in the motion vector predictor list mvpListLX (step S2601: YES in Figure 47), steps S2602 to S2609 in Figure 47 are performed.

[0177] Next, the processes of steps S2603 to S2608 in Figure 47 are repeated for index i from 0 to the smaller value -1 of 4 or the number of history motion vector predictor candidates NumHmvpCand (steps S2602 to S2609 in Figure 47). If the current number of motion vector predictor candidates numCurrMvpCand is equal to or greater than 2, which is the maximum number of elements in the motion vector predictor list mvpListLX (step S2603: NO in Figure 47), the processes of steps S2604 to S2609 in Figure 47 are omitted, and the history 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 list mvpListLX (step S2603: YES in Figure 47), the processes of step S2604 and subsequent steps in Figure 47 are performed.

[0178] Next, the processes from steps S2605 to S2607 are performed for index Y=0 and 1 (L0 and L1), respectively (steps S2604 to S2608 in FIG. 47). If the current number of motion vector predictor candidates numCurrMvpCand is equal to or greater than 2, which is the maximum number of elements in the motion vector predictor list mvpListLX (step S2605: NO in FIG. 47), steps S2606 to S2609 in FIG. 47 are omitted, and the history motion vector predictor candidate derivation process procedure ends. If the current number of motion vector predictor candidates numCurrMvpCand is less than 2, which is the maximum number of elements in the motion vector predictor list mvpListLX (step S2605: YES in FIG. 47), the processes from step S2606 onwards in FIG. 47 are performed.

[0179] Next, if the reference index of LY in the history motion vector predictor candidate list HmvpCandList[i] is an element with the same reference index as the reference index refIdxLX of the motion vector to be coded / decoded (step S2606: YES in FIG. 47), the motion vector of LY in the history motion vector predictor candidate HmvpCandList[i] is added to the numCurrMvpCand-th element mvpListLX[numCurrMvpCand] counting from 0 in the motion vector predictor candidate list (step S2607 in FIG. 47), and the number of current motion vector predictor candidates numCurrMvpCand is incremented by 1. If the reference index of LY in the history motion vector predictor candidate list HmvpCandList[i] is not an element with the same reference index as the reference index refIdxLX of the motion vector to be coded / decoded (step S2606: NO in FIG. 47), the addition process of step S2607 is skipped.

[0180] The above processing from steps S2605 to S2607 in FIG. 47 is performed for both L0 and L1 (steps S2604 to S2608 in FIG. 47).

[0181] Index i is incremented by 1 (steps S2602 and S2609 in FIG. 47), and if index i is equal to or less than the smaller value −1 of 4 or the number of historical motion vector predictor candidates NumHmvpCand, processing from step S2603 onwards is performed again (steps S2602 to S2609 in FIG. 47). By performing the above-described historical motion vector predictor candidate derivation process, the process of adding a motion vector from the historical motion vector predictor candidate list to the motion vector predictor candidate list does not involve the same candidate deletion process, so that the same candidate check and deletion process, as well as the variable setting and comparison process for executing the process, can be omitted, and the amount of processing can be reduced.Furthermore, by making it possible to refer to the motion information that is the historical motion vector predictor candidate stored in HmvpCandList in order from the oldest motion information to the most recently added motion information, it becomes possible to add a variety of motion information to the motion vector predictor candidate list. Furthermore, even if the same candidate deletion process is not performed on the historical predicted motion vector candidate list during the process of adding a candidate from the historical predicted motion vector candidate list to the predicted motion vector candidate list, it is possible to reduce the possibility of the same candidate being added to the predicted motion vector candidate list by making it possible to refer to the motion information in order from the oldest to the most recently added motion information.

[0182] (Variation 1) In the second embodiment, when deriving the predicted motion vector candidate list mvpListLX, the historical predicted motion vector candidate list HmvpCandList is used while being referenced from the beginning in the reverse order of storage in which new candidates are added from the end, and a configuration is described in which the same candidate deletion process is not performed. In a modified example of the second embodiment, as shown below, only the reference order of the historical predicted motion vector candidate list HmvpCandList is changed from the beginning to the end in the reverse order of the storage order in which new motion vectors are added from the end, so that the newly added motion information is referenced first from the old motion information, and the same candidate deletion process is performed as is.

[0183] FIG. 48 is a flowchart illustrating the procedure for deriving a historical motion vector predictor candidate when the historical motion vector predictor candidate list HmvpCandList is used while referring to the candidates in the reverse order to the storage order, and the same candidate deletion process is not performed.

[0184] If the current number of motion vector predictor candidates numCurrMvpCand is greater than or equal to the maximum number of elements in the motion vector predictor list mvpListLX (2 here) or the number of history motion vector predictor candidates NumHmvpCand is 0 (step S2801: NO in Figure 48), steps S2802 to S2809 in Figure 48 are omitted and the history motion vector predictor candidate derivation procedure ends. If the current number of motion vector predictor candidates numCurrMvpCand is less than 2, which is the maximum number of elements in the motion vector predictor list mvpListLX (step S2801: YES in Figure 48), steps S2802 to S2809 in Figure 48 are performed.

[0185] Next, the processes of steps S2803 to S2808 in Fig. 48 are repeated from 0 until index i is equal to the smaller value of 4 or the number of history motion vector predictor candidates NumHmvpCand minus 1 (steps S2802 to S2809 in Fig. 48). If the current number of motion vector predictor candidates numCurrMvpCand is equal to or greater than 2, which is the maximum number of elements in the motion vector predictor list mvpListLX (step S2803: NO in Fig. 48), the processes of steps S2804 to S2809 in Fig. 48 are omitted, and the history 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 list mvpListLX (step S2803: YES in Fig. 48), the processes of step S2804 and subsequent steps in Fig. 48 are performed.

[0186] Next, the processes from steps S2805 to S2807 are performed for index Y=0 and 1 (L0 and L1), respectively (steps S2804 to S2808 in FIG. 48). If the current number of motion vector predictor candidates numCurrMvpCand is greater than or equal to 2, which is the maximum number of elements in the motion vector predictor list mvpListLX (step S2805: NO in FIG. 48), steps S2806 to S2809 in FIG. 48 are omitted, and the history motion vector predictor candidate derivation process procedure ends. If the current number of motion vector predictor candidates numCurrMvpCand is less than 2, which is the maximum number of elements in the motion vector predictor list mvpListLX (step S2805: YES in FIG. 48), the processes from step S2806 onwards in FIG. 48 are performed.

[0187] Next, if there is an element whose reference index for LY in the history predicted motion vector candidate list HmvpCandList[i] is the same as the reference index refIdxLX of the motion vector to be encoded / decoded, and which is different from any element in the predicted motion vector list mvpListLX (step S2806: YES in Figure 48), the LY motion vector of the history predicted motion vector candidate HmvpCandList[i] is added to the numCurrMvpCand-th element mvpListLX[numCurrMvpCand] counting from 0 in the predicted motion vector candidate list (step S2807 in Figure 48), and the number of current predicted motion vector candidates numCurrMvpCand is incremented by 1. If the reference index of LY in the history predicted motion vector candidate list HmvpCandList[i] is an element with the same reference index as the reference index refIdxLX of the motion vector to be encoded / decoded, and there is no element different from any element in the predicted motion vector list mvpListLX (step S2806: NO in Figure 48), the additional processing of step S2807 is skipped.

[0188] The above processing from steps S2805 to S2807 in FIG. 48 is performed for both L0 and L1 (steps S2804 to S2808 in FIG. 48).

[0189] Index i is incremented by 1, and if index i is equal to or less than the smaller value −1 of 4 or the number of historical motion vector predictor candidates NumHmvpCand, the processes from step S2803 onwards are performed again (steps S2802 to S2809 in FIG. 48). By performing the above-described historical predicted motion vector candidate derivation process, the same candidate deletion process is performed as is, and the motion information that is the historical predicted motion vector candidate stored in HmvpCandList can be referenced in order from the oldest motion information to the most recently added motion information, making it possible to add even more diverse motion information to the predicted motion vector candidate list.

[0190] (Variation 2) As a modification of the second embodiment, when deriving the motion vector predictor candidate list mvpListLX, the element shift / addition processing procedure of the historical motion vector predictor candidate list HmvpCandList in step S2406 in Fig. 38 is configured as shown in Fig. 39. The description of Fig. 39 is omitted as it is the same as that described above. By performing the process shown in FIG. 39, it is possible to omit the process of checking for and deleting identical candidates, as well as the process of setting variables and comparing variables for executing that process, thereby reducing the amount of processing.

[0191] (Variation 3) In the second embodiment, when deriving the motion vector predictor candidate list mvpListLX, the history motion vector predictor candidate list HmvpCandList is used while referring to the motion information stored in HmvpCandList in the reverse order of adding new motion information from the end, and the motion information that is the history motion vector predictor candidate stored in HmvpCandList is used while referring to it in order from the oldest motion information to the newly added motion information, without performing the same candidate deletion process. In a modified example of the second embodiment, a forward order mode is provided in which the reference order is the same as the storage order in which the motion information is added from the end, and old motion information is referenced from the newly added motion information, and a reverse order mode is provided in which the reference order is the opposite to the storage order in which the new motion information is added from the end, and old motion information is referenced from the newly added motion information, and the forward order mode and reverse order mode can be switched using history reference flag information for switching the reference order of the history motion vector predictor candidate list HmvpCandList. This history reference flag is included in a syntax element of the coded bit stream and transmitted to the decoding side, and the decoding side obtains the coded bit stream having this history reference flag in its syntax element, enabling decoding.

[0192] (Third embodiment) As a third embodiment, the following configuration is performed when deriving a merge candidate list. In particular, the reference order when using the history motion vector predictor candidate list is changed so that the motion information is referenced in order from the oldest motion information to the most recently added motion information. Also, when a new element is added to the merge candidate list, the process of searching for and deleting elements with identical information from the history motion vector predictor candidate list is changed so as not to be performed. Furthermore, in normal merge mode, when deriving normal merge candidates using the history motion vector predictor candidate list HmvpCandList, the process of searching for elements with identical information from the history motion vector predictor candidate list and not using elements with identical information as normal merge candidates is changed so as not to be performed. <History merge candidate derivation process without duplicate candidate deletion process> Here, a description will be given of a history merge candidate derivation process that does not involve a duplicate candidate deletion process. Fig. 40 is a flowchart illustrating a history merge candidate derivation process procedure in a case where the history motion vector predictor candidate list HmvpCandList is used while sequentially referring to motion information from the oldest to the newly added motion information, and the duplicate candidate deletion process is not performed. First, initialization processing is performed (step S2701 in FIG. 40). The number of elements currently registered in the merge candidate list, numCurrMergeCand, is set in the variable numOrigMergeCand. The initial value of the index hMvpIdx is set to 0, and the addition process from step S2703 to step S2710 in Figure 40 is repeated from this initial value to NumHmvpCand-1 (steps S2702 to S2711 in Figure 40). If the number of elements registered in the current merge candidate list, numCurrMergeCand, is not less than (the 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 ends (step S2703 in Figure 40: NO). If the number of elements registered in the current merge candidate list, numCurrMergeCand, is less than (the maximum number of merge candidates, MaxNumMergeCand-1), processing from step S2710 onwards is carried out (step S2703 in Figure 40: YES). The hMvpIdx-th element HmvpCandList[hMvpIdx] of the historical 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 S2710 in FIG. 40). The index hMvpIdx is incremented by 1 (step S2702 in FIG. 40), and steps S2702 to S2711 in FIG. 40 are repeated. 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 complete. By performing the above-described history merge candidate derivation process, the process of adding from the history predicted motion vector candidate list to the merge candidate list does not involve the same candidate deletion process, thereby omitting the same candidate check and deletion process, as well as the variable setting and comparison process for executing that process, and thereby reducing the amount of processing. In addition, by making it possible to reference the motion information that is the historical predicted motion vector candidate stored in HmvpCandList in order from the oldest motion information to the most recently added motion information, it becomes possible to add a variety of motion information to the merge candidate list. Furthermore, even if the same candidate deletion process is not performed on the history prediction motion vector candidate list during the process of adding from the history prediction motion vector candidate list to the merge candidate list, it is possible to reduce the possibility of the same candidate being added to the merge candidate list by making it possible to refer to the motion information in order from the oldest to the newly added motion information.

[0193] (Variation 1) As a modification of the third embodiment, when deriving a merge candidate list, the same candidate deletion process is not performed when adding elements to the historical motion vector predictor candidate list HmvpCandList as shown in Fig. 38. The description of Fig. 38 is omitted as it is the same as above. By performing the process shown in FIG. 38, it is possible to omit the process of checking for and deleting identical candidates, as well as the process of setting variables and comparing variables to execute that process, thereby reducing the amount of processing. Furthermore, even if the same candidate deletion process is not performed on the history prediction motion vector candidate list HmvpCandList when adding an element to the history prediction motion vector candidate list, it is possible to reduce the possibility of the same candidate being added to the merge candidate list by making it possible to refer to the oldest motion information in order to the newly added motion information.

[0194] (Variation 2) As a modification of the third embodiment, when deriving a merge candidate list, the element shift / addition processing procedure of the historical motion vector predictor candidate list HmvpCandList in step S2406 in Fig. 38 is configured as shown in Fig. 39. The description of Fig. 39 is omitted as it is the same as above. By performing the process shown in FIG. 39, it is possible to omit the process of checking for and deleting identical candidates, as well as the process of setting variables and comparing variables for executing that process, thereby reducing the amount of processing.

[0195] (Variation 3) In the third embodiment, when deriving a merge candidate list, the motion information that is the historical predicted motion vector candidate stored in HmvpCandList is used by referring to it in order from the oldest motion information to the most recently added motion information, and a configuration is described in which the same candidate deletion process is not performed. In a modified example of the third embodiment, a forward mode in which the reference order starts from newly added motion information to older motion information, and a reverse mode in which the reference order starts from older motion information to newly added motion information are provided, and the forward mode and reverse mode can be switched using history reference flag information for switching the reference order of the history motion vector predictor candidate list HmvpCandList. This history reference flag is included in a syntax element of the coded bitstream and transmitted to the decoding side, and the decoding side obtains the coded bitstream having this history reference flag in its syntax element so that it can be decoded.

[0196] All of the above-described embodiments may be combined in multiple ways.

[0197] In all of the above-described embodiments, the bitstream 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 bitstream in this specific data format.

[0198] When a wired or wireless network is used to exchange bitstreams between an image encoding device and an image decoding device, the bitstreams may be converted into a data format suitable for the transmission mode of the communication channel before transmission. 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.

[0199] Furthermore, a display unit for displaying images 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 the decoded image signal on a screen.

[0200] Furthermore, an imaging unit may be added to the configuration and the captured image may be input to the image coding device, thereby forming an imaging device. In this case, the imaging unit inputs the captured image signal to the block division unit 101.

[0201] 37 shows an example of the hardware configuration of a coding / decoding device according to this embodiment. The coding / decoding device includes the configurations of the image coding device and image decoding device according to the embodiments 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.

[0202] 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 performed 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 performed 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 perform an operation desired by the user, based on user operations input via the I / O interface 9003. User operations via the keyboard 9104, mouse 9105, etc. include selecting whether to execute encoding or decoding functions, setting encoding quality, bitstream input / output destinations, image input / output destinations, etc.

[0203] When a user desires to play back images recorded on the disc recording medium 9100, the optical disc drive 9005 reads a bitstream from the inserted disc recording medium 9100 and sends the read bitstream to an image decoding unit 9008 of the codec IC 9002 via a bus 9010. The image decoding unit 9008 performs image decoding processing on the input bitstream in the image decoding device according to an embodiment of the present invention, 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 is connectable to an external distribution server 9106 or a mobile terminal 9107 via a network 9101. When a user desires to play back images recorded on the distribution server 9106 or the mobile terminal 9107 instead of the images recorded on the disc recording medium 9100, the network interface 9006 acquires the bitstream from the network 9101 instead of reading the bitstream from the input disc recording medium 9100. Furthermore, when the user wishes to play back the image recorded in memory 9004, the image decoding process is performed on the bitstream recorded in memory 9004 in the image decoding device according to the embodiment of the present invention.

[0204] When the 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 it to the image encoding unit 9007 of the codec IC 9002 via the bus 9010. The image encoding unit 9007 performs 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 create a bitstream. The bitstream is then sent to the memory 9004 via the bus 9010. When the user desires to record the bitstream on a disc recording medium 9100 instead of the memory 9004, the optical disc drive 9005 writes the bitstream to the inserted disc recording medium 9100.

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

[0206] The above 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 computer-readable recording medium, or may be provided from a server via a wired or wireless network, or may be provided as data broadcasting on terrestrial or satellite digital broadcasting.

[0207] 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 the components and treatment processes, and that such modifications are also within the scope of the present invention. [Explanation of symbols]

[0208] 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 Encoding 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 Encoding information storage memory 206 Inverse quantization / inverse orthogonal transform unit, 207 Decoded image signal superposition unit, 208 Decoded image memory.< / poc>

Claims

1. A video encoding device that encodes a video in units of blocks and generates a bitstream, comprising: a temporal motion information candidate derivation unit that adds temporal motion information candidates derived from motion information of blocks in a picture that is temporally different from the block to be coded to a motion information candidate list; a historical motion information candidate derivation unit that adds a historical motion information candidate registered in a historical motion information candidate list to the motion information candidate list; a predictive motion information candidate supplementation unit that adds motion information of a predetermined value until the number of pieces of motion information registered in the motion information candidate list reaches a predetermined number; Equipped with the history motion information candidate derivation unit does not compare the motion information with the motion information candidate list, and adds the history motion information candidate to the motion information candidate list in order from oldest to newest of the motion information registered in the history motion information candidate list. A video encoding device characterized by:

2. A video encoding method for encoding a video in units of blocks to generate a bitstream, comprising: a temporal motion information candidate derivation step of adding temporal motion information candidates derived from motion information of blocks in a picture that is different in time from the block to be coded to a motion information candidate list; a historical motion information candidate derivation step of adding a historical motion information candidate registered in the historical motion information candidate list to the motion information candidate list; a predictive motion information candidate supplementation step of adding motion information of a predetermined value until the number of motion information registered in the motion information candidate list reaches a predetermined number; Equipped with In the history motion information candidate derivation step, the history motion information candidate is added to the motion information candidate list in order from the oldest motion information to the newest motion information among the motion information registered in the history motion information candidate list, without comparing the motion information with the motion information candidate list. Video coding method.

3. A video decoding device that decodes an encoded bit string obtained by encoding a video in units of blocks, comprising: a temporal motion information candidate derivation unit that adds temporal motion information candidates derived from motion information of blocks in a picture that is different in time from the block to be decoded to a motion information candidate list; a historical motion information candidate derivation unit that adds a historical motion information candidate registered in a historical motion information candidate list to the motion information candidate list; a predictive motion information candidate supplementation unit that adds motion information of a predetermined value until the number of pieces of motion information registered in the motion information candidate list reaches a predetermined number; Equipped with the history motion information candidate derivation unit does not compare the motion information with the motion information candidate list, and adds the history motion information candidate to the motion information candidate list in order from oldest to newest of the motion information registered in the history motion information candidate list. A video decoding device comprising:

4. A video decoding method for decoding an encoded bit string obtained by encoding a video in units of blocks, comprising: a temporal motion information candidate derivation step of adding temporal motion information candidates derived from motion information of blocks in a picture that is different in time from the block to be decoded to a motion information candidate list; a historical motion information candidate derivation step of adding a historical motion information candidate registered in the historical motion information candidate list to the motion information candidate list; a predictive motion information candidate supplementation step of adding motion information of a predetermined value until the number of motion information registered in the motion information candidate list reaches a predetermined number; and In the history motion information candidate derivation step, the history motion information candidate is added to the motion information candidate list in order from the oldest motion information to the newest motion information among the motion information registered in the history motion information candidate list, without comparing the motion information with the motion information candidate list. Video decoding method.

5. A transmission method for transmitting a bitstream, comprising: a temporal motion information candidate derivation step of adding temporal motion information candidates derived from motion information of blocks in a picture that is different in time from the block to be coded to a motion information candidate list; a historical motion information candidate derivation step of adding a historical motion information candidate registered in the historical motion information candidate list to the motion information candidate list; a predictive motion information candidate supplementation step of adding motion information of a predetermined value until the number of motion information registered in the motion information candidate list reaches a predetermined number; an encoding step of encoding information indicating a prediction mode of a block to generate a bitstream; a transmitting step of transmitting the bitstream; Equipped with In the history motion information candidate derivation step, the history motion information candidate is added to the motion information candidate list in order from the oldest motion information to the newest motion information among the motion information registered in the history motion information candidate list, without comparing the motion information with the motion information candidate list. Transmission method.

6. A method for storing a bitstream on a recording medium, comprising: a temporal motion information candidate derivation step of adding temporal motion information candidates derived from motion information of blocks in a picture that is different in time from the block to be coded to a motion information candidate list; a historical motion information candidate derivation step of adding a historical motion information candidate registered in the historical motion information candidate list to the motion information candidate list; a predictive motion information candidate supplementation step of adding motion information of a predetermined value until the number of motion information registered in the motion information candidate list reaches a predetermined number; an encoding step of encoding information indicating a prediction mode of a block to generate a bitstream; a storing step of storing the bitstream on a recording medium; Equipped with In the history motion information candidate derivation step, the history motion information candidate is added to the motion information candidate list in order from the oldest motion information to the newest motion information among the motion information registered in the history motion information candidate list, without comparing the motion information with the motion information candidate list. Storage method.

Citation Information

Patent Citations

  • Concept of using one or multiple look up tables to store motion information of previously coded in order and use them to code following blocks

    US20200195959A1

  • Partial / full pruning when adding a HMVP candidate to merge / amvp

    WO2020003275A1

  • Interaction between LUT and amvp

    WO2020003284A1

  • Method and apparatus for constructing prediction candidate on basis of hmvp

    WO2020071793A1

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

    JP1997172644A