Video encoding device, video encoding method, and video encoding program

By incorporating a merge candidate list and triangular merge candidates with equal priority, the processing load and efficiency issues in image encoding are addressed, resulting in highly efficient image encoding and decoding.

JP2026083246APending Publication Date: 2026-05-19JVC KENWOOD CORP
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
JVC KENWOOD CORP
Filing Date
2026-03-03
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing image encoding techniques, such as those described in Patent Document 1, suffer from high processing loads due to image conversion processes, which affect encoding efficiency.

Method used

The implementation of a merge candidate list including spatial merge candidates, along with single and double prediction methods, and the use of triangular merge candidates with equal priority, reduces processing load and enhances encoding efficiency.

Benefits of technology

This approach achieves highly efficient image encoding and decoding with reduced overhead, improving the overall processing efficiency of image encoding and decoding systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026083246000001_ABST
    Figure 2026083246000001_ABST
Patent Text Reader

Abstract

By performing block division suitable for image encoding and decoding, encoding efficiency is improved. We provide technology to improve performance. [Solution] Merge candidate list construction unit that constructs a merge candidate list including spatial merge candidates. Then, select a normal merge candidate from the merge candidate list that will be either a single or bi-prediction. Candidate selection unit, first triangular merge candidate which becomes single prediction from merge candidate list, and single prediction It includes a triangular merge candidate selection unit that selects a second triangular merge candidate, and a triangular merge mode selection unit. The selection process uses the same priority order for motion information between the first triangular merge candidate and the second triangular merge candidate. do.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an image encoding and decoding technique for dividing an image into blocks and performing prediction.

Background Art

[0002] In image encoding and decoding, an image to be processed is divided into blocks, which are sets of a predetermined number of pixels, and processing is performed in block units. By appropriately dividing the image into blocks and appropriately setting intra prediction (intra prediction) and inter prediction (inter prediction), the encoding efficiency is improved. In the encoding and decoding of moving images, the encoding efficiency is improved by inter prediction that predicts from an encoded and decoded picture. Patent Document 1 describes a technique of applying an affine transformation during inter prediction. In moving images, it is not uncommon for an object to be accompanied by deformations such as enlargement, reduction, and rotation. By applying the technique of Patent Document 1, efficient encoding becomes possible.

[0003] In the encoding and decoding of moving images, the encoding efficiency is improved by inter prediction that predicts from an encoded and decoded picture. Patent Document 1 describes a technique of applying an affine transformation during inter prediction. In moving images, it is not uncommon for an object to be accompanied by deformations such as enlargement, reduction, and rotation. By applying the technique of Patent Document 1, efficient encoding becomes possible.

Prior Art Documents

Patent Documents

[0004]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0005] However, since the technique of Patent Document 1 involves image conversion, there is a problem of a large processing load. In view of the above problems, the present invention provides an encoding technique with low load and high efficiency.

Means for Solving the Problems

[0006] In one aspect of the present invention that solves the above problem, a merge candidate list including spatial merge candidates is A step to construct a merge candidate list, and a single or double prediction from the merge candidate list. A normal merge candidate selection step to select a normal merge candidate, and the merge candidate list From this, we select a first triangular merge candidate that results in a single prediction and a second triangular merge candidate that also results in a single prediction. The process includes a triangular merge candidate selection step, and the triangular merge candidate selection step is the usual The first triangular merge candidate and the second triangular merge candidate are given the same priority as the merge candidate. Derive. [Effects of the Invention]

[0007] According to the present invention, highly efficient image encoding and decoding can be achieved with low overhead. [Brief explanation of the drawing]

[0008] [Figure 1] This is a block diagram of an image encoding device according to an embodiment of the present invention. [Figure 2] This is a block diagram of an image decoding device according to an embodiment of the present invention. [Figure 3] This is a flowchart illustrating the process of splitting a tree block. [Figure 4] This diagram shows how an input image is divided into tree blocks. [Figure 5] This is a diagram illustrating the z-scan. [Figure 6] This diagram shows the division shape of the block. [Figure 7] This is a flowchart to explain the process of dividing a block into four parts. [Figure 8] This is a flowchart illustrating the process of dividing a block into two or three parts. [Figure 9]It is a syntax for expressing the shape of block division. [Figure 10] It is a diagram for explaining intra prediction. [Figure 11] It is a diagram for explaining the reference block of inter prediction. [Figure 12] It is a syntax for expressing the coding block prediction mode. [Figure 13] It is a diagram showing the correspondence between syntax elements and modes related to inter prediction. [Figure 14] It is a diagram for explaining the affine transformation motion compensation of two control points. [Figure 15] It is a diagram for explaining the affine transformation motion compensation of three control points. [Figure 16] It is a block diagram of the detailed configuration of the inter prediction unit 102 in FIG. 1. [Figure 17] It is a block diagram of the detailed configuration of the normal prediction motion vector mode derivation unit 301 in FIG. 16. [Figure 18] It is a block diagram of the detailed configuration of the normal merge mode derivation unit 302 in FIG. 16. [Figure 19] It is a flowchart for explaining the normal prediction motion vector mode derivation process of the normal prediction motion vector mode derivation unit 301 in FIG. 16. [Figure 20] It is a flowchart representing the processing procedure of the normal prediction motion vector mode derivation process. [Figure 21] It is a flowchart for explaining the procedure of the normal merge mode derivation process. [Figure 22] It is a block diagram of the detailed configuration of the inter prediction unit 203 in FIG. 2. [Figure 23] It is a block diagram of the detailed configuration of the normal prediction motion vector mode derivation unit 4​​​​​Figure 22 is a flowchart illustrating the normal predicted motion vector mode derivation process of the normal predicted motion vector mode derivation unit 401. [Figure 26] Figure 16 is a block diagram showing the detailed configuration of the subblock predictive motion vector mode derivation unit 303. [Figure 27] Figure 22 is a block diagram showing the detailed configuration of the subblock predictive motion vector mode derivation unit 403. [Figure 28] Figure 16 is a block diagram showing the detailed configuration of the subblock merge mode derivation unit 304. [Figure 29] Figure 22 is a block diagram showing the detailed configuration of the subblock merge mode derivation unit 404. [Figure 30] This figure illustrates the derivation of candidate motion vectors for affine inheritance prediction. [Figure 31] This figure illustrates the derivation of candidate motion vectors for affine construction prediction. [Figure 32] This diagram illustrates the derivation of affine inheritance merge candidates. [Figure 33] This diagram illustrates the derivation of affine construction merge candidates. [Figure 34] This is a flowchart for deriving candidate motion vectors for affine inheritance prediction. [Figure 35] This is a flowchart for deriving candidate motion vectors for affine construction prediction. [Figure 36] This is a flowchart for deriving candidates for affine inheritance merge. [Figure 37] This is a flowchart for deriving candidates for affine construction merge. [Figure 38] This flowchart explains the initialization and update process for the historical prediction motion vector candidate list. [Figure 39] This is a flowchart of the identical element verification process in the historical prediction motion vector candidate derivation process. [Figure 40] This is a flowchart of the element shifting procedure in the process for deriving candidate motion vectors based on historical prediction. [Figure 41]This is a flowchart illustrating the procedure for deriving candidate motion vectors based on historical predictions. [Figure 42] This is a flowchart illustrating the procedure for deriving candidates for history merge. [Figure 43] This diagram illustrates an example of the process for updating the list of candidate motion vectors predicted in the history. [Figure 44] This is a flowchart illustrating the operation of the subblock time merge candidate derivation unit 381. [Figure 45] This is a flowchart illustrating the process of deriving information about the adjacent movement of blocks. [Figure 46] This is a flowchart illustrating the process of deriving temporal motion vectors. [Figure 47] This is a flowchart to explain the derivation of interpretation prediction information. [Figure 48] This is a flowchart illustrating the process of deriving subblock movement information. [Figure 49] This is a diagram to explain the temporal relationships between the pictures. [Figure 50] This is a flowchart illustrating the process of deriving time-predicted motion vector candidates in the normal prediction motion vector mode derivation unit 301. [Figure 51] This flowchart explains the derivation process of ColPic in the derivation process of time-predicted motion vector candidates in the normal prediction motion vector mode derivation unit 301. [Figure 52] This flowchart illustrates the process of deriving the encoding information of ColPic in the derivation process of time-predicted motion vector candidates in the normal prediction motion vector mode derivation unit 301. [Figure 53] This is a flowchart to explain the process of deriving interpretation prediction information. [Figure 54] This flowchart shows the procedure for deriving inter-prediction information for an encoded block when the inter-prediction mode of the encoded block colCb is bi-prediction (Pred_BI). [Figure 55]This is a flowchart illustrating the procedure for scaling motion vectors. [Figure 56] This is a flowchart explaining the process of deriving time merge candidates. [Figure 57] This diagram illustrates motion compensation prediction in the case of L0 prediction, where the L0 reference picture (RefL0Pic) is at a time earlier than the picture to be processed (CurPic). [Figure 58] This diagram illustrates motion compensation prediction in the case of L0 prediction, where the reference picture for the L0 prediction is at a later time than the picture being processed. [Figure 59] This diagram illustrates motion-compensated prediction in a dual prediction system where the reference picture for L0 prediction is at a time earlier than the picture to be processed, and the reference picture for L1 prediction is at a time later than the picture to be processed. [Figure 60] This diagram illustrates the prediction direction of motion-compensated prediction in a dual prediction system where the reference picture for L0 prediction and the reference picture for L1 prediction are at a time earlier than the picture being processed. [Figure 61] This diagram illustrates the prediction direction of motion-compensated prediction in a dual prediction system where the reference picture for L0 prediction and the reference picture for L1 prediction are at a later time than the picture being processed. [Figure 62] This is a flowchart illustrating the procedure for deriving the average merge candidate. [Figure 63] This is a table showing information about merge difference motion vectors. [Figure 64] This diagram illustrates the derivation of the merge difference motion vector. [Figure 65] This diagram illustrates the prediction of the triangular merge mode. [Figure 66] This is a flowchart explaining the derivation of triangular merge candidates. [Figure 67] This is a flowchart explaining the derivation of single-prediction motion information for merged triangular partitions. [Figure 68] This diagram illustrates merged triangular indexes and merged triangular partitions. [Modes for carrying out the invention]

[0009] This section defines the technologies and technical terms used in this embodiment.

[0010] <Tree Block> In this embodiment, the image to be encoded and decoded is divided equally into predetermined units. We define this as a tree block. As shown in Figure 4, in this embodiment, the tree block is The size is set to 128x128 pixels, but the size of the tree block is limited to this. Instead, you can set any size. (In the case of encoding, this refers to the target of encoding.) In the decoding process, the tree block corresponds to the target to be decoded.) The tree block is in raster scan order. In other words, it switches from left to right and from top to bottom. Inside each tree block, Recursive partitioning is possible. The blocks to be encoded and decoded after tree block partitioning. We define this as an encoded block. Also, tree blocks and encoded blocks are collectively referred to as blocks. Defined as "ku". Efficient encoding becomes possible by performing appropriate block division. The block size can also be a fixed value predetermined by the encoding and decoding devices. Furthermore, a configuration is used in which the encoding device transmits the size of the tree block determined by the encoding device to the decoding device. You can also take it.

[0011] <Prediction Mode> The processed (coded in the encoding process) of the image to be processed, in units of the encoding block to be processed. The decoded image, image signal, tree block, block, encoded block of the decoded signal. Used for various purposes, and in the decoding process, the decoded image, image signal, tree block, block Intra prediction (MO) is performed from the surrounding image signal (used in coding blocks, etc.). DE_INTRA), and MODE_INTER, which performs prediction from the image signal of the processed image. Switch. Identify this intra-prediction (MODE_INTRA) and inter-prediction (MODE_INTER). The mode is defined as Prediction Mode (PredMode). Prediction Mode (PredMode) is an intraprediction ( It has a value of MODE_INTRA or MODE_INTER (interface prediction).

[0012] <Interface Forecast> Interpretation, which makes predictions from the image signals of processed images, references multiple processed images. It can be used as a picture. To manage multiple reference pictures, L0 (reference Two types of reference lists are defined: L1 (Reference List 1) and L0 (Reference List 0), and each has a reference index. Use CSS to identify the reference picture. L0 prediction (Pred_L0) is available for P slices. In B-slice, there are L0 predictions (Pred_L0), L1 predictions (Pred_L1), and bi-predictions (Pred_BI). ) is available. L0 prediction (Pred_L0) refers to the reference picture managed by L0. This is an interpretation, and the L1 prediction (Pred_L1) uses a reference picture managed by L1. This is the reference interpretation. In dual prediction (Pred_BI), both L0 and L1 predictions are performed. Interpretation that references one reference picture each managed by L0 and L1. Therefore, the information that identifies L0 prediction, L1 prediction, and dual prediction is defined as the interprediction mode. For constants and variables with the subscript LX in the output in subsequent processing, L0, L1 It is assumed that processing is performed for each step.

[0013] <Predictive motion vector mode> The predicted motion vector mode uses an index to identify the predicted motion vector, and differential motion Transmits vector, interpretation mode, and reference index, and input of the block to be processed. This mode determines the predictive information for the target block. The predicted motion vector is adjacent to the block to be processed. A processed block, or a block belonging to a processed image, which is the same as the block to be processed. Candidate predicted motion vectors derived from blocks located in or near (in the vicinity of) the predicted It is derived from an index used to identify the measured motion vector.

[0014] <Merge Mode> Merge mode does not transmit the differential motion vector or reference index, but processes the blocks to be processed. Processed blocks adjacent to the block, or blocks belonging to the processed image, are blocks to be processed. Processing is performed using the interpretation information of blocks located at the same position as or near (in the vicinity of) the block in question. This mode derives inter-prediction information for the target block.

[0015] Processed blocks adjacent to the block to be processed, and the interface of those processed blocks - Prediction information is defined as spatial merge candidates. Blocks belonging to the processed image are the blocks to be processed. Blocks located in the same position as or near (in the vicinity of) a block, and the interior of that block. Interpretation information derived from terminal prediction information is defined as a time merge candidate. The supplement is added to the merge candidate list, and the merge index predicts which blocks will be processed. Identify the merge candidates to use.

[0016] <Adjacent Blocks> Figure 11 shows how to derive interpredictive information in predictive motion vector mode and merge mode. This is a diagram illustrating the reference blocks used for referencing. A0, A1, A2, B0, B1, B2, B3 is a processed block adjacent to the block to be processed. T0 belongs to the processed image. In the block being processed, the same position as or near the target encoding block of the image being processed. It is a block located to the side.

[0017] A1 and A2 are located to the left of the coding block to be processed, and adjacent to the coding block to be processed. These are adjacent blocks. B1 and B3 are located above the encoding block to be processed, and are the same as the processing block. These are blocks adjacent to the coded block. A0, B0, and B2 are the codes to be processed, respectively. These are the blocks located in the lower left, upper right, and upper left corners of the numbered block.

[0018] Details on how adjacent blocks are handled in predictive motion vector mode and merge mode. Details will be discussed later.

[0019] <Affine transformation motion compensation> Affine transform motion compensation divides the encoded block into predetermined subblocks, and each sub This method involves setting individual motion vectors for each block and performing motion compensation. The motion vector of the block is the processed block adjacent to the block being processed, or processed Blocks belonging to the image that are located at the same position as or near the block to be processed. The result is derived based on one or more control points derived from the block's interprediction information. In terms of form, the subblock size is set to 4x4 pixels, but the subblock size is as follows: It's not limited to this, and you can even derive motion vectors at the pixel level.

[0020] Figure 14 shows an example of affine transform motion compensation with two control points. In this case, the two Since the control point has two parameters, a horizontal component and a vertical component, the control point has two The affine transformation in this case is called a four-parameter affine transformation. (See Figure 14, CP1, CP2) These are the control points. Figure 15 shows an example of affine transform motion compensation with three control points. In this case, since the three control points have two parameters, a horizontal component and a vertical component, An affine transformation with three control points is called a 6-parameter affine transformation. (Figure 15) CP1, CP2, and CP3 are control points.

[0021] Affine transformation motion compensation applies to both predictive motion vector modes and merged modes. It is also available in D. Apply affine transform motion compensation in predictive motion vector mode. We define the mode as the subblock prediction motion vector mode and the merge mode as the affine transformation. The mode to which motion compensation is applied is defined as subblock merge mode.

[0022] <Syntax of coded blocks> Using Figures 12(a), 12(b), and 13, the prediction mode of the coding block is The syntax for expressing this will be explained. In Figure 12(a), pred_mode_flag is an inter-predicted This is a flag indicating whether or not measurement is being performed. If pred_mode_flag is 0, it is an interpretation prediction, and pred_mo If de_flag is 1, it is an intranet prediction. In the case of an intranet prediction, the intranet prediction information i Send ntra_pred_mode, and if it's an interpretation, send merge_flag. merge_flag is a merge This flag indicates whether to use the gyromode or the predictive motion vector mode. In Tor mode (merge_flag=0), apply subblock predictive motion vector mode. Send the inter_affine_flag flag to indicate whether or not. Appropriate subblock prediction motion vector mode. If used (inter_affine_flag=1), send cu_affine_type_flag. g is a floating-point vector used to determine the number of control points in the subblock predictive motion vector mode. It is.

[0023] On the other hand, in merge mode (merge_flag=1), the merge_subblock_flag in Figure 12(b) is Send. merge_subblock_flag is a flag indicating whether or not to apply subblock merge mode. It is. In subblock merge mode (merge_subblock_flag=1), merge index Send merge_subblock_idx. On the other hand, if not in subblock merge mode (merge_ subblock_flag=0), merge_triangle_fl flag indicating whether or not to apply triangular merge mode. Send ag. If triangular merge mode is applied (merge_triangle_flag=1), divide the block. The direction of division is merge_triangle_split_dir, and for each of the two divided partitions, Send merge triangular indices merge_triangle_idx0 and merge_triangle_idx1. If merge mode is not applied (merge_triangle_flag=0), the merge index merge_idx Send.

[0024] Figure 13 shows the values ​​of each syntax element and their corresponding prediction modes. flag=0,inter_affine_flag=0 is for normal predictive motion vector mode (Inter Pred Mode) Responds. merge_flag=0, inter_affine_flag=1 is the subblock predictive motion vector mode ( Supports Inter Affine Mode. merge_flag=1, merge_subblock_flag=0, merge_trianlge _flag=0 corresponds to normal merge mode. merge_flag=1, merge_subblock _flag=0,merge_trianlge_flag=1 corresponds to Triangle Merge Mode. merge_flag=1,merge_subblock_flag=1 is the subblock merge mode (Affine Merge). (Mode) corresponds to

[0025] <poc> POC (Picture Order Count) is a variable associated with the picture being encoded. A value is set that increases by 1 in the order of the picture output. Depending on the value of POC, the same picture It can determine whether it is a picture, determine the order of pictures in the output order, and determine the order of pictures It is possible to derive the distance between two pictures. For example, if the POCs of two pictures have the same value... In this case, it can be determined that they are the same picture. If the two pictures have different POC values... The picture with the smaller POC value can be determined to be the picture that will be output first, 2 The difference in POC between the two pictures indicates the distance between the pictures in the time axis direction.

[0026] (First Embodiment) Regarding the image encoding device 100 and image decoding device 200 according to the first embodiment of the present invention I will explain.

[0027] Figure 1 is a block diagram of the image encoding device 100 according to the first embodiment. The motion image encoding device consists of an image encoding device 100, a block division unit 101, and an interpretation unit. Unit 102, Intra prediction unit 103, Decoded image memory 104, Prediction method determination unit 105, Residual Signal generation unit 106, orthogonal transformation / quantization unit 107, bit string encoding unit 108, inverse quantization / inverse It comprises an orthogonal transformation unit 109, a decoded image signal superposition unit 110, and an encoded information storage memory 111. El.

[0028] The block division unit 101 recursively divides the input image to generate encoded blocks. The block division section 101 divides the block to be divided in the horizontal and vertical directions, respectively. The four division points to be divided, and the blocks to be divided, are divided either horizontally or vertically. It includes a 2-3 division section. The image signal of the generated encoding block to be processed is interpreted. It is supplied to the measurement unit 102, the intra-prediction unit 103, and the residual signal generation unit 106. Information indicating the recursive partitioning structure is supplied to the bit string encoding unit 108. Block partitioning unit 10 The detailed operation of item 1 will be described later.

[0029] The interpretation unit 102 performs interpretation of the encoding block to be processed. Encoding information Interpretation information stored in storage memory, decoded image stored in memory 104 Multiple candidate interpretation information is derived from the decoded image signal, and from among the multiple candidates, the appropriate Select the desired interpretation mode, and the selected interpretation mode and the selected interpretation mode A predicted image signal corresponding to the prediction mode is supplied to the prediction method determination unit 105. The detailed configuration and operation of section 102 will be described later.

[0030] The intra prediction unit 103 performs intra prediction of the coding block to be processed. Predicted image signals are obtained from the decoded image signals stored in Mori 104 through intra-prediction. It generates and selects the most suitable intra-prediction mode from among multiple intra-prediction modes. The selected intra prediction mode and the predicted image signal corresponding to the selected intra prediction mode are predicted. It is supplied to the measurement method determination unit 105. Figure 10 shows an example of intra prediction. Figure 10(a) is This shows the correspondence between the prediction direction and the intra prediction mode number for intra prediction. For example, Intra prediction mode 50 generates an intra prediction image by copying pixels in the vertical direction. To accomplish. Intra prediction mode 1 is DC mode, and all pixels of the block to be processed. This mode uses the average value of the reference pixels. Intra prediction mode 0 is Planar mode. This creates a two-dimensional intra-predictive image from vertical and horizontal reference pixels. This is the case. Figure 10(b) shows the generation of an intra-prediction image in intra-prediction mode 40. This is an example. For each pixel of the block to be processed, the reference image of the direction indicated by the intra prediction mode. Copy the raw value. If the reference pixel in intra prediction mode is not at an integer position, the surrounding pixels are copied. The reference pixel value is determined by interpolation from the reference pixel value at an integer position.

[0031] The decoded image memory 104 stores the decoded image generated by the decoded image signal superimposition unit 110. The decoded image stored in the decoded image memory is processed by the inter-prediction unit 102 and the intra-prediction unit 1 It will be supplied to 03.

[0032] The prediction method determination unit 105 determines the coding amount of the coding information and residual signal, and the prediction image for each prediction. By evaluating the amount of distortion between the image signal and the image signal to be processed, the optimal prediction mode can be determined. Determine the mode (internal prediction or intra prediction). In the case of merge mode for internal prediction... This includes the merge index and information indicating whether or not it is in subblock merge mode (subblock merge). The encoded information of the (page flag) is supplied to the bit string encoding unit 108, and the predicted movement of the interpretation is predicted. In vector mode, the interpretation mode, predicted motion vector index, L0, L Reference index 1, differential motion vector, information indicating whether or not it is in subblock mode (sub Encoded information such as block prediction motion vector flags is supplied to the bit string encoding unit 108. The determined encoding information is supplied to the encoding information storage memory 111.

[0033] The residual signal generation unit 106 generates residual signals by subtracting the predicted image signal from the image signal to be processed. A difference signal is generated and supplied to the orthogonal transformation / quantization unit 107.

[0034] The orthogonal transformation / quantization unit 107 performs an orthogonal transformation on the residual signal according to the quantization parameters. The bit string encoding unit 108 performs quantization and generates an orthogonal transform and quantized residual signal, and the inverse This is supplied to the quantization / inverse orthogonal transformation unit 109.

[0035] The bit sequence encoding unit 108 encodes sequences, pictures, slices, and encoding blocks. In addition to the information, the prediction method determined by the prediction method determination unit 105 for each encoded block is used. Encodes the corresponding encoding information. Specifically, the prediction mode PredMode for each encoding block, In PartMode and PRED_INTER mode, determine whether or not it is merge mode. The flag, subblock merge flag, merge index if in merge mode, and mark If not in prediction mode, use the prediction mode, prediction motion vector index, and differential motion vector. Information regarding the culvert, coded information such as subblock prediction motion vector flags, etc., will be described later. Encode according to a set syntax rule to generate the first encoded bit sequence. Also, The T-series coding unit 108 applies the orthogonal transform and quantized residual signals to a specified syntax rule. Therefore, entropy coding is performed to generate a second coded bit sequence. (First coded bit sequence) The second encoded bit string is multiplexed according to the specified syntax rules, and the bitstream Outputs.

[0036] The inverse quantization / inverse orthogonal transformation unit 109 receives the orthogonal transformation supplied from the orthogonal transformation / quantization unit 107. The quantized residual signal is inversely quantized and inversely orthogonal transformed to calculate the residual signal, and the decoded image signal is obtained. It is supplied to the superimposed section 110.

[0037] The decoded image signal superimposition unit 110 superimposes the predicted image signal according to the determination made by the prediction method determination unit 105. The residual signals that have been inversely quantized and inversely orthogonal transformed by the inverse quantization / inverse orthogonal transformation unit 109 are superimposed and restored A decoded image is generated and stored in the decoded image memory 104. The decoded image is then encoded. After applying a filtering process to reduce distortions such as block distortion, the decoded image is stored in memory 104. It may be stored in [a different location].

[0038] The encoded information storage memory 111 stores the prediction mode (in) determined by the prediction method determination unit 105. It stores coded information such as (ter prediction or intra prediction). Coded information storage memory 111 The encoded information stored is, in the case of interpretation, the determined motion vector, reference list, In addition to the reference index, in the case of merge mode for interpretation, the merge index, Encoded information for the subblock merge flag, which indicates whether or not subblock merge mode is active. In the case of the interprediction prediction motion vector mode, the interprediction mode is the prediction motion vector. Reference index, L0, L1 reference index, difference motion vector, subblock motion Information indicating whether it is a do or not (subblock prediction motion vector flag), in the case of intra prediction, This is the determined intra-prediction mode, etc. History of predictions managed in the encoded information storage memory 111. The construction of the supplementary list will be discussed later.

[0039] Figure 2 shows a video decoding device according to an embodiment of the present invention, corresponding to the video encoding device in Figure 1. This is a block showing the configuration. The video decoding device of this embodiment includes a bit sequence decoding unit 201, Lock division unit 202, inter prediction unit 203, intra prediction unit 204, coded information storage unit Mori 205, inverse quantization / inverse orthogonal transformation unit 206, decoded image signal superposition unit 207, and decoded image It is equipped with 208 image memory units.

[0040] The decoding process of the video decoding device in Figure 2 is located inside the video encoding device in Figure 1. Since it corresponds to the decoding process, the encoded information storage memory 205 in Figure 2, inverse quantization, inverse The configurations of the orthogonal transformation unit 206, the decoded image signal superimposition unit 207, and the decoded image memory 208 are as follows: Figure 1 shows the video encoding device, specifically the inverse quantization / inverse orthogonal transform unit 109 and the decoded image signal superposition unit 110. The configurations of the encoded information storage memory 111 and the decoded image memory 104 correspond to the respective configurations. It has the function of [doing something].

[0041] The bitstream supplied to the bit string decoding unit 201 follows the specified syntax rules. Then it is separated. The separated first encoded bit string is decoded, and the sequence, picture, slide To obtain information at the coding block level, and coded information at the coding block level. In terms of coding blocks, either inter-prediction (PRED_INTER) or intra-prediction (PRED_INTRA) is used. Prediction modes to determine whether it is PredMode, PartMode, or Interpretation (PRED_INTER) In this case, a flag to determine whether or not it is merge mode, and if it is merge mode, the merge index. S, subblock merge flag, if in predictive motion vector mode, interpredictive mode D, predicted motion vector index, differential motion vector, subblock predicted motion vector Encoded information regarding flags, etc., is decoded according to the syntax rules specified below, and then encoded. The information is stored in the inter-prediction unit 203 or the intra-prediction unit 204, and in the encoded information storage memory. It supplies to 205. The separated second encoded bit string is decoded and orthogonally transformed and quantized. The difference signal is calculated, and the orthogonal-transformed and quantized residual signal is sent to the inverse quantization and inverse orthogonal-transformation unit 206. To give.

[0042] The interpretation unit 203 determines that the prediction mode PredMode of the coding block to be processed is interpretation When prediction (PRED_INTER) is in prediction motion vector mode, the encoded information storage memory 205 Using the encoded information of already decoded image signals stored in the system, multiple predicted motion vectors Candidates for the vector are derived and registered in the list of predicted motion vector candidates described later. From among the multiple predicted motion vector candidates registered in the supplementary list, the bit string decoding unit 201 selects Select a predicted motion vector corresponding to the decoded and supplied predicted motion vector index, The difference vector decoded by the bit string decoding unit 201 and the selected predicted motion vector are used to determine the motion The vector is calculated and stored in the encoding information storage memory 205 along with other encoding information. The encoding information of the encoding block supplied and stored here is in Prediction Mode (PredMode) and Split Mode (Pa). rtMode, L0 prediction, and flags indicating whether or not to use L1 prediction, predFlagL0[xP][yP], pr edFlagL1[xP][yP], L0, L1's reference index refIdxL0[xP][yP], refIdxL1[xP][yP] These are the motion vectors mvL0[xP][yP], mvL1[xP][yP], etc., of L0 and L1. Here, xP and yP are P This is an index indicating the position of the top-left pixel of the coded block within the Kucha. Prediction mode PredMode is for inter-prediction (MODE_INTER), and the inter-prediction mode is for L0 prediction (Pred_L0). In this case, the flag predFlagL0, which indicates whether or not to use L0 prediction, is 1, and whether or not to use L1 prediction. The flag predFlagL1, which indicates whether or not, is 0. The interpretation mode is L1 prediction (Pred_L1). In this case, the flag predFlagL0, which indicates whether or not to use L0 prediction, is 0, and L1 prediction is not used. The flag predFlagL1, which indicates this, is 1. This is the case when the interpretation mode is biprediction (Pred_BI). , a flag predFlagL0 indicating whether or not to use L0 prediction, and a flag indicating whether or not to use L1 prediction. The flag predFlagL1 is 1 in both cases. Furthermore, the prediction mode of the coded block to be processed is Pred When Mode is set to inter prediction (PRED_INTER) and merge mode is active, merge candidates are derived. The encoded information of the already decoded encoded block stored in the encoded information storage memory 205 Using this method, multiple merge candidates are derived and registered in the merge candidate list described later, and merge candidates From among the multiple merge candidates registered in the list, the bit string decoding unit 201 decodes and supplies... Select merge candidates corresponding to the merge index and predict the L0 value of the selected merge candidates. , and flags predFlagL0[xP][yP] and predFlagL1[xP][yP] indicating whether or not to use L1 prediction. , the reference index refIdxL0[xP][yP], refIdxL1[xP][yP] of L0 and L1, and the dynamic of L0 and L1 Interpretation information such as vectors mvL0[xP][yP], mvL1[xP][yP], etc. are encoded and stored in information memory 2. Store in 05. Here, xP and yP are the positions of the top-left pixel of the encoded block in the picture. This is the index shown. The detailed configuration and operation of the interpretation prediction unit will be described later.

[0043] The intra prediction unit 204 determines that the prediction mode PredMode of the coding block to be processed is intra During prediction (PRED_INTRA), intra prediction is performed. The code decoded by the bit string decoding unit 201 The serialization information includes an intra-prediction mode, and the decoded image is determined according to the intra-prediction mode. Predicted image signals are obtained from the decoded image signals stored in the image memory 208 through intra-prediction. The intra-prediction unit 20 generates a signal and supplies the predicted image signal to the decoded image signal superimposition unit 207. Since 4 corresponds to the intra prediction unit 103 of the image coding device 100, The same processing as in the prediction unit 103 is performed.

[0044] The inverse quantization / inverse orthogonal transformation unit 206 processes the orthogonal transformation / quantum transformation decoded by the bit sequence decoding unit 201. The resulting residual signal is subjected to an inverse orthogonal transform and inverse quantization, and the inverse orthogonal transform and inverse quantization are obtained. Obtain the residual signal.

[0045] The decoded image signal superposition unit 207 superimposes the predicted image signal interpredicted by the interpretation unit 203. The predicted image signal, or the predicted image signal intra-predicted by the intra-prediction unit 204, and inverse quantization / inverse quantization. By superimposing the inverse orthogonal transform and inversely quantized residual signal by the cross-transformation unit 206, The image signal is decoded and stored in the decoded image memory 208. When doing so, a filtering process is performed on the decoded image to reduce block distortion caused by encoding. After performing this process, the decoded image may be stored in the image memory 208.

[0046] Next, the operation of the block division unit 101 in the image encoding device 100 will be described. Figure 3 shows the process of dividing an image into tree blocks and then further dividing each tree block. This is a flowchart. First, the input image is divided into tree blocks of a predetermined size. (Step S1001). For each tree block, a predetermined order, i.e., raster Scan in the order of scanning (step S1002) and divide the interior of the tree block to be processed. (Step S1003).

[0047] Figure 7 is a flowchart showing the detailed operation of the splitting process in step S1003. Then, it is determined whether or not to divide the block to be processed into four parts (step S1101).

[0048] If it is determined that the block to be processed should be divided into four parts, then the block to be processed will be divided into four parts (S Step S1102). For each block into which the block to be processed has been divided, in Z-scan order, That is, scan in the order of upper left, upper right, lower left, and lower right (step S1103). Figure 5 shows Z This is an example of a can order, and Figure 6, 601, is an example where the processing block is divided into four parts. The numbers 0-3 in 601 indicate the order of processing. Then, in step S1101, it is divided. For each of the blocks, the flowchart in Figure 7 is called recursively.

[0049] If it is determined that the block to be processed should not be divided into 4 parts, then divide it into 2 or 3 parts (Step S1) 105).

[0050] Figure 8 is a flowchart detailing the operation of the 2-3 splitting process in step S1105. First, decide whether to divide the block to be processed into 2 or 3 parts, that is, whether to divide it into 2 or 3 parts. Determine whether or not to perform one of the actions (step S1201).

[0051] If it is not decided to divide the block to be processed into 2-3 parts, that is, if it is decided not to divide it. If necessary, the splitting is terminated (step S1211), and the program returns to the higher-level block.

[0052] If it is determined that the block to be processed should be divided into 2-3 parts, then the block to be processed will be further divided into 2 parts. A decision is made as to whether or not to divide it (step S1202).

[0053] If it is determined that the block to be processed should be divided into two, the block to be processed will be divided vertically. A decision is made as to whether or not to proceed (step S1203), and based on the result, the block to be processed is lowered. Divide perpendicularly (step S1204), or divide the block to be processed horizontally. Step S1205). As a result of step S1204, the block to be processed is shown in Figure 602. As a result of step S1205, the block to be processed is divided into two vertical sections. As shown in Figure 604, it is divided into two horizontal sections.

[0054] If, in step S1202, it is not determined that the block to be processed should be divided into two parts, In other words, if it is decided to divide it into three parts, the question is whether to divide the block to be processed vertically or not. Determine (step S1206), and based on the result, divide the block to be processed vertically. Either divide it (step S1207) or divide the block to be processed horizontally (step S 1208). As a result of step S1207, the block to be processed is as shown in Figure 603, The block is divided into three perpendicular sections, and as a result of step S1208, the block to be processed is shown in Figure 605. As shown, it is divided into three horizontal sections.

[0055] After executing any of steps S1204 to S1205, the block to be processed For each divided block, scan from left to right and from top to bottom (step S1209). ). The numbers 0 to 3 in Figure 6, from 602 to 605, indicate the order of processing. Each of the divided parts For each block, the flowchart in Figure 8 is called recursively.

[0056] The recursive block partitioning described here depends on the number of times the block is partitioned, or the number of blocks being processed. The necessity of splitting may be restricted depending on the size, etc. The information restricting the necessity of splitting is the encoding device. Even if an agreement is made in advance between the decryption device and the system, it can be implemented in a configuration that does not involve the transmission of information. The encoding device determines the information that limits whether or not division is necessary and records it in the encoded bit sequence. This may be implemented by transmitting the data to the decoding device.

[0057] Here, when a block is divided, the block before division is called the parent block, and the divided block Each of these blocks is called a child block.

[0058] Next, the operation of the block division unit 202 in the image decoding device 200 will be described. The lock division unit 202 performs the same processing procedure as the block division unit 101 of the image encoding device 100. This divides the tree block. However, the block division of the image encoding device 100 In section 101, optimization methods such as estimating the optimal shape using image recognition and optimizing the strain rate are applied. In contrast to determining the optimal block division shape, the block division in the image decoding device 200 The splitting unit 202 decodes the block division information recorded in the encoded bit sequence, The difference lies in how the lock's split shape is determined.

[0059] Syntax (syntax rules for encoded bit sequences) relating to block partitioning in the first embodiment This is shown in Figure 9. coding_quadtree() represents the syntax for dividing a block into four parts. `multi_type_tree()` represents the syntax for splitting a block into two or three parts. qt_split is a flag that indicates whether or not to divide the block into four parts. If you want to split into four parts, set qt_split=1; if you don't want to split into four parts, set qt_split=0. If you want to split into four parts (qt_split= 1) For each of the four divided blocks, recursively perform the four division process (coding_quadtree(0), c coding_quadtree(1), coding_quadtree(2), coding_quadtree(3)). If not divided into 4 (qt_ `split=0)` determines the subsequent split according to `multi_type_tree()`. `mtt_split` further splits... This flag indicates whether or not to split. If further splitting is performed (mtt_split=1), then vertical splitting is performed. The `mtt_split_vertical` flag indicates whether to split horizontally or vertically, and the `mtt_split_vertical` flag indicates whether to split horizontally or vertically. Refer to mtt_split_binary, which is a flag that determines whether to split into three parts. al=1 indicates vertical splitting, and mtt_split_vertical=0 indicates horizontal splitting. This indicates that mtt_split_binary=1 splits into two, and mtt_split_binary=0 splits into three. This demonstrates the division process. The multi_type_tree is recursively called until mtt_split=0. Perform a more hierarchical block division.

[0060] <Interface Forecast> The inter prediction method according to the embodiment is shown in Figure 1, inter prediction unit 10 of the video encoding device. This is carried out in the inter-prediction unit 203 of the video decoding device shown in Figure 2.

[0061] The inter prediction method according to the embodiment will be explained with reference to the drawings. The method is performed in units of coded blocks, either by encoding or decoding.

[0062] <Explanation of the encoding-side interpretation unit 102> Figure 16 shows a detailed configuration of the inter-prediction unit 102 of the video encoding device shown in Figure 1. The normal predicted motion vector mode derivation unit 301 derives a plurality of normal predicted motion vector candidates. Select the predicted motion vector and calculate the difference vector between it and the detected motion vector. Interpretation mode, reference index, motion vector, calculated difference vector This is the interprediction information for the normal predicted motion vector mode. It is supplied to the predictive mode determination unit 305. Normally, the predictive motion vector mode derivation unit 301 The detailed configuration and processing will be described later.

[0063] The normal merge mode derivation unit 302 derives multiple normal merge candidates and selects the normal merge candidates. Select and obtain interprediction information in normal merge mode. This interprediction information is inter This is supplied to the prediction mode determination unit 305. Detailed configuration and processing of the normal merge mode derivation unit 302. The reasoning will be explained later.

[0064] In the subblock predicted motion vector mode derivation unit 303, multiple subblock predicted motion vectors We derive candidate drivers and select subblock predicted motion vectors, and the detected motion vectors and Calculate the difference vector. Detected interpretation mode, reference index, motion vector The calculated difference vector is the interprediction information for 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 predictive motion vector mode derivation unit 303 will be described later.

[0065] The subblock merge mode derivation unit 304 derives multiple subblock merge candidates. Select subblock merge candidates and obtain interprediction information for the subblock merge mode. This inter-prediction information is supplied to the inter-prediction mode determination unit 305. Subblock The detailed configuration and processing of the merge mode derivation unit 304 will be described later.

[0066] In the interprediction mode determination unit 305, the normal prediction motion vector mode derivation unit 301, Merge mode derivation unit 302, subblock predictive motion vector mode derivation unit 303, subblock Based on the inter prediction information supplied from the lock merge mode derivation unit 304, Determine the prediction mode. The prediction mode determination unit 305 outputs an interface according to the determination result. - Predictive information is supplied to the compensation prediction unit 306.

[0067] Based on the determined interprediction information, the motion compensation prediction unit 306 processes the decoded image memory 1 Interpretation is performed on the reference image signal stored in 04. For detailed configuration and processing... I will explain that later.

[0068] <Explanation of the decoding side interpretation unit 203> Figure 22 shows a detailed configuration of the inter-prediction unit 203 of the video decoding device shown in Figure 2.

[0069] The normal prediction motion vector mode derivation unit 401 derives a plurality of normal prediction motion vector candidates. Select the predicted motion vector and calculate the difference vector between it and the detected motion vector. The predicted interpretation mode, reference index, motion vector, and difference vector are used for normal prediction. This becomes the interpretation information for the motion vector mode. This interpretation information is for switch 408 It is supplied to the motion compensation prediction unit 406 via the normal prediction motion vector mode derivation unit 40. The detailed configuration and processing of item 1 will be described later.

[0070] The normal merge mode derivation unit 402 derives multiple normal merge candidates and selects a normal merge candidate. Select and obtain interpredictive information in normal merge mode. This interpredictive information switches It is supplied to the motion compensation prediction unit 406 via 408. The detailed configuration and processing will be described later.

[0071] In the subblock predicted motion vector mode derivation unit 403, multiple subblock predicted motion vectors We derive candidate drivers and select subblock predicted motion vectors, and the detected motion vectors and Calculate the difference vector. Detected interpretation mode, reference index, motion vector The calculated difference vector is the interprediction information for the normal prediction motion vector mode. This interpretation information is supplied to the motion compensation prediction unit 406 via switch 408. The detailed configuration and processing of the subblock predictive motion vector mode derivation unit 403 will be discussed later. To state.

[0072] The subblock merge mode derivation unit 404 derives multiple subblock merge candidates. Select subblock merge candidates and obtain interprediction information for the subblock merge mode. This interpretation information is supplied to the motion compensation prediction unit 406 via switch 408. The detailed configuration and processing of the subblock merge mode derivation unit 404 will be described later.

[0073] The motion compensation prediction unit 406 uses the determined interpretation prediction information to process the decoded image memory 2 Interpretation is performed on the reference image signal stored in 08. For detailed configuration and processing... The same applies to the encoding side.

[0074] <Normal Predictive Motion Vector Mode Derivation Unit (Normal AMVP)> The normal predicted motion vector mode derivation unit 301 in Figure 17 derives a candidate for spatial predicted motion vector. Unit 321, Time-predicted motion vector candidate derivation unit 322, History-predicted motion vector candidate derivation unit 3 23, Predicted motion vector candidate supplementation unit 325, Normal motion vector detection unit 326, Predicted motion vector It includes a candidate selection unit 327 and a motion vector subtraction unit 328.

[0075] The normal predicted motion vector mode derivation unit 401 in Figure 23 derives a candidate for spatial predicted motion vector. Unit 421, Time-predicted motion vector candidate derivation unit 422, History-predicted motion vector candidate derivation unit 4 23, Predicted motion vector candidate supplementation unit 425, Predicted motion vector candidate selection unit 426, motion vector Includes a culverter addition unit 427.

[0076] The encoding side's normal predicted motion vector mode derivation unit 301 and the decoding side's normal predicted motion vector The processing procedure for the Tormode Derivation Unit 401 is shown in the flowcharts in Figures 19 and 25, respectively. This will be explained using the following. Figure 19 shows the normal motion vector mode derivation unit 301 on the encoding side. This flowchart shows the procedure for deriving the predicted motion vector mode, and Figure 25 shows the decoding side. The procedure for deriving a normal predicted motion vector mode by the normal motion vector mode derivation unit 401 is shown. This is a flowchart.

[0077] <Explanation of the coding side: Typical predictive motion vector mode derivation unit (typical AMVP):> The normal predicted motion vector mode derivation procedure on the encoding side will be explained with reference to Figure 19. In the description of the 19 processing steps, the term motion vector in the specification and the normal motion in Figure 19 are used. The term "vector" is to be used in correspondence. First, the motion vector detection unit 326 normally Detects normal motion vectors for each center prediction mode and reference index (Figure 19) (Tep S100).

[0078] Next, the spatial prediction motion vector candidate derivation unit 321, and the time prediction motion vector candidate derivation unit 3 22, History prediction motion vector candidate derivation unit 323, Prediction motion vector candidate supplementation unit 325, Pre The motion vector candidate selection unit 327 and the motion vector subtraction unit 328 select the normal predicted motion vector The difference motion vectors used in mode interpretation are L0 and L1 respectively. This is calculated (steps S101-S106 in Figure 19). Specifically, the estimated value of the block to be processed is calculated. The measurement mode PredMode is Interpretation (MODE_INTER), and the Interpretation mode is L0 Prediction (Pr In the case of ed_L0), calculate the predicted motion vector candidate list mvpListL0 for L0, and then the predicted motion vector Select mvpL0 and calculate the difference motion vector mvdL0 of the motion vector mvL0 of L0. If the interpretation mode of the target block is L1 prediction (Pred_L1), the predicted motion vector of L1 The candidate list mvpListL1 is calculated, the predicted motion vector mvpL1 is selected, and the motion vector L1 Calculate the difference motion vector mvdL1 of tolmvL1. Interpretation mode of the block to be processed. In the case of dual prediction (Pred_BI), both L0 and L1 predictions are performed, and the predicted movement vector of L0 is... The candidate list mvpListL0 is calculated, and the predicted motion vector mvpL0 of L0 is selected. The difference motion vector mvdL0 is calculated from the vector mvL0, and the predicted motion vector of L1 is calculated. The supplementary list mvpListL1 is calculated, the predicted motion vector mvpL1 of L1 is calculated, and the motion vector of L1 The difference motion vectors mvdL1 and mvmvL1 are calculated.

[0079] The differential motion vector calculation process is performed for both L0 and L1, but both L0 and L1 This is a common process. Therefore, in the following explanation, L0 and L1 will be represented as a common LX. In the process of calculating the differential motion vector of L0, X is 0, and the differential motion vector of L1 In the process of calculating the difference motion vector of LX, If you want to refer to information from the other list instead of LX, use LY for the other list. represent.

[0080] When using the motion vector mvLX for LX (step S102:YES in Figure 19), LX Calculate candidate predicted motion vectors and construct a list of LX predicted motion vector candidates, mvpListLX. To build (step S103 in Figure 19). In the normal predicted motion vector mode derivation unit 301 Spatial prediction motion vector candidate derivation unit 321, time prediction motion vector candidate derivation unit 322, history Multiple predicted motion vectors are generated in the predicted motion vector candidate derivation unit 323 and the predicted motion vector candidate supplementation unit 325. Candidate motion vectors are derived, and a list of predicted motion vector candidates, mvpListLX, is constructed. Figure 19 The detailed processing procedure for step S103 will be described later using the flowchart in Figure 20. ru.

[0081] Next, the predicted motion vector candidate selection unit 327 selects the predicted motion vector candidate list for LX. Select the predicted motion vector mvpLX from mvpListLX (step S104 in Figure 19). Each predicted motion stored in the motion vector mvLX and the predicted motion vector candidate list mvpListLX The difference motion vectors are calculated for each candidate mvpListLX[i], which are the differences between the motion vectors. The code value when those difference motion vectors are encoded is predicted in the motion vector candidate list mvpLis It is calculated for each element of tLX. Then, it is registered in the predicted motion vector candidate list mvpListLX. Among the elements, which predictive motion vector candidate has the minimum sign value for each predictive motion vector candidate? Select mvpListLX[i] as the predicted motion vector mvpLX and get its index i. The predicted motion vector with the smallest generated code amount in the candidate list of motion vectors mvpListLX If multiple candidates exist, the index in the predicted motion vector candidate list mvpListLX is used. The candidate prediction motion vectors mvpListLX[i], where i is represented by a small number, are selected for optimal prediction motion vector Select it as mvpLX and get its index i.

[0082] Next, the motion vector subtraction unit 328 subtracts the selected LX from the LX motion vector mvLX. Subtract the predicted motion vector mvpLX, mvdLX = mvLX - mvpLX The difference motion vector mvdLX is calculated as LX (step S105 in Figure 19).

[0083] <Explanation of the decoder side: Normal predicted motion vector mode derivation unit (normal AMVP):> Next, the normal predicted motion vector mode processing procedure on the decoding side will be explained with reference to Figure 25. On the other side, there is a spatial prediction motion vector candidate derivation unit 421 and a time prediction motion vector candidate derivation unit 4 22. History prediction motion vector candidate derivation unit 423, Prediction motion vector candidate supplementation unit 425, The motion vectors used in the interprediction of the normal predictive motion vector mode are L0 and L1 respectively. Each is calculated (steps S201-S206 in Figure 25). Specifically, the block to be processed Prediction mode is set to inter-prediction (MODE_INTER), and the inter-prediction is performed on the block being processed. If the mode is L0 prediction (Pred_L0), calculate the L0 prediction motion vector candidate list mvpListL0. The system then selects the predicted motion vector mvpL0 and calculates the motion vector mvL0 for L0. If the prediction mode for the elephant block is L1 prediction (Pred_L1), the predicted motion vector of L1 The candidate list mvpListL1 is calculated, the predicted motion vector mvpL1 is selected, and the motion vector L1 Calculate mvL1. If the interpretation mode of the block to be processed is dual prediction (Pred_BI) Both L0 and L1 predictions are performed, and the L0 prediction motion vector candidate list mvpListL0 is calculated. Then, select the predicted motion vector mvpL0 for L0 and calculate the motion vector mvL0 for L0. Together, we calculate the L1 predicted motion vector candidate list mvpListL1, and the L1 predicted motion vector The torque mvpL1 is calculated, and the motion vector mvL1 of L1 is calculated for each.

[0084] Similar to the encoding side, the decoding side also performs motion vector calculation processing for L0 and L1 respectively. This process is performed, but it is the same for both L0 and L1. Therefore, in the following explanation, L0, L1 is represented as a common LX. LX is used for interpretation of the coded block to be processed. This represents the interpretation mode. In the process of calculating the motion vector of L0, X is 0, and L1 In the process of calculating the motion vector, X is 1. Also, the motion vector of LX is calculated. During processing, instead of using the same reference list as the LX being calculated, information from another reference list is used. When comparing, the other reference list is represented as LY.

[0085] When using the motion vector mvLX for LX (step S202:YES in Figure 25), LX Calculate candidate predicted motion vectors and construct a list of LX predicted motion vector candidates, mvpListLX. To build (step S203 in Figure 25). In the normal predicted motion vector mode derivation unit 401 Spatial prediction motion vector candidate derivation unit 421, time prediction motion vector candidate derivation unit 422, history Multiple predicted motion vectors are generated in the predicted motion vector candidate derivation unit 423 and the predicted motion vector candidate supplementation unit 425. Candidate motion vectors are calculated, and a list of predicted motion vector candidates, mvpListLX, is constructed. (Figure 25) The detailed processing procedure for step S203 will be described later using the flowchart in Figure 20. ru.

[0086] Next, the predicted motion vector candidate selection unit 426 selects the predicted motion vector candidate list mvpListLX The index mv of the predicted motion vector, which is decoded and supplied by the bit sequence decoding unit 201. Candidate predicted motion vectors corresponding to pIdxLX are mvpListLX[mvpIdxLX] selected as predicted motion vectors Extract it as `mvpLX` (step S204 in Figure 25).

[0087] Next, the motion vector addition unit 427 decodes the bit string decoding unit 201 and supplies it. The difference motion vector mvdLX of LX and the predicted motion vector mvpLX of LX are added together. mvLX = mvpLX + mvdLX The motion vector mvLX of LX is calculated (step S205 in Figure 25).

[0088] <Normal Predictive Motion Vector Mode Derivation Unit (Normal AMVP): Method for Predicting Motion Vectors> Figure 20 shows the normal predicted motion vector mode guide of the motion image encoding device according to an embodiment of the present invention. Common to the output unit 301 and the normal predicted motion vector mode derivation unit 401 of the motion image decoding device This flowchart represents the processing procedure for the normal predictive motion vector mode derivation process that has the necessary functionality. ru.

[0089] Normal prediction motion vector mode derivation unit 301 and Normal prediction motion vector mode derivation unit 40 Version 1 includes a list of predicted motion vector candidates, mvpListLX. The `stomvpListLX` has a list structure and indicates the location of the predicted motion vector candidate within the list. The elements are a motion vector index and a candidate predicted motion vector corresponding to the index. A memory area is provided for storing it. The predicted motion vector index numbers start from 0. The predicted motion vector candidates are then stored in the memory area of ​​the predicted motion vector candidate list mvpListLX. It is stored. In this embodiment, the predicted motion vector candidate list mvpListLX is small It is possible to register two predicted motion vector candidates (inter-prediction information). Furthermore, the predicted motion vectors registered in the predicted motion vector candidate list mvpListLX Set the variable numCurrMvpCand, which indicates the number of candidates, to 0.

[0090] The spatial prediction motion vector candidate derivation units 321 and 421 are derived from the block adjacent to the left. Candidates for the predicted motion vector are derived. In this process, the block adjacent to the left (A0 or A flag availableFlagLXA indicating whether the predicted motion vector candidate of A1) can be used, and derive the motion vector mvLXA and the reference index refIdxA, and add mvLXA to the predicted motion vector candidate list mvpListLX (step S301 in FIG. 20). When L0, X is 0 , when L1, X is 1 (the same applies hereinafter). Subsequently, the spatial predicted motion vector candidate derivation unit 32 1 and 421 derive candidates for the predicted motion vector from the blocks (B0, B1 or B2) adjacent above. In this process, a flag availableFlagLXB indicating whether the predicted motion vector candidate of the adjacent block above can be used, and the motion vector mvLXB and the reference index refIdxB are derived. If 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 step S30 1 and S302 in FIG. 20 are common except that the positions and numbers of the adjacent blocks to be referred to are different. A flag availableFlagLXN indicating whether the predicted motion vector candidate of the coded block can be used, and the motion vector mvLXN and the reference index refIdxN (N is A or B, the same applies hereinafter) are derived.

[0091] Subsequently, the temporal predicted motion vector candidate derivation units 322 and 422 derive candidates for the predicted motion vector from the coded blocks in pictures with different times from the current processing target picture. In this process, a flag availableFlagLXCol indicating whether the predicted motion vector candidate of the coded block in a picture with a different time can be used, and the motion vector mvLXCol Derive the reference index refIdxCol and the reference list listCol, and predict the motion vector mvLXCol. Add to the candidate list mvpListLX (step S303 in Figure 20). This step S30 The derivation procedure for step 3 will be explained in detail later.

[0092] Furthermore, time-predicted motion vectors are calculated in units of sequence (SPS), picture (PPS), or slice. The processing in the candidate extraction units 322 and 422 can be omitted.

[0093] Next, the history prediction motion vector candidate derivation units 323 and 423 derive history prediction motion vector candidates The historical prediction motion vector candidates registered in the supplementary list HmvpCandList are prediction motion vector candidates Add to the supplementary list mvpListLX. (Step S304 in Figure 20). This step S304 The registration process will be explained in detail later using the flowchart in Figure 41.

[0094] Next, the predicted motion vector candidate supplementation units 325 and 425 add the predicted motion vector candidate list mv Add a motion vector of a predetermined value, such as (0,0), until pListLX is satisfied (S3 in Figure 20). 05).

[0095] <Normal Merge Mode Derivation Section (Normal Merge)> The normal merge mode derivation unit 302 in Figure 18 is a spatial merge candidate derivation unit 341, and a time merge Candidate derivation unit 342, average merge candidate derivation unit 344, history merge candidate derivation unit 345, merge Includes a candidate replacement unit 346 and a merge candidate selection unit 347.

[0096] The normal merge mode derivation unit 402 in Figure 24 is a spatial merge candidate derivation unit 441, and a time merge Candidate derivation unit 442, average merge candidate derivation unit 444, history merge candidate derivation unit 445, merge Includes a candidate replacement unit 446 and a merge candidate selection unit 447.

[0097] Figure 21 shows the normal merge mode derivation unit 302 of the video encoding device according to an embodiment of the present invention. And the normal merge mode derivation unit 402 of the video decoding device has a function common to the normal merge mode This is a flowchart illustrating the procedure for the dermo derivation process.

[0098] The following explains the process step by step. Unless otherwise specified, the following explanation will not include the following. This section explains the case where slice type is B slice, but what about the case of P slice? This can also be applied. However, if the slice type slice_type is a P slice, the interpretation model There is only L0 prediction (Pred_L0) as a code; L1 prediction (Pred_L1) and biprediction (Pred_BI) are not available. Since it is not present, the processing related to L1 can be omitted.

[0099] In the normal merge mode derivation unit 302 and the normal merge mode derivation unit 402, merge candidate It has a mergeCandList. The merge candidate list mergeCandList has a list structure, A merge index that shows the location within the merge candidate list, and the merge corresponding to the index. A memory area is provided to store merge candidates as elements. The merge index number is 0. Starting from there, the merge candidates are stored in the memory area of ​​the merge candidate list, mergeCandList. In subsequent processing, the merge index i registered in the merge candidate list mergeCandList will be used. The merge candidates will be represented by mergeCandList[i]. In this embodiment, merge The mergeCandList must register at least 6 merge candidates (internal prediction information). It shall be possible. Further, set 0 to the variable numCurrMergeCand indicating the number of merge candidates registered in the merge candidate list mergeCandList.

[0100] In the spatial merge candidate derivation unit 341 and the spatial merge candidate derivation unit 441, from the encoded information stored in the encoded information storage memory 111 of the moving image encoding device or the encoded information storage memory 205 of the moving image decoding device, derive the spatial merge candidates A and B from the blocks adjacent to the left and upper sides of the processing target block, and register the derived spatial merge candidates in the merge candidate list mergeC andList (step S401 in FIG. 21). Here, define N indicating either of the spatial merge candidates A and B or the temporal merge candidate Col. A flag availableFlagN indicating whether the inter-prediction information of block N can be used as the spatial merge candidate N, the reference index refIdxL0N of L0 of the spatial merge candidate N, and the reference index refIdxL1N of L1, the L0 prediction flag predFlagL0N indicating whether L0 prediction is performed and the L1 prediction flag predFlagL1N indicating whether L1 prediction is performed, the motion vector mvL0N of L0, and the motion vector mvL1 N of L1 are derived. However, in the present embodiment, since the merge candidates are derived without referring to other encoded blocks included in the block including the encoded block to be processed, the spatial merge candidates included in the block including the encoded block to be processed are not derived.

[0101] Subsequently, in the temporal merge candidate derivation unit 342 and the temporal merge candidate derivation unit 442, derive the temporal merge candidates from different pictures, and add the derived temporal merge candidates to the merge candidate list (step S402 in FIG. 21). ​​​​​​​​​Register the mergeCandList (step S402 in Figure 21). Time merge candidates are used. A flag, `availableFlagCol`, indicates whether it is possible or not, and whether or not L0 prediction for time merge candidates is performed. The L0 prediction flag predFlagL0Col indicates whether L1 prediction is performed, and the L1 prediction indicates whether L1 prediction is performed or not. The flag predFlagL1Col, and the motion vectors mvL0Col and mvL1Col of L0. Derivation. For detailed processing steps of step S402, please refer to Figure 56 later. explain.

[0102] Furthermore, time merge candidates are derived in units of sequence (SPS), picture (PPS), or slice. The processing of the output unit 342 and the time merge candidate derivation unit 442 can be omitted.

[0103] Next, the history merge candidate derivation unit 345 and the history merge candidate derivation unit 445 perform history prediction. The historical prediction motion vector candidates registered in the motion vector candidate list HmvpCandList are marked Add to mergeCandList (step S403 in Figure 21). Step S40 The detailed processing steps for step 3 will be explained later using the flowchart in Figure 62.

[0104] Next, the average merge candidate derivation unit 344 and the average merge candidate derivation unit 444 calculate the merge candidates The average merge candidate is derived from the supplementary list mergeCandList, and the derived average merge candidate is used as the merge candidate. Register the merge candidate list (step S404 in Figure 21). Step S4 The detailed processing steps for step 04 will be explained later using the flowchart in Figure 41. .

[0105] Next, the merge candidate supplement unit 346 and the merge candidate supplement unit 446 process the merge candidate list. The number of merge candidates registered in mergeCandList, numCurrMergeCand, is equal to the maximum number of merge candidates, M. If it is smaller than axNumMergeCand, the merge candidate list mergeCandList is registered The number of merge candidates, numCurrMergeCand, is capped at the maximum number of merge candidates, MaxNumMergeCand, for additional merge candidates. Derive the merge candidates and register them in the merge candidate list (mergeCandList) (Step S4 in Figure 21). 05) With a maximum number of merge candidates, MaxNumMergeCand, a P slice can have different references. Prediction mode where the motion vector has a value of (0,0) at the index is L0 prediction (Pred_L0). Add merge candidates. In B slices, motion vectors have different reference indices ( Prediction modes with a value of 0,0) add merge candidates for dual prediction (Pred_BI).

[0106] Next, the merge candidate selection unit 347 and the merge candidate selection unit 447 select the merge candidate list. Select a merge candidate from the merge candidates registered in mergeCandList. (Encoding side) The merge candidate selection unit 347 selects a merge candidate by calculating the sign amount and strain amount. The merge index shows the selected merge candidates, and the inter-prediction information of the merge candidates moves It is supplied to the compensation prediction unit 306. Meanwhile, in the decryption side merge candidate selection unit 447, the decrypted Based on the merge index, select merge candidates and perform the motion correction of the selected merge candidates. It is supplied to the compensation prediction unit 406.

[0107] The normal merge mode derivation unit 302 and the normal merge mode derivation unit 402 are a certain encoding block If the size of the block (product of width and height) is less than 32, the parent block of that encoding block will Then, merge candidates are derived. And in all child blocks, the parent block is derived Use the selected merge candidates. However, the parent block size must be 32 or larger and fit within the screen. Only if you are waiting.

[0108] <Derivation of subblock predicted motion vector modes> This section explains the derivation of the subblock predicted motion vector mode.

[0109] Figure 26 shows the subblock predictive motion vector mode guide in the encoding device of this embodiment. This is a block diagram of section 303.

[0110] First, in the affine inheritance prediction motion vector candidate derivation unit 361, the affine inheritance prediction motion We derive candidate vectors. Details on deriving candidate motion vectors for affine inheritance prediction will follow later. To state.

[0111] Next, in the affine construction prediction motion vector candidate derivation unit 362, affine construction prediction Derive candidate motion vectors. For details on deriving candidate motion vectors for affine construction, see below. More details will follow.

[0112] Next, in the affine identical prediction motion vector candidate derivation unit 363, affine identical prediction We derive candidate motion vectors. For details on deriving candidate motion vectors for affine identical predictions, see below. More details will follow.

[0113] The subblock motion vector detection unit 366 is suitable for the subblock predicted motion vector mode. It detects the subblock motion vector and uses the detected vector as the subblock predicted motion vector. This is supplied to the candidate selection unit 367 and the difference calculation unit 368.

[0114] The subblock prediction motion vector candidate selection unit 367 selects affine inheritance prediction motion vector candidates. Supplementary derivation unit 361, affine construction prediction motion vector candidate derivation unit 362, affine identical prediction motion Among the subblock predicted motion vector candidates derived in the vector candidate derivation unit 363 Based on the motion vector supplied from the subblock motion vector detection unit 366, Select a candidate subblock predicted motion vector, and the selected subblock predicted motion vector Information regarding the candidates is supplied to the interpretation mode determination unit 305 and the difference calculation unit 368.

[0115] The difference calculation unit 368 receives the motion vector supplied from the subblock motion vector detection unit 366. From the toll vector, the subblock predicted motion vector candidate selection unit 367 selects the subblock The difference prediction motion vector obtained by subtracting the lock prediction motion vector is used in the interpretation mode determination unit. It will supply to 305.

[0116] Figure 27 shows the derivation of the subblock predicted motion vector mode in the decoding device of this embodiment. This is a block diagram of section 403.

[0117] First, in the affine inheritance prediction motion vector candidate derivation unit 461, the affine inheritance prediction motion The vector candidate is derived. The processing of the affine inheritance prediction motion vector candidate derivation unit 461 is as follows: Processing of the Affine Inheritance Predicted Motion Vector Candidate Derivation Unit 361 in the Encoding Device of the Embodiment It is identical to [the other one].

[0118] Next, in the affine construction prediction motion vector candidate derivation unit 462, affine construction prediction The motion vector candidates are derived. The processing of the affine construction prediction motion vector candidate derivation unit 462 is as follows: Processing of the affine construction prediction motion vector candidate derivation unit 362 in the encoding device of this embodiment It is identical to reason.

[0119] Next, in the affine identical prediction motion vector candidate derivation unit 463, affine identical prediction The motion vector candidates are derived. The processing of the affine identical predicted motion vector candidate derivation unit 463 is as follows: Processing of the affine identical predicted motion vector candidate derivation unit 363 in the encoding device of this embodiment It is identical to reason.

[0120] The subblock prediction motion vector candidate selection unit 466 selects affine inheritance prediction motion vector candidates. Supplemental derivation unit 461, affine construction predicted motion vector candidate derivation unit 462, affine identical predicted motion Among the subblock predicted motion vector candidates derived in the vector candidate derivation unit 463 Based on the predicted motion vector index transmitted and decoded from the encoding device, Select a block predictive motion vector candidate, and then select a subblock predictive motion vector candidate. Information regarding compensation is supplied to the motion compensation prediction unit 406 and the addition calculation unit 467.

[0121] The addition unit 467 performs an addition operation on the subblock predicted motion vector candidate selection unit 466. The block predictive motion vector is converted to the differential motion vector transmitted from the encoding device and decoded. The motion vector generated by summing is supplied to the motion compensation prediction unit 406.

[0122] <Affine inheritance prediction motion vector candidate derivation> The affine inheritance prediction motion vector candidate derivation unit 361 will be explained. Regarding the motion vector candidate derivation unit 461, the affine inheritance prediction motion vector candidate derivation unit 36 It is the same as 1.

[0123] The affine inheritance predictive motion vector candidate inherits the motion vector information of the control points.

[0124] Figure 30 illustrates the derivation of candidate motion vectors for affine inheritance prediction.

[0125] Affine inheritance predictive motion vector candidates are based on spatially adjacent encoded and decoded blocks. It is obtained by searching for the motion vectors of the control points.

[0126] Specifically, the blocks adjacent to the left of the block to be processed (A0, A1) and the processing target From the blocks adjacent to the top of the elephant block (B0, B1, B2), you can choose up to one block from each of them. We explore affine modes and use them as affine inheritance predicted motion vectors.

[0127] Figure 34 is a flowchart for deriving candidate motion vectors for affine inheritance prediction.

[0128] First, the blocks adjacent to the left of the block to be processed (A0, A1) are designated as the left group. (Step S3101) Block containing A0 is a block using affine transformation motion compensation Determine whether or not it is in affine mode (step S3102). If it is a code (step S3102: YES), get the affine mode used by A0. (Step S3103), proceed to processing the block adjacent to the upper side. A0 is affin mo If not (step S3102: NO), the affine inheritance predictive motion vector candidate derivation The target is A0->A1, and we attempt to obtain the affine mode from the block containing A1.

[0129] Next, the blocks adjacent to the block to be processed (B0, B1, B2) above it are looped upwards. Step S3104 determines whether the block containing B0 is in affine mode. Determine (step S3105). If B0 is in affine mode (step S310 5:YES), obtain the affine mode used by B0 (step S3106), and process Terminate. If B0 is not in affine mode (step S3105: NO), affine continuation The target for deriving candidate motion vectors is B0->B1, and the affiliate is derived from the block containing B1. Attempt to acquire affine mode. Furthermore, if B1 is not in affine mode (step S310) 5:NO), the target of the affine inheritance prediction motion vector candidate derivation is B1->B2, and B2 is Attempts to obtain the affine mode from the included block.

[0130] In this way, we divide the group into a left block and an upper block, and then we discuss the left block. The system searches for affine modes in the order of the blocks from bottom left to top left, and for the leftmost block, By exploring the affine mode in order from the top right to the top left block, we can find two different blocks as much as possible. The affine mode can be obtained, and any of the affine predicted motion vectors are differential motion Candidate affine prediction motion vectors with small y vectors can be derived.

[0131] <Affine Construction Prediction: Derivation of Candidate Motion Vectors> The affine construction prediction motion vector candidate derivation unit 362 will be explained. Regarding the motion vector candidate derivation unit 462, the affine construction prediction motion vector candidate derivation unit 36 It is the same as in 2.

[0132] Affine construction predicts motion vector candidates are controlled from the motion information of spatially adjacent blocks. Construct vector information of the point's movement.

[0133] Figure 31 illustrates the derivation of candidate motion vectors for affine construction prediction.

[0134] Affine construction predicts motion vector candidates for spatially adjacent encoded and decoded blocks. It is obtained by combining existing motion vectors to construct a new affine mode.

[0135] Specifically, the block adjacent to the upper left side of the block to be processed (B2, B3, A2) Then, derive the motion vector of the upper left control point CP0, and the adjacent block on the upper right side of the block to be processed. The motion vector of the upper right control point CP1 is derived from the lock (B1,B0), and the block to be processed is... The motion vector of the lower left control point CP2 is derived from the adjacent block (A1, A0) on the lower left side of the block. To release.

[0136] Figure 35 is a flowchart for deriving candidate motion vectors for affine construction prediction.

[0137] First, derive the upper left control point CP0, the upper right control point CP1, and the lower left control point CP2 (step S3201). The upper left control point CP0 is a reference block that has the same reference image as the block to be processed. The lock is calculated by searching for reference blocks in the order of priority of B2, B3, and A2. Point CP1 identifies reference blocks that have the same reference image as the block to be processed as B1, B0 It is calculated by searching in the priority order of the reference blocks. The lower left control point CP2 is the block to be processed. Search for reference blocks that have the same reference image as the lock, prioritizing A1 and A0 reference blocks. It is calculated by doing so.

[0138] When selecting the 3-control-point mode as the affine construction predictive motion vector (step S 3202:YES) Whether all three control points (CP0, CP1, CP2) have been derived. Determine if all three control points (CP0, CP1, CP2) are If derived in this way (step S3203: YES), then there are three control points (CP0, CP1, C The affine model using P2) is used as the affine construction predictive motion vector (step S32) 04). If you do not select the 3-control-point mode and instead select the 2-control-point mode (Step S3) 202:NO), determine whether both control points (CP0, CP1) have been derived. (Step S3205). When both control points (CP0, CP1) have been derived (S Step S3205:YES), an affine model using two control points (CP0, CP1). Let this be the affine construction prediction motion vector (step S3206).

[0139] <Derivation of candidate affine identical predictive motion vectors> The affine identical prediction motion vector candidate derivation unit 363 will be explained. The motion vector candidate derivation unit 463 also corresponds to the affine identical predicted motion vector candidate derivation unit 36 It is the same as 3.

[0140] Affine identical predicted motion vector candidates are those that derive the same motion vector at each control point. It can be obtained from this.

[0141] Specifically, similar to the affine construction prediction motion vector candidate derivation units 362 and 462, each control By deriving the point information and setting all control points to the same value in either CP0 or CP2, It can be obtained. Also, the time motion vector derived in the same way as the normal predicted motion vector mode can be used It can also be obtained by setting it as a control point.

[0142] <Derivation of subblock merge mode> The derivation of the subblock merge mode will be explained.

[0143] Figure 28 shows the subblock merge mode derivation unit 304 in the encoding device of this embodiment. This is a block diagram. The subblock merge mode derivation unit 304 is a subblock merge candidate. It includes a supplementary list subblockMergeCandList. This is the normal merge mode derivation unit 302 Similar to the merge candidate list mergeCandList in [the previous example], it forms a list structure, and subblock merge A merge index that shows the location within the candidate list, and the sub-block corresponding to the index. A storage area is provided for storing merge candidates as elements. The subblockMergeCandList contains at least 5 merge candidates. Supplementary (internal prediction information) may be registered. However, each merge candidate is Furthermore, it may have motion vector information at the sub-block level, or motion vector information at the control points. To have a report.

[0144] First, in the subblock time merge candidate derivation unit 381, The supplement is derived. Details of the derivation of subblock time merge candidates will be described later.

[0145] Next, the affine inheritance merge candidate derivation unit 382 derives the affine inheritance merge candidate. To generate. Details on deriving affine inheritance merge candidates will be discussed later.

[0146] Next, in the affine construction merge candidate derivation unit 383, the affine construction merge candidates are derived. To generate. Details on deriving affine construction merge candidates will be discussed later.

[0147] Next, the affine fixed merge candidate derivation unit 385 derives the affine fixed merge candidate. To generate. Details on deriving affine fixed merge candidates will be discussed later.

[0148] The subblock merge candidate selection unit 386 is a subblock time merge candidate derivation unit 381, Affine inheritance merge candidate derivation unit 382, ​​Affine construction merge candidate derivation unit 383, Affine From among the subblock merge candidates derived in the fixed merge candidate derivation unit 385, Select block merge candidates and interact with the selected subblock merge candidates. - Supplied to the prediction mode determination unit 305.

[0149] Figure 29 shows the subblock merge mode derivation unit 404 in the decoding device of this embodiment. This is a block diagram. The subblock merge mode derivation unit 404 is a subblock merge candidate. It includes a list called subblockMergeCandList. This is the subblock merge mode derivation unit. It is the same as 304.

[0150] First, in the subblock time merge candidate derivation unit 481, The supplement is derived. The processing of the subblock time merge candidate derivation unit 481 is the subblock time merge. This is the same process as the candidate derivation unit 381.

[0151] Next, in the affine inheritance merge candidate derivation unit 482, the affine inheritance merge candidate is derived. Output. The processing of the affine inheritance merge candidate derivation unit 482 is performed by the affine inheritance merge candidate derivation unit 3 This is the same process as in 82.

[0152] Next, in the affine construction merge candidate derivation unit 483, the affine construction merge candidates are derived. Output. The processing of the affine construction merge candidate derivation unit 483 is performed by the affine construction merge candidate derivation unit 3 This is the same process as in 83.

[0153] Next, the affine fixed merge candidate derivation unit 485 derives the affine fixed merge candidate. Output. The processing of the affine fixed merge candidate derivation unit 485 is performed by the affine fixed merge candidate derivation unit 4 This is the same process as in step 85.

[0154] The subblock merge candidate selection unit 486 is a subblock time merge candidate derivation unit 481, Affine inheritance merge candidate derivation unit 482, Affine construction merge candidate derivation unit 483, Affine From among the subblock merge candidates derived in the fixed merge candidate derivation unit 485, Select subblock merge candidates based on the index transmitted and decoded from the processing device. The system then supplies information about the selected subblock merge candidates to the motion compensation prediction unit 406. .

[0155] Subblock merge mode derivation unit 304 and subblock merge mode derivation unit 404 are If the size (product of width and height) of a given coding block is less than 32, that coding block Subblock merge candidates are derived in the parent block. And all child blocks Next, we use the subblock merge candidates derived in the parent block. However, the parent block This applies only if the screen size is 32 inches or larger and fits within the screen area.

[0156] <Derivation of subblock time merge candidates> The operation of the subblock time merge candidate derivation unit 381 will be described later.

[0157] <Affine inheritance merge candidate derivation> The affine inheritance merge candidate derivation unit 382 will be explained. Section 482 is the same as section 382 for affine inheritance merge candidate derivation.

[0158] Affine inheritance merge candidates are selected from the affine models of spatially adjacent blocks. We will inherit the affine model of the point.

[0159] Figure 32 is a diagram illustrating the derivation of affine inheritance merge candidates. The derivation of the zimode candidate, similar to the derivation of the affine inheritance predictive motion vector, involves spatially adjacent elements. This is obtained by searching for the motion vectors of the control points in the encoded and decoded blocks.

[0160] Specifically, the blocks adjacent to the left of the block to be processed (A0, A1) and the processing target From the blocks adjacent to the top of the elephant block (B0, B1, B2), you can choose up to one block from each of them. Explore affine modes and use them for affine merge modes.

[0161] Figure 36 is a flowchart for deriving candidates for affine inheritance merge.

[0162] First, the blocks adjacent to the left of the block to be processed (A0, A1) are designated as the left group. (Step S3301) Determine whether the block containing A0 is in affine mode. (Step S3302). If A0 is in affine mode (Step S3102: YE S) obtain the affine model used by A0 (step S3303), and the adjacent upper side Proceed to processing the block. If A0 is not in affine mode (Step S3302: NO) The target for deriving affine inheritance merge candidates is A0->A1, and the affine inheritance merge candidate is derived from the block containing A1. Attempting to acquire the entry mode.

[0163] Next, the blocks adjacent to the block to be processed (B0, B1, B2) above it are looped upwards. Step S3304 determines whether the block containing B0 is in affine mode. Determine (step S3305). If B0 is in affine mode (step S330 5:YES), obtain the affine model used by B0 (step S3306), and process Terminate. If B0 is not in affine mode (step S3305: NO), affine continuation Let B0->B1 be the target for deriving merge candidates, and from the block containing B1, the affine mode Attempt to acquire. Furthermore, if B1 is not in affine mode (step S3305: NO) The target for deriving affine inheritance merge candidates is B1->B2, and the affine inheritance merge candidate is derived from the block containing B2. Attempting to acquire the entry mode.

[0164] <Affine construction merge candidate derivation> The affine construction merge candidate derivation unit 383 will be explained. Section 483 is the same as the affine construction merge candidate derivation section 383.

[0165] Figure 33 is a diagram illustrating the derivation of affine construction merge candidates. Affine construction merge candidates This involves the motion information of spatially adjacent blocks and the control point's aberration from the time-coded block. Construct a fin model.

[0166] Specifically, the block adjacent to the upper left side of the block to be processed (B2, B3, A2) Then, derive the motion vector of the upper left control point CP0, and the adjacent block on the upper right side of the block to be processed. The motion vector of the upper right control point CP1 is derived from the lock (B1,B0), and the block to be processed is... The motion vector of the lower left control point CP2 is derived from the adjacent block (A1, A0) on the lower left side of the block. The lower right control point is located from the encoding block (T0) adjacent to the lower right side of the block to be processed. Derive the motion vector of CP3.

[0167] Figure 37 is a flowchart for deriving candidates for affine construction merge.

[0168] First, set the upper left control point CP0, the upper right control point CP1, the lower left control point CP2, and the lower right control point CP3. Derivation (step S3401). The upper left control point CP0 is a block that has motion information, It is calculated by searching in the priority order of blocks B2, B3, and A2. The upper right control point CP1 is, It is calculated by searching for blocks containing motion information in the priority order of B1 and B0 blocks. The lower left control point CP2 searches for blocks containing motion information, prioritizing blocks A1 and A0. It is calculated by searching. The lower right control point CP3 searches for motion information of the time block. It is calculated as follows.

[0169] Next, using the derived CP0, CP1, and CP2, we obtain an affine model with three control points. Determine whether it is constructible or not (step S3402), and if it is constructible (step S3402:YES), a three-control-point affine model using CP0, CP1, and CP2 Select as a candidate for elimination (step S3403).

[0170] Next, using the derived CP0, CP1, and CP3, we obtain an affine model with three control points. Determine whether it is constructible or not (step S3404), and if it is constructible (step S3404:YES), a three-control-point affine model using CP0, CP1, and CP3 Select as a candidate for elimination (step S3405).

[0171] Next, using the derived CP0, CP2, and CP3, we obtain an affine model with three control points. Determine whether it is constructible or not (step S3406), and if it is constructible (step S3406:YES), a three-control-point affine model using CP0, CP2, and CP3 Select as a candidate for elimination (step S3407).

[0172] Next, using the derived CP1, CP2, and CP3, we obtain an affine model with three control points. Determine whether it is constructible or not (step S3408), and if it is constructible (step S3408:YES), a three-control-point affine model using CP1, CP2, and CP3 Select as a candidate for merge (step S3409).

[0173] Next, using the derived CP0 and CP1, it is possible to construct an affine model with two control points. Determine whether or not (step S3410), and if it is constructible (step S341 0:YES), a two-control-point affine model using CP0 and CP1 is a candidate for affine merge. (Step S3411).

[0174] Next, using the derived CP0 and CP2, it is possible to construct an affine model with two control points. Determine whether or not (step S3412), and if it is constructible (step S341 2:YES), a two-control-point affine model using CP0 and CP2 is a candidate for affine merge. (Step S3413).

[0175] Here, whether or not an affine model can be constructed depends at least on the participation of all control points. The condition is that the images are identical (affine transformation possible). Also, CP0, CP1, CP2 provides a 3-control-point affine model, while CP0 and CP1 provide a 2-control-point affine model. For affine models other than the one mentioned above, the three-control affine model is CP0, CP1, CP For the 3-control-point affine model using 2, the 2-control-point affine model is CP0,C Convert to a two-control-point affine model using P1.

[0176] <Derivation of Affine Fixed Merge Candidates> The affine fixed merge candidate derivation unit 385 will be explained. The same applies to section 485 as to section 385, which is the affine fixed merge candidate derivation section.

[0177] Affine fixed merge candidates fix the motion information of control points with fixed motion information.

[0178] Specifically, the motion vector of each control point is fixed to (0,0).

[0179] <Time-predicted motion vector derivation> Prior to explaining the time-predicted motion vector, Figure 49 shows the temporal sequence of events in the pictures. See the following for explanation. Figure 49(a) shows the encoded block to be processed and the picture to be processed. This indicates the relationship between encoded pictures that are different in time. ColPic is defined as a specific encoded picture that is referenced. ColPic is a syntax It is identified by [this method].

[0180] Furthermore, Figure 49(b) shows that in ColPic, the same position as the encoding block to be processed, and This shows the encoded coding blocks located in the vicinity of it. However, as shown in Figure 49(b) The coded blocks T0 and T1 shown are schematic; their actual positions and sizes are not shown. Not limited to this. For the encoding block to be processed, the position is (xCb, yCb) and the width is cbWidt Let h be the height, and cbHeight be the height. xColBr = xCb + cbWidth yColBr = yCb + cbHeight Calculate the encoded block on ColPic that includes the position ((xColBr >> 3) << 3, (yColBr >> 3) << 3). The lock becomes T0. Also, xColCtr = xCb + (cbWidth >> 1) yColCtr = yCb + (cbHeight >> 1) Calculate the encoding on ColPic that includes the position ((xColCtr >> 3) << 3, (yColCtr >> 3) << 3). The block becomes T1.

[0181] The above explanation of the temporal sequence of the pictures pertains to the encoding process, but the same applies to the decoding process. This is how it works. In other words, when decoding, replace encoding with decoding in the above explanation, and explain similarly. It will be revealed.

[0182] Time-predicted motion vector candidates in the normal prediction motion vector mode derivation unit 301 shown in Figure 17. The operation of the derivation unit 322 will be explained with reference to Figure 50.

[0183] First, we derive ColPic (step S4201). Refer to Figure 51 for the derivation of ColPic. I will explain by referring to it.

[0184] If slice type is B slice and flag collocated_from_l0_flag is 0 Match (Step S4211: YES, Step S4212: YES), different time pictures ColPic will be the picture RefPicList1[0] whose reference index in reference list L1 is 0. Step S4213). Otherwise, i.e., slice type slice_type is B slice If the aforementioned flag collocated_from_l0_flag is 1 (step S4211: YES, Step S4212: NO), or if slice type slice_type is P slice ( Step S4211: NO, Step S4214: YES), Picture ColPic at different times This is the picture RefPicList0[0] whose reference index in the reference list L0 is 0 (step S4215). If slice_type is not P slice (step S4214: NO), process Ending.

[0185] Refer to Figure 50 again. After deriving ColPic, derive the coding block colCb, and the code Acquire conversion information (step S4202). This process will be explained with reference to Figure 52. ru.

[0186] First, within the picture ColPic at different time points, the rightmost of the encoding block at the same position as the encoding block to be encoded... Let the encoded block containing the lower position be the encoded block colCb at a different time (step S 4221). An example of this coding block is shown in coding block T0 in Figure 49.

[0187] Next, obtain the encoding information of the encoding block colCb at different time points (step S422) 2) PredMode is unavailable for coding blocks colCb of different time zones, or different time zones If the prediction mode PredMode of the numbered block colCb is intra prediction (MODE_INTRA) ( Step S4223: NO, Step S4224: YES), Picture ColPic at different times Within the code block being processed, the code block containing the same position as the central lower-right position is different. Let colCb be the time encoding block (step S4225). An example of this encoding block is This is shown in the coded block T1 of Figure 49.

[0188] Refer to Figure 50 again. Next, derive the interpretation information for each reference list (S Steps S4203, S4204). Here, for the coded block colCb, the reference list... The motion vector mvLXCol for each unit and the flag availableFlagLXCo indicating whether the encoded information is valid or not. We derive l. LX represents a reference list, and in the derivation of reference list 0, LX becomes L0, and reference list In the derivation of T1, LX becomes L1. The derivation of the interpretation information is explained with reference to Figure 53. do.

[0189] If a coding block colCb of a different time is unavailable (Step S4231: NO) , or if the prediction mode PredMode is intraprediction (MODE_INTRA) (step S4232 :NO), set both flag availableFlagLXCol and flag predFlagLXCol to 0 (step S 4233), process the motion vector mvLXCol as (0,0) (step S4234) Ending.

[0190] The coding block colCb is available (step S4231: YES), and the prediction mode PredMod If e is not an intra prediction (MODE_INTRA) (step S4232:YES), then the following steps are taken. The following parameters are calculated in order: mvCol, refIdxCol, and availableFlagCol.

[0191] A flag, PredFlagL0[xPCo], indicates whether or not the L0 prediction for the coded block colCb is being used. If l[yPCol] is 0 (step S4235: YES), predict the mode of the coded block colCb. Since the vector is Pred_L1, the motion vector mvCol is the motion vector of L1 of the encoded block colCb. It is set to the same value as the reference index MvL1[xPCol][yPCol] (step S4236), and the reference index The refIdxCol is set to the same value as the reference index RefIdxL1[xPCol][yPCol] of L1. Step S4237) The reference list listCol is set to L1 (Step S4238) Here, xPCol and yPCol are the left-hand coding blocks colCb within the picture ColPic at different times. This is an index indicating the position of the uppermost pixel.

[0192] On the other hand, if the L0 prediction flag PredFlagL0[xPCol][yPCol] of the coded block colCb is not 0 (Step S4235: NO), PredFlagL1[xP] of the coded block colCb Determine whether [Col][yPCol] is 0 or not. PredFlagL1[x If [PCol][yPCol] is 0 (step S4239: YES), the motion vector mvCol is encoded The value is set to the same value as MvL0[xPCol][yPCol], which is the motion vector of L0 of block colCb ( Step S4240), reference index refIdxCol is reference index RefIdxL0[xP Set to the same value as [Col][yPCol] (step S4241), and the reference list listCol becomes L0 It is set (step S4242).

[0193] The L0 prediction flag PredFlagL0[xPCol][yPCol] of the coded block colCb and the coded block col If the L1 prediction flags PredFlagL1[xPCol][yPCol] for Cb are both not 0 (step S4235) :NO, and S4239:NO), the interprediction mode of the coded block colCb is biprediction. Since (Pred_BI), we select one of the two motion vectors, L0 and L1 (S (S4243).

[0194] Figure 54 shows the code when the interprediction mode of the coded block colCb is biprediction (Pred_BI). This is a flowchart showing the procedure for deriving interpretation information for a numbered block.

[0195] First, the POC of all pictures registered in all reference lists is the current processing target Determine whether it is smaller than the POC of the elephant picture (step S4251), and encode the block P of all pictures registered in L0 and L1, which are all reference lists of colCb If OC is smaller than POC of the currently processed picture (Step S4251: YES) ), LX is a candidate for the predicted motion vector of L0, i.e., the L0 of the coded block to be processed. If the complement is derived (step S4252: YES), L0 of the encoded block colCb Select the interpretation information and LX is L1, i.e., the movement of L1 of the coding block to be processed. If you are deriving a candidate prediction vector for the vector (step S4252: NO), sign Select the interpretation information for L1 of the coding block colCb. On the other hand, the coding block colCb At least one POC of a picture registered in all reference lists L0 and L1 If it is greater than the POC of the currently processed picture (step S4251: NO), If the lag collocated_from_l0_flag is 0 (step S4253: YES), the encoding block Select the interpretation information for L0 of colCb, and the flag collocated_from_l0_flag is 1. In the case (step S4253: NO), the interpretation information of L1 of the coded block colCb Select the report.

[0196] When selecting the interpretation prediction information for L0 of the coded block colCb (step S42) 52:YES, or step S4253:YES), motion vector mvCol is MvL0[xPCol] [yPCol] is set to the same value (step S4254), and the reference index refIdxCol is set to RefI dxL0[xPCol][yPCol] is set to the same value (step S4255), and list listCol is L0 It is set to (step S4256).

[0197] When selecting the interpretation prediction information for L1 of the coded block colCb (step S42) 52:NO, or step S4253:NO), motion vector mvCol is MvL1[xPCol][yPC Set to the same value as ol] (step S4257), and reference index refIdxCol is set to RefIdxL1 [xPCol][yPCol] are set to the same value (step S4258), and the list listCol is set to L1. Determined (step S4259).

[0198] Returning to Figure 53, once the interpretation information is obtained from the coded block colCb, the flag ava Set both ilableFlagLXCol and flag predFlagLXCol to 1 (step S4244).

[0199] Next, the motion vector mvCol is scaled to obtain the motion vector mvLXCol (step (P4245). The scaling calculation procedure for this motion vector mvLXCol is shown in Figure 55. I will explain.

[0200] From the POC of picture ColPic at different time points, the list Col of encoded block colCb is used. Subtract the POC of the reference picture corresponding to the reference index refIdxCol and the picture. The distance td is td = [POC of picture ColPic at different times] - [list of coded blocks colCb] [POC of the reference picture referenced by listCol] This is calculated (step S4261). Note that the encoding is better than picture ColPic of different time periods. If the POC of the referenced picture referenced by the list listCol in the lock colCb is displayed earlier in the display order. The distance between pictures, td, becomes a positive value, and the encoded blocks are greater than the picture ColPic at different time points. If the POC of the referenced picture referenced in the list ColCb is displayed later in the display order, The distance td between the two Kucha will be a negative value.

[0201] Next, the list LX of the currently processed pictures is taken from the POC of the currently processed picture. Subtract the POC of the reference picture to obtain the picture distance tb. tb = [POC of the currently processed picture] - [Reference in LX of the time merge candidate] [POC of the reference picture corresponding to the DEX] This is calculated (step S4262). Note that the current processing target picture is more important than the current processing target picture. If the referenced picture in the elephant picture list LX is displayed earlier in the display order, between pictures The distance tb will be a positive value, and will refer to the reference picture in the list LX of currently processed pictures. If the picture appears later in the display order, the distance between pictures, tb, will be a negative value.

[0202] Next, the distance between pictures td and tb are compared (step S4263), and the distance between pictures If td and tb are equal (step S4263: YES), the motion vector mvLXCol is, mvLXCol = mvCol The scaling calculation process is then terminated (step S4264).

[0203] On the other hand, if the distance between pictures td and tb is not equal (step S4263: NO), The number tx, tx = ( 16384 + Abs( td ) >> 1 ) / td This is calculated (step S4265). Next, the scaling factor distScaleFactor is calculated as follows: distScaleFactor = Clip3( -4096, 4095, ( tb * tx + 32 ) >> 6 ) This is calculated (step S4266). Here, Clip3(x,y,z) is calculated so that the minimum value of z is x, This is a function that restricts the maximum value to y. Next, the motion vector mvLXCol is, mvLXCol = Clip3( -32768, 32767, Sign( distScaleFactor * mvLXCol ) * ((Abs( distScaleFactor * mvLXCol ) + 127 ) >> 8 ) ) The scaling calculation process is then terminated (step S4267). (x) is a function that returns the sign of the value x, and Abs(x) is a function that returns the absolute value of the value x.

[0204] Refer to Figure 50 again. Then, the motion vector of L0 mvL0Col is the same as the previously mentioned normal predicted motion. In the vector mode derivation unit 301, the predicted motion vector candidate list mvpListLX contains candidates and Add (step S4205). However, this addition is an encoding block of reference list 0. This is only the case when the flag availableFlagL0Col=1, which indicates whether the colCb is valid or not. The motion vector mvL1Col is used in the prediction of the normal prediction motion vector mode derivation unit 301 described above. Add the motion vector to the candidate list mvpListLX as a candidate (step S4205). This addition includes the flag availabl, which indicates whether the coded block colCb in reference list 1 is valid or not. This is only the case when eFlagL1Col=1. Therefore, the time prediction motion vector candidate derivation unit 322 Processing will now be terminated.

[0205] The above description of the normal predicted motion vector mode derivation unit 301 pertains to the encoding process. The same applies during decoding. In other words, in the normal predicted motion vector mode derivation unit 401 of Figure 23, The operation of the time prediction motion vector candidate derivation unit 422 is to decode the encoding described above. It can be replaced with the same explanation.

[0206] <Time merge candidate derivation> In the operation of the time merge candidate derivation unit 342 in the normal merge mode derivation unit 302 in Figure 18, This will be explained with reference to Figure 56.

[0207] First, ColPic is derived (step S4301). Next, the encoded block colCb is derived. Then, the encoding information is obtained (step S4302). Furthermore, for each reference list, the interface - Derive prediction information (steps S4303, S4304). The above process is time prediction Since this is the same as S4201 to S4204 in the vector candidate derivation section 322, explanation Omit it.

[0208] Next, calculate the flag availableFlagCol which indicates whether the coded block colCb is valid or not. Step S4305). If the flag availableFlagL0Col or the flag availableFlagL1Col is If the value is 1, availableFlagCol will be 1. Otherwise, availableFlagCol will be 0.

[0209] Then, the motion vector mvL0Col of L0 and the motion vector mvL1Col of L1 are given the aforementioned normal... The merge candidate is added to the merge candidate list mergeCandList in the merge mode derivation unit 302. (Step S4306). However, this addition indicates whether the coded block colCb is valid or not. This applies only when the flag availableFlagCol=1. Therefore, the time merge candidate derivation unit 34 End of process 2.

[0210] The above explanation of the time merge candidate derivation unit 342 pertains to the encoding process, but the same applies to the decoding process. This is how it works. In other words, the time merge candidate derivation in the normal merge mode derivation unit 402 of Figure 24 The operation of section 442 is similarly described above, with encoding replaced by decoding.

[0211] <Update to the list of candidate motion vectors for historical prediction> Next, the encoding information storage memory 111 on the encoding side and the encoding information storage memory 20 on the decoding side This document details how to initialize and update the HmvpCandList, a list of candidate motion vectors for historical prediction, in preparation for step 5. I will explain in detail. Figure 38 illustrates the initialization and update process for the history prediction motion vector candidate list. This is a flowchart.

[0212] In this embodiment, updating the history prediction motion vector candidate list HmvpCandList is performed by encoding information This shall be carried out in the information storage memory 111 and the encoded information storage memory 205. A history candidate list update unit is installed within the prediction unit 102 and the interpretation unit 203 to perform history prediction. You may also want to update the motion vector candidate list HmvpCandList.

[0213] At the beginning of the slice, the history prediction motion vector candidate list HmvpCandList is initialized, and On the generation side, the prediction method determination unit 105 selects either the normal prediction vector mode or the normal merge mode. If selected, the history prediction motion vector candidate list HmvpCandList is updated, and on the decoding side, The prediction mode decoded by the string decoding unit 201 is either the normal prediction vector mode or In constant merge mode, update the history prediction motion vector candidate list HmvpCandList.

[0214] The input used when performing interprediction in normal prediction vector mode or normal merge mode. The predictive information is used as the interpretation information candidate hMvpCand in the historical predictive motion vector candidate list. Register in HmvpCandList. The interpretation information candidate hMvpCand contains the L0 reference index. refIdxL0 and L1 are reference indexes. RefIdxL1 indicates whether L0 prediction is performed or not. The measurement flag predFlagL0 and the L1 prediction flag predFlagL1, which indicates whether or not L1 prediction is performed. Includes the motion vector mvL0 of L0 and the motion vector mvL1 of L1. Encoded information format of the encoding side. History prediction motion vectors provided in the storage memory 111 and the decoding side encoding information storage memory 205 Among the elements registered in the candidate list HmvpCandList (i.e., interpretation information), If interpretation information with the same value as candidate hMvpCand exists, historical prediction Remove the element from the motion vector candidate list HmvpCandList. Meanwhile, interpretation information If no interpretation information exists with the same value as candidate hMvpCand, then the historical prediction motion vector candidate... Remove the first element from the supplementary list HmvpCandList and the historical prediction motion vector candidate list HmvpCand Add the interpretation information candidate hMvpCand to the end of the List.

[0215] The encoding information storage memory 111 on the encoding side and the encoding information storage memory 2 on the decryption side of the present invention The number of elements in the history prediction motion vector candidate list HmvpCandList, which is prepared for 05, will be 6.

[0216] First, initialize the HmvpCandList, a list of candidate motion vectors for historical prediction at the slice level. (Step S2101 in Figure 38). The list of candidate historical motion vectors Hm at the beginning of the slice. Clear all elements in vpCandList and add them to the historical prediction motion vector candidate list HmvpCandList. The value of NumHmvpCand, which represents the number of recorded historical prediction motion vector candidates, is set to 0.

[0217] Note that the initialization of the historical prediction motion vector candidate list HmvpCandList is done in slice units (slice It was stated that this would be done in the first encoding block of the block, but it is done on a picture-by-picture, tile-by-tile, or tree-by-tree basis. This can also be done on a row-by-row basis.

[0218] Next, for each encoded block within the slice, the following list of candidate historical motion vectors (Hmvp) is presented. The CandList update process is repeated (steps S2102 to S2107 in Figure 38).

[0219] First, initial settings are performed on a coding block basis. A flag is used to indicate whether or not identical candidates exist. Set the value of `identicalCandExist` to FALSE and set the index to be deleted, `removeIdx`, to 0. Set this (step S2103 in Figure 38).

[0220] Candidate Interpretation Information hMvp to be registered in the Historical Prediction Motion Vector Candidate List HmvpCandList Determine whether or not a Cand exists (step S2104 in Figure 38). Prediction method on the encoding side. If the determination unit 105 determines that it is in normal predicted motion vector mode or normal merge mode, Alternatively, the bit sequence decoding unit 201 on the decoding side may use the normal predicted motion vector mode or the normal merge mode. If decoded as a code, the interpretation mode will be set to hMvpCand. Prediction on the encoding side The method determination unit 105 selects intra prediction mode, subblock prediction motion vector mode, or If block merge mode is detected, or if the bit string decoding unit 201 on the decoding side is Tiger prediction mode, subblock prediction motion vector mode, or subblock merge mode If decrypted as such, the history prediction motion vector candidate list HmvpCandList is updated. There are no candidate internet prediction information hMvpCand to register. If no candidate hMvpCand exists, skip steps S2105 to S2106 (Figure Step 38 S2104:NO). The candidate for the target interpretation information hMvpCand exists. If so, perform the following steps (step S2104 in Figure 38: YES). .

[0221] Next, the elements to be registered in the historical prediction motion vector candidate list HmvpCandList Determine whether or not the same elements exist as the candidate for the predictive information hMvpCand (steps in Figure 38). S2105). Figure 39 is a flowchart of this identical element confirmation process procedure. History prediction movement If the value of the number of vector candidates NumHmvpCand is 0 (step S2121:NO in Figure 39), The historical prediction motion vector candidate list HmvpCandList is empty, and there are no identical candidates, as shown in Figure 39. Steps S2122 to S2125 are skipped, and this identical element verification process is terminated. If the value of the number of historical prediction motion vector candidates, NumHmvpCand, is greater than 0 (step S2 in Figure 39) 121:YES), historical prediction motion vector index hMvpIdx is from 0 to NumHmvpCand-1 Then, the process in step S2123 is repeated (steps S2122 to S2125 in Figure 39). First, counting from 0, the hMvpIdx-th element HmvpCandLis in the list of candidate motion vectors for historical prediction. Compare whether t[hMvpIdx] is identical to the interpretation information candidate hMvpCand (steps in Figure 39). S2123). If they are the same (step S2123 in Figure 39: YES), then the same candidate exists. The flag `identicalCandExist`, which indicates whether or not to delete an index, is set to TRUE (true), and the index to be deleted is set to TRUE (true). The value of hMVpIndex is set to removeIdx, and this identical element verification process is terminated. (Step S2123:NO in Figure 39), increment hMvpIdx by 1, and predict the historical movement. If the vector index hMvpIdx is less than or equal to NumHmvpCand-1, then proceed from step S2123 onwards. The process is carried out (steps S2122 to S2125 in Figure 39).

[0222] Returning to the flowchart in Figure 38, the historical prediction motion vector candidate list HmvpCandList Element shifting and addition processing is performed (step S2106 in Figure 38). Figure 40 shows the same process as in Figure 38. Element shift / addition processing for the history prediction motion vector candidate list HmvpCandList of step S2106 This is a flowchart of the procedure. First, the history prediction motion vector candidate list HmvpCandList is You can either remove the stored elements and then add the new elements, or add the new elements without removing the existing elements. Determine whether to add it. Specifically, the flag `identicalC` indicates whether an identical candidate already exists. andExist is compared to TRUE or NumHmvpCand is 6 (step S21 in Figure 40). 41) The flag identicalCandExist, which indicates whether or not identical candidates exist, is TRUE or If NumHmvpCand satisfies any of the six conditions (Step S2141 in Figure 40: YES) , after removing the elements stored in the historical prediction motion vector candidate list HmvpCandList, a new one Add an element. Set the initial value of index i to removeIdx + 1. This initial value Repeat the element shifting process in step S2143 from to NumHmvpCand. (Figure 40) Steps S2142~S2144). The elements of HMVPCandList[i] are placed in HMVPCandList[i - 1]. By copying, the element is shifted forward (step S2143 in Figure 40), and i is moved in 1 Create (steps S2142-S2144 in Figure 40). Index i is NumHmvp When Cand+1 is achieved and the element shifting process in step S2143 is completed, the historical predicted motion vector is generated. Add the candidate for interpretation information hMvpCand to the end of the candidate list (step S2 in Figure 40). 145). Here, the last in the list of candidate motion vectors for historical prediction is (NumHmvp) counting from 0. This is the (Cand-1)th HMVPCandList[NumHmvpCand-1]. This concludes the historical prediction motion vector candidate. The element shifting and addition process for the supplementary list HMVPCandList is terminated. Meanwhile, check if identical candidates exist. The flag `identicalCandExist`, which indicates whether or not it exists, is either TRUE or `NumHmvpCand` is 6. If this condition is not met (step S2141: NO in Figure 40), the historical prediction motion vector candidate is Without removing the elements stored in the HmvpCandList, the list of candidate motion vectors for historical predictions Finally, add the interpretation information candidate hMvpCand (step S2146 in Figure 40). So, the last candidate in the historical prediction motion vector list is the NumHmvpCand HMVPC, counting from 0. This is andList[NumHmvpCand]. Also, increment NumHmvpCand by 1 and perform this historical prediction. The element shift / addition process for the motion vector candidate list HMVPCandList is terminated.

[0223] Figure 43 illustrates an example of the process for updating the historical prediction motion vector list. The motion vector candidate list HMVPCandList has six elements (interpretation information) registered. When adding new interpretation information, the historical prediction motion vector candidate list HMVP By comparing each element of CandList with the new interpretation information from the front (Figure 43(a)), we can determine the new The interpretation information is the third from the top of the historical prediction motion vector candidate list HMVPCandList If the value is the same as element HMVP2, the element HMV is taken from the historical prediction motion vector candidate list HMVPCandList. Delete P2 and shift (copy) the subsequent elements HMVP3~HMVP5 forward one by one, then predict the history Add new interpretation information to the end of the vector candidate list HMVPCandList (Figure 43) (b)) Complete the update of the historical prediction motion vector candidate list HMVPCandList (Figure 43(c) ))

[0224] <Historical prediction motion vector candidate derivation process> Next, the history prediction motion vector candidate of the encoding side normal prediction motion vector mode derivation unit 301 Supplementary derivation unit 323, history predicted motion vector of the normal predicted motion vector mode derivation unit 401 on the decoding side The processing procedure for step S304 in Figure 20, which is a common process in the candidate derivation unit 423, is as follows: Method for deriving historical prediction motion vector candidates from the historical prediction motion vector candidate list HMVPCandList This will be explained in detail. Figure 41 illustrates the procedure for deriving candidate motion vectors based on historical predictions. This is a low-level chart.

[0225] The current number of predicted motion vector candidates is numCurrMvpCand, and the list of predicted motion vector candidates is mvpLis. The number of elements in tLX (which we'll assume is 2 here) or the number of historically predicted motion vector candidates NumHmvp If the value of Cand is 0 (step S2201: NO in Figure 41), then step S220 in Figure 41 The process from step 2 to S2209 is omitted, and the procedure for deriving candidate motion vectors based on historical predictions is terminated. The current number of predicted motion vector candidates is numCurrMvpCand, and the list of predicted motion vector candidates is mvpListL. If the number of X elements is less than 2, and the number of historical prediction motion vector candidates NumHmvpCand If the value is greater than 0 (step S2201 in Figure 41: YES), step S in Figure 41 Process steps 2202 through S2209.

[0226] Next, the number of historical prediction motion vector candidates NumHmvpCand is calculated as index i from 0 to 3. Repeat the process from steps S2203 to S2208 in Figure 41 until the smaller value is reached. Steps S2202-S2209 in Figure 41. Number of current predicted motion vector candidates: numCurrM If vpCand is 2 or more, which is the maximum number of elements in the predicted motion vector candidate list mvpListLX (Figure 4) Step 1 S2203:NO), process steps S2204 to S2209 in Figure 41 This procedure for deriving candidate motion vectors based on historical predictions is omitted and terminated. Current predicted motion vector The number of candidates, numCurrMvpCand, is the maximum number of elements in the predicted motion vector candidate list, mvpListLX, which is 2. If it is smaller (step S2203 in Figure 41: YES), step S2204 in Figure 41 The following steps will be performed.

[0227] Next, the process from steps S2205 to S2207 is performed when Y is 0 and 1 (L0 and L1). Perform the following steps (steps S2204-S2208 in Figure 41). Current predicted motion vector The number of candidate vectors, numCurrMvpCand, is the maximum number of elements in the predicted motion vector candidate list, mvpListLX. If the result is 2 or more (step S2205:NO in Figure 41), then step S2206 in Figure 41 The process in S2209 is omitted, and the procedure for deriving candidate motion vectors based on historical predictions is terminated. The number of current predicted motion vector candidates is numCurrMvpCand, and the list of predicted motion vector candidates is mvpListLX. If the number of elements is less than the maximum number of elements, which is 2 (step S2205 in Figure 41: YES), Figure 41 The process from step S2206 onwards is performed.

[0228] Next, the reference index of LY in the historical prediction motion vector candidate list HmvpCandList[i] is , if the reference index refIdxLX is the same as the motion vector to be encoded / decoded (Figure 41) S2206:YES), as the last element of the predicted motion vector candidate list, predicted motion The element at the numCurrMvpCand position, counting from 0 in the vector candidate list, is mvpListLX[numCurrMvpCand Add the motion vector LY of the historical prediction motion vector candidate HmvpCandList[i] to ] (Figure 41) Step S2207), increment the number of current predicted motion vector candidates numCurrMvpCand by 1. The reference index of LY in the historical prediction motion vector candidate list HmvpCandList[i] is If the reference index refIdxLX of the motion vector to be encoded / decoded is not the same (Figure 41) If step S2206: NO, skip the additional processing in step S2207.

[0229] The processes from steps S2205 to S2207 in Figure 41 are performed on both L0 and L1. (Steps S2204-S2208 in Figure 41).

[0230] Increment index i by 1, and when index i becomes 3, the historical predicted movement vector will be... If the value is less than or equal to the smaller of the complements NumHmvpCand, the process from step S2203 onwards will resume. Perform the following steps (S2202-S2209 in Figure 41).

[0231] <History merge candidate derivation process> Next, the history merge candidate derivation unit 345 of the encoding side normal merge mode derivation unit 302, decoding The diagram shows the common processing in the history merge candidate derivation unit 445 of the normal merge mode derivation unit 402 on the side. The 21st step S404 is the processing procedure for the history merge candidate list HmvpCandList. The method for deriving merge candidates will be explained in detail. Figure 42 shows the procedure for deriving history merge candidates. This is a flowchart for explanation.

[0232] First, the initialization process is performed (step S2301 in Figure 42). isPruned[i] is set from 0 (numCu Set the value of FALSE to each of the (-1)th elements of rrMergeCand and store the result in the variable numOrigMergeCand Sets numCurrMergeCand to the number of elements currently registered in the merge candidate list.

[0233] Next, the initial value of index hMvpIdx is set to 1, and from this initial value up to NumHmvpCand The additional processing from step S2303 to step S2310 in Figure 42 is repeated (Figure 4 Step 2 (S2302~S2311). Elements currently registered in the merge candidate list. If the number of merge candidates, numCurrMergeCand, is not less than or equal to (MaxNumMergeCand - 1), then merge Since merge candidates have been added to all elements of the candidate list, this history merge candidate derivation process will now proceed. Finish (step S2303:NO in Figure 42). Registered in the current merge candidate list. If the number of elements present, numCurrMergeCand, is less than or equal to (the maximum number of merge candidates, MaxNumMergeCand-1) (Figure If step S2303 (YES) is completed, the process from step S2304 onwards is performed.

[0234] First, set the value of sameMotion to FALSE (step S2304 in Figure 42). Then, the initial value of index i is set to 0, and from this initial value to 1, step S2 in Figure 42. 306. Perform the processing in S2307 (S2305~S2308 in Figure 42).

[0235] Next, counting from 0, the (NumHmvpCand-hMvpIdx)th candidate in the list of historical motion vector prediction candidates The element HmvpCandList[NumHmvpCand-hMvpIdx] and the i-th element from the merge candidate list (counting from 0). The raw mergeCandList[i] are compared to see if they have the same value (step S2306 in Figure 42). The merge candidates having the same value means that all the components (interpretation mode, This shows that the values ​​of the reference index and motion vector are the same. However, this step The processing in S2306 is performed when hMvpIdx is greater than NumHmvpCand-2 and mergeCandList[i] is space Only for merge candidates where isPruned[i] is FALSE. If the values ​​are the same (Figure 39) Step S2306:YES), set both sameMotion and isPruned[i] to TRUE. (Step S2307 in Figure 42). If the values ​​are not the same (Step S2306 in Figure 39: N O), skip the processing in step S2307. From step S2305 in Figure 42 Once the iterative process up to step S2308 is complete, compare whether sameMotion is FALSE or not. (Step S2309 in Figure 42), if sameMotion is FALSE (Step S2309 in Figure 42) (P S2309:YES), the merge candidate list numCurrMergeCand_nth mergeCandList[nu [mCurrMergeCand] counts from 0 in the list of candidate motion vectors for historical prediction (NumHmvpCand - hMvp Add the (Idx)th element HmvpCandList[NumHmvpCand - hMvpIdx] and set numCurrMergeCand to 1 Increment (step S2310 in Figure 42). Increment index hMvpIdx by 1. (Step S2302 in Figure 42), Steps S2302 to S2311 in Figure 42 Perform the process repeatedly.

[0236] Once all elements in the historical prediction motion vector candidate list have been reviewed, the merge candidate list will be finalized. Once merge candidates have been added to all elements of the history, the derivation process for these merge candidates is complete. .

[0237] <Process for deriving average merge candidates> Next, the average merge candidate derivation unit 344 of the encoding side normal merge mode derivation unit 302, and the decoding The average merge candidate derivation unit 444 of the normal merge mode derivation unit 402 on the side is a common process, as shown in the figure. This section provides a detailed explanation of the process for deriving the average merge candidate, which is the processing step S403 of step 21. Figure 62 is a flowchart illustrating the process for deriving the average merge candidate.

[0238] First, the initialization process is performed (step S1301 in Figure 62). The variable numOrigMergeCand is Sets numCurrMergeCand to the number of elements currently registered in the merge candidate list.

[0239] Next, we scan the merge candidate list from the beginning and determine two pieces of motion information. The first one is Let i=0 be the index indicating the movement information of the first movement, and j=1 be the index indicating the second movement information. Steps S1302-S1303 in Figure 62. Registered in the current merge candidate list. If the number of elements numCurrMergeCand is not less than or equal to (maximum number of merge candidates MaxNumMergeCand-1), then Since merge candidates have been added to all elements in the merge candidate list, this history merge candidate derivation process The process is terminated (step S1304 in Figure 62). The current merge candidate list is registered. If the number of elements to merge, numCurrMergeCand, is less than or equal to (maximum number of merge candidates, MaxNumMergeCand - 1), then Perform the processing from step S1305 onwards.

[0240] mergeCandList[i] is the move information for the i-th merge candidate in the merge candidate list, and the move information for the j-th merge candidate in the merge candidate list. Determine whether the information mergeCandList[j] is invalid or not (step S130 in Figure 62) 5) If both are invalid, the average merge candidates of mergeCandList[i] and mergeCandList[j]. Without deriving the result, we move on to the next element. mergeCandList[i] and mergeCandList[j] are both invalid. If not found, set X to 0 and 1 and repeat the following process (from step S1306 to S in Figure 62) 1314).

[0241] Determine if the LX prediction for mergeCandList[i] is valid (step S1307 in Figure 62). If LX prediction is enabled for mergeCandList[i], then LX prediction is also enabled for mergeCandList[j]. Determine whether it is (step S1308 in Figure 62). If the LX prediction of mergeCandList[j] is valid, In this case, that is, both the LX prediction in mergeCandList[i] and the LX prediction in mergeCandList[j] are valid. If so, the motion vector of the LX prediction in mergeCandList[i] and the LX prediction in mergeCandList[j] The motion vector of the LX prediction averaged from the motion vector and the reference index of the LX prediction in mergeCandList[i] The average merge candidate for LX predictions with ax is derived and set as the LX prediction for averageCand, and avera Enable LX prediction for geCand (step S1309 in Figure 62). Step S13 in Figure 62 In 08, if the LX prediction for mergeCandList[j] is not valid, i.e., the LX of mergeCandList[i] If prediction is enabled and LX prediction for mergeCandList[j] is disabled, then LX for mergeCandList[i] Derive the average merge candidate for LX predictions with prediction motion vectors and reference indices. Set ageCand to LX prediction and enable averageCand LX prediction (step S13 in Figure 62) 10). In step S1307 of Figure 62, if the LX prediction for mergeCandList[i] is not valid, Determine whether the LX prediction for mergeCandList[j] is valid (step S1311 in Figure 62) ). If the LX prediction for mergeCandList[j] is valid, i.e., the LX prediction for mergeCandList[i] is If disabled and LX prediction for mergeCandList[j] is enabled, then LX prediction for mergeCandList[j] Derive the average merge candidate for LX prediction with motion vectors and reference indices and averageC Set to LX prediction for and and enable LX prediction for averageCand (step S1312 in Figure 62) ). In step S1311 of Figure 62, if the LX prediction of mergeCandList[j] is not valid, then If both the LX prediction for mergeCandList[i] and the LX prediction for mergeCandList[j] are invalid, Disable the LX prediction for averageCand (step S1312 in Figure 62).

[0242] Here, LX prediction is valid if the reference index refIdxLX is greater than or equal to 0. If LX prediction is invalid, i.e., does not exist, the reference index refIdxLX is set to -1.

[0243] The average merge candidate averageCand of the L0 forecast, L1 forecast, or BI forecast generated as described above is Add the numCurrMergeCand-th mergeCandList[numCurrMergeCand] to the merge candidate list. Then, increment numCurrMergeCand by 1 (step S1315 in Figure 62). Then, complete the process of deriving the average merge candidate.

[0244] The average merge candidate is calculated using the horizontal and vertical components of the motion vector. It is averaged out.

[0245] <Derivation of subblock time merge candidates> Subblock time merge candidates in the subblock merge mode derivation unit 304 in Figure 16 The operation of the derivation unit 381 will be explained with reference to Figure 44.

[0246] First, it is determined whether the encoded block is less than 8x8 pixels (step S4002).

[0247] If the encoding block is less than 8x8 pixels (step S4002: YES), subblock Set the flag availableFlagSbCol=0 to indicate the existence of a time merge candidate (step S400) 3) The processing of the subblock time merge candidate derivation section is terminated. Here, the syntax If temporal motion vector prediction is prohibited, or if subblock time merging is If prohibited, if the encoding block is less than 8x8 pixels (step S4002: Perform the same process as YES.

[0248] On the other hand, if the encoding block is 8x8 pixels or larger (step S4002: NO), the encoding P Adjacent movement information of encoded blocks in Kucha is derived (step S4004).

[0249] The process for deriving adjacent movement information of encoded blocks will be explained with reference to Figure 45. The process for deriving adjacent motion information is in conjunction with the process of the spatial prediction motion vector candidate derivation unit 321 described above. They are similar. However, the order in which adjacent blocks are searched is A0, B0, B1, A1, and B2 is not searched. No. First, we obtain the encoding information for the adjacent block n=A0 (step S4052). Encoded information includes a flag availableFlagN indicating whether adjacent blocks are available, and a reference link. This shows the reference index refIdxLXN and the motion vector mvLXN for each stock.

[0250] Next, it is determined whether the adjacent block n is valid or invalid (step S4054). The flag availableFlagN=1 indicates whether the tool is available or not; otherwise, it is enabled, and it is disabled. ru.

[0251] If the adjacent block n is valid (step S4054: YES), the reference index ref Let IdxLXN be the reference index refIdxLXn of the adjacent block n (step S4056). Also, the motion vector mvLXN is used as the motion vector mvLXn of the adjacent block n (step S4) 056) The process of deriving adjacent movement information for blocks is terminated.

[0252] On the other hand, if adjacent block n is invalid (step S4054: NO), then adjacent block n = B Set to 0, obtain the encoding information (step S4052), and determine whether the adjacent block n is valid or invalid. Make a decision (step S4054). Repeat the same process, looping through B1 and A1 in that order. The process for deriving adjacent movement information loops until adjacent blocks become valid, and all adjacent If blocks A0, B0, B1, and A1 are invalid, the process of deriving adjacent movement information for the blocks is terminated. ru.

[0253] Refer to Figure 44 again. Once the adjacent motion information has been derived (step S4004), the tempo Derive the motion vector (step S4006).

[0254] The process for deriving the temporal motion vector will be explained with reference to Figure 46. First, The temporal motion vector is initialized as tempMv=(0,0) (step S4062).

[0255] Next, it is determined whether the adjacent movement information is valid or invalid (step S4064). Adjacent blocks The flag availableFlagN=1 indicates whether it is available or not; if it is, it is enabled, otherwise it is disabled. If adjacent motion information is invalid (step S4064: NO), the temporal motion vector is The derivation process is terminated.

[0256] On the other hand, if adjacent movement information is valid (step S4064: YES), then to adjacent block N In this case, we determine whether the flag predFlagL1N, which indicates whether or not L1 prediction is being used, is 1 or not. Step S4066). If predFlagL1N=0 (Step S4066: NO), proceed to the next step ( Proceed to step S4078). If predFlagL1N=1 (step S4066:YES), The POCs for all pictures registered in all reference lists are the currently processed pictures Determine whether the POC is below or below Cha's (step S4068). If this determination is true (step If step S4068: YES, proceed to the next step (step S4070).

[0257] If slice type is B slice and flag collocated_from_l0_flag is 0 (Step S4070: YES, Step AND S4072: YES), ColPic and reference P Kucha RefPicList1[refIdxL1N](The pic of the reference index refIdxL1N in the reference list L1) Determine whether (ya) is the same or not (step S4074). If this determination is true (step S 4074:YES), let the temporal motion vector be tempMv=mvL1N (step S4076) ). If this judgment is false (step S4074: NO), the next process (step S4078 Proceed to ). If slice type slice_type is not B slice, flag collocated_from_l0_f If lag is not 0 (step S4070: NO, or step S4072: NO), Proceed to the next process (step S4078).

[0258] And a flag, predFlagL0N, indicates whether or not L0 prediction is being used in the adjacent block N. Determine whether it is 1 or not (step S4078). If predFlagL0N=1 (step S40 78:YES), ColPic and reference picture RefPicList0[refIdxL0N](reference of reference list L0) Determine whether the picture of index refIdxL0N is the same (step S4080). If this judgment is true (step S4080: YES), the temporal motion vector tempMv = m Set to vL0N (step S4082). If this determination is false (step S4080: NO) Then, the process of deriving the temporal motion vector is terminated.

[0259] Refer to Figure 44 again. Next, we derive ColPic (step S4016). This process This is the same as S4201 in the time prediction motion vector candidate derivation unit 322, therefore, explanation Omit it.

[0260] Then, we set up a coding block colCb of a different time (step S4017). It is located in the lower right center of the same position as the encoded block being processed within the picture ColPic at different time points. The encoding block located there is set as colCb. This encoding block is shown in Figure This corresponds to coding block T1 of 49.

[0261] Next, the position obtained by adding the temporal motion vector tempMv to the encoded block colCb is newly Let colCb be (step S4018). Now, let the top-left position of the encoded block colCb be (xCo lCb, yColCb), temporal motion vector tempMv with 1 / 16 pixel precision (tempMv[0], tempMv[1]) And, xColCb = Clip3( xCtb, xCtb + CtbSizeY + 3, xColCb + ( tempMv[0] >> 4 ) ) yColCb = Clip3( yCtb, yCtb + CtbSizeY - 1, yColCb + ( tempMv[1] >> 4 ) ) Calculate the following. Here, the top-left position of the tree block is (xCtb, yCtb), and the top of the tree block is Let the size be CtbSizeY. On ColPic containing position ((xColCb >> 3) << 3, (yColCb >> 3) << 3). The encoded block becomes the new colCb. As shown in the above equation, the position after adding tempMv is t To prevent significant deviations compared to before adding empMv, the correction is applied within a range approximately equal to the size of the tree block. If this position falls outside the screen, it will be corrected to fit within the screen.

[0262] And the prediction mode of this coding block colCb is PredMode (MODE_INTER Determine whether or not the prediction mode of colCb is interprediction (step S4020). If (step S4020: NO), the flag av indicates the presence of a candidate for subblock time merge. Set ailableFlagSbCol=0 (step S4003) and guide the subblock time merge candidate Processing of the output section will now be terminated.

[0263] On the other hand, if the prediction mode of colCb is interprediction (step S4020: YES), Interpretation information is derived for each light list (steps S4022, S4023). Now, regarding colCb, we will use the central motion vector ctrMvLX for each reference list and the LX prediction. Derive the flag ctrPredFlagLX which indicates whether or not it exists. LX represents the reference list, and the reference list In the derivation of 0, LX becomes L0, and in the derivation of reference list 1, LX becomes L1. Interpretation information The derivation will be explained with reference to Figure 47.

[0264] If a coding block colCb of a different time is unavailable (Step S4112: NO) , or if the prediction mode PredMode is intraprediction (MODE_INTRA) (step S4114) :NO), set both flag availableFlagLXCol and flag predFlagLXCol to 0 (step S 4116), the motion vector mvCol is set to (0,0) (step S4118), inter The process of deriving prediction information is now complete.

[0265] The coding block colCb is available (step S4112: YES), and the prediction mode PredMod If e is not an intra prediction (MODE_INTRA) (step S4114: YES), then the following steps are taken. The following parameters are calculated in order: mvCol, refIdxCol, and availableFlagCol.

[0266] A flag, PredFlagLX[xPCo], indicates whether or not the LX prediction for the coded block colCb is being used. If [l][yPCol] is 1 (step S4120: YES), the motion vector mvCol is encoded by The value is set to the same value as MvLX[xPCol][yPCol], which is the motion vector of LX in colCb (step (P4122), the reference index refIdxCol is the reference index RefIdxLX[xPCol] of LX. [yPCol] is set to the same value (step S4124), and the list listCol is set to LX. (Step S4126). Here, xPCol and yPCol are symbols within the picture ColPic at different times. This is an index indicating the position of the top-left pixel of the numbered block colCb.

[0267] On the other hand, the flag PredFlagL indicates whether or not LX prediction for the coded block colCb is being used. If X[xPCol][yPCol] is 0 (step S4120: NO), the following process is performed. First, The POC of all pictures registered in all reference lists is the currently processed picture Determine whether or not the POC of ya is below (step S4128). Also, the LY prediction of colCb is useful. Determine whether the flag PredFlagLY[xPCol][yPCol], which indicates whether it is being used, is 1 or not (stat (S4128). Here, LY prediction is defined as a reference list different from LX prediction. When LX=L0, LY=L1, and when LX=L1, LY=L0.

[0268] If this determination is true (step S4128: YES), the motion vector mvCol is encoded The value is set to the same value as MvLY[xPCol][yPCol], which is the motion vector of LY in lock colCb (stat (S4130), reference index refIdxCol is the reference index RefIdxLY[xPCo [l][yPCol] is set to the same value (step S4132), and the list listCol is set to LX. (Step S4134).

[0269] On the other hand, if this judgment is false (step S4128: NO), the flag availableFlagLXCol Set both flag predFlagLXCol to 0 (step S4116), and set motion vector mvCol to (0 Assuming ,0) (step S4118), the process of deriving interpretation information is terminated.

[0270] If interpretation information can be obtained from the coded block colCb, the flag availableFlagLXCo Set both l and the flag predFlagLXCol to 1 (step S4136).

[0271] Next, the motion vector mvCol is scaled to obtain the motion vector mvLXCol (step (S4138). This process is performed in S424 of the time prediction motion vector candidate derivation unit 322. Since it is the same as 5, the explanation will be omitted.

[0272] Refer to Figure 44 again. Once the interpretation information has been derived for each reference list, the calculation is The motion vector mvLXCol is the central motion vector ctrMvLX, and the calculated flag predFlagLXCol is Set the flag to ctrPredFlagLX (steps S4022, S4023).

[0273] Then, it is determined whether the central motion vector is valid or invalid (step S4024). ctrPre If dFlagL0=0 and ctrPredFlagL1=0, it is invalid; otherwise, it is considered invalid. Center movement vector If Torr is invalid (step S4024: NO), the existence of a subblock time merge candidate is confirmed. Set the flag availableFlagSbCol=0 (step S4003), subblock time The merge candidate derivation section will now terminate.

[0274] On the other hand, if the central motion vector is valid (step S4024: YES), subblock Set the flag availableFlagSbCol=1 to indicate the existence of a time merge candidate (step S402) 5) Derive subblock movement information (step S4026). For this process, see Figure See page 48 for further explanation.

[0275] First, from the width cbWidth and height cBheight of the encoded block colCb, we get the number of subblocks in the width direction. Calculate numSbX and the number of subblocks in the height direction, numSbY (step S4152). Set refIdxLXSbCol=0 (step S4152). From this point onward, the prediction subblock c The process is repeated in units of olSb. This iteration sets the height index ySbIdx to 0. From 0 to numSbY, the process is carried out while changing the width index xSbIdx from 0 to numSbX. ru.

[0276] If the top-left position of the encoded block colCb is (xCb, yCb), then the left of the prediction subblock colSb is... The upper position (xSb, ySb) is, xSb = xCb + xSbIdx * sbWidth ySb = yCb + ySbIdx * sbHeight This is calculated. Next, the temporal motion vector tempMv is added to the prediction subblock colSb. The position is designated as the new colSb (step S4154). Position (xColSb, yColSb), temporal motion vector tempMv with 1 / 16 pixel precision (tempMv[0], If we let tempMv[1]), the top-left position of the new colSb is: xColSb = Clip3( xCtb, xCtb + CtbSizeY + 3, xSb + ( tempMv[0] >> 4 ) ) yColSb = Clip3( yCtb, yCtb + CtbSizeY - 1, ySb + ( tempMv[1] >> 4 ) ) This is the result. Here, the top-left position of the tree block is (xCtb, yCtb), and the size of the tree block is... Let CtbSizeY be the value of CtbSizeY. As shown in the above equation, the position after adding tempMv is larger than the position before adding tempMv. To prevent collapse, it is adjusted to a range approximately the size of the tree block. If this position If the image goes off-screen, it will be corrected to fit within the screen.

[0277] Then, interpretation information is derived for each reference list (steps S4156, S41 58). Here, for the prediction subblock colSb, the reference list is defined on a subblock basis. The motion vector mvLXSbCol and the flag availableFl indicating whether the prediction subblock is valid. We derive agLXSbCol. LX represents a reference list, and in the derivation of reference list 0, LX becomes L0. In the derivation of reference list 1, LX becomes L1. The derivation of interpretation information is shown in Figure 47, S4022. Since it is the same as S4023, the explanation will be omitted.

[0278] After deriving the interpretation information (steps S4156, S4158), the prediction subblock col Determine whether Sb is valid (step S4160). availableFlagL0SbCol=0 and available If bleFlagL1SbCol=0, colSb is considered invalid; otherwise, it is considered valid. (Step S4160: NO), motion vector mvLXSbCol, center motion vector ctrMvLX and (Step S4162). Furthermore, a flag predFl indicates whether or not LX prediction is being used. Let agLXSbCol be the flag ctrPredFlagLX in the central motion vector (step S416) 2) This concludes the derivation of subblock movement information.

[0279] Refer to Figure 44 again. Then, the motion vector of L0 mvL0SbCol and the motion vector of L1 TormvL1SbCol is used in the subblock of the subblock merge mode derivation unit 304 mentioned above. Add as a candidate to the merge candidate list subblockMergeCandList (Step S4028) However, this addition is a flag that indicates the presence of a subblock time merge candidate, availableSbCol This applies only when = 1. With that, the processing of the time merge candidate derivation unit 342 is terminated.

[0280] The above explanation of the subblock time merge candidate derivation unit 381 is for the time of encoding, The same applies during decoding. In other words, in the subblock merge mode derivation unit 404 of Figure 22 The operation of the subblock time merge candidate derivation unit 481 is to decode the encoding described above. It can be replaced with the same explanation.

[0281] <Motion compensation prediction processing> The motion compensation prediction unit 306 predicts the block that is currently being processed in the coding process. The position and size are obtained. The motion compensation prediction unit 306 also inputs the prediction information. The prediction mode determination unit 305 obtains the information. The reference index is obtained from the acquired prediction information. The coordinates and motion vectors are derived and identified by the reference index in the decoded image memory. The illuminated picture was moved from the same position as the image signal of the prediction block by the amount of the motion vector. After acquiring the image signal of the location, a prediction signal is generated.

[0282] In interprediction, the interprediction mode is a single reference pixel, such as L0 prediction or L1 prediction. In the case of prediction from a picture, the prediction signal obtained from one reference picture is a motion-compensated prediction signal. The prediction mode is set to BI prediction, and the prediction mode is set to 2 reference pictures. In the case of prediction, the weighted average of the prediction signals obtained from two reference pictures is used. The motion-compensated prediction signal is used as the prediction method determination unit, and the motion-compensated prediction signal is supplied to the prediction method determination unit. Here, dual prediction is The weighted average ratio is set to 1:1, but other ratios may also be used for weighted averaging. For example, the closer the distance between the picture being predicted and the reference picture, the better. The weighting ratio may be increased. Also, the calculation of the weighting ratio may be done between pictures. Alternatively, this can be done using a correspondence table between interval combinations and weighting ratios.

[0283] The motion compensation prediction unit 406 has the same function as the motion compensation prediction unit 306 on the encoding side. The compensation prediction unit 406 uses the interpretation information to determine the normal prediction motion vector mode derivation unit 401. Normal merge mode derivation unit 402, subblock predictive motion vector mode derivation unit 403, The block merge mode is obtained from the block merge mode derivation unit 404 via the switch 408.

[0284] The motion compensation prediction unit 406 sends the obtained motion compensation prediction signal to the decoded image signal superimposition unit 207. To supply.

[0285] <About Interpretation Mode> We define the process of making a prediction from a single reference picture as a single prediction, and in the case of a single prediction, it is an L0 prediction. Alternatively, L1 prediction refers to either of the two reference pictures registered in reference lists L0 and L1. Prediction is performed using either one of the following methods. L0 prediction and L1 prediction are forward predictions (using a forward reference image). It may be a reference prediction (a prediction that refers to a reference image behind it) or a backward prediction (a prediction that refers to a reference image behind it). Figures 57-58 are diagrams illustrating motion compensation prediction in L0 prediction (single prediction).

[0286] Figure 57 shows that the interpretation mode is L0 prediction and the reference picture of L0 (RefL0Pi c) shows the case where the processing time is earlier than that of the picture to be processed (CurPic). Figure 58 This indicates an L0 prediction where the L0 reference picture is at a later time than the picture being processed. Similarly, the reference pictures for L0 prediction in Figures 57 and 58 are used as reference pictures for L1 prediction. You can also replace it with Cha (RefL1Pic) to perform a single prediction.

[0287] The process of making predictions from two reference pictures is defined as dual prediction, and in the case of dual prediction, L0 prediction is used. Using both L1 and 1 predictions, we express this as dual prediction. Figures 59-61 show motion compensation prediction in dual prediction. This is a diagram to explain the measurement. Figure 59 is a dual prediction, and the reference picture of the L0 prediction is the processing counterpart. The reference picture for the L1 prediction is at a time before the elephant picture, and is after the picture being processed. This shows the case at a given time. Figure 60 is a dual prediction, with a reference picture of the L0 prediction and the L1 prediction. This shows the case where the reference picture for measurement is at an earlier time than the picture to be processed. Figure 61 shows the same In predictions, the reference picture for L0 prediction and the reference picture for L1 prediction are greater than the picture to be processed. This indicates a case where the time is later.

[0288] Thus, the relationship between the prediction type and time of L0 / L1 is such that L0 is a forward prediction (forward reference image) (Prediction that refers to an image), L1 is limited to back-direction prediction (prediction that refers to a back-reference image) It can be used without any problems. Also, in the case of dual prediction, the same reference picture can be used for L0 prediction. Measurement and L1 prediction may be performed separately. Furthermore, motion compensation prediction may be performed as a single prediction or as a dual prediction. The decision of whether to use L0 prediction or L1 prediction is based on factors such as whether or not to use L0 prediction. The decision is made based on the information (e.g., a flag).

[0289] <About Reference Indexes> In embodiments of the present invention, in order to improve the accuracy of motion compensation prediction, multiple motion compensation predictions are performed. This makes it possible to select the optimal reference picture from among a number of reference pictures. Therefore, The reference picture used in motion compensation prediction is used as the reference index, and the reference The index is encoded along with the encoding vector within the encoding stream.

[0290] <Motion compensation processing based on the normal predictive motion vector mode> The motion compensation prediction unit 306 is also shown in the interpretation prediction unit 102 on the encoding side in Figure 16. In the interprediction mode determination unit 305, the normal predicted motion vector mode is derived. If the interpretation prediction information from section 301 is selected, this interpretation prediction information will be used - The interpretation of the block currently being processed, obtained from the prediction mode determination unit 305. The measurement mode, reference index, and motion vector are derived, and a motion compensation prediction signal is generated. The generated motion compensation prediction signal is supplied to the prediction method determination unit 105.

[0291] Similarly, the motion compensation prediction unit 406 is also present in the interpretation prediction unit 203 on the decoding side in Figure 22. As shown, during the decoding process, switch 408 normally predicts the motion vector mode derivation unit 40 When connected to 1, the interpretation is performed by the normal prediction motion vector mode derivation unit 401. The information is retrieved, and the interpretation mode and reference index of the block currently being processed are obtained. Next, the motion vector is derived and a motion compensation prediction signal is generated. The signal is supplied to the decoded image signal superimposition unit 207.

[0292] <Motion compensation processing based on normal merge mode> The motion compensation prediction unit 306 is also shown in the interpretation prediction unit 102 on the encoding side in Figure 16. In the inter prediction mode determination unit 305, the normal merge mode derivation unit 302 If the interpretation prediction information is selected, this interpretation prediction information will be used in the interpretation prediction mode. The inter prediction mode of the block currently being processed is obtained from the block determination unit 305. The reference index and motion vector are derived, and a motion compensation prediction signal is generated. The compensation prediction signal is supplied to the prediction method determination unit 105.

[0293] Similarly, the motion compensation prediction unit 406 is also present in the interpretation prediction unit 203 on the decoding side in Figure 22. As shown, during the decoding process, switch 408 is normally connected to merge mode derivation unit 402. If this occurs, the normal merge mode derivation unit 402 will acquire inter prediction information and process the current The prediction mode, reference index, and motion vector of the block being analyzed are Derivation is performed to generate a motion-compensated prediction signal. The generated motion-compensated prediction signal is then used to calculate the decoding image signal weight. It is supplied to the tatami mat section 207.

[0294] <Motion compensation processing based on subblock predicted motion vector modes> The motion compensation prediction unit 306 is also shown in the interpretation prediction unit 102 on the encoding side in Figure 16. In the inter-prediction mode determination unit 305, the sub-block prediction motion vector is determined. If the inter prediction information from the code derivation unit 303 is selected, this inter prediction information The interprediction mode determination unit 305 obtains the current block to be processed. Derive the center prediction mode, reference index, and motion vector, and generate a motion compensation prediction signal. The generated motion compensation prediction signal is supplied to the prediction method determination unit 105.

[0295] Similarly, the motion compensation prediction unit 406 is also present in the interpretation prediction unit 203 on the decoding side in Figure 22. As shown, during the decoding process, switch 408 leads the subblock predictive motion vector mode When connected to output unit 403, the subblock predictive motion vector mode derivation unit 403 Interpretation information is obtained, and the interpretation mode of the block currently being processed is obtained. The system derives the reference index and motion vector, and generates a motion compensation prediction signal. The motion compensation prediction signal is supplied to the decoded image signal superimposition unit 207.

[0296] <Motion compensation processing based on subblock merge mode> The motion compensation prediction unit 306 is also shown in the interpretation prediction unit 102 on the encoding side in Figure 16. In the inter prediction mode determination unit 305, the subblock merge mode derivation unit If interpretation information by 304 is selected, this interpretation information will be used for interpretation. Interpretation of the block currently being processed, obtained from the prediction mode determination unit 305. Derive the mode, reference index, and motion vector, and generate a motion compensation prediction signal. The generated motion compensation prediction signal is supplied to the prediction method determination unit 105.

[0297] Similarly, the motion compensation prediction unit 406 is also present in the interpretation prediction unit 203 on the decoding side in Figure 22. As shown, during the decoding process, switch 408 is in subblock merge mode derivation unit 404 When connected, the interprediction information by the subblock merge mode derivation unit 404 Obtain the interpretation mode and reference index of the block currently being processed. Then, the motion vector is derived and a motion compensation prediction signal is generated. The generated motion compensation prediction signal is The decoded image signal is then supplied to the superimposed image signal unit 207.

[0298] <Motion compensation processing based on affine mode> In this embodiment, motion compensation using an affine model can be used. Affine model Motion compensation uses 2 to 4 corners of the encoded block as control points, and the motion vector of the control points is... Then, the motion vectors of the subblocks are derived, and motion compensation is performed on a subblock-by-subblock basis.

[0299] The following flags are determined by the interprediction mode determination unit 305 during the encoding process. Based on the conditions for the interpretation prediction, the following flags are reflected and encoded during the encoding stream. In the decoding process, the following flags in the encoded stream are used to perform the affin mod Determine whether or not Dell will provide motion compensation.

[0300] The sps_affine_enabled_flag enables motion compensation using an affine model in interpretation. Indicates whether it is available or not. If sps_affine_enabled_flag is 0, then on a sequence basis It is suppressed so that it is not motion compensation by the affine model. Also, inter_affine_flag and cu_affine_type_flag is the CU (encoding unit) syntax of the encoded video sequence. It is not transmitted in the case of sps. If sps_affine_enabled_flag is 1, the encoded video sequence Motion compensation using an affine model can be used in the simulation.

[0301] sps_affine_type_flag is used in interpretation by the 6-parameter affine mode. This indicates whether motion compensation is available or not. The 6-parameter affine model uses three control points. From the six parameters of the horizontal and vertical components of each motion vector, the motion vector of the subblock This mode derives torque and performs motion compensation at the sub-block level. The vector is derived, but a common reference index is derived for each coding block.

[0302] If sps_affine_type_flag is 0, motion compensation using a 6-parameter affine model will It is suppressed so as not to happen. Also, cu_affine_type_flag is the CU of the encoded video sequence. Not transmitted in the syntax. If sps_affine_type_flag is 1, encoded video Motion compensation using a 6-parameter affine model can be used in the sequence.

[0303] If sps_affine_type_flag does not exist, it is assumed to be 0.

[0304] When decoding a P or B slice, in the CU currently being processed, If r_affine_flag is 1, generate a motion compensation prediction signal for the currently processed CU. To achieve this, motion compensation using an affine model is employed.

[0305] If inter_affine_flag is 0, the affine model will not be applied to the currently processed CU. It is not used.

[0306] If inter_affine_flag does not exist, it is set to 0.

[0307] When decoding a P or B slice, in the CU currently being processed, cu_a If ffine_type_flag is 1, the motion compensation prediction signal for the currently processed CU is generated. To achieve this, motion compensation using a 6-parameter affine model is employed.

[0308] If cu_affine_type_flag is 0, then the motion compensation prediction signal for the CU currently being processed is To generate the signal, motion compensation using a 4-parameter affine model is employed. The Affine model is the horizontal and vertical components of the motion vectors of the two control points. The motion vector of the subblock is derived from the four parameters, and motion compensation is performed on a subblock-by-subblock basis. This is the mode for making compensation.

[0309] <Merge Difference Motion Vector (MMVD)> The top two merge candidates (the merge indexes 0 and 1 in the merge candidate list) The difference motion vector can be added to the motion vector of the candidate. The resulting vector is called the merge difference motion vector.

[0310] When adding the merge difference motion vector in the merge candidate selection unit 347 on the encoding side, The motion vector obtained by adding the merged difference motion vectors is determined by the Interpretation Mode Determination Unit 305 It is supplied to the motion compensation prediction unit 306 via the bit string encoding unit 108. This encodes information about differential motion vectors. Information about merged differential motion vectors is... , an index mmvd_distance_idx indicating the distance to be added to the motion vector, and the motion vector The index mmvd_direction_idx indicates the direction in which to add. These indices are It is defined as shown in the table in Figures 63(a) and 63(b). And the merge difference dynamic The x and y components of the vector offset MmvdOffset are given by MmvdOffset[0] and MmvdOffset[1] respectively. To express it, MmvdOffset[0] = ( MmvdDistance << 2 ) * MmvdSign[0] MmvdOffset[1] = ( MmvdDistance << 2 ) * MmvdSign[1] The merge difference motion vector is the merge difference motion vector offset MmvdOffs in the above formula. It is derived from et. For details on deriving the merge difference motion vector, see the following for the decoding side. I will explain.

[0311] If a merge difference motion vector exists on the decoding side, it is provided to the bit string decoding unit 201. Separate information about the merge difference motion vector from the supplied bitstream, and merge difference The minute motion vector offset MmvdOffset is derived. Also, the merge candidate selection unit 447 The merge difference motion vector is derived from the generated merge difference motion vector offset. This merged difference motion vector is added to the motion vector, and then that motion vector is used for motion interpolation. It is supplied to the compensation prediction unit 406.

[0312] Figure 6 shows the derivation of the merge difference motion vector mMvdLX in the merge candidate selection unit 447. Refer to the flowchart in 4(a) for explanation. First, the interpretation model of the coding block. Determine whether the code is a biprediction (PRED_BI) or not (S4402). If it is not a biprediction ( S4402: No), determine whether it is an L0 prediction (PRED_L0) or not (S4404). L0 prediction In the case of (S4404:Yes), mMvdL0 = MmvdOffset mMvdL1 = 0 As a result (S4406), the process of deriving the merge difference motion vector is completed. L1 prediction field (S4404:No), mMvdL0 = 0 mMvdL1 = MmvdOffset As a result (S4408), the process of deriving the merge difference motion vector is completed.

[0313] On the other hand, in the case of biprediction (S4402:Yes), the picture to be processed currPic and the reference picture The difference in POC is calculated for each reference list and assigned to currPocDiffL0 and currPocDiffL1 respectively. S4410). Here, the difference in POC between picA and picB, DiffPicOrderCnt(picA, picB), is: DiffPicOrderCnt( picA, picB ) = [POC of picA] - [POC of picB] This indicates that the reference picture RefPicList0[refIdxL0] is the reference index of reference list L0. This is the picture pointed to by refIdxL0. Similarly, the referenced picture RefPicList1[refIdxL1] is This is the picture indicated by the reference index refIdxL1 in reference list L1.

[0314] Next, determine whether -currPocDiffL0 * currPocDiffL1 >= 0 (step S4412) ). If this determination is true (step S4412: Yes), mMvdL0 = MmvdOffset mMvdL1 = -MmvdOffset Thus (step S4414), the process of deriving the merge difference motion vector is completed. On the other hand, if this determination is false (step S4412: No), mMvdL0 = MmvdOffset mMvdL1 = MmvdOffset (Step S4416). Next, the absolute value of the difference between the POC and the reference list L0 is the reference list Determine whether the absolute value of the difference between L1 and POC is greater than or equal to (step S4418). If this determination is true In this case (step S4418: Yes), set X=0, Y=1 (step S4420), and the mark of L1 Scaling the difference motion vector mMvdL1 (step S4424). Here, mMvdLY This indicates that if Y=0, it is mMvdL0, and if Y=1, it is mMvdL1. On the other hand, if this determination is false Combine (Step S4418: No), set X=1, Y=0 (Step S4422), and merge difference of L0. Scaling motion vector mMvdL0 (step S4424). Merge difference motion vector The scaling of mMvdLY is as shown in Figure 64(b), td = Clip3( -128, 127, currPocDiffLX ) tb = Clip3( -128, 127, currPocDiffLY ) tx = ( 16384 + Abs( td ) >> 1 ) / td distScaleFactor = Clip3( -4096, 4095, ( tb * tx + 32 ) >> 6 ) mMvdLY = Clip3( -32768, 32767, Sign( distScaleFactor * mMvdLY ) * ((Abs( distScaleFactor * mMvdLY ) + 127 ) >> 8 ) ) This is derived as follows: Here, currPocDiffLX is currPocDiffL0 when X=0, and cu when X=1. This shows that rrPocDiffL1. Similarly, currPocDiffLY is currPocDiffL0 when Y=0. This shows that when Y=1, it is currPocDiffL1. Also, Clip3(x,y,z) is the minimum value of z. This is a function that restricts the value to x and the maximum value to y. Sign(x) is a function that returns the sign of the value x, and Abs(x) This is a function that returns the absolute value of the value x. The above process derives the merge difference motion vector. It will end.

[0315] The merge difference motion vector is calculated for the top two motion vectors of the subblock merge candidates. You can also add it. In this case, the index mmvd_dis indicates the distance to be added to the motion vector. tance_idx is defined as shown in the table in Figure 63(c). Subblock merge candidate selection The operation of unit 386 is the same as that of merge candidate selection unit 347, so its explanation is omitted. Also, The operation of the subblock merge candidate selection unit 486 is the same as that of the merge candidate selection unit 447. Therefore, I will omit the explanation.

[0316] As mentioned above, MmvdDistance is defined as shown in the table in Figures 63(a) and 63(c). These tables are defined with 1 / 4 pixel precision, so the generated merge difference motion vector The values ​​may include fractional pixel precision. However, the pixel precision in these tables is not 1. By encoding / decoding the indicated flags on a slice-by-slice basis, the generated merge difference motion vector The function can be modified to exclude fractional pixel precision.

[0317] Adaptive Motion Vector Resolution (AMVR) The resolution of the differential motion vector can be adaptively changed at the coding block level. This resolution is called adaptive motion vector resolution.

[0318] This section explains the use of adaptive motion vector resolution for the usual predictive motion vector mode. To clarify, in this case, the spatial prediction motion vector candidate derivation units 321 and 421 and the time prediction motion The vector candidate derivation units 322 and 422, and the history prediction motion vector candidate derivation unit 323 In step 423, the derived candidate motion vectors are rounded according to the resolution. The degree of precision can be selected from 1 / 4, 1, or 4 pixel precision; if the resolution is not changed, it will default to 1 / 4 pixel precision. Rounding The processing is performed in accordance with the resolution of the motion vector in the encoding block being processed. In other words, the derived candidate motion vector mvX is, rightShift = leftShift = MvShift + 2 offset = 1 << ( rightShift - 1 ) mvX = ( mvX >= 0 ? ( mvX + offset ) >> rightShift : - ( ( - mvX + offset ) >> rightShift ) ) << leftShift And it is rounded. Here, the resolution of the motion vector in the encoding block being processed is For 1 / 4 pixel precision, MvShift=0. Similarly, for motion vector resolution of 1 pixel precision... In this case, MvShift=2, and if the motion vector resolution is 4 pixels precise, then MvShift=4. The formula processes the x and y components of mvX, respectively.

[0319] Adaptive motion vector resolution is used for subblock predicted motion vector modes. This is also possible. In this case, the only difference from the normal predictive motion vector mode described above is the resolution. That is, the affine inheritance prediction motion vector candidate derivation units 361 and 461, and affine Construction predicted motion vector candidate derivation units 362 and 462, and affine identical predicted motion vector In candidate derivation units 363 and 463, the motion vector of the derived candidate is determined according to the resolution. It can be rounded. The resolution can be selected from 1 / 16, 1 / 4, and 1 pixel precision, and if you do not change the resolution it will be 1 / This results in 16-pixel precision. Rounding is performed on the resolution of the motion vector in the encoded block being processed. It is done according to the degree. In other words, the derived candidate motion vector mvX is given by the above formula Rounding is performed. Here, the resolution of the motion vector in the encoding block being processed is 1 / For 4-pixel precision, MvShift=0. Similarly, when the resolution of the motion vector is 1-pixel precision... MvShift=2. According to the above formula, the x and y components of mvX are processed respectively.

[0320] <Triangular Merge Mode> Triangular merge mode is a type of merge mode that merges diagonally within the encoded / decoded block. This mode divides the data into partitions and performs motion compensation and prediction.

[0321] The triangular merge mode will be explained using Figure 65. Figure 65 shows a 16x16 triangular merge. This shows the prediction of the coding and decoding blocks in the mode. This is the coding and decoding in triangular merge mode. The block is divided into 4x4 subblocks, and each subblock is a single prediction partition UNI0, single-prediction partition 1 (UNI1), dual-prediction partition 2 It is assigned to three partitions of (BI). Here, the sub on the upper diagonal Place the block in partition 0, and the subblock on the lower diagonal in partition 1. Assign the diagonal subblocks to partition 2 respectively. If plit_dir is 0, a partition will be allocated as shown in Figure 65(a), and merge_tr If iangle_split_dir is 1, partitions will be allocated as shown in Figure 65(b). .

[0322] For motion-compensated predictions of partition 0, a simple prediction is used, specified by merge triangle index 0. The motion information is used. For motion compensation prediction of partition 1, the merged triangular index is used. The single prediction motion information specified in S1 is used. For the motion compensation prediction of partition 2, , single prediction motion information specified by merge triangle index 0 and merge triangle index 1 The system uses dual-prediction motion information, which is a combination of single-prediction motion information specified by the system.

[0323] Here, single-prediction motion information is a set of motion vector and reference index, and bi-prediction Motion information consists of two sets: motion vectors and reference indices. This refers to single-prediction or double-prediction movement information.

[0324] The merge candidate selection units 347 and 447 select the derived merge candidate list, mergeCandList. Use this as the triangleMergeCandList for the list of candidate triangle merges.

[0325] The flowchart in Figure 66, which relates to the derivation of triangular merge candidates, will now be explained.

[0326] First, the merge candidate list is called the triangleMergeCandList. Use a List (step S3501). Triangle Merge Candidate List Number of Candidates numTriangleMerge Set Cand to the same value as the number of merge candidates, numCurrMergeCand.

[0327] Next, we derive the single predictive motion information for the merged triangular partition (step S3502). .

[0328] Figure 67 illustrates the derivation of single predictive motion information for the merged triangular partition in this embodiment. This is a flowchart.

[0329] In this embodiment, merged triangular partition 0 and merged triangular partition 1 are identical. This method derives single-prediction motion information in a priority order, thereby reducing processing load.

[0330] First, for the Mth candidate in the derived merge candidate list mergeCandList, candidate M It is determined whether or not it has motion information in the motion information list L0 (step S3601). Candidate If M has motion information in motion information list L0, then the motion information in candidate M's motion information list L0 The report is designated as a candidate for triangular merge (step S3602).

[0331] Next, for the Mth candidate in the derived merge candidate list mergeCandList, It is determined whether M has motion information in the motion information list L1 (step S3603). If auxiliary M has movement information in movement information list L1, then the movement of candidate M in movement information list L1 The information is designated as a candidate for triangular merge (step S3604). Candidate M(M=numMergeCand-1,…) For ,1,0), step S3601, step S3602, step S36 03. Perform step S3604 to derive additional triangular merge candidates.

[0332] Figure 68 illustrates an example of motion information for a triangular merge candidate in this embodiment.

[0333] Figure 68(a) shows an example of a merge candidate list, and the merge candidate for merge index 0 is The interpretation mode is Pred-BI, and the motion information in motion information list L0 is MV0 _L0, the motion information for motion information list L1 is MV0_L1. Merge candidate for merge index 1. The supplement is that the interpretation mode is single prediction (Pred-L0), and the motion information of motion information list L0 MV1_L0 does not have motion information in motion information list L1. Merge candidate for merge index 2 The supplement is that the interpretation mode is single prediction (Pred-L1), and the motion information of motion information list L0 It does not have, and the motion information for motion information list L1 is MV2_L1. Merge index 3 The candidate is one whose interpretation mode is Pred-BI, and whose motion information list L0 is motion The information is MV3_L0, and the motion information for motion information list L1 is MV3_L1. Merge index 4 The merge candidates are those whose interpretation mode is single prediction (Pred-L0) and whose motion information list L0 Motion information is not available in MV4_L0, nor in motion information list L1.

[0334] Figure 68(b) shows the merge triangle index in the case of the example merge candidate list in Figure 68(a). This diagram illustrates the relationship between S and merge triangular partitions.

[0335] Candidate single predictive motion information for merged triangular partition 0 are MV0_L0, MV0_L1, MV1_L0, MV2_ The motion information is structured in the order of L1, MV3_L0.

[0336] Similarly, the single predictive motion information candidates for merged triangular partition 1 are MV0_L0, MV0_L1, and MV1_L0. The motion information is constructed in the order of MV2_L1, MV3_L0, (MV3_L1), but merge triangular partition The movement information of n0 and the movement information of merged triangular partition 1 are not identical. By removing the single predicted motion information selected at triangle index 0 (merge_triangle_idx0), Next, we derive the merge triangle index 1 (merge_triangle_idx1).

[0337] Thus, the single predictive motion of merged triangular partition 0 and merged triangular partition 1 By prioritizing the information candidates in the same way as the merge list candidate list, an efficient triangular process can be achieved. Merge mode can be transmitted with a small amount of code. Also, merge triangular partition 0 To ensure that the motion information and the motion information of merge triangle partition 1 are not identical, merge triangle By transmitting index 0 and merge triangle index 1, the triangular merge mode is activated. Movement information of merged triangular partition 0 and movement of merged triangular partition 1 that do not need to be merged. By eliminating redundancy where the same information is used, triangular merge mode can be transmitted with less code. .

[0338] In all the embodiments described above, the encoded bitst output by the image encoding device Reem is specified to be decodeable according to the encoding method used in the embodiment. It has a data format. The encoded bitstream is HDD, SSD, flat Provided by recording on a recording medium that can be read by a computer, such as a flash memory or optical disc. You may do so, or you may provide it from the server via a wired or wireless network. Therefore, the image decoding device corresponding to this image encoding device, regardless of the means of provision, this specific data It can decode encoded bitstreams of data formats.

[0339] In order to exchange encoded bitstreams between the image encoding device and the image decoding device, When a wired or wireless network is used, the data format should be appropriate for the transmission method of the communication channel. The encoded bitstream may be converted and transmitted. In that case, the image encoding device will output Convert the encoded bitstream into encoded data in a data format suitable for the transmission method of the communication channel. A transmitting device that converts and transmits data to the network, and a device that receives encoded data from the network and encodes it. A receiving device is provided that restores the data into a sequenced bitstream and supplies it to an image decoding device. The signaling device includes a memory that buffers the encoded bitstream output by the image encoding device, A packet processing unit that packets the encoded bitstream, and a packet processing unit that transmits packets over the network. It includes a transmitting unit that transmits coded data. The receiving device transmits data via a network. A receiving unit that receives the encoded data that has been packetized, and a buffer that receives the encoded data It uses memory to process the encoded data, and generates an encoded bitstream by packet processing the encoded data. It includes a packet processing unit that provides packets to the image decoding device.

[0340] In order to exchange encoded bitstreams between the image encoding device and the image decoding device, When a wired or wireless network is used, in addition to the transmitting device and receiving device, Even if a relay device is provided that receives encoded data transmitted by a transmitting device and supplies it to a receiving device, Good. The relay device is a receiving unit that receives packetized encoded data transmitted by the transmitting device. And, a memory for buffering the received encoded data, and the packetized encoded data and It includes a transmitting unit that transmits to the network. Furthermore, the relay device includes a packetized encoded data A receiving packet processing unit that processes the data into packets to generate an encoded bitstream, and a coding A recording medium for storing encoded bitstreams and a transmission medium for packetizing encoded bitstreams. It may include a signal packet processing unit.

[0341] Furthermore, by adding a display unit to the configuration that displays the image decoded by the image decoding device, the display It can also be used as a device. In that case, the display unit is generated by the decoded image signal superposition unit 207, and The decoded image signal stored in the image memory 208 is read out and displayed on the screen.

[0342] Furthermore, by adding an imaging unit to the configuration and inputting the captured image into an image encoding device, It can also be used as a device. In that case, the imaging unit inputs the captured image signal into the block division unit 101. To exert force.

[0343] The above encoding and decoding processes are performed using hardware-based transmission, storage, and receiving devices. Of course, it would be fine to implement this using ROM (Read-Only Memory) and flash memory. The actual operation is carried out by firmware stored in memory, etc., and software on computers, etc. It is acceptable to reveal the firmware program, the software program, on the computer. It may be recorded and provided on a recording medium that can be read by, for example, a wired or wireless network. It can be provided from the server via the network, or data from terrestrial or satellite digital broadcasting. It's acceptable to offer it as a broadcast.

[0344] The present invention has been described above based on embodiments. The embodiments are illustrative and their respective components The combination of constituent elements and each processing process can be varied in many ways, and such variations Those skilled in the art will understand that the examples also fall within the scope of the present invention. [Explanation of symbols]

[0345] 100 Image encoding device, 101 Block division unit, 102 Interpretation unit, 103 Intra prediction unit, 104 Decoded image memory, 105 Prediction method determination unit, 10 6 Residual signal generation unit, 107 Orthogonal transformation / quantization unit, 108 Bit sequence encoding unit, 109 Inverse quantization / inverse orthogonal transform section, 110 Decoded image signal superposition section, 111 Encoded information Information storage memory, 200 Image decoding device, 201 Bit sequence decoding unit, 202 Block 203 Interpretation unit, 204 Intraprediction unit, 205 Encoded information Storage memory, 206 Inverse quantization / inverse orthogonal transformation unit, 207 Decoded image signal superposition unit, 2 08 Decoded image memory.< / poc>

Claims

1. The bitstream generated according to the video encoding method using merge mode is recorded on the recording medium. A storage method for storing in the body, wherein the video encoding method is A merge candidate list construction step that constructs a merge candidate list that includes spatial merge candidates, A normal merge candidate that will result in simple or biprediction is selected from the merge candidate list. The candidate selection step, From the merge candidate list, a first triangular merge candidate that is a single prediction, and a second that is a single prediction A triangular merge candidate selection step to select triangular merge candidates, Equipped with, The triangular merge candidate selection step is performed with the same priority as the normal merge candidate, The first triangular merge candidate and the second triangular merge candidate are derived. A storage method characterized by the following:

2. Transmit a bitstream generated according to a video encoding method using merge mode. A transmission method wherein the video encoding method is A merge candidate list construction step that constructs a merge candidate list that includes spatial merge candidates, A normal merge candidate that will result in simple or biprediction is selected from the merge candidate list. The candidate selection step, From the merge candidate list, a first triangular merge candidate that is a single prediction, and a second that is a single prediction A triangular merge candidate selection step to select triangular merge candidates, Equipped with, The triangular merge candidate selection step is performed with the same priority as the normal merge candidate, The first triangular merge candidate and the second triangular merge candidate are derived. A transmission method characterized by the following: