Moving image encoding device, moving image encoding method, moving image decoding device, moving image decoding method, transmission method and storage method
Patent Information
- Application Number
- JP2024212529
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2019-04-24
- Filing Date
- 2024-12-05
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2039-12-27
AI Technical Summary
【0012】 本発明によれば、高効率な画像符号化·復号処理を低負荷で実現することができる。
Smart Images

Figure 2025026557000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to an image encoding and decoding technique that divides an image into blocks and performs prediction. [Background technology]
[0002] In image encoding and decoding, the image to be processed is divided into blocks, which are collections of a certain number of pixels, and processed on a block-by-block basis. By dividing the image into appropriate blocks and appropriately setting intra-frame prediction (intra-prediction) and inter-frame prediction (inter-prediction), the encoding efficiency can be improved.
[0003] In video coding and decoding, coding efficiency is improved by inter-prediction, which predicts from pictures that have already been coded and decoded. Patent Document 1 describes a technique for applying affine transformation during inter-prediction. In video, it is not uncommon for objects to undergo transformations such as enlargement, reduction, and rotation, and applying the technique of Patent Document 1 enables efficient coding. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Japanese Patent Application Publication No. 9-172644 Summary of the Invention [Problem to be solved by the invention]
[0005] However, the technique of Patent Document 1 involves image conversion, and therefore has the problem of a large processing load. In view of the above problem, the present invention provides an efficient encoding technique with a low load. [Means for solving the problem]
[0006] In order to solve the above problem, a video encoding device of one embodiment of the present invention comprises a spatial motion information candidate derivation unit that adds a spatial motion information candidate derived from motion information of a block spatially adjacent to the block to be encoded to a motion information candidate list, a historical motion information candidate derivation unit that adds a historical motion information candidate registered in the historical motion information candidate list to the motion information candidate list, and an encoding unit that encodes inter-prediction information including a flag indicating whether a merge mode is applied to the block to be encoded, and if the merge mode is not applied to the block to be encoded, the historical motion information candidate derivation unit does not compare the motion information in the historical motion information candidate list with the motion information in the motion information candidate list, and adds the historical motion information candidate to the motion information candidate list in the order of the motion information registered in the historical motion information candidate list from the oldest motion information to the most recently added motion information.
[0007] In addition, another aspect of the video encoding method of the present invention includes a first step of adding a spatial motion information candidate derived from motion information of a block spatially adjacent to the block to be encoded to a motion information candidate list, a second step of adding a historical motion information candidate registered in a historical motion information candidate list to the motion information candidate list, and a third step of encoding inter-prediction information including a flag indicating whether a merge mode is applied to the block to be encoded, wherein if the merge mode is not applied to the block to be encoded, the second step does not compare the motion information in the historical motion information candidate list with the motion information in the motion information candidate list, and adds the historical motion information candidates to the motion information candidate list in the order of the motion information registered in the historical motion information candidate list from the oldest motion information to the most recently added motion information.
[0008] In addition, another aspect of the video decoding device of the present invention comprises a decoding unit that decodes inter-prediction information including a flag indicating whether a merge mode is applied to the block to be decoded, a spatial motion information candidate derivation unit that adds a spatial motion information candidate derived from motion information of a block spatially adjacent to the block to be decoded to a motion information candidate list, and a historical motion information candidate derivation unit that adds a historical motion information candidate registered in the historical motion information candidate list to the motion information candidate list, wherein if the merge mode is not applied to the block to be decoded, the historical motion information candidate derivation unit does not compare the motion information in the historical motion information candidate list with the motion information in the motion information candidate list, and adds the historical motion information candidates to the motion information candidate list in the order of the motion information registered in the historical motion information candidate list from the oldest motion information to the most recently added motion information.
[0009] In addition, another aspect of the video decoding method of the present invention includes a first step of decoding inter-prediction information including a flag indicating whether a merge mode is applied to the block to be decoded, a second step of adding a spatial motion information candidate derived from motion information of a block spatially adjacent to the block to be decoded to a motion information candidate list, and a third step of adding a historical motion information candidate registered in a historical motion information candidate list to the motion information candidate list, wherein if the merge mode is not applied to the block to be decoded, the third step does not compare the motion information in the historical motion information candidate list with the motion information in the motion information candidate list, and adds the historical motion information candidates to the motion information candidate list in the order of the motion information registered in the historical motion information candidate list from the oldest motion information to the most recently added motion information.
[0010] In addition, another aspect of the transmission method of the present invention is a transmission method for transmitting a bitstream, comprising: a first step of adding a spatial motion information candidate derived from motion information of a block spatially adjacent to the block to be encoded to a motion information candidate list; a second step of adding a historical motion information candidate registered in a historical motion information candidate list to the motion information candidate list; a third step of encoding inter prediction information including a flag indicating whether a merge mode is applied to the block to be encoded to generate a bitstream; and a fourth step of transmitting the bitstream, wherein if the merge mode is not applied to the block to be encoded, the second step does not compare the motion information in the historical motion information candidate list with the motion information in the motion information candidate list, and adds the historical motion information candidates to the motion information candidate list in the order of the motion information registered in the historical motion information candidate list from the oldest motion information to the most recently added motion information.
[0011] In addition, another aspect of the storage method of the present invention is a storage method for storing a bitstream on a recording medium, comprising: a first step of adding a spatial motion information candidate derived from motion information of a block spatially adjacent to the block to be encoded to a motion information candidate list; a second step of adding a historical motion information candidate registered in a historical motion information candidate list to the motion information candidate list; a third step of encoding inter prediction information including a flag indicating whether a merge mode is applied to the block to be encoded to generate a bitstream; and a fourth step of storing the bitstream on a recording medium, wherein if the merge mode is not applied to the block to be encoded, the second step does not compare the motion information in the historical motion information candidate list with the motion information in the motion information candidate list, and adds the historical motion information candidates to the motion information candidate list in the order of the motion information registered in the historical motion information candidate list from the oldest motion information to the most recently added motion information. Effect of the Invention
[0012] According to the present invention, highly efficient image encoding / decoding processing can be realized with a low load. [Brief description of the drawings]
[0013] [Figure 1] 1 is a block diagram of an image encoding device according to an embodiment of the present invention. [Diagram 2] 1 is a block diagram of an image decoding device according to an embodiment of the present invention. [Diagram 3] 13 is a flowchart for explaining an operation of dividing a tree block. [Figure 4] FIG. 13 is a diagram showing how an input image is divided into tree blocks. [Diagram 5] FIG. 1 is a diagram illustrating a z-scan. [Figure 6A] FIG. 13 is a diagram showing the divided shapes of blocks. [Figure 6B] FIG. 13 is a diagram showing the divided shapes of blocks. [Figure 6C] FIG. 13 is a diagram showing the divided shapes of blocks. [Figure 6D] FIG. 13 is a diagram showing the divided shapes of blocks. [Figure 6E] FIG. 13 is a diagram showing the divided shapes of blocks. [Figure 7] 13 is a flowchart for explaining an operation of dividing a block into four. [Figure 8] 13 is a flowchart for explaining an operation of dividing a block into two or three. [Figure 9] This is a syntax for expressing the shape of block division. [Figure 10A] FIG. 1 is a diagram illustrating intra prediction. [Figure 10B] FIG. 1 is a diagram illustrating intra prediction. [Figure 11] FIG. 13 is a diagram for explaining reference blocks for inter prediction. [Figure 12] This is a syntax for expressing a coding block prediction mode. [Figure 13]FIG. 11 is a diagram showing the correspondence between syntax elements and modes relating to inter prediction. [Figure 14] FIG. 13 is a diagram for explaining affine transformation motion compensation of two control points. [Figure 15] FIG. 13 is a diagram for explaining affine transformation motion compensation of three control points. [Figure 16] FIG. 2 is a block diagram showing a detailed configuration of the inter prediction unit 102 in FIG. [Figure 17] 17 is a block diagram showing a detailed configuration of a normal predicted motion vector mode derivation unit 301 in FIG. 16. [Figure 18] 17 is a block diagram showing a detailed configuration of a normal merge mode derivation unit 302 in FIG. 16. [Figure 19] 17 is a flowchart for explaining a normal predicted motion vector mode derivation process of the normal predicted motion vector mode derivation unit 301 of FIG. 16. [Figure 20] 13 is a flowchart showing a processing procedure of a normal predicted motion vector mode derivation process. [Figure 21] 13 is a flowchart illustrating a processing procedure for a normal merge mode derivation process. [Figure 22] FIG. 3 is a block diagram showing a detailed configuration of an inter prediction unit 203 in FIG. 2. [Diagram 23] 23 is a block diagram showing a detailed configuration of a normal predicted motion vector mode derivation unit 401 in FIG. 22. [Figure 24] 23 is a block diagram showing a detailed configuration of a normal merge mode derivation unit 402 in FIG. 22. [Diagram 25] 23 is a flowchart for explaining a normal predicted motion vector mode derivation process of the normal predicted motion vector mode derivation unit 401 in FIG. 22. [Figure 26] FIG. 13 is a diagram illustrating a procedure for initializing and updating a history motion vector predictor candidate list. [Figure 27] 13 is a flowchart of a procedure of a process of checking identical elements in the procedure of a process of initializing and updating a history motion vector predictor candidate list. [Figure 28]13 is a flowchart of an element shifting process procedure in the history motion vector predictor candidate list initialization / update process procedure. [Figure 29] 13 is a flowchart illustrating a procedure of a process of deriving a history predicted motion vector candidate. [Diagram 30] 13 is a flowchart illustrating a history merging candidate derivation process procedure. [Figure 31A] FIG. 11 is a diagram for explaining an example of a history motion vector predictor candidate list update process. [Figure 31B] FIG. 11 is a diagram for explaining an example of a history motion vector predictor candidate list update process. [Figure 31C] FIG. 11 is a diagram for explaining an example of a history motion vector predictor candidate list update process. [Diagram 32] FIG. 13 is a diagram illustrating motion compensation prediction in the case of L0 prediction in which an L0 reference picture (RefL0Pic) is located at a time earlier than a current picture (CurPic). [Diagram 33] 13 is a diagram for explaining motion compensation prediction in the case where L0 prediction is performed and a reference picture for L0 prediction is located at a later time than the current picture to be processed. FIG. [Diagram 34] FIG. 1 is a diagram for explaining the prediction direction of motion compensation prediction in a bi-predictive case where a reference picture for L0 prediction is at a time earlier than a current picture to be processed and a reference picture for L1 prediction is at a time later than a current picture to be processed. [Diagram 35] 13 is a diagram for explaining the prediction direction of motion compensation prediction in bi-prediction where the reference picture for L0 prediction and the reference picture for L1 prediction are located at a time earlier than the current picture to be processed. FIG. [Diagram 36] 13 is a diagram for explaining the prediction direction of motion compensation prediction in bi-prediction where the reference picture for L0 prediction and the reference picture for L1 prediction are at a time later than the current picture. FIG. [Figure 37] 1 is a diagram illustrating an example of a hardware configuration of a coding / decoding device according to an embodiment of the present invention; [Figure 38]This is a flowchart that explains the procedure of the process of deriving a history prediction motion vector candidate when a history prediction motion vector candidate list is used while referring to the oldest motion information in order to the newly added motion information in order, and the same candidate deletion process is not performed. [Figure 39] 13 is a flowchart of an element shift / addition process procedure for a history motion vector predictor candidate list. [Diagram 40] This is a flowchart that explains the procedure of the history merge candidate derivation process when a history predicted motion vector candidate list is used while referring to the oldest motion information in order to the newly added motion information in order, and the same candidate deletion process is not performed. [Diagram 41] FIG. 13 is a diagram for explaining the configuration of a history predicted motion vector candidate list. [Diagram 42] FIG. 13 is a diagram for explaining a state in which the top element is deleted when adding to a history motion vector predictor candidate list. [Diagram 43] FIG. 13 is a diagram for explaining how elements are shifted within a list when adding to a history motion vector predictor candidate list. [Diagram 44] 13 is a diagram for explaining how a new element is added to a historical motion vector predictor candidate list. FIG. [Diagram 45] FIG. 13 is a diagram for explaining a reference order of a history motion vector predictor candidate list. [Figure 46] FIG. 13 is a diagram for explaining a reference order of a history motion vector predictor candidate list. [Figure 47] 13 is a flowchart illustrating a procedure of a process of deriving a historical motion vector predictor candidate when a historical motion vector predictor candidate list is used while referring to the list in a reverse order to the storage order, and a process of deleting identical candidates is not performed. [Figure 48] 13 is a flowchart illustrating a procedure of a process of deriving a historical motion vector predictor candidate when a configuration is configured to perform a process of deleting identical candidates by using a historical motion vector predictor candidate list while referring to the list in a reverse order to the order in which the motion vectors were stored. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] The technologies and technical terms used in this embodiment will be defined below.
[0015] <Tree Block> In the embodiment, an image to be encoded / decoded is divided equally into a predetermined size. This unit is defined as a tree block. In FIG. 4, the size of the tree block is 128x128 pixels, but the size of the tree block is not limited to this and may be set to any size. The tree blocks to be processed (corresponding to the encoding target in the encoding process and the decoding target in the decoding process) are switched in raster scan order, that is, from left to right and from top to bottom. The inside of each tree block can be further divided recursively. A block to be encoded / decoded after the tree block is divided recursively is defined as an encoding block. In addition, the tree block and the encoding block are collectively defined as a block. Efficient encoding can be achieved by performing appropriate block division. The size of the tree block can be a fixed value previously determined by the encoding device and the decoding device, or a configuration can be adopted in which the size of the tree block determined by the encoding device is transmitted to the decoding device. Here, the maximum size of the tree block is 128x128 pixels, and the minimum size of the tree block is 16x16 pixels. Also, the maximum size of a coding block is set to 64x64 pixels, and the minimum size of a coding block is set to 4x4 pixels.
[0016] <Prediction mode> For each coding block to be processed, a switch is made between intra prediction (MODE_INTRA) in which prediction is made from the processed image signal of the image to be processed and inter prediction (MODE_INTER) in which prediction is made from the image signal of the processed image. In the encoding process, the processed image is used as an image, image signal, tree block, block, coding block, etc., obtained by decode a signal whose encoding has been completed, and in the decoding process, the processed image is used as an image, image signal, tree block, block, coding block, etc., after decoding has been completed. A mode for distinguishing between the intra prediction (MODE_INTRA) and the inter prediction (MODE_INTER) is defined as a prediction mode (PredMode). The prediction mode (PredMode) has intra prediction (MODE_INTRA) or inter prediction (MODE_INTER) as a value.
[0017] <Inter Prediction> In inter prediction, which performs prediction from an image signal of a processed image, multiple processed images can be used as reference pictures. In order to manage multiple reference pictures, two types of reference lists, L0 (reference list 0) and L1 (reference list 1), are defined, and each uses a reference index to identify a reference picture. L0 prediction (Pred_L0) is available in P slices. L0 prediction (Pred_L0), L1 prediction (Pred_L1), and bi-prediction (Pred_BI) are available in B slices. L0 prediction (Pred_L0) is inter prediction that refers to a reference picture managed in L0, and L1 prediction (Pred_L1) is inter prediction that refers to a reference picture managed in L1. Bi-prediction (Pred_BI) is inter prediction in which both L0 prediction and L1 prediction are performed, and one reference picture managed in each of L0 and L1 is referenced. Information that identifies L0 prediction, L1 prediction, and bi-prediction is defined as an inter prediction mode. In the subsequent processing, it is assumed that the constants and variables with the subscript LX in the output are processed for each L0 and L1.
[0018] <Predictive motion vector mode> The predicted motion vector mode is a mode in which an index for identifying a predicted motion vector, a differential motion vector, an inter prediction mode, and a reference index are transmitted to determine inter prediction information for a block to be processed. The predicted motion vector is derived from a predicted motion vector candidate derived from a processed block adjacent to the block to be processed, or a block belonging to a processed image that is located at the same position as the block to be processed or in the vicinity (neighborhood), and an index for identifying the predicted motion vector.
[0019] <Merge mode> Merge mode is a mode in which inter-prediction information for the block to be processed is derived from inter-prediction information for a processed block adjacent to the block to be processed, or a block belonging to a processed image that is located at the same position as the block to be processed or in its vicinity (vicinity), without transmitting differential motion vectors or reference indexes.
[0020] The spatial merge candidates are defined as processed blocks adjacent to the current block and the inter prediction information of the processed blocks. The temporal merge candidates are defined as blocks belonging to the processed image that are located at the same position as the current block or in its vicinity (neighborhood) and the inter prediction information derived from the inter prediction information of the blocks. Each merge candidate is registered in a merge candidate list, and a merge index is used to identify the merge candidate to be used in predicting the current block.
[0021] <Adjacent block> 11 is a diagram for explaining reference blocks to be referenced for deriving inter prediction information in the predicted motion vector mode and merge mode. A0, A1, A2, B0, B1, B2, and B3 are processed blocks adjacent to the processing target block. T0 is a block belonging to the processed image, and is located at the same position as the processing target block in the processing target image or in the vicinity (neighborhood).
[0022] A1 and A2 are blocks located to the left of the coding block to be processed and adjacent to the coding block to be processed. B1 and B3 are blocks located above the coding block to be processed and adjacent to the coding block to be processed. A0, B0, and B2 are blocks located at the bottom left, top right, and top left of the coding block to be processed, respectively.
[0023] How adjacent blocks are handled in the predicted motion vector mode and merge mode will be described in detail later.
[0024] <Affine transformation motion compensation> Affine transformation motion compensation is a method of dividing an encoding block into subblocks of a predetermined unit, determining a motion vector for each divided subblock individually, and performing motion compensation. The motion vector of each subblock is derived based on one or more control points derived from inter prediction information of a processed block adjacent to the processing target block, or a block belonging to a processed image that is located at the same position as the processing target block or in the vicinity (neighborhood). In this embodiment, the size of the subblock is 4x4 pixels, but the size of the subblock is not limited to this, and the motion vector may be derived in units of pixels.
[0025] Figure 14 shows an example of affine transformation motion compensation when there are two control points. In this case, the two control points have two parameters, a horizontal component and a vertical component. Therefore, the affine transformation when there are two control points is called a four-parameter affine transformation. CP1 and CP2 in Figure 14 are the control points. Figure 15 shows an example of affine transformation motion compensation when there are three control points. In this case, the three control points have two parameters, a horizontal component and a vertical component. Therefore, the affine transformation when there are three control points is called a six-parameter affine transformation. CP1, CP2, and CP3 in Figure 15 are the control points.
[0026] Affine transform motion compensation can be used in both the predictive motion vector mode and the merge mode. A mode in which affine transform motion compensation is applied in the predictive motion vector mode is defined as a sub-block predictive motion vector mode, and a mode in which affine transform motion compensation is applied in the merge mode is defined as a sub-block merge mode.
[0027] <Inter prediction syntax> The syntax relating to inter prediction will be described with reference to FIGS. In Fig. 12, merge_flag is a flag indicating whether the current coding block is to be in merge mode or predictive motion vector mode. merge_affine_flag is a flag indicating whether the sub-block merge mode is applied to the current coding block in merge mode. inter_affine_flag is a flag indicating whether the sub-block predictive motion vector mode is applied to the current coding block in predictive motion vector mode. cu_affine_type_flag is a flag for determining the number of control points in the sub-block predictive motion vector mode. FIG. 13 shows the value of each syntax element and the corresponding prediction method. merge_flag=1,merge_affine_flag=0 corresponds to the normal merge mode. The normal merge mode is a merge mode that is not a sub-block merge. merge_flag=1,merge_affine_flag=1 corresponds to the sub-block merge mode. merge_flag=0,inter_affine_flag=0 corresponds to the normal predicted motion vector mode. The normal predicted motion vector mode is a predicted motion vector merge that is not a sub-block predicted motion vector mode. merge_flag=0,inter_affine_flag=1 corresponds to the sub-block predicted motion vector mode. When merge_flag=0,inter_affine_flag=1, cu_affine_type_flag is further transmitted to determine the number of control points.
[0028] <poc> POC (Picture Order Count) is a variable associated with a picture to be coded, and is set to a value that increases by one according to the picture output order. The POC value can be used to determine whether the pictures are the same, to determine the order of pictures in the output order, and to derive the distance between pictures. For example, if two pictures have the same POC value, they can be determined to be the same picture. If two pictures have different POC values, it can be determined that the picture with the smaller POC value is the picture that will be output first, and the difference between the POCs of the two pictures indicates the distance between the pictures along the time axis.
[0029] (First embodiment) An image encoding device 100 and an image decoding device 200 according to a first embodiment of the present invention will be described.
[0030] 1 is a block diagram of an image coding device 100 according to a first embodiment. The image coding device 100 according to the embodiment includes a block division unit 101, an inter prediction unit 102, an intra prediction unit 103, a decoded image memory 104, a prediction method determination unit 105, a residual generation unit 106, an orthogonal transform / quantization unit 107, a bit string coding unit 108, an inverse quantization / inverse orthogonal transform unit 109, a decoded image signal superimposition unit 110, and a coding information storage memory 111.
[0031] The block division unit 101 recursively divides an input image to generate coding blocks. The block division unit 101 includes a 4-division unit that divides a block to be divided horizontally and vertically, and a 2-3 division unit that divides a block to be divided either horizontally or vertically. The block division unit 101 sets the generated coding block as a coding block to be processed, and supplies an image signal of the coding block to be processed to the inter prediction unit 102, the intra prediction unit 103, and the residual generation unit 106. The block division unit 101 also supplies information indicating the determined recursive division structure to the bit string coding unit 108. A detailed operation of the block division unit 101 will be described later.
[0032] The inter prediction unit 102 performs inter prediction of the coding block to be processed. The inter prediction unit 102 derives a plurality of inter prediction information candidates from the inter prediction information stored in the coding information storage memory 111 and the decoded image signal stored in the decoded image memory 104, selects an appropriate inter prediction mode from the derived plurality of candidates, and supplies the selected inter prediction mode and a predicted image signal according to the selected inter prediction mode to the prediction method determination unit 105. A detailed configuration and operation of the inter prediction unit 102 will be described later.
[0033] The intra prediction unit 103 performs intra prediction of the coding block to be processed. The intra prediction unit 103 refers to a decoded image signal stored in the decoded image memory 104 as a reference pixel, and generates a predicted image signal by intra prediction based on coding information such as an intra prediction mode stored in the coding information storage memory 111. In the intra prediction, the intra prediction unit 103 selects an appropriate intra prediction mode from a plurality of intra prediction modes, and supplies the selected intra prediction mode and a predicted image signal according to the selected intra prediction mode to the prediction method determination unit 105. 10A and 10B show examples of intra prediction. FIG. 10A shows the correspondence between the prediction direction of intra prediction and the intra prediction mode number. For example, the intra prediction mode 50 generates an intra prediction image by copying reference pixels in the vertical direction. The intra prediction mode 1 is a DC mode, and is a mode in which all pixel values of the processing target block are the average value of the reference pixels. The intra prediction mode 0 is a planar mode, and is a mode in which a two-dimensional intra prediction image is created from reference pixels in the vertical and horizontal directions. FIG. 10B shows an example of generating an intra prediction image in the case of the intra prediction mode 40. The intra prediction unit 103 copies the value of the reference pixel in the direction indicated by the intra prediction mode to each pixel of the processing target block. When the reference pixel of the intra prediction mode is not an integer position, the intra prediction unit 103 determines the reference pixel value by interpolation from the reference pixel value of the surrounding integer positions.
[0034] The decoded image memory 104 stores the decoded image generated by the decoded image signal superimposing unit 110. The decoded image memory 104 supplies the stored decoded image to the inter prediction unit 102 and the intra prediction unit 103.
[0035] The prediction method determination unit 105 determines the optimal prediction mode for each of intra prediction and inter prediction by evaluating the coding information, the coding amount of residual, the distortion amount between the predicted image signal and the image signal to be processed, and the like. In the case of intra prediction, the prediction method determination unit 105 supplies intra prediction information such as an intra prediction mode as coding information to the bit string coding unit 108. In the case of a merge mode of inter prediction, the prediction method determination unit 105 supplies inter prediction information such as a merge index and information indicating whether or not a sub-block merge mode (sub-block merge flag) as coding information to the bit string coding unit 108. In the case of a predicted motion vector mode of inter prediction, the prediction method determination unit 105 supplies inter prediction information such as an inter prediction mode, a predicted motion vector index, reference indexes of L0 and L1, a difference motion vector, and information indicating whether or not a sub-block predicted motion vector mode (sub-block predicted motion vector flag) as coding information to the bit string coding unit 108. Furthermore, the prediction method determination unit 105 supplies the determined coding information to the coding information storage memory 111. The prediction method determination unit 105 supplies the residual generation unit 106 and the predicted image signal to the decoded image signal superimposition unit 110 .
[0036] The residual generation unit 106 generates a residual by subtracting the prediction image signal from the image signal to be processed, and supplies the residual to the orthogonal transformation / quantization unit 107 .
[0037] The orthogonal transform / quantization unit 107 performs orthogonal transform and quantization on the residual in accordance with the quantization parameter to generate an orthogonally transformed / quantized residual, and supplies the generated residual to the bit string coding unit 108 and the inverse quantization / inverse orthogonal transform unit 109.
[0038] The bitstream coding unit 108 codes coding information according to the prediction method determined by the prediction method determination unit 105 for each coding block, in addition to information in units of sequences, pictures, slices, and coding blocks. Specifically, the bitstream coding unit 108 codes the prediction mode PredMode for each coding block. When the prediction mode is inter prediction (MODE_INTER), the bitstream coding unit 108 codes coding information (inter prediction information) such as a flag for determining whether or not the merge mode is selected, a sub-block merge flag, a merge index in the merge mode, an inter prediction mode in the non-merge mode, a predicted motion vector index, information on a difference motion vector, and a sub-block predicted motion vector flag according to a specified syntax (syntax rules of the bitstream) to generate a first bitstream. When the prediction mode is intra prediction (MODE_INTRA), the bitstream coding unit 108 codes coding information (intra prediction information) such as an intra prediction mode according to a specified syntax (syntax rules of the bitstream) to generate a first bitstream. Furthermore, the bit string coding unit 108 entropy-codes the orthogonally transformed and quantized residual in accordance with a specified syntax to generate a second bit string. The bit string coding unit 108 multiplexes the first bit string and the second bit string in accordance with the specified syntax to output a bit stream.
[0039] The inverse quantization and inverse orthogonal transform unit 109 inverse quantizes and inverse orthogonal transforms the orthogonally transformed and quantized residual supplied from the orthogonal transform and quantization unit 107 to calculate a residual, and supplies the calculated residual to a decoded image signal superimposition unit 110.
[0040] The decoded image signal superimposing unit 110 superimposes the predicted image signal according to the determination by the prediction method determining unit 105 and the residual that has been inverse quantized and inverse orthogonal transformed by the inverse quantization and inverse orthogonal transform unit 109 to generate a decoded image, and stores the decoded image in the decoded image memory 104. Note that the decoded image signal superimposing unit 110 may store the decoded image in the decoded image memory 104 after performing a filtering process on the decoded image to reduce distortion such as block distortion caused by encoding.
[0041] The coding information storage memory 111 stores coding information such as a prediction mode (inter prediction or intra prediction) determined by the prediction method determination unit 105. In the case of inter prediction, the coding information stored in the coding information storage memory 111 includes inter prediction information such as a determined motion vector, reference indexes of reference lists L0 and L1, and a history prediction motion vector candidate list. In the case of a merge mode of inter prediction, the coding information stored in the coding information storage memory 111 includes inter prediction information such as a merge index and information indicating whether or not a sub-block merge mode (sub-block merge flag) in addition to the above-mentioned information. In the case of a predicted motion vector mode of inter prediction, the coding information stored in the coding information storage memory 111 includes inter prediction information such as an inter prediction mode, a predicted motion vector index, a differential motion vector, and information indicating whether or not a sub-block prediction motion vector mode (sub-block prediction motion vector flag) in addition to the above-mentioned information. In the case of intra prediction, the coding information stored in the coding information storage memory 111 includes intra prediction information such as a determined intra prediction mode.
[0042] Fig. 2 is a block diagram showing the configuration of an image decoding device according to an embodiment of the present invention, which corresponds to the image encoding device in Fig. 1. The image decoding device according to the embodiment includes a bitstream decoding unit 201, a block dividing unit 202, an inter prediction unit 203, an intra prediction unit 204, an encoded information storage memory 205, an inverse quantization and inverse orthogonal transform unit 206, a decoded image signal superimposition unit 207, and a decoded image memory 208.
[0043] 2 corresponds to the decoding process provided inside the image coding device of FIG. 1, and therefore each of the components of the coding information storage memory 205, the inverse quantization and inverse orthogonal transformation unit 206, the decoded image signal superimposition unit 207, and the decoded image memory 208 of FIG. 2 has a function corresponding to each of the components of the coding information storage memory 111, the inverse quantization and inverse orthogonal transformation unit 109, the decoded image signal superimposition unit 110, and the decoded image memory 104 of the image coding device of FIG. 1.
[0044] The bitstream supplied to the bitstream decoding unit 201 is separated according to the rules of a prescribed syntax. The bitstream decoding unit 201 decodes the separated first bitstream to obtain information on a sequence, a picture, a slice, and a coding block unit, and coding information on a coding block unit. Specifically, the bitstream decoding unit 201 decodes a prediction mode PredMode that determines whether the prediction mode is inter prediction (MODE_INTER) or intra prediction (MODE_INTRA) on a coding block unit basis. When the prediction mode is inter prediction (MODE_INTER), the bitstream decoding unit 201 decodes coding information (inter prediction information) related to a flag that determines whether the prediction mode is a merge mode or not, a merge index in the merge mode, a sub-block merge flag, an inter prediction mode in the predictive motion vector mode, a predictive motion vector index, a difference motion vector, a sub-block predictive motion vector flag, and the like, according to a prescribed syntax, and supplies the coding information (inter prediction information) to the inter prediction unit 203 and the coding information storage memory 205 via the block division unit 202. When the prediction mode is intra prediction (MODE_INTRA), coding information (intra prediction information) such as the intra prediction mode is decoded according to a specified syntax, and the coding information (intra prediction information) is supplied to the inter prediction unit 203 or the intra prediction unit 204, and to the coding information storage memory 205 via the block division unit 202. The bit string decoding unit 201 decodes the separated second bit string to calculate an orthogonally transformed and quantized residual, and supplies the orthogonally transformed and quantized residual to the inverse quantization and inverse orthogonal transformation unit 206.
[0045] When the prediction mode PredMode of the coding block to be processed is inter prediction (MODE_INTER) and a predicted motion vector mode, the inter prediction unit 203 derives a plurality of predicted motion vector candidates using the coding information of the already decoded image signal stored in the coding information storage memory 205, and registers the derived plurality of predicted motion vector candidates in a predicted motion vector candidate list described later. The inter prediction unit 203 selects a predicted motion vector according to a predicted motion vector index decoded and supplied by the bitstream decoding unit 201 from the plurality of predicted motion vector candidates registered in the predicted motion vector candidate list, calculates a motion vector from the difference motion vector decoded by the bitstream decoding unit 201 and the selected predicted motion vector, and stores the calculated motion vector in the coding information storage memory 205 together with other coding information. The coding information of the coding block supplied and stored here includes a prediction mode PredMode, flags predFlagL0[xP][yP] and predFlagL1[xP][yP] indicating whether to use L0 prediction and L1 prediction, reference indexes refIdxL0[xP][yP] and refIdxL1[xP][yP] of L0 and L1, motion vectors mvL0[xP][yP] and mvL1[xP][yP] of L0 and L1, etc. Here, xP and yP are indexes indicating the position of the upper left pixel of the coding block in a picture. When the prediction mode PredMode is inter prediction (MODE_INTER) and the inter prediction mode is L0 prediction (Pred_L0), the flag predFlagL0 indicating whether to use L0 prediction is 1, and the flag predFlagL1 indicating whether to use L1 prediction is 0. When the inter prediction mode is L1 prediction (Pred_L1), the flag predFlagL0 indicating whether or not to use L0 prediction is 0, and the flag predFlagL1 indicating whether or not to use L1 prediction is 1. When the inter prediction mode is bi-prediction (Pred_BI), the flag predFlagL0 indicating whether or not to use L0 prediction and the flag predFlagL1 indicating whether or not to use L1 prediction are both 1. Furthermore, when the prediction mode PredMode of the coding block to be processed is inter prediction (MODE_INTER) and a merge mode, merge candidates are derived.Using the coding information of the already decoded coding block stored in the coding information storage memory 205, a plurality of merge candidates are derived and registered in a merge candidate list described later, a merge candidate corresponding to a merge index decoded and supplied by the bitstream decoding unit 201 is selected from the plurality of merge candidates registered in the merge candidate list, and inter prediction information such as flags predFlagL0[xP][yP], predFlagL1[xP][yP] indicating whether or not to use L0 prediction and L1 prediction of the selected merge candidate, reference indexes refIdxL0[xP][yP], refIdxL1[xP][yP] of L0 and L1, and motion vectors mvL0[xP][yP], mvL1[xP][yP] of L0 and L1 are stored in the coding information storage memory 205. Here, xP and yP are indexes indicating the position of the upper left pixel of the coding block in the picture. A detailed configuration and operation of the inter prediction unit 203 will be described later.
[0046] The intra prediction unit 204 performs intra prediction when the prediction mode PredMode of the coding block to be processed is intra prediction (MODE_INTRA). The coding information decoded by the bitstream decoding unit 201 includes an intra prediction mode. The intra prediction unit 204 generates a prediction image signal by intra prediction from a decoded image signal stored in the decoded image memory 208 according to the intra prediction mode included in the coding information decoded by the bitstream decoding unit 201, and supplies the generated prediction image signal to the decoded image signal superimposition unit 207. The intra prediction unit 204 corresponds to the intra prediction unit 103 of the image coding device 100, and therefore performs the same process as the intra prediction unit 103.
[0047] The inverse quantization and inverse orthogonal transformation unit 206 performs inverse orthogonal transformation and inverse quantization on the orthogonally transformed and quantized residual decoded by the bit stream decoding unit 201 to obtain an inverse orthogonally transformed and inverse quantized residual.
[0048] The decoded image signal superimposition unit 207 decodes the decoded image signal by superimposing the predicted image signal inter predicted by the inter prediction unit 203 or the predicted image signal intra predicted by the intra prediction unit 204 on a residual that has been inverse orthogonally transformed and inverse quantized by the inverse quantization and inverse orthogonal transformation unit 206, and stores the decoded decoded image signal in the decoded image memory 208. When storing the decoded image in the decoded image memory 208, the decoded image signal superimposition unit 207 may perform a filtering process on the decoded image to reduce block distortion and the like caused by encoding, and then store the decoded image in the decoded image memory 208.
[0049] Next, the operation of the block division unit 101 in the image encoding device 100 will be described. Fig. 3 is a flowchart showing the operation of dividing an image into tree blocks and further dividing each tree block. First, an input image is divided into tree blocks of a predetermined size (step S1001). Each tree block is scanned in a predetermined order, i.e., in raster scan order (step S1002), and the inside of the tree block to be processed is divided (step S1003).
[0050] 7 is a flowchart showing the detailed operation of the division process in step S1003. First, it is determined whether or not the block to be processed is to be divided into four (step S1101).
[0051] If it is determined that the processing target block should be divided into four, the processing target block is divided into four (step S1102). Each block into which the processing target block is divided is scanned in Z scan order, that is, in the order of upper left, upper right, lower left, and lower right (step S1103). FIG. 5 is an example of Z scan order, and 601 in FIG. 6A is an example in which the processing target block is divided into four. Numbers 0 to 3 of 601 in FIG. 6A indicate the order of processing. Then, for each block divided in step S1101, the division process in FIG. 7 is recursively executed (step S1104).
[0052] If it is determined that the processing target block should not be divided into four, it is divided into two and three (step S1105).
[0053] 8 is a flowchart showing the detailed operation of the 2-3 division process in step S1105. First, it is determined whether or not the block to be processed is to be divided into 2-3, that is, whether or not to divide into 2 or 3 (step S1201).
[0054] If it is not determined that the block to be processed should be divided into 2 or 3, that is, if it is determined that the block should not be divided, the division is terminated (step S1211). In other words, no further recursive division is performed on the block that has been divided by the recursive division process.
[0055] If it is determined that the block to be processed is to be divided into 2 or 3, it is then determined whether or not the block to be processed is to be further divided into 2 (step S1202).
[0056] If it is determined that the processing target block should be divided into two, it is determined whether or not to divide the processing target block vertically (step S1203), and based on the result, the processing target block is divided into two vertically (step S1204) or divided left and right (step S1205). As a result of step S1204, the processing target block is divided into two vertically (as shown in 602 in Fig. 6B, and as a result of step S1205, the processing target block is divided into two horizontally (as shown in 604 in Fig. 6D).
[0057] In step S1202, if it is not determined that the block to be processed should be divided into two, that is, if it is determined that the block to be processed should be divided into three, it is determined whether to divide the block to be processed into top, middle, and bottom (vertical direction) (step S1206), and based on the result, the block to be processed is divided into three parts, top, middle, and bottom (vertical direction) (step S1207), or the block to be processed is divided into three parts, left, middle, and right (horizontal direction) (step S1208). As a result of step S1207, the block to be processed is divided into three parts, top, middle, and bottom (vertical direction), as shown in 603 in Fig. 6C, and as a result of step S1208, the block to be processed is divided into three parts, left, middle, and right (horizontal direction), as shown in 605 in Fig. 6E.
[0058] After executing any one of step S1204, step S1205, step S1207, and step S1208, each block divided from the processing target block is scanned in the order from left to right and top to bottom (step S1209). Numbers 0 to 2 of 602 to 605 in Figures 6B to 6E indicate the order of processing. For each divided block, the 2-3 division process in Figure 8 is recursively executed (step S1210).
[0059] The recursive block division described here may limit the necessity of division depending on the number of divisions, the size of the block to be processed, etc. The information limiting the necessity of division may be realized in a configuration in which no information is transmitted by making a prior arrangement between the encoding device and the decoding device, or may be realized in a configuration in which the encoding device determines information limiting the necessity of division and transmits it to the decoding device by recording it in a bit string.
[0060] When a block is divided, the block before the division is called a parent block, and each block after the division is called a child block.
[0061] Next, the operation of the block division unit 202 in the image decoding device 200 will be described. The block division unit 202 divides tree blocks in the same processing procedure as the block division unit 101 in the image encoding device 100. However, the difference is that the block division unit 101 in the image encoding device 100 determines the optimal block division shape by applying an optimization method such as optimal shape estimation by image recognition or distortion rate optimization, whereas the block division unit 202 in the image decoding device 200 determines the block division shape by decoding block division information recorded in a bit string.
[0062] The syntax (syntax rules for bit strings) related to block division in the first embodiment is shown in Fig. 9. coding_quadtree() represents syntax related to division of a block into four. multi_type_tree() represents syntax related to division of a block into two or three. qt_split is a flag indicating whether or not to divide a block into four. If the block is to be divided into four, qt_split=1 is set, and if not, qt_split=0 is set. If the block is to be divided into four (qt_split=1), each block is recursively divided into four (coding_quadtree(0), coding_quadtree(1), coding_quadtree(2), coding_quadtree(3), arguments 0 to 3 correspond to number 601 in Fig. 6A). If the block is not to be divided into four (qt_split=0), the subsequent division is determined according to multi_type_tree(). mtt_split is a flag indicating whether or not to divide the block further. When further division is required (mtt_split=1), mtt_split_vertical, a flag indicating whether to divide vertically or horizontally, and mtt_split_binary, a flag determining whether to divide into two or three, are transmitted. mtt_split_vertical=1 indicates division vertically, and mtt_split_vertical=0 indicates division horizontally. mtt_split_binary=1 indicates division into two, and mtt_split_binary=0 indicates division into three. When dividing into two (mtt_split_binary=1), division processing is performed recursively for each block divided into two (multi_type_tree(0), multi_type_tree(1), arguments 0 to 1 correspond to numbers 602 or 604 in Figures 6B to 6D). When splitting into three (mtt_split_binary=0), splitting processing is performed recursively for each of the three split blocks (multi_type_tree(0), multi_type_tree(1), multi_type_tree(2), where 0 to 2 correspond to numbers 603 in FIG. 6B or 605 in FIG. 6E).Hierarchical block division is performed by recursively calling multi_type_tree until mtt_split=0.
[0063] <Inter Prediction> The inter prediction method according to the embodiment is implemented in the inter prediction unit 102 of the image encoding device in FIG. 1 and the inter prediction unit 203 of the image decoding device in FIG.
[0064] An inter prediction method according to an embodiment will be described with reference to the drawings. The inter prediction method is performed in both encoding and decoding processes on a coding block basis.
[0065] <Description of the inter prediction unit 102 on the encoding side> Fig. 16 is a diagram showing a detailed configuration of the inter prediction unit 102 of the image encoding device of Fig. 1. The normal prediction motion vector mode derivation unit 301 derives a plurality of normal prediction motion vector candidates to select a prediction motion vector, and calculates a difference motion vector between the selected prediction motion vector and the detected motion vector. The detected inter prediction mode, reference index, motion vector, and calculated difference motion vector become inter prediction information of the normal prediction motion vector mode. This inter prediction information is supplied to the inter prediction mode determination unit 305. The detailed configuration and processing of the normal prediction motion vector mode derivation unit 301 will be described later.
[0066] The normal merge mode derivation unit 302 derives a plurality of normal merge candidates, selects a normal merge candidate, and obtains inter prediction information for the normal merge mode. This inter prediction information is supplied to the inter prediction mode determination unit 305. A detailed configuration and processing of the normal merge mode derivation unit 302 will be described later.
[0067] The sub-block predictive motion vector mode derivation unit 303 derives a plurality of sub-block predictive motion vector candidates to select a sub-block predictive motion vector, and calculates a differential motion vector between the selected sub-block predictive motion vector and the detected motion vector. The detected inter prediction mode, reference index, motion vector, and calculated differential motion vector become inter prediction information of the sub-block predictive motion vector mode. This inter prediction information is supplied to the inter prediction mode determination unit 305.
[0068] The subblock merging mode derivation unit 304 derives a plurality of subblock merging candidates, selects a subblock merging candidate, and obtains inter prediction information of the subblock merging mode. This inter prediction information is supplied to the inter prediction mode determination unit 305.
[0069] The inter prediction mode determination unit 305 determines inter prediction information based on the inter prediction information supplied from the normal prediction motion vector mode derivation unit 301, the normal merge mode derivation unit 302, the sub-block prediction motion vector mode derivation unit 303, and the sub-block merge mode derivation unit 304. The inter prediction mode determination unit 305 supplies inter prediction information according to the determination result to the motion compensation prediction unit 306.
[0070] Based on the determined inter prediction information, the motion compensation prediction unit 306 performs inter prediction on the reference image signal stored in the decoded image memory 104. The detailed configuration and processing of the motion compensation prediction unit 306 will be described later.
[0071] <Description of the Inter Prediction Unit 203 on the Decoding Side> FIG. 22 is a diagram showing a detailed configuration of the inter prediction unit 203 of the image decoding device in FIG.
[0072] The normal prediction motion vector mode derivation unit 401 derives a plurality of normal prediction motion vector candidates to select a prediction motion vector, and calculates the sum of the selected prediction motion vector and the decoded difference motion vector to obtain a motion vector. The decoded inter prediction mode, reference index, and motion vector become inter prediction information for the normal prediction motion vector mode. This inter prediction information is supplied to the motion compensation prediction unit 406 via a switch 408. The detailed configuration and processing of the normal prediction motion vector mode derivation unit 401 will be described later.
[0073] The normal merge mode derivation unit 402 derives a plurality of normal merge candidates, selects a normal merge candidate, and obtains inter prediction information for the normal merge mode. This inter prediction information is supplied to the motion compensation prediction unit 406 via a switch 408. The detailed configuration and processing of the normal merge mode derivation unit 402 will be described later.
[0074] The sub-block prediction motion vector mode derivation unit 403 derives a plurality of sub-block prediction motion vector candidates to select a sub-block prediction motion vector, and calculates the sum of the selected sub-block prediction motion vector and the decoded difference motion vector to obtain a motion vector. The decoded inter prediction mode, reference index, and motion vector become inter prediction information for the sub-block prediction motion vector mode. This inter prediction information is supplied to the motion compensation prediction unit 406 via the switch 408.
[0075] The subblock merging mode derivation unit 404 derives a plurality of subblock merging candidates, selects a subblock merging candidate, and obtains inter-prediction information for the subblock merging mode. This inter-prediction information is supplied to the motion compensation prediction unit 406 via the switch 408.
[0076] Based on the determined inter prediction information, the motion compensation prediction unit 406 performs inter prediction on the reference image signal stored in the decoded image memory 208. The detailed configuration and processing of the motion compensation prediction unit 406 are similar to those of the motion compensation prediction unit 306 on the encoding side.
[0077] <Normal predicted motion vector mode derivation part (normal AMVP)> The normal prediction motion vector mode derivation unit 301 in Figure 17 includes a spatial prediction motion vector candidate derivation unit 321, a temporal prediction motion vector candidate derivation unit 322, a history prediction motion vector candidate derivation unit 323, a prediction motion vector candidate supplementation unit 325, a normal motion vector detection unit 326, a prediction motion vector candidate selection unit 327, and a motion vector subtraction unit 328.
[0078] The normal predictor motion vector mode derivation unit 401 in Figure 23 includes a spatial predictor motion vector candidate derivation unit 421, a temporal predictor motion vector candidate derivation unit 422, a history predictor motion vector candidate derivation unit 423, a predictor motion vector candidate supplementation unit 425, a predictor motion vector candidate selection unit 426, and a motion vector addition unit 427.
[0079] The processing procedures of the normal prediction motion vector mode derivation unit 301 on the encoding side and the normal prediction motion vector mode derivation unit 401 on the decoding side will be described with reference to the flowcharts of Fig. 19 and Fig. 25. Fig. 19 is a flowchart showing the normal prediction motion vector mode derivation processing procedure by the normal motion vector mode derivation unit 301 on the encoding side, and Fig. 25 is a flowchart showing the normal prediction motion vector mode derivation processing procedure by the normal motion vector mode derivation unit 401 on the decoding side.
[0080] <Normal prediction motion vector mode derivation part (normal AMVP): Explanation on the encoding side> The normal predicted motion vector mode derivation process procedure on the encoding side will be described with reference to Fig. 19. In the description of the process procedure in Fig. 19, the term "normal" shown in Fig. 19 may be omitted.
[0081] First, the normal motion vector detection unit 326 detects a normal motion vector for each inter prediction mode and reference index (step S100 in FIG. 19).
[0082] Next, the spatial prediction motion vector candidate derivation unit 321, the temporal prediction motion vector candidate derivation unit 322, the history prediction motion vector candidate derivation unit 323, the prediction motion vector candidate supplementation unit 325, the prediction motion vector candidate selection unit 327, and the motion vector subtraction unit 328 calculate the difference motion vector of the motion vector used in the inter prediction of the normal prediction motion vector mode for each of L0 and L1 (steps S101 to S106 in FIG. 19). Specifically, when the prediction mode PredMode of the processing target block is inter prediction (MODE_INTER) and the inter prediction mode is L0 prediction (Pred_L0), the prediction motion vector candidate list mvpListL0 of L0 is calculated, the prediction motion vector mvpL0 is selected, and the difference motion vector mvdL0 of the motion vector mvL0 of L0 is calculated. When the inter prediction mode of the block to be processed is L1 prediction (Pred_L1), the L1 predicted motion vector candidate list mvpListL1 is calculated, the predicted motion vector mvpL1 is selected, and the differential motion vector mvdL1 of the motion vector mvL1 of L1 is calculated. When the inter prediction mode of the block to be processed is bi-prediction (Pred_BI), both L0 prediction and L1 prediction are performed, the L0 predicted motion vector candidate list mvpListL0 is calculated, the L0 predicted motion vector mvpL0 is selected, and the differential motion vector mvdL0 of the motion vector mvL0 of L0 is calculated, and the L1 predicted motion vector candidate list mvpListL1 is calculated, the L1 predicted motion vector mvpL1 is calculated, and the differential motion vector mvdL1 of the motion vector mvL1 of L1 is calculated.
[0083] A differential motion vector calculation process is performed for each of L0 and L1, but the process is common to both L0 and L1. Therefore, in the following description, L0 and L1 are represented as a common LX. In the process of calculating the differential motion vector of L0, X of LX is 0, and in the process of calculating the differential motion vector of L1, X of LX is 1. Furthermore, when referring to information of the other list instead of LX during the process of calculating the differential motion vector of LX, the other list is represented as LY.
[0084] When the motion vector mvLX of LX is used (step S102 in FIG. 19: YES), a candidate of the predicted motion vector of LX is calculated to construct a predicted motion vector candidate list mvpListLX of LX (step S103 in FIG. 19). A spatial predicted motion vector candidate derivation unit 321, a temporal predicted motion vector candidate derivation unit 322, a history predicted motion vector candidate derivation unit 323, and a predicted motion vector candidate supplementation unit 325 in the normal predicted motion vector mode derivation unit 301 derive multiple predicted motion vector candidates to construct the predicted motion vector candidate list mvpListLX. The detailed processing procedure of step S103 in FIG. 19 will be described later with reference to the flowchart in FIG. 20.
[0085] Next, the motion vector predictor candidate selection unit 327 selects the motion vector predictor mvpLX of LX from the motion vector predictor candidate list mvpListLX of LX (step S104 in FIG. 19). Here, one element (the i-th element counting from 0) in the motion vector predictor candidate list mvpListLX is represented as mvpListLX[i]. Each difference motion vector, which is the difference between the motion vector mvLX and each motion vector predictor candidate mvpListLX[i] stored in the motion vector predictor candidate list mvpListLX, is calculated. The amount of code when these difference motion vectors are coded is calculated for each element (motion vector predictor candidate) of the motion vector predictor candidate list mvpListLX. Then, among each element registered in the motion vector predictor candidate list mvpListLX, the motion vector predictor candidate mvpListLX[i] with the smallest amount of code for each motion vector predictor candidate is selected as the motion vector predictor mvpLX, and its index i is obtained. If there are multiple candidates for the predicted motion vector that will result in the smallest amount of generated code in the predicted motion vector candidate list mvpListLX, the predicted motion vector candidate mvpListLX[i] represented by the smallest index i in the predicted motion vector candidate list mvpListLX is selected as the optimal predicted motion vector mvpLX, and its index i is obtained.
[0086] Next, the motion vector subtraction unit 328 subtracts the selected predicted motion vector mvpLX of LX from the motion vector mvLX of LX, mvdLX = mvLX - mvpLX Then, the differential motion vector mvdLX of LX is calculated as (Step S105 in FIG. 19).
[0087] <Normal predicted motion vector mode derivation part (normal AMVP): Decoding side explanation> Next, the normal predicted motion vector mode processing procedure on the decoding side will be described with reference to Fig. 25. On the decoding side, the spatial predicted motion vector candidate derivation unit 421, the temporal predicted motion vector candidate derivation unit 422, the history predicted motion vector candidate derivation unit 423, and the predicted motion vector candidate supplementation unit 425 calculate the motion vectors used in inter prediction of the normal predicted motion vector mode for each of L0 and L1 (steps S201 to S206 in Fig. 25). Specifically, when the prediction mode PredMode of the processing target block is inter prediction (MODE_INTER) and the inter prediction mode of the processing target block is L0 prediction (Pred_L0), the predicted motion vector candidate list mvpListL0 of L0 is calculated, the predicted motion vector mvpL0 is selected, and the motion vector mvL0 of L0 is calculated. When the inter prediction mode of the block to be processed is L1 prediction (Pred_L1), the L1 predicted motion vector candidate list mvpListL1 is calculated, the predicted motion vector mvpL1 is selected, and the motion vector mvL1 of L1 is calculated. When the inter prediction mode of the block to be processed is bi-prediction (Pred_BI), both L0 prediction and L1 prediction are performed, the L0 predicted motion vector candidate list mvpListL0 is calculated, the L0 predicted motion vector mvpL0 is selected, and the motion vector mvL0 of L0 is calculated, while the L1 predicted motion vector candidate list mvpListL1 is calculated, the L1 predicted motion vector mvpL1 is calculated, and the motion vector mvL1 of L1 is calculated.
[0088] As in the coding side, the decoding side also performs motion vector calculation processing for each of L0 and L1, but the processing is common to both L0 and L1. Therefore, in the following description, L0 and L1 are represented as a common LX. LX represents an inter-prediction mode used for inter-prediction of the coding block to be processed. In the processing to calculate the motion vector of L0, X is 0, and in the processing to calculate the motion vector of L1, X is 1. In addition, when the information of the other reference list is referred to during the processing to calculate the motion vector of LX, instead of the same reference list as the LX to be calculated, the other reference list is represented as LY.
[0089] When the motion vector mvLX of LX is used (step S202 in FIG. 25: YES), a candidate of the predicted motion vector of LX is calculated to construct a predicted motion vector candidate list mvpListLX of LX (step S203 in FIG. 25). A spatial predicted motion vector candidate derivation unit 421, a temporal predicted motion vector candidate derivation unit 422, a history predicted motion vector candidate derivation unit 423, and a predicted motion vector candidate supplementation unit 425 in the normal predicted motion vector mode derivation unit 401 calculate a plurality of predicted motion vector candidates to construct the predicted motion vector candidate list mvpListLX. A detailed processing procedure of step S203 in FIG. 25 will be described later with reference to the flowchart in FIG. 20.
[0090] Next, the predicted motion vector candidate selection unit 426 extracts the predicted motion vector candidate mvpListLX[mvpIdxLX] corresponding to the predicted motion vector index mvpIdxLX decoded and supplied by the bit string decoding unit 201 from the predicted motion vector candidate list mvpListLX as the selected predicted motion vector mvpLX (step S204 in Figure 25).
[0091] Next, the motion vector adder 427 adds the differential motion vector mvdLX of LX decoded and supplied by the bit stream decoder 201 and the predicted motion vector mvpLX of LX, mvLX = mvpLX + mvdLX Then, the motion vector mvLX of LX is calculated (step S205 in FIG. 25).
[0092] <Normal predicted motion vector mode derivation part (normal AMVP): Motion vector prediction method> Figure 20 is a flowchart showing the processing steps of a normal prediction motion vector mode derivation process having functions common to the normal prediction motion vector mode derivation unit 301 of the image encoding device and the normal prediction motion vector mode derivation unit 401 of the image decoding device according to an embodiment of the present invention.
[0093] The normal motion vector predictor mode derivation unit 301 and the normal motion vector predictor mode derivation unit 401 are provided with a motion vector predictor candidate list mvpListLX. The motion vector predictor candidate list mvpListLX has a list structure, and is provided with a storage area for storing a motion vector predictor index indicating a location in the motion vector predictor candidate list and a motion vector predictor candidate corresponding to the index as elements. The number of the motion vector predictor index starts from 0, and the motion vector predictor candidate is stored in the storage area of the motion vector predictor candidate list mvpListLX. In this embodiment, it is assumed that the motion vector predictor candidate list mvpListLX can register at least two motion vector predictor candidates (inter prediction information). Furthermore, 0 is set to a variable numCurrMvpCand indicating the number of motion vector predictor candidates registered in the motion vector predictor candidate list mvpListLX.
[0094] The spatial prediction motion vector candidate derivation units 321 and 421 derive a candidate of a prediction motion vector from a block adjacent to the left. In this process, the prediction motion vector mvLXA is derived by referring to the inter prediction information of the block adjacent to the left (A0 or A1 in FIG. 11), that is, a flag indicating whether a prediction motion vector candidate is available, a motion vector, a reference index, and the like, and the derived mvLXA is added to the prediction motion vector candidate list mvpListLX (step S301 in FIG. 20). Note that X is 0 for L0 prediction, and X is 1 for L1 prediction (similar below). Next, the spatial prediction motion vector candidate derivation units 321 and 421 derive a candidate of a prediction motion vector from a block adjacent to the upper side. In this process, a predicted motion vector mvLXB is derived by referring to the inter prediction information of the adjacent block above (B0, B1, or B2 in FIG. 11), i.e., a flag indicating whether a predicted motion vector candidate is available, a motion vector, a reference index, etc., and if the derived mvLXA and mvLXB are not equal, mvLXB is added to the predicted motion vector candidate list mvpListLX (step S302 in FIG. 20). The processes of steps S301 and S302 in FIG. 20 are the same except that the positions and numbers of the adjacent blocks to be referenced are different, and a flag availableFlagLXN indicating whether a predicted motion vector candidate of the coding block is available, a motion vector mvLXN, and a reference index refIdxN (N indicates A or B, the same below) are derived.
[0095] Next, the temporal motion vector predictor candidate derivation units 322 and 422 derive candidates for motion vector predictors from blocks in pictures whose time is different from that of the currently processed picture. In this process, a flag availableFlagLXCol indicating whether a motion vector predictor candidate of an encoding block of a picture whose time is different is available or not, a motion vector mvLXCol, a reference index refIdxCol, and a reference list listCol are derived, and mvLXCol is added to the motion vector predictor candidate list mvpListLX (step S303 in FIG. 20).
[0096] It is assumed that the processing of the temporal motion vector predictor candidate derivation units 322 and 422 can be omitted in units of a sequence (SPS), a picture (PPS), or a slice.
[0097] Next, the history motion vector predictor candidate derivation units 323 and 423 add the history motion vector predictor candidates registered in the history motion vector predictor candidate list HmvpCandList to the motion vector predictor candidate list mvpListLX (step S304 in FIG. 20). Details of the registration process procedure in step S304 will be described later with reference to the flowchart in FIG. 29.
[0098] Next, the motion vector predictor candidate supplementation units 325 and 425 add motion vector predictor candidates of a predetermined value, such as (0, 0), until the motion vector predictor candidate list mvpListLX is filled (S305 in FIG. 20).
[0099] <Normal merge mode derivation part (normal merge)> The normal merge mode derivation unit 302 in FIG. 18 includes a spatial merge candidate derivation unit 341, a temporal merge candidate derivation unit 342, an average merge candidate derivation unit 344, a history merge candidate derivation unit 345, a merge candidate supplementation unit 346, and a merge candidate selection unit 347.
[0100] The normal merge mode derivation unit 402 in FIG. 24 includes a spatial merge candidate derivation unit 441, a temporal merge candidate derivation unit 442, an average merge candidate derivation unit 444, a history merge candidate derivation unit 445, a merge candidate supplementation unit 446, and a merge candidate selection unit 447.
[0101] FIG. 21 is a flowchart illustrating the procedure of a normal merge mode derivation process having a function common to the normal merge mode derivation unit 302 of the image encoding device and the normal merge mode derivation unit 402 of the image decoding device according to an embodiment of the present invention.
[0102] The various processes will be described below in order. In the following description, unless otherwise specified, the slice type slice_type is a B slice, but can also be applied to the case of a P slice. However, when the slice type slice_type is a P slice, there is only L0 prediction (Pred_L0) as an inter prediction mode, and there is no L1 prediction (Pred_L1) or bi-prediction (Pred_BI), so that the process related to L1 can be omitted.
[0103] The normal merge mode derivation unit 302 and the normal merge mode derivation unit 402 include a merge candidate list mergeCandList. The merge candidate list mergeCandList has a list structure and is provided with a merge index indicating a location in the merge candidate list and a storage area for storing merge candidates corresponding to the index as elements. The merge index number starts from 0, and merge candidates are stored in the storage area of the merge candidate list mergeCandList. In the following processing, the merge candidate of the merge index i registered in the merge candidate list mergeCandList is represented as mergeCandList[i]. In this embodiment, it is assumed that the merge candidate list mergeCandList can register at least six merge candidates (inter prediction information). Furthermore, 0 is set to a variable numCurrMergeCand indicating the number of merge candidates registered in the merge candidate list mergeCandList.
[0104] The spatial merge candidate derivation unit 341 and the spatial merge candidate derivation unit 441 derive spatial merge candidates from adjacent blocks (B1, A1, B0, A0, B2 in FIG. 11) on the left and top sides of 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. A flag availableFlagN indicating whether inter prediction information of block N can be used as a spatial merge candidate, an L0 reference index refIdxL0N and an L1 reference index refIdxL1N of spatial merge candidate N, an L0 prediction flag predFlagL0N indicating whether L0 prediction is performed and an L1 prediction flag predFlagL1N indicating whether L1 prediction is performed, an L0 motion vector mvL0N, and an L1 motion vector mvL1N are derived. However, in this embodiment, a merge candidate is derived without referring to inter prediction information of a block included in a coding block to be processed, so a spatial merge candidate using inter prediction information of a block included in a coding block to be processed is not derived.
[0105] Next, the temporal merge candidate derivation unit 342 and the temporal merge candidate derivation unit 442 derive temporal merge candidates from pictures of different times and register the derived temporal merge candidates in a merge candidate list mergeCandList (step S402 in FIG. 21). A flag availableFlagCol indicating whether the temporal merge candidate is available, an L0 prediction flag predFlagL0Col indicating whether L0 prediction of the temporal merge candidate is performed, an L1 prediction flag predFlagL1Col indicating whether L1 prediction is performed, and a motion vector mvL0Col and a motion vector mvL1Col of L0 and L1 are derived.
[0106] It is assumed that the processing of the temporal merge candidate derivation unit 342 and the temporal merge candidate derivation unit 442 can be omitted in units of a sequence (SPS), a picture (PPS), or a slice.
[0107] Next, the history merge candidate derivation unit 345 and the history merge candidate derivation unit 445 register the history predictor motion vector candidates registered in the history predictor motion vector candidate list HmvpCandList in the merge candidate list mergeCandList (step S403 in FIG. 21). In addition, if the number of merge candidates registered in the merge candidate list mergeCandList, numCurrMergeCand, is smaller than the maximum number of merge candidates, MaxNumMergeCand, the number of merge candidates registered in the merge candidate list mergeCandList is set to an upper limit of the maximum number of merge candidates, MaxNumMergeCand, and historical merge candidates are derived and registered in the merge candidate list mergeCandList.
[0108] Next, the average merge candidate derivation unit 344 and the average merge candidate derivation unit 444 derive average merge candidates from the merge candidate list mergeCandList, and add the derived average merge candidates to the merge candidate list mergeCandList (step S404 in FIG. 21). In addition, if the number of merge candidates registered in the merge candidate list mergeCandList, numCurrMergeCand, is smaller than the maximum number of merge candidates, MaxNumMergeCand, the average merge candidate is derived with the number of merge candidates registered in the merge candidate list mergeCandList, numCurrMergeCand, as an upper limit, up to the maximum number of merge candidates, MaxNumMergeCand, and registered in the merge candidate list mergeCandList. Here, the average merge candidate is a new merge candidate having a motion vector obtained by averaging the motion vectors of the first merge candidate and the second merge candidate registered in the merge candidate list mergeCandList for each L0 prediction and L1 prediction.
[0109] Next, in the merge candidate supplementation unit 346 and the merge candidate supplementation unit 446, when the number of merge candidates registered in the merge candidate list mergeCandList, numCurrMergeCand, is smaller than the maximum number of merge candidates, MaxNumMergeCand, the number of merge candidates registered in the merge candidate list mergeCandList, numCurrMergeCand is set as an upper limit of the maximum number of merge candidates, MaxNumMergeCand, and additional merge candidates are derived and registered in the merge candidate list mergeCandList (step S405 in FIG. 21). With the maximum number of merge candidates, MaxNumMergeCand, a merge candidate having a motion vector of (0,0) and a prediction mode of L0 prediction (Pred_L0) is added to the P slice. A merge candidate having a motion vector of (0,0) and a prediction mode of bi-prediction (Pred_BI) is added to the B slice. A reference index when adding a merge candidate is different from a reference index already added.
[0110] Next, the merge candidate selection unit 347 and the merge candidate selection unit 447 select a merge candidate from among the merge candidates registered in the merge candidate list mergeCandList. The merge candidate selection unit 347 on the encoding side selects a merge candidate by calculating the code amount and the distortion amount, and supplies a merge index indicating the selected merge candidate and inter prediction information of the merge candidate to the motion compensation prediction unit 306 via the inter prediction mode determination unit 305. On the other hand, the merge candidate selection unit 447 on the decoding side selects a merge candidate based on the decoded merge index, and supplies the selected merge candidate to the motion compensation prediction unit 406.
[0111] <Update of historical motion vector prediction candidate list> Next, a detailed description will be given of a method for initializing and updating the historical motion vector predictor candidate list HmvpCandList provided in the encoding information storage memory 111 on the encoding side and the encoding information storage memory 205 on the decoding side. Fig. 26 is a flowchart illustrating the procedure of the historical motion vector predictor candidate list initialization / update process.
[0112] In this embodiment, the history prediction motion vector candidate list HmvpCandList is updated in the coding information storage memory 111 and the coding information storage memory 205. A history prediction motion vector candidate list update unit may be provided in the inter prediction unit 102 and the inter prediction unit 203 to update the history prediction motion vector candidate list HmvpCandList.
[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 bit string 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 prediction motion vector mode or normal merge mode is registered as an inter prediction information candidate hMvpCand in a history prediction motion vector candidate list HmvpCandList. The inter prediction information candidate hMvpCand includes an L0 reference index refIdxL0 and an L1 reference index refIdxL1, an L0 prediction flag predFlagL0 indicating whether or not L0 prediction is performed, an L1 prediction flag predFlagL1 indicating whether or not L1 prediction is performed, an L0 motion vector mvL0, and an L1 motion vector mvL1.
[0115] If inter prediction information with the same value as the inter prediction information candidate hMvpCand exists among elements (i.e., inter prediction information) registered in the historical prediction motion vector candidate list HmvpCandList provided in the encoding information storage memory 111 on the encoding side and the encoding information storage memory 205 on the decoding side, the element is deleted from the historical prediction 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 historical prediction motion vector candidate list HmvpCandList is deleted, and the inter prediction information candidate hMvpCand is added to the end of the historical prediction 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 in the present invention is assumed to be six.
[0117] First, the historical motion vector predictor candidate list HmvpCandList is initialized in units of slices (step S2101 in FIG. 26). All elements of the historical motion vector predictor candidate list HmvpCandList are cleared at the beginning of the slice, and the value of the number of historical motion vector predictor candidates (current number of candidates) NumHmvpCand registered in the historical motion vector predictor candidate list HmvpCandList is set to 0.
[0118] Note that, although the initialization of the historical motion vector predictor candidate list HmvpCandList is performed on a slice-by-slice basis (the first coding block of a slice), it may be performed on a picture-by-picture basis, a tile-by-tile basis, or a tree block row-by-tree block basis.
[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 made for each coding block. A value of FALSE is set to a flag identicalCandExist indicating whether an identical candidate exists, and 0 is set to a deletion target index removeIdx indicating a candidate to be deleted (step S2103 in FIG. 26).
[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 that the mode is the normal prediction motion vector mode or the 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 the normal merge mode, the inter prediction information is set as the inter prediction information candidate hMvpCand to be registered. If the prediction method determination unit 105 on the encoding side determines that the mode is the intra prediction mode, the sub-block prediction motion vector mode, or the sub-block merge mode, or if the bitstream decoding unit 201 on the decoding side decodes the intra prediction mode, the sub-block prediction motion vector mode, or the sub-block merge mode, the 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 in FIG. 26: NO). When an inter-prediction information candidate hMvpCand to be registered exists, the processes in and after step S2105 are performed (step S2104 in FIG. 26: YES).
[0122] Next, it is determined whether or not an element (inter prediction information) having the same value as the inter prediction information candidate hMvpCand to be registered exists among the elements of the history prediction motion vector candidate list HmvpCandList, that is, whether or not an identical element exists (step S2105 in FIG. 26). FIG. 27 is a flowchart of this identical element confirmation process procedure. If the value of the number of history prediction motion vector candidates NumHmvpCand is 0 (step S2121: NO in FIG. 27), the history prediction motion vector candidate list HmvpCandList is empty and no identical candidate exists, so steps S2122 to S2125 in FIG. 27 are skipped and this identical element confirmation process procedure ends. If the value of the number of history prediction motion vector candidates NumHmvpCand is greater than 0 (YES in step S2121 in FIG. 27), the process of step S2123 is repeated for the history prediction 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 see if they are the same (step S2123 in FIG. 27). If they are the same (step S2123 in FIG. 27: YES), a flag identicalCandExist indicating whether an identical candidate exists is set to TRUE, a deletion target index removeIdx indicating the position of an element to be deleted 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 the same (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 onward are performed.
[0123] Returning to the flowchart of FIG. 26 again, a shift and addition process of elements of the historical motion vector predictor candidate list HmvpCandList is performed (step S2106 of FIG. 26). FIG. 28 is a flowchart of an element shift / addition process procedure of the historical motion vector predictor candidate list HmvpCandList in step S2106 of 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 elements. Specifically, it is compared whether a flag identicalCandExist indicating whether an identical candidate exists is TRUE (true) or NumHmvpCand is 6 (step S2141 of FIG. 28). When either of the conditions that the flag identicalCandExist indicating whether an identical candidate exists is TRUE (true) or the current number of candidates NumHmvpCand is 6 is satisfied (step S2141: YES in FIG. 28), an element stored in the historical motion vector predictor candidate list HmvpCandList is 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 which corresponds to the end of the historical motion vector predictor candidate list (step S2145 in FIG. 28), and the element shifting / addition process of this historical motion vector predictor candidate list HmvpCandList is terminated.On the other hand, when neither of the conditions that the flag identicalCandExist indicating whether or not an identical candidate exists is TRUE (true) and NumHmvpCand is 6 is satisfied (step S2141 in FIG. 28: NO), the inter prediction information candidate hMvpCand is added to the end of the history motion vector predictor candidate list 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. In addition, 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 for explaining an example of a process of updating a history prediction motion vector candidate list. When adding a new element to the registered history prediction motion vector candidate list HmvpCandList of six elements (inter prediction information), the elements in the history prediction motion vector candidate list HmvpCandList are compared with the new inter prediction information in order from the front (Fig. 31A), and if the new element has the same value as the third element HMVP2 from the top of the history prediction motion vector candidate list HmvpCandList, the element HMVP2 is deleted from the history prediction motion vector candidate list HmvpCandList, and the rear elements HMVP3 to HMVP5 are shifted (copied) forward one by one, and the new element is added to the end of the history prediction motion vector candidate list HmvpCandList (Fig. 31B), completing the update of the history prediction motion vector candidate list HmvpCandList (Fig. 31C).
[0125] <Historical Prediction Motion Vector Candidate Derivation Process> Next, a detailed description will be given of a method for deriving a historical prediction motion vector candidate from the historical prediction motion vector candidate list HmvpCandList, which is a processing procedure of step S304 in Fig. 20 and is common to the historical prediction motion vector candidate derivation unit 323 of the normal prediction motion vector mode derivation unit 301 on the encoding side and the historical prediction motion vector candidate derivation unit 423 of the normal prediction motion vector mode derivation unit 401 on the decoding side. Fig. 29 is a flowchart illustrating the historical prediction motion vector candidate derivation processing procedure.
[0126] If the number of current motion vector predictor candidates numCurrMvpCand is equal to or greater than the maximum number of elements in the motion vector predictor candidate list mvpListLX (2 here) or the number of historical motion vector predictor candidates NumHmvpCand is 0 (NO in step S2201 in FIG. 29), steps S2202 to S2209 in FIG. 29 are omitted and the historical motion vector predictor candidate derivation procedure is terminated. If the number of current motion vector predictor candidates numCurrMvpCand is smaller than 2, which is the maximum number of elements in the motion vector predictor candidate list mvpListLX, and the number of historical motion vector predictor candidates NumHmvpCand is greater than 0 (YES in step S2201 in FIG. 29), steps S2202 to S2209 in FIG. 29 are performed.
[0127] Next, the process of steps S2203 to S2208 in FIG. 29 is repeated from index i to the smaller value between 1 and 4 or the number of history motion vector predictor candidates numCheckedHMVPCand (steps S2202 to S2209 in FIG. 29). If the number of current motion vector predictor candidates numCurrMvpCand is equal to or greater than 2, which is the maximum number of elements in the motion vector predictor candidate list mvpListLX (step S2203 in FIG. 29: NO), the process of steps S2204 to S2209 in FIG. 29 is omitted, and the history motion vector predictor candidate derivation process procedure is terminated. If the number of current motion vector predictor candidates numCurrMvpCand is smaller than 2, which is the maximum number of elements in the motion vector predictor candidate list mvpListLX (step S2203 in FIG. 29: YES), the process of step S2204 and subsequent steps in FIG. 29 is performed.
[0128] Next, the processes from step S2205 to S2207 are performed for Y being 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 smaller 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 in FIG. 29 onwards are performed.
[0129] Next, if the historical predictor 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 predictor motion vector list mvpListLX (step S2206: YES in Figure 29), the motion vector of LY in the historical predictor motion vector candidate HmvpCandList[NumHmvpCand - i] is added to the numCurrMvpCand-th element mvpListLX[numCurrMvpCand] counting from 0 in the predictor motion vector candidate list (step S2207 in Figure 29), and the number of current predictor 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 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 smaller than 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 a processing procedure in step S404 in Fig. 21 and is common to the history merge candidate derivation unit 345 of the normal merge mode derivation unit 302 on the encoding side and the history merge candidate derivation unit 445 of the normal merge mode derivation unit 402 on the decoding side. Fig. 30 is a flowchart illustrating the history merge candidate derivation processing procedure.
[0132] First, an initialization process is performed (step S2301 in FIG. 30). The value FALSE is set for each of the 0th to (numCurrMergeCand -1)th elements of isPruned[i], and the number of elements currently registered in the merge candidate list, numCurrMergeCand, is set to the variable numOrigMergeCand.
[0133] Next, the initial value of index hMvpIdx is set to 1, and the addition process from step S2303 to step S2310 in FIG. 30 is repeated from this initial value to NumHmvpCand (steps S2302 to S2311 in FIG. 30). If the number of elements registered in the current merge candidate list, numCurrMergeCand, is not equal to or less than (maximum number of merge candidates, MaxNumMergeCand-1), this history merge candidate derivation process is terminated (NO in step S2303 in FIG. 30), since merge candidates have been added to all elements in the merge candidate list. If the number of elements registered in the current merge candidate list, numCurrMergeCand, is equal to or less than (maximum number of merge candidates, MaxNumMergeCand-1) (YES in step S2303 in FIG. 30), the processes from step S2304 onwards are performed.
[0134] First, the value FALSE is set in 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 HmvpCandList[NumHmvpCand-hMvpIdx] counting from 0 of the history motion vector prediction candidate list is compared with the i-th element mergeCandList[i] counting from 0 of the merge candidate list to see if they have the same value (step S2306 in FIG. 30). Here, the merge candidates have the same value, meaning that the values of all the components (inter prediction mode, reference index, motion vector) of the merge candidates are the same. However, the process of this step S2306 is limited to the case where hMvpIdx is larger than NumHmvpCand-2, mergeCandList[i] is a spatial merge candidate, and isPruned[i] is FALSE. If they have the same value (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 FIG. 30), the process of step S2307 is skipped. After the repeated processes from step S2305 to step S2308 in FIG. 30 are completed, a comparison is made to see if sameMotion is FALSE (step S2309 in FIG. 30), and if sameMotion is FALSE (YES in step S2309 in FIG. 30), the (NumHmvpCand - hMvpIdx)-th element HmvpCandList[NumHmvpCand - hMvpIdx] counting from 0 of the history motion vector predictor candidate list is added to the numCurrMergeCand-th mergeCandList[numCurrMergeCand] of the merge candidate list, and numCurrMergeCand is incremented by 1 (step S2310 in FIG. 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 completed.
[0137] <Motion compensation prediction processing> The motion compensation prediction unit 306 acquires the position and size of a block currently being subjected to prediction processing in encoding. The motion compensation prediction unit 306 also acquires inter prediction information from the inter prediction mode determination unit 305. A reference index and a motion vector are derived from the acquired inter prediction information, and a prediction signal is generated after acquiring an image signal of a reference picture specified by the reference index in the decoded image memory 104, which is moved by the amount of the motion vector from the same position as the image signal of the prediction block.
[0138] In the case where the inter prediction mode in the inter prediction is prediction from a single reference picture such as L0 prediction or L1 prediction, the prediction signal obtained from one reference picture is used as a motion compensation prediction signal, and in the case where the inter prediction mode is prediction from two reference pictures such as BI prediction, the weighted average of the prediction signals obtained from the two reference pictures is used as a motion compensation prediction signal, and the motion compensation prediction signal is supplied to the prediction method determination unit 105. Here, the ratio of the weighted average of the bi-prediction is set to 1:1, but the weighted average may be performed using other ratios. For example, the weighting ratio may be set to be larger as the picture interval between the picture to be predicted and the reference picture becomes closer. In addition, the weighting ratio may be calculated using a correspondence table of combinations of picture intervals and weighting ratios.
[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 from a normal prediction motion vector mode derivation unit 401, a normal merge mode derivation unit 402, a sub-block prediction motion vector mode derivation unit 403, and a sub-block merge mode derivation unit 404 via a switch 408. The motion compensation prediction unit 406 supplies the obtained motion compensation prediction signal to the decoded image signal superimposition unit 207.
[0140] <Inter prediction mode> The process of making predictions from a single reference picture is defined as uni-prediction, and in the case of uni-prediction, predictions are made using one of two reference pictures registered in the reference lists L0 and L1, called L0 prediction or L1 prediction.
[0141] Fig. 32 shows a case where the L0 reference picture (RefL0Pic) is located before the current picture (CurPic) in uni-prediction. Fig. 33 shows a case where the L0 prediction reference picture is located after the current picture. Similarly, uni-prediction can be performed by replacing the L0 prediction reference picture in Fig. 32 and Fig. 33 with the L1 prediction reference picture (RefL1Pic).
[0142] A process of making predictions from two reference pictures is defined as bi-prediction, and in the case of bi-prediction, both L0 prediction and L1 prediction are used and expressed as BI prediction. Figure 34 shows a case of bi-prediction where the reference picture for L0 prediction is at a time before the picture to be processed and the reference picture for L1 prediction is at a time after the picture to be processed. Figure 35 shows a case of bi-prediction where the reference picture for L0 prediction and the reference picture for L1 prediction are at a time before the picture to be processed. Figure 36 shows a case of bi-prediction where the reference picture for L0 prediction and the reference picture for L1 prediction are at a time after the picture to be processed.
[0143] In this way, the relationship between the prediction type and time of L0 / L1 can be used without being limited to L0 being the past direction and L1 being the future direction. In the case of bi-prediction, the same reference picture may be used to perform both L0 prediction and L1 prediction. Note that the decision as to whether to perform motion compensation prediction in uni-prediction or bi-prediction is made based on information (e.g., a flag) indicating whether to use L0 prediction and whether to use L1 prediction, for example.
[0144] <About reference indexes> In the embodiment of the present invention, in order to improve the accuracy of motion compensation prediction, it is possible to select an optimal reference picture from among multiple reference pictures in motion compensation prediction. To this end, the reference picture used in the motion compensation prediction is used as a reference index, and the reference index is coded into the bitstream together with a differential motion vector.
[0145] <Motion compensation process based on normal predicted motion vector mode> 16 , when inter prediction information by the normal prediction motion vector mode derivation unit 301 is selected in the inter prediction mode determination unit 305, the motion compensation prediction unit 306 acquires this inter prediction information from the inter prediction mode determination unit 305, derives the inter prediction mode, reference index, and motion vector of the block currently being processed, and generates a motion compensation prediction signal. The generated motion compensation prediction signal is supplied to the prediction method determination unit 105.
[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 inter prediction information by the normal merge mode derivation unit 302 is selected in the inter prediction mode determination unit 305, the motion compensation prediction unit 306 acquires this inter prediction information from the inter prediction mode determination unit 305, derives the inter prediction mode, reference index, and motion vector of the block currently being processed, and generates a motion compensation prediction signal. The generated motion compensation prediction signal is supplied to the prediction method determination unit 105.
[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 obtains inter prediction information from the normal merge mode derivation unit 402, derives an inter prediction mode, a reference index, and a motion vector of the block currently being processed, and generates a motion compensation prediction signal. The generated motion compensation prediction signal is supplied to the decoded image signal superimposition unit 207.
[0149] <Motion compensation process based on sub-block predicted motion vector mode> 16 , when inter prediction information is selected by the sub-block prediction motion vector mode derivation unit 303 in the inter prediction mode determination unit 305, the motion compensation prediction unit 306 acquires the inter prediction information from the inter prediction mode determination unit 305, derives the inter prediction mode, reference index, and motion vector of the block currently being processed, and generates a motion compensation prediction signal. The generated motion compensation prediction signal is supplied to the prediction method determination unit 105.
[0150] 22, when a switch 408 is connected to the sub-block prediction motion vector mode derivation unit 403 during the decoding process, the motion compensation prediction unit 406 obtains inter prediction information from the sub-block prediction motion vector mode derivation unit 403, derives the inter prediction mode, reference index, and motion vector of the block currently being processed, and generates a motion compensation prediction signal. The generated motion compensation prediction signal is supplied to the decoded image signal superimposition unit 207.
[0151] <Motion compensation processing based on sub-block merge mode> 16 , when inter prediction information is selected by the sub-block merge mode derivation unit 304 in the inter prediction mode determination unit 305, the motion compensation prediction unit 306 acquires the inter prediction information from the inter prediction mode determination unit 305, derives the inter prediction mode, reference index, and motion vector of the block currently being processed, and generates a motion compensation prediction signal. The generated motion compensation prediction signal is supplied to the prediction method determination unit 105.
[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 in the encoding process, and are encoded in the bitstream. In the decoding process, whether or not to perform motion compensation using an affine model is specified based on the following flags in the bitstream.
[0154] sps_affine_enabled_flag indicates whether or not motion compensation based on an affine model can be used in inter prediction. If sps_affine_enabled_flag is 0, motion compensation based on an affine model is suppressed on a sequence-by-sequence basis. In addition, inter_affine_flag and cu_affine_type_flag are not transmitted in the CU (coding block) syntax of the coded video sequence. If sps_affine_enabled_flag is 1, motion compensation based on an affine model can be used in the coded video sequence.
[0155] sps_affine_type_flag indicates whether or not motion compensation based on a 6-parameter affine model can be used in inter prediction. If sps_affine_type_flag is 0, motion compensation based on a 6-parameter affine model is suppressed. In addition, cu_affine_type_flag is not transmitted in the CU syntax of the coded video sequence. If sps_affine_type_flag is 1, motion compensation based on a 6-parameter affine model can be used in the coded video sequence. If sps_affine_type_flag does not exist, it is assumed to be 0.
[0156] When decoding a P or B slice, if inter_affine_flag is 1 in the currently processed CU, motion compensation based on the affine model is used to generate a motion compensation prediction signal for the currently processed CU. If inter_affine_flag is 0, the affine model is not used for the currently processed CU. If inter_affine_flag is not present, it is assumed to be 0.
[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 compensation prediction signal for the currently processed CU. If cu_affine_type_flag is 0, motion compensation based on a 4-parameter affine model is used to generate a motion compensation prediction signal for the currently processed CU.
[0158] In motion compensation based on the affine model, reference indexes and motion vectors are derived for each subblock, and therefore a motion compensation prediction signal is generated using the reference indexes and motion vectors to be processed for each subblock.
[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 each motion vector of two control points, and motion compensation is performed on a subblock basis.
[0160] In this embodiment, the reference order when using the history prediction motion vector candidate list may be configured to be reverse to the storage order. Here, when storing from the tail of the history prediction motion vector candidate list and storing in an order in which the motion information at the head of the history prediction motion vector candidate list is older than the tail, the storage state is the same as that of this embodiment. Also, when storing in an order in which the head of the history prediction motion vector candidate list is newer than the tail, the storage state is reverse to that shown in this embodiment. Even in the case of such a reverse storage state, by performing the reference order in the reverse order to the storage order, it is possible to refer to the reference contents as shown in this embodiment, that is, when referring to the history prediction motion vector candidate list, in order from the old motion information to the newly added motion information. Furthermore, when using the history prediction motion vector candidate list, the reference order may be configured to be used in the same direction as the storage order and in the reverse direction to the storage order. In other words, when using the historical prediction motion vector candidate list, it may be possible to configure it so that the motion information stored in the historical prediction motion vector candidate list can be referenced in order from older motion information to newly added motion information, and the motion information stored in the historical prediction motion vector candidate list can be referenced in order from newly added motion information to older motion information.
[0161] Furthermore, when a new element is added to the historical motion vector predictor candidate list, a process of searching for an element having the same information from the historical motion vector predictor candidate list and deleting the element may be avoided.
[0162] Furthermore, in the normal prediction motion vector mode, when deriving a normal prediction motion vector candidate using the historical prediction motion vector candidate list HmvpCandList, it is possible to configure the system so as not to search for elements having the same information from the historical prediction motion vector candidate list and not to perform processing to exclude elements having the same information from being normal prediction motion vector candidates.
[0163] <History 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 encoding target block is set as an inter prediction information candidate hMvpCand to be registered, and is registered in a 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 capable of storing six elements, and a basic storage operation is a first-in, first-out (FIFO) method in which the elements stored first are taken out in order.
[0165] Here, as an example, the maximum number of elements that can be stored in HmvpCandList is described as six as an agreement between the encoding side and the decoding side, but this is not particularly limited and may be six or more. 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 to have 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, and the maximum number of sub-block merge candidates. HmvpCandList may be configured to be linked to the maximum number of elements of the inter prediction information candidates of each mode.
[0166] The maximum number of elements in HmvpCandList may be included in a syntax element of the encoded bitstream, so that it can be transmitted from the encoding side to the decoding side.
[0167] 41, HmvpCandList can store six elements from position 0, which is the beginning of the list, to position 5, which is 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 predicted motion vector index hMvpIdx. For example, position 0 can be expressed as hMVpIdx[0], and position 5 can be expressed as hMVpIdx[5]. The number of stored elements in HmvpCandList is managed by NumHmvpCand, and an increase or decrease in the stored elements is managed within the range from 0 to 6, which is the maximum number of elements.
[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. When registering a new inter-prediction information candidate hMvpCand as a history as shown in FIG. 42, 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 process is performed on the historical motion vector predictor candidate list. <Searching for the same candidate in the history predicted motion vector candidate list> When the historical prediction motion vector candidate list HmvpCandList is used in the reference order shown in FIG. 45, if 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 historical prediction motion vector candidate list HmvpCandList, the element (inter prediction information) is deleted from the historical prediction motion vector candidate list HmvpCandList. Such a process of deleting the same candidate is hereinafter referred to as a same candidate deletion process. When an element is added to the historical prediction motion vector candidate list HmvpCandList, the same candidate deletion process is not performed. In addition, when the historical prediction motion vector candidate list HmvpCandList is used while referring to the historical prediction motion vector candidate list in the reverse order to the storage order in which new elements are added to the end of the historical prediction motion vector candidate list as shown in FIG. 46, the same candidate deletion process is not performed. Figure 38 is a flowchart that explains 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 set as the inter prediction information candidate hMvpCand to be registered, and the inter prediction information candidate hMvpCand to be registered is added in order from the vacant position closest to the top side, 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 coding information storage memory 111 on the coding side and the coding information storage memory 205 on the decoding side. When HmvpCandList is filled up to the maximum number of elements, the top 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. The number of elements of the history prediction motion vector candidate list HmvpCandList provided in the coding information storage memory 111 on the coding side and the coding information storage memory 205 on the decoding side in this embodiment 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 NumHmvpCand of historical motion vector predictor candidates 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 coding side determines that the mode is the normal prediction motion vector mode or the normal merge mode, or if the bitstream decoding unit on the decoding side decodes as the normal prediction motion vector mode or the normal merge mode, the inter prediction mode is set as hMvpCand. If the prediction method determination unit 105 on the coding side determines that the mode is the intra prediction mode, the sub-block prediction motion vector mode, or the sub-block prediction motion vector mode, or if the bitstream decoding unit on the decoding side decodes as the intra prediction mode, the sub-block prediction motion vector mode, or the sub-block merge mode, the update process of the history prediction motion vector candidate list HmvpCandList is not performed, and 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 in and after step S2406 are performed (step S2404 in FIG. 38: YES). Next, a process of shifting and adding elements of the historical motion vector predictor candidate list HmvpCandList is performed (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 to execute the process, thereby making it possible to reduce the amount of processing. In addition, even if the same candidate deletion process is not performed on the historical prediction motion vector candidate list when adding an element to the historical prediction motion vector candidate list HmvpCandList, it is possible to reduce the possibility of the same candidate being added to the prediction motion vector candidate list by making it possible to refer to the older motion information first, followed by the newly added motion information in order.
[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 in FIG. 38 is configured as follows. FIG. 39 is a flowchart of the process of shifting / adding elements to the historical motion vector predictor candidate list HmvpCandList in step S2406 of FIG. First, it is determined whether to remove the top element stored in the history 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 NumHmvpCand is 6 (step S2541 in FIG. 39). If NumHmvpCand is 6 (step S2541 in FIG. 39: YES), the top element stored in the history motion vector predictor candidate list HmvpCandList is removed and then a new element is added. The initial value of index i is set to a value of 1. The element shift 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 FIG. 39), and the element shifting and adding process of the historical motion vector predictor candidate list HmvpCandList ends. On the other hand, if NumHmvpCand is not 6 (step S2541 in FIG. 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 shifting 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 making it possible to reduce 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 referring to the motion information stored in HmvpCandList in the reverse order of the storage order 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 referring to it in order from the oldest motion information to the newly added motion information, without performing the same candidate deletion process. In the modified example of the first embodiment, a forward 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 the old motion information is referenced from the newly added motion information, and a reverse 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 the old motion information is referenced from the newly added motion information, and the forward mode and the reverse mode are switched by using history reference flag information for switching the reference order of the history predicted motion vector candidate list HmvpCandList. This history reference flag is included in a syntax element of the encoded bit stream and transmitted to the decoding side, and the decoding side obtains the encoded bit stream 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 performed. In particular, when deriving the motion vector predictor candidate list mvpListLX, the historical motion vector predictor candidate list HmvpCandList is used while referring to the motion vector predictor candidate list from the top in a storage order reverse 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, a process of determining whether or not the same motion vector predictor is included in the motion vector predictor candidate list is not performed.
[0173] Hereinafter, the process of deriving a historical motion vector predictor candidate according to this embodiment will be described.
[0174] <Process for deriving historical predicted motion vector candidate without process for deleting duplicate candidates> Here, a process of deriving a historical motion vector predictor candidate that does not involve a duplicate candidate deletion process will be described.
[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 to the storage order, and by configuring in such a way that the same candidate deletion process is not performed.
[0176] If the current number of motion vector predictor candidates numCurrMvpCand is equal to or greater than 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 FIG. 47), steps S2602 to S2609 in FIG. 47 are omitted and the history motion vector predictor candidate derivation procedure is terminated. 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 S2601: YES in FIG. 47), steps S2602 to S2609 in FIG. 47 are performed.
[0177] Next, the processes of steps S2603 to S2608 in FIG. 47 are repeated from index i from 0 to the smaller value of 4 or the number of history motion vector predictor candidates NumHmvpCand minus 1 (steps S2602 to S2609 in FIG. 47). If the number of current motion vector predictor candidates numCurrMvpCand is equal to or greater than 2, which is the maximum number of elements in the motion vector predictor list mvpListLX (step S2603 in FIG. 47: NO), the processes of steps S2604 to S2609 in FIG. 47 are omitted, and the history motion vector predictor candidate derivation process procedure is terminated. If the number of current motion vector predictor candidates numCurrMvpCand is smaller than 2, which is the maximum number of elements in the motion vector predictor list mvpListLX (step S2603 in FIG. 47: YES), the processes of step S2604 and subsequent steps in FIG. 47 are performed.
[0178] Next, the processes from step S2605 to S2607 are performed for index Y being 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 in FIG. 47: NO), 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 smaller than 2, which is the maximum number of elements in the motion vector predictor list mvpListLX (step S2605 in FIG. 47: YES), 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 in step S2607 is skipped.
[0180] The above-mentioned 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 of 4 or the number of historical motion vector predictor candidates NumHmvpCand minus 1, processing from step S2603 onwards is performed again (steps S2602 to S2609 in FIG. 47). By performing the above-mentioned history prediction motion vector candidate derivation process, in the process of adding from the history prediction motion vector candidate list to the prediction motion vector candidate list, the same candidate deletion process is not performed, so that the same candidate check and deletion process and the variable setting and comparison process for executing the process can be omitted, and the amount of processing can be reduced. Also, by making it possible to refer to the motion information that is the history prediction motion vector candidate stored in HmvpCandList in order from the oldest motion information to the newly added motion information, it becomes possible to add various motion information to the prediction motion vector candidate list. Furthermore, even if the same candidate deletion process is not performed on the historical prediction motion vector candidate list during the process of adding to the prediction motion vector candidate list, it is possible to reduce the possibility of the same candidate being added to the prediction motion vector candidate list by making it possible to refer to the motion information in order from the oldest motion information to the newly added motion information.
[0182] (Variation 1) In the second embodiment, a case is described in which, when deriving the predicted motion vector candidate list mvpListLX, the historical predicted motion vector candidate list HmvpCandList is used while referring to it from the top in the reverse storage order to the order in which new candidates are added from the end, and 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 to reference from the beginning 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 from the old motion information, and the same candidate deletion process is performed as is.
[0183] FIG. 48 is a flowchart illustrating a procedure of a historical motion vector predictor candidate derivation process in a case where the historical motion vector predictor candidate list HmvpCandList is used while referring to the candidates in the reverse order to the storage order, and a process of deleting identical candidates is not performed.
[0184] If the number of current motion vector predictor candidates numCurrMvpCand is equal to or greater than the maximum number of elements in the motion vector predictor list mvpListLX (2 here) or the number of history motion vector predictor candidates NumHmvpCand is 0 (step S2801: NO in FIG. 48), steps S2802 to S2809 in FIG. 48 are omitted and the history motion vector predictor candidate derivation procedure is terminated. If the number of current motion vector predictor candidates numCurrMvpCand is smaller than 2, which is the maximum number of elements in the motion vector predictor list mvpListLX (step S2801: YES in FIG. 48), steps S2802 to S2809 in FIG. 48 are performed.
[0185] Next, the processes of steps S2803 to S2808 in FIG. 48 are repeated from index i from 0 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 number of current motion vector predictor candidates numCurrMvpCand is equal to or greater than 2, which is the maximum number of elements in the motion vector predictor list mvpListLX (step S2803 in FIG. 48: NO), 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 number of current 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 in FIG. 48: YES), the processes of step S2804 and subsequent steps in FIG. 48 are performed.
[0186] Next, the processes from step S2805 to S2807 are performed for index Y being 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 equal to or greater than 2, which is the maximum number of elements in the motion vector predictor list mvpListLX (step S2805 in FIG. 48: NO), 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 smaller than 2, which is the maximum number of elements in the motion vector predictor list mvpListLX (step S2805 in FIG. 48: YES), the processes from step S2806 onwards in FIG. 48 are performed.
[0187] Next, if there is an element whose reference index of LY in the history prediction motion vector candidate list HmvpCandList[i] is the same reference index as the reference index refIdxLX of the motion vector to be encoded / decoded, and which is different from any element in the prediction motion vector list mvpListLX (step S2806: YES in Figure 48), the LY motion vector of the history prediction motion vector candidate HmvpCandList[i] is added to the numCurrMvpCand-th element mvpListLX[numCurrMvpCand] counting from 0 in the prediction motion vector candidate list (step S2807 in Figure 48), and the number of current prediction 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-mentioned 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 prediction motion vector candidate derivation process, the same candidate deletion process is configured to be performed as is, and the motion information that is the historical prediction 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 a motion vector predictor candidate list mvpListLX, the element shift / addition process 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 since it is the same as 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 making it possible to reduce 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 stored in HmvpCandList as the history motion vector predictor candidate is used while referring to the old motion information in order to the newly added motion information, and the same candidate deletion process is not performed. In a modified example of the second embodiment, a forward mode 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 mode 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, are prepared, and the forward mode and reverse mode are switched by 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 encoded bit stream and transmitted to the decoding side, and the decoding side obtains the encoded bit stream having this history reference flag in its syntax element, making it possible to decode it.
[0192] (Third embodiment) As a third embodiment, the following configuration is made 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 used in order from the oldest motion information to the newly added motion information. Also, when adding a new element to the merge candidate list, the process of searching for an element having the same information from the history motion vector predictor candidate list and deleting it is changed so as not to be performed. Furthermore, in the normal merge mode, when deriving a normal merge candidate using the history motion vector predictor candidate list HmvpCandList, the process of searching for an element having the same information from the history motion vector predictor candidate list and not setting the element having the same information as a normal merge candidate is changed so as not to be performed. <History merge candidate derivation process without duplicate candidate deletion process> Here, the history merge candidate derivation process without the same candidate deletion process will be described. Fig. 40 is a flowchart for explaining the history merge candidate derivation process procedure when the history prediction motion vector candidate list HmvpCandList is used while referring to the motion information from the old motion information to the newly added motion information in order, and the same candidate deletion process is not performed. First, an initialization process 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 index hMvpIdx is set to 0, and the addition process from step S2703 to step S2710 in FIG. 40 is repeated from this initial value to NumHmvpCand-1 (steps S2702 to S2711 in FIG. 40). If the number of elements registered in the current merge candidate list, numCurrMergeCand, is not equal to or 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 is terminated (step S2703 in FIG. 40: NO). If the number of elements registered in the current merge candidate list, numCurrMergeCand, is equal to or less than (the maximum number of merge candidates, MaxNumMergeCand-1), processing from step S2710 onwards is performed (step S2703 in FIG. 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 completed. 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 making it possible to omit the same candidate checking and deletion process, as well as the variable setting and comparison process for executing that process, thereby reducing the amount of processing. In addition, by making it possible to refer to 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 motion information to the newly added motion information.
[0193] (Variation 1) As a modified example of the third embodiment, when deriving a merge candidate list, a configuration is made in which the same candidate deletion process is not performed when an element is added to a historical motion vector predictor candidate list HmvpCandList as shown in Fig. 38. The description of Fig. 38 is omitted since it is the same as the 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 to execute the process, thereby making it possible to reduce the amount of processing. In addition, even if the same candidate deletion process is not performed on the historical prediction motion vector candidate list when adding an element to the historical prediction motion vector candidate list HmvpCandList, 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 older motion information first, followed by the newly added motion information in order.
[0194] (Variation 2) As a modification of the third embodiment, when deriving a merge candidate list, the element shift / addition process 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 since it is the same as 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 making it possible to reduce the amount of processing.
[0195] (Variation 3) In the third embodiment, a case is described in which, when deriving a merge candidate list, motion information that is a 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 the modified example of the third embodiment, a forward mode in which the reference order refers to old motion information from newly added motion information and a reverse mode in which the reference order refers to newly added motion information from old motion information are prepared, and the forward mode and reverse mode can be switched by using history reference flag information for switching the reference order of the history predicted motion vector candidate list HmvpCandList. This history reference flag is included in a syntax element of the encoded bitstream and transmitted to the decoding side, and the decoding side obtains the encoded 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 forms.
[0197] In all the embodiments described above, the bit stream output by the image coding device has a specific data format so that it can be decoded according to the coding method used in the embodiment, and the image decoding device corresponding to the image coding device can decode the bit stream in the specific data format.
[0198] When a wired or wireless network is used to exchange a bitstream between an image encoding device and an image decoding device, the bitstream may be converted into a data format suitable for the transmission mode of the communication channel before being transmitted. In this case, a transmitting device is provided that converts the bitstream output by the image encoding device into coded data in a data format suitable for the transmission mode of the communication channel and transmits the coded data to the network, and a receiving device is provided that receives the coded data from the network, restores the coded data to a bitstream, and supplies the bitstream to the image decoding device. The transmitting device includes a memory that buffers the bitstream output by the image encoding device, a packet processing unit that packetizes the bitstream, and a transmitting unit that transmits the packetized coded data via the network. The receiving device includes a receiving unit that receives the packetized coded data via the network, a memory that buffers the received coded data, and a packet processing unit that packetizes the coded data to generate a bitstream and provides it to the image decoding device.
[0199] Moreover, a display unit for displaying an image decoded by the image decoding device may be added to the configuration to form a display device. In this case, the display unit reads out the decoded image signal generated by the decoded image signal superimposition unit 207 and stored in the decoded image memory 208, and displays it on a screen.
[0200] Moreover, an imaging unit may be added to the configuration and the captured image may be input to the image coding device to form an imaging device. In this case, the imaging unit inputs a captured image signal to the block division unit 101.
[0201] 37 shows an example of a hardware configuration of a coding / decoding device according to the present embodiment. The coding / decoding device includes the configurations of an image coding device and an image decoding device according to the embodiment of the present invention. The coding / decoding device 9000 includes a CPU 9001, a codec IC 9002, an I / O interface 9003, a memory 9004, an optical disk drive 9005, a network interface 9006, and a video interface 9009, and each unit is connected by a bus 9010.
[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 executed by the image encoding unit 9007, and the image decoding process of the image decoding device according to the embodiment of the present invention is executed by the image decoding unit 9008. The I / O interface 9003 is realized by, for example, a USB interface, and is connected to an external keyboard 9104, mouse 9105, etc. The CPU 9001 controls the encoding / decoding device 9000 so as to execute an operation desired by the user based on a user operation input via the I / O interface 9003. The user operation by the keyboard 9104, mouse 9105, etc. includes a selection of whether to execute an encoding or decoding function, a setting of encoding quality, an input / output destination of a bit stream, an input / output destination of an image, etc.
[0203] When a user desires to play back an image recorded on the disc recording medium 9100, the optical disc drive 9005 reads a bit stream from the inserted disc recording medium 9100 and sends the read bit stream to an image decoding unit 9008 of the codec IC 9002 via a bus 9010. The image decoding unit 9008 executes image decoding processing in the image decoding device according to the embodiment of the present invention on the input bit stream, and sends the decoded image to an external monitor 9103 via a video interface 9009. The encoding / decoding device 9000 also has a network interface 9006, and can be connected to an external distribution server 9106 or a mobile terminal 9107 via a network 9101. When a user desires to play back an image recorded on the distribution server 9106 or the mobile terminal 9107 instead of the image recorded on the disc recording medium 9100, the network interface 9006 acquires the bit stream from the network 9101 instead of reading the bit stream from the input disc recording medium 9100. Furthermore, when a user wishes to play back the image recorded in memory 9004, an image decoding process is executed on the bitstream recorded in memory 9004 in an image decoding device according to an embodiment of the present invention.
[0204] When a user desires to encode an image captured by an external camera 9102 and record the encoded image in memory 9004, the video interface 9009 inputs the image from the camera 9102 and sends the image to an image encoding unit 9007 of the codec IC 9002 via a bus 9010. The image encoding unit 9007 executes image encoding processing in the image encoding device according to the embodiment of the present invention on the image input via the video interface 9009 to generate a bitstream. The image encoding unit 9007 then sends the bitstream to the memory 9004 via the bus 9010. When a user desires to record the bitstream in the disc recording medium 9100 instead of the memory 9004, the optical disc drive 9005 writes the bitstream to the inserted disc recording medium 9100.
[0205] It is also possible to realize a hardware configuration having an image encoding device but not an image decoding device, or a hardware configuration having an image decoding device but not an image encoding device. Such a hardware configuration can be realized, for example, by replacing the codec IC 9002 with an image encoding unit 9007 or an image decoding unit 9008, respectively.
[0206] The above-mentioned encoding and decoding processes may be realized not only as a transmission, storage, and receiving device using hardware, but also as firmware stored in a ROM (read-only memory) or flash memory, or as software for a computer, etc. The firmware program or software program may be provided by recording it on a recording medium readable by a computer, etc., or may be provided from a server via a wired or wireless network, or may be provided as data broadcasting of terrestrial or satellite digital broadcasting.
[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 each component and each treatment process, 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 encoded information storage memory, 200 image decoding device, 201 bit string decoding unit, 202 block division unit, 203 inter prediction unit 204 intra prediction unit, 205 encoded information storage memory 206 inverse quantization / inverse orthogonal transform unit, 207 decoded image signal superposition unit, 208 decoded image memory.< / poc>
Claims
1. a spatial motion information candidate derivation unit that adds spatial motion information candidates derived from motion information of blocks spatially adjacent to the encoding target block 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; an encoding unit that encodes inter prediction information including a flag indicating whether a merge mode is applied to the encoding target block; Equipped with When the merge mode is not applied to the encoding target block, the history motion information candidate derivation unit does not compare the motion information in the history motion information candidate list with the motion information in the motion information candidate list, and adds the history motion information candidates to the motion information candidate list in the order of the oldest motion information to the most recently added motion information among the motion information registered in the history motion information candidate list. A video encoding device.
2. a first step of adding spatial motion information candidates derived from motion information of blocks spatially adjacent to the encoding target block to a motion information candidate list; a second step of adding a historical motion information candidate registered in the historical motion information candidate list to the motion information candidate list; a third step of encoding inter prediction information including a flag indicating whether a merge mode is applied to the current block; and Equipped with When the merge mode is not applied to the block to be coded, the second step does not compare the motion information in the history motion information candidate list with the motion information in the motion information candidate list, and adds the history motion information candidates to the motion information candidate list in the order of the oldest motion information to the most recently added motion information among the motion information registered in the history motion information candidate list. A video coding method.
3. A decoding unit that decodes inter prediction information including a flag indicating whether a merge mode is applied to a decoding target block; a spatial motion information candidate derivation unit that adds a spatial motion information candidate derived from motion information of a block spatially adjacent to the decoding target block 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; Equipped with When the merge mode is not applied to the block to be decoded, the history motion information candidate derivation unit does not compare the motion information in the history motion information candidate list with the motion information in the motion information candidate list, and adds the history motion information candidates to the motion information candidate list in the order of the oldest motion information to the most recently added motion information among the motion information registered in the history motion information candidate list. Video decoding device.
4. A first step of decoding inter prediction information including a flag indicating whether a merge mode is applied to a block to be decoded; a second step of adding spatial motion information candidates derived from motion information of blocks spatially adjacent to the decoding target block to a motion information candidate list; a third step of adding a historical motion information candidate registered in the historical motion information candidate list to the motion information candidate list; Equipped with When the merge mode is not applied to the block to be decoded, the third step does not compare the motion information of the history motion information candidate list with the motion information of the motion information candidate list, and adds the history motion information candidates to the motion information candidate list in the order of the oldest motion information to the most recently added motion information among the motion information registered in the history motion information candidate list. A video decoding method.
5. A method for transmitting a bitstream, comprising the steps of: a first step of adding spatial motion information candidates derived from motion information of blocks spatially adjacent to the encoding target block to a motion information candidate list; a second step of adding a historical motion information candidate registered in the historical motion information candidate list to the motion information candidate list; a third step of encoding inter prediction information including a flag indicating whether a merge mode is applied to the current block to generate a bitstream; a fourth step of transmitting the bitstream; Equipped with When the merge mode is not applied to the block to be coded, the second step does not compare the motion information in the history motion information candidate list with the motion information in the motion information candidate list, and adds the history motion information candidates to the motion information candidate list in the order of the oldest motion information to the most recently added motion information among the motion information registered in the history motion information candidate list. Transmission method.
6. A method for storing a bitstream on a recording medium, comprising the steps of: a first step of adding spatial motion information candidates derived from motion information of blocks spatially adjacent to the encoding target block to a motion information candidate list; a second step of adding a historical motion information candidate registered in the historical motion information candidate list to the motion information candidate list; a third step of encoding inter prediction information including a flag indicating whether a merge mode is applied to the current block to generate a bitstream; a fourth step of storing the bitstream on a recording medium; Equipped with When the merge mode is not applied to the block to be coded, the second step does not compare the motion information in the history motion information candidate list with the motion information in the motion information candidate list, and adds the history motion information candidates to the motion information candidate list in the order of the oldest motion information to the most recently added motion information among the motion information registered in the history 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