Image encoding device, image encoding method, and image encoding program, image decoding device, image decoding method, and image decoding program

The image encoding device addresses processing load issues by deriving motion information candidates without comparison, enhancing efficiency in image encoding and decoding processes.

JP2025129212AActive Publication Date: 2025-09-04JVC KENWOOD CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2025107221
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2019-03-28
Filing Date
2025-06-25
Publication Date
2025-09-04
Estimated Expiration
2039-12-27

AI Technical Summary

Technical Problem

Existing image encoding technologies place a heavy processing load on the system due to image conversion, which affects efficiency.

Method used

An image encoding device that derives temporal and historical motion information candidates without comparing spatial motion information, and adds them to a motion information candidate list, reducing processing load.

Benefits of technology

Achieves highly efficient image encoding and decoding with reduced processing load.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025129212000001_ABST
    Figure 2025129212000001_ABST
Patent Text Reader

Abstract

To provide a technique to improve encoding efficiency by deriving motion information candidates suitable for image encoding and decoding.SOLUTION: A moving image encoding device comprises: a spatial motion information candidate derivation unit that derives spatial motion information candidates from motion information of a block spatially adjacent to a decoding target block; a temporal motion information candidate derivation unit that derives temporal motion information candidates from the motion information of the block temporally adjacent to the decoding target block; and history motion information candidate derivation unit that derives history motion information candidates from a memory that holds motion information of a decoded block. The moving image encoding device adds the temporal motion information candidates to a motion information candidate list without a comparison in the motion information between the spatial motion information candidates and the temporal motion information candidates, and when the motion information of the spatial motion information candidates and the motion information of the history motion information candidates are not identical to each other, adds the history motion information candidates to the motion information candidate list.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

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

[0002] In image encoding and decoding, the image to be processed is divided into blocks, which are groups of a predetermined number of pixels. Divide into appropriate blocks and process in blocks. Encoding efficiency is improved by appropriately setting inter-frame prediction and frame prediction. do.

[0003] In video coding and decoding, inter-prediction is used, which predicts from pictures that have already been coded or decoded. In Patent Document 1, affine transformation is used in inter-prediction. The technology to be applied is described. In moving images, objects undergo transformations such as scaling and rotation. It is not uncommon for this to happen, and by applying the technology of Patent Document 1, efficient coding This becomes possible. [Prior art documents] [Patent documents]

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

[0005] However, the technology of Patent Document 1 involves image conversion, which places a heavy processing load on the system. In view of the above-mentioned problems, the present invention provides a low-load, efficient encoding technique. . [Means for solving the problem]

[0006] In order to solve the above problem, an image encoding device of one embodiment of the present invention comprises a temporal motion information candidate derivation unit that derives temporal motion information candidates from motion information of blocks that are temporally close to the block to be encoded, and a historical motion information candidate derivation unit that derives historical motion information candidates from a memory that holds motion information of encoded blocks, and adds the temporal motion information candidates to a motion information candidate list without comparing the motion information of the spatial motion information candidates with the motion information of the temporal motion information candidates, and if the motion information of the spatial motion information candidates and the motion information of the historical motion information candidates are not identical, adds the historical motion information candidates to the motion information candidate list. [Effects of the Invention]

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

[0008] [Figure 1] FIG. 1 is a block diagram of an image encoding device according to a first embodiment. [Figure 2] FIG. 1 is a block diagram of an image decoding device according to a first embodiment. [Figure 3] 10 is a flowchart illustrating an operation of dividing a tree block. [Figure 4] FIG. 10 is a diagram illustrating how an input image is divided into tree blocks. [Figure 5] FIG. 1 is a diagram illustrating a z-scan. [Figure 6] FIG. 10 is a diagram showing the divided shapes of blocks. [Figure 7] 10 is a flowchart illustrating an operation of dividing a block into four parts. [Figure 8] 10 is a flowchart illustrating an operation of dividing a block into two or three parts. [Figure 9] This is a syntax for expressing the shape of block division. [Figure 10] FIG. 10 is a diagram illustrating intra prediction. [Figure 11] FIG. 10 is a diagram illustrating a reference block for inter prediction. [Figure 12] This is a syntax for expressing a coding block prediction mode. [Figure 13] FIG. 10 is a diagram showing correspondence between syntax elements and modes related to inter prediction. [Figure 14] FIG. 10 is a diagram for explaining affine transformation motion compensation of two control points. [Figure 15] FIG. 10 is a diagram for explaining affine transformation motion compensation of three control points. [Figure 16] FIG. 2 is a block diagram showing a detailed configuration of the inter prediction unit 201 in FIG. [Figure 17] FIG. 17 is a block diagram showing a detailed configuration of a normal predicted motion vector mode derivation unit 301 in FIG. [Figure 18] FIG. 17 is a block diagram showing a detailed configuration of a normal merge mode derivation unit 302 in FIG. 16. [Figure 19] 17 is a flowchart for explaining a normal predicted motion vector mode derivation process of the normal predicted motion vector mode derivation unit 301 of FIG. 16. [Figure 20] 10 is a flowchart showing the processing procedure of a normal predictor motion vector mode derivation process having a function common to the normal predictor motion vector mode derivation unit 301 and the normal predictor motion vector mode derivation unit 401 according to the embodiment of the present invention. [Figure 21] 10 is a flowchart illustrating a procedure for a merge mode derivation process having a function common to a normal merge mode derivation unit 302 and a normal merge mode derivation unit 402 according to the embodiment of the present invention. [Figure 22] FIG. 3 is a block diagram showing a detailed configuration of an inter prediction unit 203 in FIG. 2. [Figure 23] FIG. 23 is a block diagram showing a detailed configuration of the normal predicted motion vector mode derivation unit 301 in FIG. 22. [Figure 24] FIG. 17 is a block diagram showing a detailed configuration of a normal merge mode derivation unit 302 in FIG. 16. [Figure 25]23 is a flowchart for explaining a normal predicted motion vector mode derivation process of the normal predicted motion vector mode derivation unit 301 of FIG. 22. [Figure 26] FIG. 3 is a block diagram of a sub-block predicted motion vector mode derivation unit 303 in the encoding device of the present application. [Figure 27] FIG. 4 is a block diagram of a sub-block predicted motion vector mode derivation unit 403 in the decoding device of the present application. [Figure 28] FIG. 3 is a block diagram of a sub-block merge mode derivation unit 304 in the encoding device of the present application. [Figure 29] FIG. 4 is a block diagram of a sub-block merge mode derivation unit 404 in the decoding device of the present application. [Figure 30] FIG. 10 is a diagram illustrating derivation of affine inheritance predicted motion vector candidates. [Figure 31] FIG. 10 is a diagram illustrating the derivation of affine-constructed predicted motion vector candidates. [Figure 32] FIG. 10 is a diagram illustrating affine inheritance merge candidate derivation. [Figure 33] FIG. 10 is a diagram illustrating affine construction merge candidate derivation. [Figure 34] 10 is a flowchart illustrating the derivation of affine inheritance predicted motion vector candidates. [Figure 35] 10 is a flowchart illustrating the derivation of affine constructed motion vector predictor candidates. [Figure 36] 10 is a flowchart of affine inheritance merge candidate derivation. [Figure 37] 10 is a flowchart of affine construction merge candidate derivation. [Figure 38] 38 is a flowchart illustrating a procedure for initializing and updating a history motion vector predictor candidate list. [Figure 39] 10 is a flowchart of a procedure for checking identical elements in the procedure for deriving a historical motion vector predictor candidate. [Figure 40] 10 is a flowchart of an element shifting process procedure in the historical motion vector predictor candidate derivation process procedure. [Figure 41]10 is a flowchart illustrating a procedure for deriving a historical motion vector predictor candidate. [Figure 42] 10 is a flowchart illustrating a history merge candidate derivation process procedure. [Figure 43] FIG. 10 is a diagram illustrating a procedure for updating a history motion vector predictor candidate list. [Figure 44] 10 is a flowchart illustrating the operation of a sub-block temporal merge candidate derivation unit 381. [Figure 45] 10 is a flowchart illustrating a process of deriving adjacent motion information of a block. [Figure 46] 10 is a flowchart illustrating a process of deriving a temporal motion vector. [Figure 47] 10 is a flowchart illustrating derivation of inter prediction information. [Figure 48] 10 is a flowchart illustrating a process of deriving sub-block motion information. [Figure 49] FIG. 1 is a diagram for explaining the temporal relationship between pictures. [Figure 50] 10 is a flowchart for explaining a process of deriving a temporal motion vector predictor candidate in a normal motion vector predictor mode derivation unit 301. [Figure 51] 10 is a flowchart for explaining the derivation process of ColPic in the derivation process of a temporal motion vector predictor candidate in the normal motion vector predictor mode derivation unit 301. [Figure 52] 10 is a flowchart for explaining the process of deriving coding information of ColPic in the process of deriving a temporal motion vector predictor candidate in the normal motion vector predictor mode derivation unit 301. [Figure 53] 10 is a flowchart illustrating a process of deriving inter prediction information. [Figure 54] 10 is a flowchart showing the procedure of a process of deriving inter prediction information of a coding block when the inter prediction mode of the coding block colCb is bi-prediction (Pred_BI). [Figure 55]10 is a flowchart illustrating a procedure for a motion vector scaling calculation process. [Figure 56] 10 is a flowchart illustrating a process of deriving temporal merge candidates. [Figure 57] FIG. 10 is a diagram illustrating the prediction direction of motion compensation prediction in the case where uni-prediction is used and the L0 reference picture (RefL0Pic) is located at a time earlier than the current picture to be coded (CurPic). [Figure 58] FIG. 10 is a diagram illustrating the prediction direction of motion compensation prediction when uni-prediction is performed and the reference picture for L0 prediction is located at a time later than the current picture to be coded. [Figure 59] FIG. 10 is a diagram illustrating the prediction direction of motion compensation prediction in a bi-predictive case where the reference picture for L0 prediction is located at a time earlier than the current picture to be coded and the reference picture for L1 prediction is located at a time later than the current picture to be coded. [Figure 60] FIG. 10 is a diagram illustrating the prediction direction of motion compensation prediction in bi-prediction when the reference picture for L0 prediction and the reference picture for L1 prediction are located at a time earlier than the current picture to be coded. [Figure 61] FIG. 10 is a diagram illustrating the prediction direction of motion compensation prediction in bi-prediction when the reference picture for L0 prediction and the reference picture for L1 prediction are located at a time later than the current picture to be coded. [Figure 62] 10 is a table showing an example of historical motion vector predictor candidates added by initializing a historical motion vector predictor candidate list. [Figure 63] 10 is a table showing another example of historical motion vector predictor candidates added by initializing the historical motion vector predictor candidate list. [Figure 64] 10 is a table showing another example of historical motion vector predictor candidates added by initializing the historical motion vector predictor candidate list. [Figure 65] 10 is a flowchart illustrating a procedure for deriving a historical motion vector predictor candidate according to the second modification of the first embodiment. [Figure 66] FIG. 2 is a diagram illustrating an example of a hardware configuration of a coding / decoding device according to a first embodiment. DETAILED DESCRIPTION OF THE INVENTION

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

[0010] <Tree Block> In this embodiment, the image to be encoded / decoded is divided equally into predetermined units. As shown in FIG. 4, in this embodiment, the subtree block is The size of the tree block is set to 128x128 pixels. Instead, you can set any size. , which corresponds to the decoding target in the decoding process.) The tree blocks are arranged in raster scan order, That is, the order is from left to right and from top to bottom. Recursive division is possible. After tree block division, the block to be coded / decoded is The tree block and the coding block are collectively called the block. By dividing the image into blocks appropriately, efficient coding becomes possible. The size of the block can be a fixed value that is pre-agreed between the encoding device and the decoding device. The size of the treeblock determined by the encoding device is transmitted to the decoding device. It can also be taken.

[0011] <Prediction mode> The processed image (code in the encoding process) is The signal for which decoding is completed is used as a decoded image, image signal, etc., and in the decoding process, Intra prediction (MODE) is used to predict from the surrounding image signals of the image. Inter prediction (MODE_INTRA), which predicts from the image signal of the processed image, can be switched between This model distinguishes between intra prediction (MODE_INTRA) and inter prediction (MODE_INTER). The prediction mode (PredMode) is defined as the prediction mode (PredMode). It has two values, MODE_INTRA, MODE_INTER, and MODE_INTRA, and can be selected for encoding. .

[0012] <Inter prediction> In inter-prediction, which predicts from the image signal of a processed image, multiple processed images are used as reference pixels. It can be used as a picture. To manage multiple reference pictures, L0 (reference list) Two types of lists are defined: L1 (reference list L1) and L2 (reference index L3). In P slices, L0 prediction (Pred_L0) is available. For B slices, L0 prediction (Pred_L0), L1 prediction (Pred_L1), and bi-prediction (Pred_BI) are available. L0 prediction (Pred_L0) refers to the reference picture managed by L0. Inter prediction, L1 prediction (Pred_L1) refers to the reference picture managed by L1 Bi-prediction (Pred_BI) is inter-prediction in which both L0 and L1 predictions are performed. Inter prediction refers to one reference picture managed by L1 and L2. The information specifying L0 prediction, L1 prediction, or bi-prediction is defined as the reference mode. For constants and variables with the subscript LX in the output, processing is performed for each L0 and L1. It is assumed that this will be done.

[0013] <Predictive motion vector mode> The predicted motion vector mode is an index for specifying the predicted motion vector, a differential motion vector, and a Transmits vectors, reference modes, and reference indices, and performs inter prediction on the block to be coded. The predicted motion vector is determined based on the processed motion vector information of the block adjacent to the current block. A block in the processed image that is located at the same position as the target block or belongs to the processed image. The predicted motion vector candidate derived from the block located in the vicinity and the predicted motion vector It is derived from an index to identify the vector.

[0014] <Merge mode> In merge mode, the target block is processed without transmitting differential motion vectors and reference indices. The processed blocks adjacent to the target block or blocks belonging to the processed image are The inter prediction information of the block located at the same position as the block or in the vicinity (neighborhood) is used for processing. This is a mode for deriving inter prediction information for the current block. The processed blocks adjacent to the target block and the inter-blocks of the processed blocks The prediction information is defined as a spatial merge candidate. Blocks located at the same location as the block or in its vicinity (neighborhood), and the inter-block Inter-prediction information derived from the inter-prediction information is defined as a temporal merge candidate. is registered in the merge candidate list, and the prediction of the target block is determined by the merge index. Identify merge candidates to use in

[0015] <Proximity Block> FIG. 11 shows the procedure for deriving inter prediction information in the predicted motion vector mode and merge mode. A0, A1, A2, B0, B1, B2, B3 is a processed block adjacent to the block to be processed. T0 is the block to be coded / decoded. The blocks belonging to the processed image are used to encode / decode the target blocks of the image to be encoded / decoded. A block is a block that is located at the same position as the block or in its vicinity (neighborhood).

[0016] A1 and A2 are located on the left side of the coding block to be processed and are adjacent to the coding block to be processed. B1 and B3 are adjacent blocks located above the coding block to be processed. A0, B0, and B2 are the blocks adjacent to the target coding block. These are the blocks located at the bottom left, top right, and top left of the encryption block.

[0017] Details of how neighboring blocks are handled in predicted motion vector mode and merge mode Details will be given later.

[0018] <Affine transformation motion compensation> Affine transformation motion compensation is performed by dividing the image into sub-blocks of a predetermined unit, and performing the following for each sub-block: The motion vectors of each sub-block are determined individually and motion compensation is performed. The block is a processed block that is adjacent to the target block or a block that belongs to the processed image. Interaction of blocks located at the same position as the target block or in the vicinity (neighborhood) In this embodiment, the sub-block is derived based on one or more control points derived from the prediction information. The size of the sub-block is set to 4x4 pixels, but the size of the sub-block is not limited to this. Alternatively, the motion vector may be derived in units of pixels.

[0019] FIG. 14 shows an example of affine transformation motion compensation when there are two control points. 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. are the control points. Figure 15 shows an example of affine transformation motion compensation when there are three control points. In this case, the three control points have two parameters, a horizontal component and a vertical component, so The affine transformation with three control points is called a six-parameter affine transformation. CP1, CP2, and CP3 are control points.

[0020] Affine transformation motion compensation is available in both the predicted motion vector mode and the merge mode. It is also available in the prediction motion vector mode. The mode in which the affine transformation is performed is defined as the sub-block predicted motion vector mode, and the merge mode is defined as the affine transformation mode. A mode in which motion compensation is applied is defined as a sub-block merge mode.

[0021] <Inter prediction syntax> The syntax related to inter prediction will be described with reference to FIGS. 12 and 13. rge_flag indicates whether the coding block to be processed is in merge mode or in predicted motion vector mode. merge_affine_flag is a flag indicating whether to use the merge mode. A flag indicating whether to apply sub-block merge mode in the lock. _flag is the sub-block predicted motion vector for the coding block to be processed in the predicted motion vector mode. cu_affine_type_flag is a flag that indicates whether to apply vector mode. This flag determines the number of control points in the block prediction motion vector mode. 3 shows the values ​​of each syntax element and the corresponding prediction method. erge_affine_flag=0 is a merge mode that is not a subblock merge, the normal merge mode. merge_flag=1,merge_affine_flag=1 corresponds to the sub-block merge mode. merge_flag=0,inter_affine_flag=0 is not a sub-block predicted motion vector mode. This corresponds to the normal predicted motion vector mode, which is a simple predicted motion vector merge. = 0, inter_affine_flag = 1 corresponds to the sub-block predicted motion vector mode. If ag=0 and inter_affine_flag=1, cu_affine_type_flag is also transmitted, and the number of control points is Determine.

[0022] <poc> POC (Picture Order Count) is a variable associated with the picture to be coded, The value increases by 1 in the output order of the picture. It can determine whether a picture is a pixel or not, determine the order of pictures in the output order, and For example, if two pictures have the same POC value, If two pictures have different POC values, they can be determined to be the same picture. ,The picture with the smaller POC value can be determined to be the picture to be output first, and 2 The difference in POC between two pictures indicates the distance between the pictures along the time axis.

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

[0024] FIG. 1 is a block diagram of an image coding device 100 according to a first embodiment. The video encoding device in this embodiment includes an image encoding device 100, a block division unit 101, an inter-prediction unit 102, intra prediction unit 103, decoded image memory 104, prediction method determination unit 105, residual A signal generation unit 106, an orthogonal transformation and quantization unit 107, a bit string coding unit 108, an inverse quantization and inverse The image processing apparatus includes an orthogonal transform unit 109, a decoded image signal superimposing unit 110, and an encoded information storage memory 111. can.

[0025] The block division unit 101 recursively divides an input image to generate coding blocks. The block division unit 101 divides the blocks to be divided into horizontal and vertical blocks. The quadrants to be divided and whether the block to be divided is to be divided horizontally or vertically. The generated image signal of the coding block to be processed is divided into 2-3 division units. The signal is supplied to the prediction unit 102, the intra prediction unit 103, and the residual signal generation unit 106. The block division unit 10 supplies information indicating the recursive division structure to the bit string encoding unit 108. The detailed operation of 1 will be described later.

[0026] The inter prediction unit 102 performs inter prediction on the coding block to be processed. The prediction mode stored in the storage memory, the decoded image stored in the decoded image memory 104 Multiple inter-prediction information candidates are derived from the image signal, and the most suitable inter-prediction information is selected from the multiple candidates. Select an inter prediction mode, and then select the selected inter prediction mode and The inter-prediction unit 10 supplies a predicted image signal according to the prediction mode to the prediction method determination unit 105. The detailed configuration and operation of 2 will be described later.

[0027] The intra prediction unit 103 performs intra prediction on the coding block to be processed. A predicted image signal is generated by intra-prediction from the decoded image signal stored in the memory 104. a suitable intra-prediction mode is selected from among a plurality of intra-prediction modes; and a predicted image signal according to the selected intra prediction mode. The result is supplied to the measurement method determination unit 105. FIG. 10 shows an example of intra prediction. The figure shows the correspondence between the prediction direction of intra prediction and the prediction mode number. For example, 50 generates an intra-predicted image by copying pixels vertically. Mode 1 is DC mode, in which all pixel values ​​of the processing target block are set as the average value of the reference pixels. Prediction mode 0 is a planar mode, and the vertical and horizontal reference This is a mode that creates a two-dimensional intra-prediction image from pixels. This is an example of generating an intra-prediction image in the case of mode 40. The value of the reference pixel in the direction indicated by the prediction mode is copied. If the pixel value is not the same as the reference pixel value, the reference pixel value is determined by interpolation from the reference pixel values ​​of the neighboring integer positions.

[0028] The decoded image memory 104 stores the decoded image generated by the decoded image signal superimposing unit 110 . The decoded image stored in the decoded image memory is processed by the inter prediction unit 102 and the inter prediction unit 103. Supply to 3.

[0029] The prediction method determination unit 105 determines the amount of coding information and residual signal code, the predicted image, and the By evaluating the distortion between image signals, etc., the optimum prediction mode (in In the case of merge mode of inter prediction, the merge mode is sub-block merge mode (sub-block merge flag) The coding information of the inter prediction motion vector is supplied to the bitstream coding unit 108. In case of mode, inter prediction mode, predicted motion vector index, L0, L1 reference index, differential motion vector, information indicating whether it is in sub-block mode (sub-block The coding information such as the predicted motion vector flag is supplied to the bitstream coding unit 108. The encoded information is supplied to the encoded information storage memory 111.

[0030] The residual signal generating unit 106 generates a residual signal by subtracting a predicted image signal from the image signal to be processed. A difference signal is generated and supplied to the orthogonal transform and quantization unit 107 .

[0031] The orthogonal transform and quantization unit 107 performs orthogonal transform and quantization on the residual signal in accordance with the quantization parameter. and quantization to generate an orthogonally transformed and quantized residual signal, which is then inversely transmitted to the bit string coding unit 108. The result is supplied to the quantization and inverse orthogonal transformation unit 109.

[0032] The bitstream coding unit 108 encodes the bitstream in units of sequences, pictures, slices, and coding blocks. In addition to the information, the prediction method determined by the prediction method determination unit 104 for each coding block is Specifically, the coding information is coded according to the prediction mode PredMode for each coding block, In case of partition mode PartMode and inter prediction (PRED_INTER), determine whether it is merge mode or not flag to merge, subblock merge flag, merge index if merge mode, If not in page mode, the inter prediction mode, predicted motion vector index, and differential motion vector Information about vectors, coding information such as sub-block predicted motion vector flags, etc., will be described later. The encoded data is then coded according to a prescribed syntax rule to generate a first coded bit string. The bit stream coding unit 108 encodes the orthogonally transformed and quantized residual signal in accordance with a prescribed syntax rule. The first coded bit is entropy coded according to The bitstream is multiplexed with the second coded bitstream according to the specified syntax rules. Output the program.

[0033] The inverse quantization and inverse orthogonal transformation unit 109 performs the orthogonal transformation supplied from the orthogonal transformation and quantization unit 107. The quantized residual signal is inversely quantized and inversely orthogonally transformed to calculate the residual signal, and the decoded image signal is The signal is supplied to the superimposing unit 110.

[0034] The decoded image signal superimposing unit 110 outputs a predicted image signal according to the determination by the prediction method determining unit 105. and the residual signal that has been inversely quantized and inversely orthogonally transformed by the inverse quantization and inverse orthogonal transformation unit 109 is superimposed and decoded. The decoded image is generated and stored in the decoded image memory 104. After filtering to reduce block distortion and other distortions, the decoded image is stored in the decoded image memory 104. It may be stored in

[0035] The encoding information storage memory 111 stores the prediction mode (integer) determined by the prediction method determination unit 105. The coding information storage memory 111 stores coding information such as super-prediction or intra-prediction. The coding information stored in the block 100 includes, in the case of inter-prediction, a determined motion vector, a reference list, In addition to the reference index, in the case of inter prediction merge mode, the merge index, Encoding information of information indicating whether or not it is in sub-block merge mode (sub-block merge flag) In the case of the inter prediction prediction motion vector mode, the inter prediction mode, L0, L1 prediction L0, L1 differential motion vector index, L0, L1 reference index, L0, L1 differential motion vector index vector, information indicating whether it is in sub-block mode (sub-block predicted motion vector flag) In the case of intra prediction, the determined intra prediction mode, etc. The construction of the history candidate list managed by 111 will be described later.

[0036] FIG. 2 shows a video decoding device according to an embodiment of the present invention, which corresponds to the video encoding device of FIG. 2 is a block diagram showing the configuration of the video decoding device according to the embodiment. A block dividing unit 202, an inter-prediction unit 203, an intra-prediction unit 204, and a coding information storage memory memory 205, an inverse quantization and inverse orthogonal transformation unit 206, a decoded image signal superimposition unit 207, and a decoded image signal superimposition unit 208. An image memory 208 is provided.

[0037] The decoding process of the video decoding device of FIG. 2 is provided inside the video encoding device of FIG. Since it corresponds to the decoding process, the coding information storage memory 205 in FIG. The orthogonal transform unit 206, the decoded image signal superimposing unit 207, and the decoded image memory 208 are configured as follows: , the inverse quantization and inverse orthogonal transformation unit 109 and the decoded image signal superimposition unit 110 of the video encoding device of FIG. , the encoded information storage memory 111, and the decoded image memory 104. It has the function of

[0038] The bitstream supplied to the bitstream decoder 201 follows the rules of the specified syntax. The separated first coded bitstream is decoded to obtain a sequence, a picture, a slide, and a The information on the coding block unit and the coding information on the coding block unit are obtained. In general, inter prediction (PRED_INTER) or intra prediction (PRED_INTRA) is used for each coding block. Prediction mode PredMode, partition mode PartMode, inter prediction (PRED_INTER) If so, a flag to determine whether it is in merge mode, and if so, a merge index. subblock merge flag, and inter prediction mode if in predicted motion vector mode. L0, L1 predicted motion vector index, L0, L1 reference index, L 0, L1 differential motion vector, sub-block predicted motion vector flag, etc. The information is decoded in accordance with a prescribed syntax rule to be described later, and the coded information is sent to the inter prediction unit 20. 3 or intra prediction unit 204 and the coded information storage memory 205. The second coded bit string is decoded to calculate an orthogonally transformed and quantized residual signal, and the orthogonal transform is performed. The quantized residual signal is supplied to the inverse quantization and inverse orthogonal transformation unit 208.

[0039] The inter prediction unit 203 determines whether the prediction mode PredMode of the coding block to be decoded is inter prediction mode. When the prediction (PRED_INTER) is in the predicted motion vector mode, the coding information storage memory 205 A plurality of predicted motion vectors are generated using the coding information of the already decoded image signal stored in the The motion vector predictor candidates are derived and registered in a motion vector predictor candidate list, which will be described later. Decoding the first coded bitstream from among the plurality of motion vector predictor candidates registered in the supplementary list The predicted motion vector corresponding to the predicted motion vector index decoded and supplied by the unit 202 The bitstream decoding unit 201 selects the differential vector and the selected predicted motion vector. A motion vector is calculated from the data and stored in the coded information storage memory 205 together with other coded information. The coding information of the coding block supplied and stored here is the prediction mode PredMode, Flag predFlagL0 indicating whether to use the division mode PartMode, L0 prediction, and L1 prediction [xP][yP], predFlagL1[xP][yP], L0, L1 reference index refIdxL0[xP][yP], refI dxL1[xP][yP], L0 and L1 motion vectors mvL0[xP][yP], mvL1[xP][yP], etc. , xP, yP are indices indicating the position of the top left pixel of the coding block in the picture. Prediction mode PredMode is inter prediction (MODE_INTER), and inter prediction mode is L0 prediction In the case of (Pred_L0), the flag predFlagL0 indicating whether to use L0 prediction is 1, The flag predFlagL1 indicating whether to use L1 prediction is set to 0. In the case of Pred_L1, the flag predFlagL0 indicating whether to use L0 prediction is 0, L1 The flag predFlagL1 indicating whether or not to use prediction is set to 1. In the case of Pred_BI, a flag predFlagL0 indicates whether to use L0 prediction, L1 prediction The flag predFlagL1 indicating whether to use the encoding When the block prediction mode PredMode is inter prediction (PRED_INTER) and merge mode, The encoded data stored in the encoded data storage memory 205 is used to derive the encoded data candidates. Using the coding information of the coded block, multiple merge candidates are derived and a merge candidate list is created. The bitstream decoder selects one of the merge candidates from the list of merge candidates. 201 selects a merge candidate corresponding to the decoded and supplied merge index, and A flag predFlagL0[x P][yP], predFlagL1[xP][yP], L0, L1 reference index refIdxL0[xP][yP], refIdx Inter prediction information such as L1[xP][yP], L0 and L1 motion vectors mvL0[xP][yP], mvL1[xP][yP] The information is supplied to the motion compensation prediction unit 206 and stored in the coding information storage memory 205. where xP and yP are indices that indicate the position of the top left pixel of the coding block in the picture. The detailed configuration and operation of the inter prediction unit will be described later.

[0040] The intra prediction unit 204 determines whether the prediction mode PredMode of the coding block to be decoded is intra. Intra prediction is performed during prediction (PRED_INTRA). The decoding information includes the intra prediction mode, and the decoded image is A predicted image signal is generated by intra-prediction from the decoded image signal stored in the image memory 210. The intra prediction unit 20 generates a predicted image signal and supplies the predicted image signal to the decoded image signal superimposing unit 209. 4 corresponds to the intra prediction unit 103 of the image encoding device 100, The same processing as that of the error prediction unit 103 is performed.

[0041] The inverse quantization and inverse orthogonal transformation unit 208 performs the orthogonal transformation decoded by the first coded bit stream decoding unit 202. The transformed and quantized residual signal is subjected to inverse orthogonal transformation and inverse quantization. A quantized residual signal is obtained.

[0042] The decoded image signal superimposing unit 209 superimposes the predicted image signal obtained by the inter-prediction in the motion compensation prediction unit 206. or a predicted image signal obtained by intra-prediction in the intra prediction unit 204, and The decoded signal is obtained by superimposing the residual signal that has been inverse orthogonally transformed and inversely quantized by the orthogonal transform unit 208 on the original signal. The decoded image signal is decoded and stored in the decoded image memory 210. When encoding, a filtering process is performed on the decoded image to reduce block distortion caused by encoding. After this, the image may be stored in the decoded image memory 210.

[0043] Next, the operation of the block division unit 101 in the image coding device 100 will be described. Figure 3 shows the division of an image into treeblocks and the further division of each treeblock. First, the input image is divided into tree blocks of a predetermined size. Each tree block is sorted in a predetermined order, i.e., a raster order (step S1001). The tree block is scanned in scan order (step S1002) and the inside of the tree block to be processed is divided. (Step S1003).

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

[0045] If it is determined that the processing block should be divided into four, the processing block is divided into four (step Step S1102). For each block into which the processing target block is divided, That is, the scanning is performed in the order of upper left, upper right, lower left, and lower right (step S1103). 6 is an example of a scan order, and 601 in FIG. 6 is an example in which the block to be processed is divided into four. The numbers 0 to 3 in 601 indicate the order of processing. For each block, the flowchart in FIG. 7 is recursively called.

[0046] If it is determined that the block to be processed is not to be divided into four, it is divided into two or three (step S1 105).

[0047] FIG. 8 is a flowchart showing the detailed operation of the 2-3 division process in step S1105. First, we decide whether to divide the block to be processed into 2 or 3 parts. It is determined whether or not to perform either of these (step S1201).

[0048] If it is not determined that the processing block should be divided into 2-3 blocks, i.e., if it is determined that no division should be made, If so, the division is terminated (S1211) and the process returns to the block in the upper hierarchy.

[0049] If it is determined that the processing block should be divided into 2-3 blocks, the processing block is further divided into 2 blocks. It is determined whether or not to divide (step S1202).

[0050] If it is determined that the processing block should be divided into two, the processing block is divided vertically. Based on the result of the determination, the processing target block is Divide the target block vertically (step S1204), or divide the target block horizontally ( Step S1205) As a result of step S1204, the block to be processed is As a result of step S1205, the block to be processed is divided into two parts in the vertical direction. As shown in Figure 604, it is divided into two parts horizontally.

[0051] In step S1202, if it is not determined that the block to be processed is to be divided into two , that is, if it is determined that the block to be processed should be divided into three, whether to divide the block vertically or not Based on the result, the processing target block is divided vertically. (step S1207) or divide the block to be processed horizontally (step S 1208). As a result of step S1207, the processing target block is divided into vertical blocks as shown in FIG. As a result of step S1208, the block to be processed is divided into three parts in the vertical direction, as shown in FIG. As shown, it is divided into three horizontal sections.

[0052] After executing either step S1204 or step S1205, the processing target block is Each divided block is scanned from left to right and from top to bottom (step S1209 ) The numbers 0 to 3 in 602 to 605 in Figure 6 indicate the order of processing. For each block, the flowchart in FIG. 8 is called recursively.

[0053] The recursive block division explained here is performed by dividing the number of blocks into multiple blocks. The necessity of division may be restricted depending on the size of the image. By making a prearrangement between the decoder and the decoder, it is possible to realize a configuration that does not transmit information. Alternatively, the encoding device may determine information that limits the necessity of division and record it in the encoded bit string. The above-mentioned signal may be transmitted to the decoding device.

[0054] Next, the operation of the block division unit 202 in the image decoding device 200 will be described. The block division unit 202 performs the same processing procedure as the block division unit 101 of the image encoding device 101. However, the block division of the image coding device 101 is The unit 101 applies optimization techniques such as optimal shape estimation by image recognition and strain rate optimization, The optimal block division shape is determined, whereas the block division in the image decoding device 200 is determined. The dividing unit 202 divides the blocks by decoding the block division information recorded in the coded bit string. The difference is in determining the lock split shape.

[0055] Syntax for Block Division in the First Embodiment (Syntax Rules for Encoded Bitstreams) The coding_quadtree() syntax is shown in Figure 9. ,multi_type_tree() represents the syntax for dividing a block into two or three parts. qt_split is a flag that indicates whether to split a block into four. If you do not want to split it into four, set qt_split=1. If you do not want to split it into four, set qt_split=0. 1) For each block divided into four, recursively divide it into four (coding_quadtree(0), c coding_quadtree(1), coding_quadtree(2), coding_quadtree(3)). If not divided into four (qt_ split=0) determines subsequent splits according to multi_type_tree(). mtt_split determines further splits. This flag indicates whether to split the image further. If splitting is performed further (mtt_split=1), the image is split vertically. The flag mtt_split_vertical indicates whether to split the image horizontally or vertically, and the flag mtt_split_vertical indicates whether to split the image horizontally or vertically. Refer to mtt_split_binary, which is a flag that determines whether to split into 3 or 4. al=1 indicates splitting vertically, mtt_split_vertical=0 indicates splitting horizontally mtt_split_binary=1 indicates splitting into two parts, mtt_split_binary=0 indicates splitting into three parts. This indicates that the tree is split by recursively calling multi_type_tree until mtt_split=0 is reached. This allows for hierarchical block division.

[0056] <Inter prediction> The inter prediction method according to the embodiment is performed by the inter prediction unit 10 of the video encoding device shown in FIG. 2 and the inter prediction unit 203 of the video decoding device of FIG.

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

[0058] (Explanation of the inter prediction unit 102 on the encoding side) FIG. 16 is a diagram showing a detailed configuration of the inter-prediction unit 102 of the video encoding device of FIG. The normal motion vector predictor derivation unit 301 derives and predicts a plurality of normal motion vector predictor candidates. A motion vector is selected and a difference vector between the selected motion vector and the detected motion vector is calculated. Inter prediction mode, reference index, motion vector, calculated difference vector are usually This inter prediction information is used as inter prediction information for the predicted motion vector mode. The motion vector prediction unit 301 normally outputs the motion vector prediction signal to the motion vector prediction mode determination unit 305. The processing will be described later.

[0059] The normal merge mode derivation unit 302 derives multiple normal merge candidates and This inter prediction information is used for the normal merge mode. The result is supplied to the prediction mode determination unit 306. The reasoning behind this will be explained later.

[0060] The sub-block predicted motion vector derivation unit 303 calculates a plurality of sub-block predicted motion vectors. A candidate is derived to select a sub-block predicted motion vector, and the difference between the detected motion vector and the Calculate the vector: Detected inter prediction mode, reference index, and motion vector The calculated difference vector becomes inter prediction information in the normal predicted motion vector mode. The inter prediction information is supplied to the inter prediction mode determination unit 306. The detailed configuration and processing of the motion vector derivation unit 303 will be described later.

[0061] The sub-block merge mode derivation unit 304 derives multiple sub-block merge candidates. Select sub-block merging candidates and obtain inter-prediction information for sub-block merging modes This inter prediction information is supplied to the inter prediction mode determination unit 306. The detailed configuration and processing of the merge mode derivation unit 304 will be described later.

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

[0063] The motion compensation prediction unit 306 stores the decoded image in the decoded image memory 1 based on the determined inter prediction information. Inter prediction is performed on the reference image signal stored in 04. For details on the configuration and processing, see More details will be given later.

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

[0065] The normal motion vector predictor derivation unit 401 derives and predicts a plurality of normal motion vector predictor candidates. A motion vector is selected and a difference vector between the selected motion vector and the detected motion vector is calculated. Inter prediction mode, reference index, motion vector, and difference vector are normal prediction motion vectors. This inter prediction information is sent via the switch 408. The motion vector is then supplied to the motion compensation prediction unit 406. The construction and processing will be described later.

[0066] The normal merge mode derivation unit 402 derives multiple normal merge candidates and selects the normal merge candidates. Select this to get the inter prediction information for normal merge mode. The merge mode derivation unit 402 normally supplies the merge mode to the motion compensation prediction unit 406 via 408. The detailed configuration and processing will be described later.

[0067] The sub-block predicted motion vector derivation unit 403 calculates a plurality of sub-block predicted motion vectors. A candidate is derived to select a sub-block predicted motion vector, and the difference between the detected motion vector and the Calculate the vector: Detected inter prediction mode, reference index, and motion vector The calculated difference vector becomes inter prediction information in the normal predicted motion vector mode. The inter prediction information is supplied to the motion compensation prediction unit 406 via the switch 408. The detailed configuration and processing of the block predicted motion vector derivation unit 403 will be described later.

[0068] The sub-block merge mode derivation unit 404 derives multiple sub-block merge candidates. Select sub-block merging candidates and obtain inter-prediction information for sub-block merging modes This inter prediction information is supplied to the motion compensation prediction unit 406 via the switch 408. The detailed configuration and processing of the sub-block merge mode derivation unit 404 will be described later.

[0069] The motion compensation prediction unit 406 stores the decoded image in the decoded image memory 1 based on the determined inter prediction information. Inter prediction is performed on the reference image signal stored in 08. For details on the configuration and processing, see The procedure is the same as for the encoding side.

[0070] <Normal predicted motion vector mode derivation part (normal AMVP)> The normal predicted motion vector mode derivation unit 301 in FIG. 16 derives spatial predicted motion vector candidates. 321, a temporal motion vector predictor candidate derivation unit 322, and a historical motion vector predictor candidate derivation unit 3 23, a predicted motion vector candidate supplementation unit 325, a normal motion vector detection unit 326, a predicted motion vector The motion vector selection unit 327 includes a motion vector candidate selection unit 328 .

[0071] The normal predicted motion vector mode derivation unit 402 in FIG. 23 derives spatial predicted motion vector candidates. unit 421, a temporal motion vector predictor candidate derivation unit 422, and a historical motion vector predictor candidate derivation unit 4 23, a motion vector predictor candidate supplementation unit 425, a motion vector predictor candidate selection unit 426, a motion vector The vector adder 428 is included.

[0072] The normal predicted motion vector mode derivation unit 301 on the encoding side and the normal predicted motion vector mode derivation unit 302 on the decoding side The processing procedure of the torque mode derivation unit 401 is shown in the flowcharts of FIGS. 19 and 25. 19 is a diagram showing the normal motion vector mode derivation unit 301 on the encoding side. 25 is a flowchart showing a procedure for deriving a predicted motion vector mode. 1 shows a procedure for deriving a normal predicted motion vector mode by the normal motion vector mode derivation unit 401. This is a flowchart.

[0073] <Normal prediction motion vector mode derivation part (normal AMVP): explanation on the encoding side> The normal predicted motion vector mode derivation process on the encoding side will be described with reference to FIG.

[0074] First, the normal motion vector detection unit 326 detects the inter prediction mode and the reference index. Then, a normal motion vector is detected (step S100 in FIG. 19).

[0075] Next, the spatial motion vector predictor candidate derivation unit 321 and the temporal motion vector predictor candidate derivation unit 3 22, a history predicted motion vector candidate derivation unit 323, a predicted motion vector candidate supplement unit 325, a predicted motion vector candidate A predicted motion vector candidate selection unit 327 and a motion vector subtraction unit 328 select a normal predicted motion vector The differential motion vectors of the motion vectors used in inter prediction of the mode are set for L0 and L1 respectively. Specifically, the coding target block is calculated as follows (steps S101 to S106 in FIG. 19). Prediction mode PredMode is inter prediction (MODE_INTER), and inter prediction mode is L0 prediction ( Pred_L0), the motion vector predictor candidate list mvpListL0 of L0 is calculated, and the motion vector predictor candidate list mvpListL0 is used. A vector mvpL0 is selected, and a differential motion vector mvdL0 of the motion vector mvL0 of L0 is calculated. If the inter prediction mode of the block to be coded is L1 prediction (Pred_L1), the predicted motion vector of L1 is A motion vector candidate list mvpListL1 is calculated, a predicted motion vector mvpL1 is selected, and the motion vector L1 is Calculate the differential motion vector mvdL1 of the vector mvL1. Inter prediction of the block to be coded When the mode is bi-prediction (Pred_BI), both L0 prediction and L1 prediction are performed. A vector candidate list mvpListL0 is calculated, and a motion vector predictor mvpL0 for L0 is selected. The differential motion vector mvdL0 of the motion vector mvL0 of L1 is calculated, and the predicted motion vector of L2 is calculated. A motion vector candidate list mvpListL1 is calculated, a motion vector predictor mvpL1 for L1 is calculated, and the motion vector of L1 is calculated. Then, a differential motion vector mvdL1 is calculated for each of the moving vectors mvL1 and mvdL2.

[0076] The differential motion vector calculation process is performed for each of L0 and L1. Therefore, in the following explanation, L0 and L1 are 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 is In the process of calculating the difference motion vector of LX, X is 1. If you want to refer to information from another list, not LX, use LY as the other list. represent.

[0077] When calculating the differential motion vector mvdLX of LX (YES in step S102 of FIG. 19) , and calculates the candidate predicted motion vectors of LX to generate a candidate predicted motion vector list mvpListL of LX. X is constructed (step S103 in FIG. 19). The spatial motion vector predictor candidate derivation unit 321 and the temporal motion vector predictor candidate derivation unit 322 , the history motion vector predictor candidate derivation unit 323 and the motion vector predictor candidate supplementation unit 325 Candidates for the motion vector predictor are derived to construct a motion vector predictor candidate list mvpListLX. The detailed processing procedure of step S103 in FIG. 19 will be explained using the flowchart in FIG. 20. This will be discussed later.

[0078] Next, the motion vector predictor candidate selection unit 327 selects a motion vector predictor candidate list for LX. Select a predicted motion vector mvpLX for LX from the mvpListLX (step S104 in FIG. 19). The motion vector mvLX and each predicted motion vector stored in the predicted motion vector candidate list mvpListLX are Each differential motion vector is calculated as a difference between the candidate motion vector mvpListLX[i] and the candidate motion vector mvpListLX[i]. The amount of code when these differential motion vectors are coded is calculated using the predicted motion vector candidate list mvpListL. Calculate for each element of X, and among the elements registered in the motion vector predictor candidate list mvpListLX, , the candidate motion vector predictor mvpListLX[i] that minimizes the amount of coding for each candidate motion vector predictor is selected as the motion vector predictor mvpLX. If there are multiple candidates for the predicted motion vector that will result in the minimum amount of generated code, The predicted motion vector i is represented by a small number in the motion vector candidate list mvpListLX. The candidate mvpListLX[i] is selected as the optimal predicted motion vector mvpLX.

[0079] Next, the motion vector subtraction unit 328 subtracts the motion vector mvLX of LX selected from the motion vector mvLX of LX. A differential motion vector mvdLX of LX is calculated by subtracting the predicted motion vector mvpLX ( Step S105 in FIG. 19).

[0080] (Normal predicted motion vector mode derivation unit (normal AMVP): explanation on the decoding side) Next, the normal predicted motion vector mode processing procedure on the decoding side will be described with reference to FIG. On the other hand, a spatial prediction motion vector candidate derivation unit 421 and a temporal prediction motion vector candidate derivation unit 422 are provided. 22, the history predicted motion vector candidate derivation unit 423, the predicted motion vector candidate supplementation unit 425, The motion vectors used in inter prediction in normal prediction motion vector mode are set for each of L0 and L1. Specifically, the values ​​of the block to be decoded are calculated (steps S201 to S206 in FIG. 25). Prediction mode PredMode is inter prediction (MODE_INTER) and the current block is inter prediction When the mode is L0 prediction (Pred_L0), the predicted motion vector candidate list mvpListL0 of L0 is calculated. Then, the predicted motion vector mvpL0 is selected, and the motion vector mvL0 of L0 is calculated. If the inter prediction mode of the target block is L1 prediction (Pred_L1), the predicted motion vector of L1 is used. A motion vector candidate list mvpListL1 is calculated, a motion vector predictor mvpL1 is selected, and the motion vector of L1 is If the inter prediction mode of the block to be decoded is bi-predictive (Pred_BI), Both L0 prediction and L1 prediction are performed, and the L0 predicted motion vector candidate list mvpListL0 is calculated. Then, the predicted motion vector mvpL0 of L0 is selected, and the motion vector mvL0 of L0 is calculated. In both cases, a motion vector predictor candidate list mvpListL1 of L1 is calculated, and the motion vector predictor of L1 is Then, the motion vector mvpL1 for L1 is calculated, and the motion vector mvL1 for L2 is calculated.

[0081] As with the encoding side, the decoding side also performs motion vector calculation processing for each of L0 and L1. However, the process is common to both L0 and L1. L1 is represented as a common LX. In the process of calculating the motion vector of L0, X is 0, and L In the process of calculating the motion vector of 1, X is 1. If you refer to the information in the other list instead of the LX during the process of adding the other list, is expressed as LY.

[0082] When calculating the motion vector mvLX of LX (YES in step S202 of FIG. 25), Calculate the candidate predicted motion vectors of LX and construct a candidate predicted motion vector list mvpListLX of LX. (Step S203 in FIG. 25). A spatial motion vector predictor candidate derivation unit 421, a temporal motion vector predictor candidate derivation unit 422, a history A motion vector predictor candidate deriving unit 423 and a motion vector predictor candidate supplementing unit 425 generate a plurality of motion vector predictors. Then, motion vector predictor candidates are calculated and a motion vector predictor candidate list mvpListLX is constructed. The detailed processing procedure of step S203 will be described later with reference to the flowchart of FIG. do.

[0083] Next, the motion vector predictor candidate selection unit 426 selects the motion vector predictor candidate list mvpListLX The bitstream decoder 201 decodes and supplies the predicted motion vector index mv The candidate predicted motion vector mvpListLX[mvpIdxLX] corresponding to pIdxLX is used as the selected predicted motion vector. The vector mvpLX is extracted (step S204 in FIG. 25).

[0084] Then, the motion vector adder 427 decodes the bit stream and supplies it to the bit stream decoder 201. LX is obtained by adding the differential motion vector mvdLX of LX and the predicted motion vector mvpLX of LX. The motion vector mvLX is calculated (step S205 in FIG. 25).

[0085] <Normal predicted motion vector mode derivation part (normal AMVP): Motion vector prediction method> FIG. 20 shows a normal prediction motion vector mode guide of a video encoding device according to an embodiment of the present invention. The motion vector mode derivation unit 301 and the normal predicted motion vector mode derivation unit 401 of the video decoding device are common to the motion vector mode derivation unit 301 and the normal predicted motion vector mode derivation unit 401 of the video decoding device. 10 is a flowchart showing the processing procedure of a normal predicted motion vector mode derivation process having a function. do.

[0086] The normal predicted motion vector mode derivation unit 301 and the normal predicted motion vector mode derivation unit 40 1, a motion vector predictor candidate list mvpListLXN (N is A or B, the same below) is provided. The motion vector predictor candidate list mvpListLXN has a list structure and A predicted motion vector index indicating the location within the complementary list and a predicted motion vector corresponding to the index A storage area is provided for storing candidate predicted motion vectors as elements. The index number starts from 0 and is used to store the motion vector predictor candidate list mvpListLXN. In the subsequent processing, the motion vector predictor candidate list is The candidate motion vector predictor is the motion vector predictor index i registered in the mvpListLXN. The coding block to be coded is represented by mvpListLXN[i], and the motion vector predictor candidate list mvpL It is distinguished from istLXN by using an array notation. The motion vector candidate list mvpListLXN contains up to two motion vector predictor candidates (inter prediction information). Furthermore, the motion vector predictor candidate list mvpListL 0 is set to the variable numMvpCand indicating the number of motion vector predictor candidates registered in XN.

[0087] The spatial prediction motion vector candidate derivation units 321 and 421 are based on the coding block adjacent to the left. The predicted motion vector candidates are derived from the adjacent coding block on the left side. a flag availableFlagLXA indicating whether a motion candidate is available, and a motion vector mvLXA; The reference index refIdxA and the list ListA are derived, and mvLXA is used to create the predicted motion vector candidate list m vpListLXA (step S301 in FIG. 20). Note that X is 0 for L0 and Then, X is set to 1 (same below). derives candidate predicted motion vectors from adjacent coding blocks on the upper side, and A flag, availableF, indicating whether a motion vector predictor candidate for the coding block is available. lagLXB, motion vector mvLXB, reference index refIdxB, and list ListB are derived, and mvL If XA is not equal to mvLXB, add mvLXB to the motion vector predictor candidate list mvpListLXB. (Step S302 in FIG. 20). The processes in steps S301 and S302 in FIG. 20 are referenced. The difference is the position and number of neighboring blocks. a flag indicating whether a motion candidate is available, mvLXN, and a motion vector, mvLXN. Derive the reference index refIdxN, ListN (N is A or B, etc.).

[0088] Next, the temporal motion vector predictor candidate derivation units 322 and 422 calculate the motion vector predictor candidates of pictures at different times. Deriving candidate motion vectors from coding blocks and coding pictures at different times Flag indicating whether the motion vector predictor candidate for the block is available. availableFlagLXCol , and the motion vector mvLXCol, the reference index refIdxCol, and the list ListCol are derived, and mvL Add XCol to the motion vector predictor candidate list mvpListLX (step S303 in FIG. 20). The derivation process procedure in step S303 will be explained in detail later.

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

[0090] Next, the history prediction motion vector candidate derivation units 323 and 423 derive the history prediction motion vector candidate. The historical predicted motion vector candidates registered in the supplementary list HmvpCandList are used as predicted motion vector candidates. The mvpListLX is added to the auxiliary list mvpListLX (step S304 in FIG. 20). The registration process will be described in detail later with reference to the flowchart of FIG.

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

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

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

[0094] FIG. 21 shows the normal merge mode derivation unit 302 of the video encoding device according to the embodiment of the present invention. and a merge mode derivation unit 402 of the video decoding device. 10 is a flowchart illustrating the procedure of a code derivation process.

[0095] The following describes the various steps in order. The slice type slice_type is explained as a B slice, but the case of a P slice is explained as follows. However, if the slice type slice_type is P slice, the inter prediction model There is only L0 prediction (Pred_L0) as a code, and L1 prediction (Pred_L1) and bi-prediction (Pred_BI) are also supported. Since there is no L1, processing related to L1 can be omitted.

[0096] The normal merge mode derivation unit 302 and the normal merge mode derivation unit 402 determine the merge candidate list. The merge candidate list mergeCandList has a list structure, A merge index that indicates the location within the merge candidate list and the merge candidate corresponding to the index. There is a memory area for storing merge candidates as elements. The merge index number is 0. The merge candidates are stored in the merge candidate list (mergeCandList) starting from In the following process, the merge index i registered in the merge candidate list mergeCandList is used. The coding blocks that are candidates for merging are represented by mergeCandList[i]. It will be distinguished from the mergeCandList by using array notation. The merge candidate list mergeCandList contains up to six merge candidates (inter prediction information). Furthermore, it is possible to register merge candidates in the merge candidate list mergeCandList. The variable numMergeCand, which indicates the number of merge candidates, is set to 0.

[0097] The spatial merge candidate derivation unit 341 and the spatial merge candidate derivation unit 441 are The encoded information storage memory 115 or the encoded information storage memory 210 of the video decoding device stores the From the stored coding information, each coding block adjacent to the coding / decoding target block is Derive spatial merge candidates A, B, C, D, E from blocks A, B, C, D, E, and The spatial merge candidates thus obtained are registered in the merge candidate list mergeCandList (step S in FIG. 21). 401), where N denotes either A, B, C, D, E or the temporal merge candidate Col. The inter prediction information of coding block N can be used as spatial merge candidate N. Flag indicating whether availableFlagN, L0 reference index refI of spatial merge candidate N dxL0N and L1 reference index refIdxL1N, L0 prediction indicating whether L0 prediction is performed The L1 prediction flag predFlagL0N indicates whether L1 prediction is performed, and the L1 prediction flag predFlagL indicates whether L1 prediction is performed. The motion vector mvL0N for L1, L1N, and the motion vector mvL1N for L1 are derived. In terms of form, the same coding block as the coding block containing the coding block to be processed The merging candidates are derived without referring to the coding blocks included in the target code. The spatial merge candidates included in the same coding block as the coding block containing the merging block are derived. do not.

[0098] Next, the temporal merge candidate derivation unit 342 and the temporal merge candidate derivation unit 442 determine different time derive temporal merge candidates from the pictures between, and the derived temporal merge candidates are called merge candidates The time merge candidate is registered in the list mergeCandList (step S402 in FIG. 21). Flag availableFlagCol indicating whether L0 prediction of temporal merge candidates is performed. The L0 prediction flag predFlagL0Col indicates whether L1 prediction is performed, and L 1 prediction flag predFlagL1Col, L0 motion vector mvL0Col, L1 motion vector mvL1 The detailed processing procedure of step S402 is shown in the flowcharts of FIGS. This will be explained in more detail later using charts.

[0099] Here, temporal merge candidates are sorted by sequence (SPS), picture (PPS) or slice unit. It is assumed that the processing of the derivation unit 342 and the temporal merge candidate derivation unit 442 can be omitted. .

[0100] 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 complement list mergeCandList, and the derived average merge candidate is merged. The average merge candidate is registered in the merge candidate list mergeCandList (step S403 in FIG. 21). A complement is derived when the merge candidate list contains two or more candidates.

[0101] Next, the history merge candidate derivation unit 345 and the history merge candidate derivation unit 445 perform history prediction. Mark the historical predicted motion vector candidates registered in the motion vector candidate list HmvpCandList. The mergeCandList is added to the merge candidate list (step S404 in FIG. 21). The detailed processing procedure of step 4 will be explained later using the flowchart of FIG.

[0102] Next, the merge candidate supplementation unit 346 and the merge candidate supplementation unit 446 generate a merge candidate list. The number of merge candidates registered in mergeCandList, numMergeCand, is less than the maximum number of merge candidates, maxNu If it is smaller than mMergeCand, the merge candidate registered in the mergeCandList The number of candidates numMergeCand is limited to the maximum number of merge candidates maxNumMergeCand. The merge candidate list is derived and registered in the merge candidate list mergeCandList (step S405 in FIG. 21). In P slices, the maximum number of merge candidates is maxNumMergeCand. The motion vector has a value of (0,0) in the frame, and the prediction mode is the zero-matrix L0 prediction (Pred_L0). In B slices, the motion vectors are (0, 0) is added as a zero merge candidate whose prediction mode is bi-predictive (Pred_BI).

[0103] Next, the merge candidate selection unit 347 and the merge candidate supplementation unit 447 select the merge candidates from the merge candidate list. Select a merge candidate from the merge candidates registered in mergeCandList. The merge candidate selection unit 347 selects merge candidates by calculating the code amount and distortion amount. , a merge index indicating the selected merge candidate, and the inter-prediction information of the merge candidate. On the other hand, the merge candidate supplementation unit 447 on the decoding side supplies the decoded merge candidate to the motion compensation prediction unit 406. Selects merge candidates based on the merge indexes provided and runs the selected merge candidates. The result is supplied to the compensation prediction unit 406.

[0104] <average merge candidate> The average merge candidate is the candidate that is included in the merge candidate list. The average merger is derived using two merge candidates, the first merge candidate and the second merge candidate. The merge candidate is the motion vector of the L0 prediction of the first merge candidate and the motion vector of the L0 prediction of the second merge candidate. The average motion vector of the L0 prediction obtained by averaging the vectors is compared with the motion vector of the L1 prediction of the first merge candidate. The average motion vector of the L1 prediction is calculated by averaging the motion vectors of the L1 prediction of the vector and the second merge candidate. The reference index of the L0 prediction of the average merge candidate is the first merge candidate. is the reference index of the L0 prediction of the image candidate, and is the reference index of the L1 prediction of the average merge candidate. The index is the reference index for L1 prediction of the first merging candidate. In the derivation, the horizontal and vertical components of the motion vector are calculated independently. That is, the horizontal component of the average motion vector of the L0 prediction of the average merge candidate is , the motion vector of the L0 prediction of the first merge candidate and the motion vector of the L0 prediction of the second merge candidate The horizontal components of each of the ,average motion of the L0 prediction of the average merge candidate are ,determined. The vertical component of the vector is the motion vector of the L0 prediction of the first merging candidate and the motion vector of the second merging candidate. The average merge candidate is the average of the vertical components of the motion vectors of the L0 predictions. The same applies to the average motion vector of the complementary L1 prediction. By deriving the average merge candidate after deriving the history merge candidate, the history merge candidate is Even if the total number of spatial and temporal merge candidates is less than one, This allows us to derive average merging candidates using the merging candidates, improving coding efficiency. . <Sub-block prediction motion vector mode derivation> The sub-block predicted motion vector mode derivation will be explained.

[0105] FIG. 26 shows the sub-block predicted motion vector mode derivation unit 30 in the encoding device of the present application. 3 is a block diagram of the

[0106] First, the affine inheritance predicted motion vector candidate derivation unit 361 derives the affine inheritance predicted motion vector candidate. The details of deriving affine inheritance predicted motion vector candidates will be explained later. Describe.

[0107] Next, the affine construction prediction motion vector candidate derivation unit 362 calculates the affine construction prediction Derive motion vector candidates. For details on deriving affine construction prediction motion vector candidates, see This will be discussed later.

[0108] Next, the affine-coherent prediction motion vector candidate derivation unit 363 performs affine-coherent prediction. Derive motion vector candidates. For details on deriving affine identical predictor motion vector candidates, see This will be discussed later.

[0109] The sub-block motion vector detector 366 is adapted to the sub-block predicted motion vector mode. A sub-block motion vector corresponding to the sub-block is detected, and the detected vector is used as a sub-block predicted motion vector. The result is supplied to a torque candidate selection unit 367 and a difference calculation unit 368.

[0110] The sub-block predicted motion vector candidate selection unit 367 selects the affine inheritance predicted motion vector candidate. A complementary derivation unit 361, an affine construction predicted motion vector candidate derivation unit 362, an affine identical predicted motion vector Among the sub-block predicted motion vector candidates derived by the motion vector candidate derivation unit 363, Based on the motion vector supplied from the sub-block motion vector detection unit 366, A sub-block motion vector predictor candidate is selected, and the selected sub-block motion vector predictor The information about the candidates is supplied to the inter prediction mode determination unit 305 and the difference calculation unit 368 .

[0111] The difference calculation unit 368 calculates the motion vectors supplied from the sub-block motion vector detection unit 366. The sub-block predicted motion vector candidate selection unit 367 selects the sub-block predicted motion vector candidate from the motion vector. The difference prediction motion vector obtained by subtracting the inter prediction motion vector is Supply to 305.

[0112] FIG. 27 shows the sub-block predicted motion vector mode derivation unit 403 in the decoding device of the present application. FIG.

[0113] First, the affine inheritance predicted motion vector candidate derivation unit 461 derives the affine inheritance predicted motion vector candidate. The processing of the affine inheritance predicted motion vector candidate derivation unit 461 is The processing is the same as that of the affine inheritance predicted motion vector candidate derivation unit 361 in the encoding device of the present application. be.

[0114] Next, the affine construction prediction motion vector candidate derivation unit 462 calculates the affine construction prediction The affine construction prediction motion vector candidate derivation unit 462 performs the following process: The same processing as that of the affine construction predicted motion vector candidate derivation unit 362 in the encoding device of the present application. is.

[0115] Next, the affine-coherent prediction motion vector candidate derivation unit 463 performs affine-coherent prediction. The affine identical predictor motion vector candidate derivation unit 463 performs the following process: The same processing as that of the affine identical predictor motion vector candidate derivation unit 363 in the encoding device of the present application is.

[0116] The sub-block predicted motion vector candidate selection unit 467 selects the affine inheritance predicted motion vector candidate. The auxiliary derivation unit 461, the affine construction predicted motion vector candidate derivation unit 462, the affine identical predicted motion vector candidate derivation unit 463, and the affine identical predicted motion vector candidate derivation unit 464 are connected. Among the sub-block predicted motion vector candidates derived by the motion vector candidate derivation unit 463, Then, based on the predicted motion vector index transmitted from the encoding device and decoded, a sub-block predicted motion vector candidate is selected, and the selected sub-block predicted motion vector candidate is selected; The information about the complement is supplied to the motion compensation prediction unit 406 and the addition operation unit 467 .

[0117] The addition operation unit 467 adds the sub-block predicted motion vector candidate selected by the sub-block predicted motion vector candidate selection unit 466. The differential motion vector transmitted from the encoding device and decoded is used as the subblock predicted motion vector. The motion vector generated by the addition is supplied to the motion compensation prediction unit 406 .

[0118] <Affine Inheritance Prediction Motion Vector Candidate Derivation> The affine succession prediction motion vector candidate derivation unit 361 will now be described. The motion vector candidate derivation unit 461 also uses the affine inheritance predicted motion vector candidate derivation unit 36 Same as 1.

[0119] The affine inheritance motion vector predictor candidate inherits the motion vector information of the affine control point. .

[0120] FIG. 30 is a diagram for explaining derivation of affine inheritance predicted motion vector candidates.

[0121] The affine inheritance motion vector predictor candidate is a candidate of the spatially adjacent coded and decoded blocks. The motion vectors are obtained by searching for the affine control points that have the same motion vector.

[0122] Specifically, the block (A0, A1) adjacent to the left of the block to be coded / decoded, From the blocks (B0, B1, B2) adjacent to the upper side of the block to be coded / decoded, A maximum of one affine mode is searched for and used as the affine succession predicted motion vector.

[0123] FIG. 34 is a flowchart of deriving affine inheritance predicted motion vector candidates.

[0124] First, the block (A0, A1) adjacent to the left of the block to be coded / decoded is treated as a left group. The block containing A0 is a block using affine guarantee (Affine If A0 is in affine mode (S3102), it is determined whether A0 is in affine mode (S 3102:YES), obtain the affine model used by A0 (S3103), and Proceed to processing of adjacent blocks. If A0 is not in affine mode (S3102: NO), The target of deriving affine inheritance predicted motion vector candidates is A0->A1, and the block including A1 Attempt to get affine mode from

[0125] Next, the blocks (B0, B1, B2) adjacent to the upper side of the block to be coded / decoded are It is determined whether the block including B0 is in the affine mode (S3104). If B0 is in affine mode (S3105: YES), The affine model used by B0 is acquired (S3106), and the process ends. If the affine inheritance prediction motion vector candidate is not the target (S3105: NO), B0->B1, and try to get the affine mode from the block containing B1. If 1 is not the affine mode (S3105: NO), the affine inheritance predicted motion vector candidate The target of the supplementary derivation is B1->B2, and an attempt is made to obtain an affine mode from the block including B2. do.

[0126] In this way, we divided the group into left and upper blocks, and for the left block, searches for affine models in the order from the bottom left to the top left block, and for the left block, By searching the affine model in order from the top right to the top left block, we can find two as different as possible. The affine model can be obtained by using the differential motion vectors. Therefore, it is possible to derive affine predicted motion vector candidates that have a small motion vector.

[0127] <Affine Construction Prediction Motion Vector Candidate Derivation> The affine construction prediction motion vector candidate derivation unit 362 will now be described. The motion vector candidate derivation unit 462 is also the same as the affine construction prediction motion vector candidate derivation unit 36 Same as 2.

[0128] The affine constructed motion vector candidate is derived from the motion information of spatially adjacent blocks. The motion vector information of the control points is constructed.

[0129] FIG. 31 is a diagram illustrating the derivation of affine constructed predicted motion vector candidates.

[0130] The affine construction motion vector predictor candidate is a candidate of the spatially adjacent coded and decoded blocks. The motion vectors are combined to construct a new affine model.

[0131] Specifically, the blocks adjacent to the upper left of the block to be coded / decoded (B2, B3, A 2) to derive the motion vector of the upper left affine control point CP0, and The motion vector of the upper right affine control point CP1 is calculated from the block (B1, B0) adjacent to the upper right side of the block. The code is derived from the block (A1, A0) adjacent to the lower left of the block to be coded / decoded. A motion vector for the lower-left affine control point CP2 is derived.

[0132] FIG. 35 is a flowchart showing the derivation of affine constructed motion vector predictor candidates.

[0133] First, the upper left control point CP0, the upper right control point CP1, and the lower left affine control point CP2 are derived ( The upper left affine control point CP0 is the same as the reference image of the block to be coded or decoded. Calculated by searching for a reference block with an image in the order of B2, B3, and A2 reference blocks. The upper right affine control point CP1 has the same reference image as the block to be coded or decoded. The reference blocks are calculated by searching the B1, B0 reference blocks in that order. The affine control point CP2 is a reference block that has the same reference image as the block to be coded or decoded. The calculation is performed by searching the A1, A0 reference blocks in that order.

[0134] When selecting the three affine control points mode as the affine construction predicted motion vector (S 3202:YES), all three affine control points (CP0, CP1, CP2) are derived. It is determined whether the three affine control points (CP0, CP1, CP2) ) are all derived (S3203: YES), the three affine control points (CP0,C P1, CP2) is used as the affine model for the affine constructed predicted motion vector (S32 04). If you do not select the three affine control points mode and select the two affine control points mode, If (S3202:NO), then both affine control points (CP0, CP1) are derived. It is determined whether or not the two affine control points (CP0, CP1) are all derived (S3205). If this is requested (S3205:YES), the two affine control points (CP0, CP1) are used. The obtained affine model is used as the affine constructed predicted motion vector (S3206).

[0135] <Derivation of affine identical predictive motion vector candidates> The affine coherent prediction motion vector candidate derivation unit 363 will be described. The motion vector candidate derivation unit 463 also uses the same affine identical predictive motion vector candidate derivation unit 36 Same as 3.

[0136] The affine identical predicted motion vector candidate derives the same motion vector at each affine control point. This can be obtained by doing the following.

[0137] Specifically, similarly to the affine construction motion vector candidate derivation units 362 and 462, each Derive fin control point information and set all affine control points to the same value between CP0 and CP2. In addition, the temporal motion vector derived in the same way as in the normal predicted motion vector mode is can also be obtained by setting the sine vector to all affine control points.

[0138] <Sub-block merge mode derivation> Sub-block merge mode derivation will now be described.

[0139] FIG. 28 shows the block diagram of the sub-block merge mode derivation unit 304 in the encoding device of the present application. The sub-block merge mode derivation unit 304 generates a sub-block merge candidate list This is the same as in the normal merge mode derivation unit 302. This is similar to the merge candidate list mergeCandList, and it is a list of candidates that differs for each subblock. The only difference is that it becomes a strike.

[0140] First, the sub-block temporal merge candidate derivation unit 381 determines the sub-block temporal merge candidates. The details of the derivation of sub-block temporal merge candidates will be described later.

[0141] Next, the affine inheritance merge candidate derivation unit 382 derives affine inheritance merge candidates. The details of deriving affine inheritance merge candidates will be described later.

[0142] Next, the affine construction merge candidate derivation unit 383 derives affine construction merge candidates. The details of deriving affine construction merge candidates will be described later.

[0143] Next, the affine-fixed merge candidate derivation unit 384 derives affine-fixed merge candidates. The details of deriving affine-fixed merge candidates will be described later.

[0144] The sub-block merge candidate selection unit 386 includes the sub-block temporal merge candidate derivation unit 381, An affine inheritance merge candidate derivation unit 382, ​​an affine construction merge candidate derivation unit 383, an affine Among the sub-block merging candidates derived by the fixed merging candidate derivation unit 384, Select a block merge candidate and view information about the selected sub-block merge candidate. The prediction mode determination unit 305 receives the result.

[0145] FIG. 29 shows the block diagram of the sub-block merge mode derivation unit 404 in the decoding device of the present application. The sub-block merging mode derivation unit 404 generates a sub-block merging candidate list su bblockMergeCandList, which is a sub-block merge mode derivation unit 304 and They are the same thing.

[0146] First, the sub-block temporal merge candidate derivation unit 481 determines the sub-block temporal merge candidates. The process of the sub-block time merge candidate derivation unit 481 is to derive the sub-block time marker. This is the same as the processing of the candidate derivation unit 381.

[0147] Next, the affine inheritance merge candidate derivation unit 482 derives affine inheritance merge candidates. The processing of the affine inheritance merge candidate derivation unit 482 is the same as that of the affine inheritance merge candidate derivation unit 3 This is the same as the process in 82.

[0148] Next, the affine construction merge candidate derivation unit 483 derives affine construction merge candidates. The processing of the affine construction merge candidate derivation unit 483 is the same as that of the affine construction merge candidate derivation unit 3 This is the same as the process in 83.

[0149] Next, the affine-fixed merge candidate derivation unit 485 derives affine-fixed merge candidates. The processing of the affine fixed merge candidate derivation unit 485 is the same as that of the affine fixed merge candidate derivation unit 485. This is the same as the process in 85.

[0150] The sub-block merge candidate selection unit 486 includes the sub-block temporal merge candidate derivation unit 481, An affine inheritance merge candidate derivation unit 482, an affine construction merge candidate derivation unit 483, an affine Among the sub-block merging candidates derived by the fixed merging candidate derivation unit 484, the code Selecting sub-block merging candidates based on the index transmitted and decoded from the decoder and provides information about the selected sub-block merge candidates to the motion compensation prediction unit 406. .

[0151] <Sub-block temporal merge candidate derivation> The operation of the sub-block temporal merge candidate derivation unit 381 will be described later.

[0152] <Affine inheritance merge candidate derivation> The affine inheritance merge candidate derivation unit 382 will be described. The affine inheritance merge candidate derivation unit 482 is similar to the affine inheritance merge candidate derivation unit 382 .

[0153] Affine inheritance merge candidates are derived from the affine models of spatially adjacent blocks. Inherits the affine model of the fin control points.

[0154] FIG. 32 is a diagram for explaining the derivation of affine inheritance merge candidates. The derivation of the motion vector candidates is similar to the derivation of the affine inheritance predicted motion vector, but it is based on spatially adjacent motion vectors. The motion vectors are obtained by searching for the affine control points of the coded and decoded blocks. can be done.

[0155] Specifically, the block (A0, A1) adjacent to the left of the block to be coded / decoded, From the blocks (B0, B1, B2) adjacent to the upper side of the block to be coded / decoded, At most one affine mode is searched for and used for the affine merge mode.

[0156] FIG. 36 is a flowchart of affine inheritance merge candidate derivation.

[0157] First, the block (A0, A1) adjacent to the left of the block to be coded / decoded is treated as a left group. It is then determined whether the block containing A0 is in affine mode (S3301). S3302). If A0 is in affine mode (S3102: YES), The affine model is obtained (S3303), and the process moves to the adjacent block above. If is not in affine mode (S3302: NO), it is the target of deriving affine inheritance merge candidates. Set A0->A1 and try to get the affine mode from the block containing A1.

[0158] Next, the blocks (B0, B1, B2) adjacent to the upper side of the block to be coded / decoded are It is then determined whether the block containing B0 is in the affine mode (S3304). If B0 is in affine mode (S3305: YES), The affine model used by B0 is acquired (S3306), and the process ends. If it is not (S3305: NO), the target of affine inheritance merge candidate derivation is B0->B. 1 and try to get the affine mode from the block containing B1. If the mode is not affine inheritance merge candidate derivation, the target of affine inheritance merge candidate derivation is B1- >B2 and try to get the affine mode from the block containing B2.

[0159] <Affine Construction Merge Candidate Derivation> The affine construction merge candidate derivation unit 383 will be described. The affine construction merge candidate derivation unit 483 is similar to the affine construction merge candidate derivation unit 383 .

[0160] 33 is a diagram for explaining the derivation of affine construction merge candidates. The motion information of spatially adjacent blocks and the temporal coding block are used to generate the affine image. Construct an affine model of the points.

[0161] Specifically, the blocks adjacent to the upper left of the block to be coded / decoded (B2, B3, A 2) to derive the motion vector of the upper left affine control point CP0, and The motion vector of the upper right affine control point CP1 is calculated from the block (B1, B0) adjacent to the upper right side of the block. The code is derived from the block (A1, A0) adjacent to the lower left of the block to be coded / decoded. The motion vector of the lower-left affine control point CP2 is derived, and the lower-right side of the block to be coded / decoded is The motion vector of the lower right affine control point CP3 from the adjacent temporal coding block (T0) is Derive.

[0162] FIG. 37 is a flowchart of affine construction merge candidate derivation.

[0163] First, the upper left affine control point CP0, the upper right affine control point CP1, and the lower left affine control point C P2, the lower right affine control point CP3 is derived (S3401). It is calculated by searching for blocks with information in the order of priority: B2, B3, A2 blocks. The upper right control point CP1 selects blocks with motion information in the order of priority, B1, B0 blocks. The lower left control point CP2 is calculated by searching the blocks with motion information, A1, The bottom right control point CP3 is calculated by searching in the order of priority of the A0 block. It is calculated by searching the motion information of

[0164] Next, the three affine control points CP0, CP1, and CP2 are used to create an affine It is determined whether or not a model can be constructed (S3402), and if it can be constructed (S340 2:YES), the three affine control point affine model by CP0, CP1, and CP2 is affine The data is then selected as a merge candidate (S3403).

[0165] Next, the three affine control points CP0, CP1, and CP3 are used to create an affine It is determined whether or not a model can be constructed (S3404), and if it can be constructed (S340 4:YES), the three affine control point affine model by CP0, CP1, and CP3 is affine The data is then selected as a merge candidate (S3405).

[0166] Next, the three affine control points CP0, CP2, and CP3 are used to create an affine It is determined whether or not a model can be constructed (S3406), and if it can be constructed (S340 6:YES), the three affine control point affine model by CP0, CP2, and CP3 is affine The data is then selected as a merge candidate (S3407).

[0167] Next, the three affine control points CP1, CP2, and CP3 are used to create an affine It is determined whether or not a model can be constructed (S3408), and if it can be constructed (S340 8:YES), the three affine control point affine model by CP1, CP2, and CP3 is The data is then selected as a merge candidate (S3409).

[0168] Next, an affine model with two affine control points is created using the derived CP0 and CP1. It is determined whether construction is possible (S3410), and if construction is possible (S3410: YE S), CP0, and CP1 are used as candidates for affine merging. (S3411).

[0169] Next, an affine model with two affine control points is created using the derived CP0 and CP2. It is determined whether construction is possible (S3412), and if construction is possible (S3412: YE S), CP0, and CP2 are used as candidates for affine merging. (S3413).

[0170] Here, whether or not an affine model is constructed is determined based on the following conditions.

[0171] 1. The reference image for all affine control points is the same (affine transformation is possible). 2. At least one affine control point has a different motion vector (expressed as a translation). (I can't) In addition, the three-point affine control point affine model, CP0, CP1, and CP2, Affine models other than the two-control-point affine model by P1 are three-control affine models. For the affine model, a three-point affine control point affine model with CP0, CP1, and CP2 is used. For the two-point control affine model, the two-point affine control points CP0 and CP1 are used. Convert it into a computer model.

[0172] <Affine-fixed merge candidate derivation> The affine-fixed merge candidate derivation unit 385 will be described. The affine fixed merge candidate derivation unit 485 is similar to the affine fixed merge candidate derivation unit 385 .

[0173] The affine fixed merge candidate is a candidate that fixes the motion information of the affine control points with the fixed motion information. do.

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

[0175] <Temporal motion vector prediction> Before explaining the temporal motion vector prediction, the temporal relationship between pictures will be explained. FIG. 49(a) shows a case where the current coding block and the current coding picture are different in time. This shows the relationship between the coded pictures. A specific coded picture is defined as ColPic. ColPic is specified by the syntax. can be.

[0176] Also, in FIG. 49(b), in ColPic, the same position as the coding block to be coded and These coding blocks T 0 and T1 are at almost the same position in a picture that is temporally different from the picture to be coded. is a coding block of

[0177] The above explanation of the temporal relationship of pictures is for encoding, but the same applies to decoding. In other words, when decoding, the encoding in the above explanation can be replaced with decoding and the explanation can be repeated in the same way. It will be revealed.

[0178] The temporal motion vector predictor candidate derivation in the normal motion vector predictor mode derivation unit 301 in FIG. The operation of the output unit 322 will be described with reference to FIG.

[0179] First, ColPic is derived (step S4201). For the derivation of ColPic, see FIG. This will be explained in light of the above.

[0180] If the slice type slice_type is a B slice and the flag collocated_from_l0_flag is 0, If (YES in step S4211, YES in step S4212), RefPicList1[0], That is, the picture with reference index 0 in the reference list L1 is a picture colPic at a different time. If not, that is, if the slice type slice_type is B slice, If the flag collocated_from_l0_flag is 1 (YES in step S4211), S, NO in step S4212), or if the slice type slice_type is a P slice (NO in step S4211, YES in step S4214), RefPicList0[0], that is, That is, the picture with reference index 0 in reference list L0 is the picture colPic at a different time. If the slice_type is not a P slice (step S4214: N O), end the process.

[0181] Referring again to Figure 50, once ColPic is derived, the coding block colCb is derived and the code This process will be described with reference to FIG. do.

[0182] First, in a picture colPic at a different time, the bottom right ( The coding block located outside is defined as a coding block colCb at a different time (step S4221) This coding block corresponds to coding block T0 in FIG.

[0183] Next, the coding information of the coding block colCb at a different time is obtained (step S422 2) If the PredMode of the coding block colCb of a different time is not available or the coding block colCb of a different time is When the prediction mode PredMode of the coded block colCb is intra prediction (MODE_INTRA) ( Step S4223: NO, Step S4224: YES), within the picture colPic at a different time The coding block located at the bottom right of the center of the same position as the coding block to be processed is processed at a different time. This coding block is designated as colCb in FIG. This corresponds to the coding block T1.

[0184] Again, see Figure 50. Next, for each reference list, inter prediction information is derived (S Here, for the coding block colCb, the motion of each reference list is Derive the vector mvLXCol and the flag availableFlagLXCol that indicates whether the coding information is valid. LX indicates the reference list, and in the derivation of reference list 0, LX becomes L0, and in the derivation of reference list 1, Then, LX becomes L1. The derivation of inter prediction information will be described with reference to FIG.

[0185] If the coding block colCb of a different time is not available (S4231S4231:NO) Or, if the prediction mode PredMode is intra prediction (MODE_INTRA) (S4232: NO) The flag availableFlagLXCol and the flag predFlagLXCol are both set to 0 (step S4233 ), and the motion vector mvLXCol is set to (0,0) (S4234), and the process ends.

[0186] The coding block colCb is available (S4231: Yes) and the prediction mode PredMode is intra. If it is not prediction (MODE_INTRA) (S4232:YES), use the following procedure to set mvCol and refIdxCol. and calculate availableFlagCol.

[0187] Flag PredFlagL0[xP If Col][yPCol] is 0 (YES in S4235), the prediction mode of the coding block colCb is Pr ed_L1, the motion vector mvCol is the L1 motion vector of the coding block colCb. The reference index refIdxCol is set to the same value as the MvL1[xPCol][yPCol] (S4236). is set to the same value as the L1 reference index RefIdxL1[xPCol][yPCol] (S4237), The list ListCol is set to L1 (S4238). Here, xPCol and yPCol are different time is an index indicating the position of the top left pixel of the coding block colCb in the picture colPic. be.

[0188] On the other hand, if the L0 prediction flag PredFlagL0[xPCol][yPCol] of the coding block colCb is not 0, If the result of S4235 is NO, the L1 prediction flag PredFlagL1[xPCol][yPC ol] is 0. The L1 prediction flag PredFlagL1[xPCol][ yPCol] is 0 (YES in S4239), the motion vector mvCol is the It is set to the same value as the L0 motion vector MvL0[xPCol][yPCol] (S4240), The index refIdxCol is set to the same value as the reference index RefIdxL0[xPCol][yPCol] of L0. The list ListCol is set to L0 (S4242).

[0189] L0 prediction flag PredFlagL0[xPCol][yPCol] of coding block colCb and coding block col If both of the L1 prediction flags PredFlagL1[xPCol][yPCol] of Cb are not 0 (NO in S4235, S4239 NO), the inter prediction mode of the coding block colCb is bi-prediction (Pred_BI). Therefore, one of the two motion vectors L0 and L1 is selected (S4243).

[0190] FIG. 54 shows the code when the inter prediction mode of the coding block colCb is bi-prediction (Pred_BI). 10 is a flowchart showing the procedure of a process for deriving inter prediction information of a coded block.

[0191] First, the POCs of all pictures registered in all reference lists are checked against the current encoding. It is determined whether the POC is smaller than the POC of the target picture (S4251). POC of all pictures registered in L0 and L1, which are all reference lists of b If LX is smaller than the POC of the current picture to be coded (YES in S4251), L0, that is, the predicted vector candidate of the motion vector of L0 of the coding block to be coded is derived. If yes (YES in S4252), inter prediction for L0 of the coding block colCb is performed. LX is the predicted motion vector of L1 of the coding block to be coded. If the measurement vector candidate is derived (NO in S4252), the L1 On the other hand, the inter prediction information of the coding block colCb is selected. At least one of the POCs of the pictures registered in L0 and L1 is the current picture to be coded. If the POC is larger than the current one (NO in S4251), the flag collocated_from_l0_fla If g is 0 (YES in S4253), inter prediction information for L0 of the coding block colCb If the flag collocated_from_l0_flag is 1 (NO in S4253), The inter prediction information for L1 of the locked colCb is selected.

[0192] When selecting inter prediction information for L0 of coding block colCb (Y in S4252) ES, YES in S4253), the motion vector mvCol is set to the same value as MvL0[xPCol][yPCol] (S4254), and the reference index refIdxCol becomes the same value as RefIdxL0[xPCol][yPCol]. The list ListCol is set to L0 (S4256).

[0193] When selecting inter prediction information for L1 of coding block colCb (N in S4252) (NO in S4253), the motion vector mvCol is set to the same value as MvL1[xPCol][yPCol]. (S4257), the reference index refIdxCol is set to the same value as RefIdxL1[xPCol][yPCol]. (S4258), and the list ListCol is set to L1 (S4259).

[0194] Returning to Figure 53, once the inter prediction information is obtained from the coding block colCb, the flag ava Both ilableFlagLXCol and flag predFlagLXCol are set to 1 (S4244).

[0195] Next, the motion vector mvCol is scaled to obtain a motion vector mvLXCol (S42 45S4245). The scaling calculation procedure for this motion vector mvLXCol is shown in Figure 55. and explain.

[0196] The POC of the picture colPic at different times is referenced by a list ListCol of coding blocks colCb. The POC of the reference picture corresponding to the reference index refIdxCol is subtracted to obtain the picture. The distance td between the two pictures is calculated (S4261). If the POC of the reference picture referenced in the list ListCol of block colCb comes before the POC of the reference picture in the display order, In this case, the inter-picture distance td is a positive value, and the coding block is closer to the picture colPic at a different time. If the POC of the reference picture referenced in the list ListCol of the check colCb is later in the display order, The inter-picture distance td is a negative value. td = POC of pictures colPic at different times - ListCol of coding blocks colCb POC of the reference picture to be referenced in The list LX of pictures currently to be coded is referenced from the POC of the picture currently to be coded. The POC of the reference picture is subtracted from the POC of the reference picture to calculate the inter-picture distance tb (S4262). The list LX of the picture to be coded is referred to rather than the picture to be coded. If the reference picture is earlier in display order, the inter-picture distance tb is a positive value, and the current code If the reference picture in the list of pictures to be coded LX is later in display order, The inter-cha distance tb is a negative value. tb = POC of current picture to be coded / decoded - LX reference image of temporal merge candidate POC of the reference picture corresponding to the index Next, the inter-picture distances td and tb are compared (S4263). If b is equal (YES in S4263), the motion vector mvLXCol is calculated using the following formula ( S4264), this scaling calculation process ends. mvLXCol = mvCol On the other hand, if the inter-picture distances td and tb are not equal (NO in S4263), then The variable tx is calculated (S4265). tx = ( 16384 + Abs( td ) >> 1 ) / td Next, the scaling coefficient distScaleFactor is calculated using the following equation (S4266). distScaleFactor = Clip3( -4096, 4095, ( tb * tx + 32 ) >> 6 ) Here, Clip3(x, y, z) is a function that limits the minimum value to x and the maximum value to y for the value z. Next, the motion vector mvLXCol is calculated by the following formula (S4267), and this scaling calculation is performed. The calculation process ends. mvLXCol = Clip3( -32768, 32767, Sign( distScaleFactor * mvLXCol ) * ( (Abs( distScaleFactor * mvLXCol ) + 127 ) >> 8 ) ) Here, Sign(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. do.

[0197] Again, refer to FIG. 50. Then, the motion vector mvL0Col of L0 is calculated by the normal prediction motion vector mvL0Col. The motion vector prediction candidate list mvpListLXN in the motion vector mode derivation unit 301 is a candidate. However, this addition is performed for the coded block colCb of the reference list 0. This is only possible when the flag availableFlagL0Col=1 indicates whether the L1 motion vector is available. The vector mvL1Col is calculated by the predicted motion vector mode derivation unit 301. The candidate is added to the list of candidates mvpListLXN (S4205). Flag indicating whether the coding block colCb of reference list 1 is valid or not: availableFlagL1Col=1 This is the only step. The process of the temporal motion vector predictor candidate derivation unit 322 is then completed.

[0198] The above description of the normal predicted motion vector mode derivation unit 301 is for the encoding process. That is, in the normal predicted motion vector mode derivation unit 401 in FIG. The operation of the temporal motion vector predictor candidate derivation unit 422 in this case is the same as that of the encoding in the above description. and is explained in the same way.

[0199] <Time Merge> The operation of the temporal merge candidate derivation unit 342 in the normal merge mode derivation unit 302 in FIG. This will be described with reference to FIG.

[0200] First, ColPic is derived (step S4301). Next, the coding block colCb is derived. Then, the encoding information is acquired (step S4302). The above process derives the temporal prediction motion vector. Since these steps are the same as steps S4201 to S4204 in the rule candidate derivation unit 322, their explanations will be omitted. do.

[0201] Next, a flag availableFlagCol indicating whether the coding block colCb is valid or not is calculated ( S4305). If the flag availableFlagL0Col or the flag availableFlagL1Col is 1 availableFlagCol will be 1 otherwise availableFlagCol will be 0.

[0202] Then, the motion vector mvL0Col of L0 and the motion vector mvL1Col of L1 are calculated by the normal motion vector calculation method described above. The merge candidate list mergeCandList in the page mode derivation unit 302 is added as a candidate. (S4306). However, this addition is performed by setting a flag a indicating whether the coding block colCb is valid or not. This is only the case when validFlagCol=1. Finish.

[0203] The above explanation of the temporal merge candidate derivation unit 342 is for the encoding process, but the same applies to the decoding process. That is, the temporal merge candidate derivation in the normal merge mode derivation unit 402 in FIG. The operation of unit 442 is similarly described, substituting decoding for encoding in the above description.

[0204] <Update of historical motion vector predictor candidate list> Next, the encoding information storage memory 111 on the encoding side and the encoding information storage memory 20 on the decoding side are 5.5, we will explain in detail how to update the history predicted motion vector candidate list HmvpCandList. FIG. 38 is a flowchart illustrating the procedure for deriving a historical motion vector predictor candidate. .

[0205] In this embodiment, the historical motion vector predictor candidate list HmvpCandList is updated based on the coding information. This is implemented in the information storage memory 111 and the coded information storage memory 205. A history candidate list update unit is provided in the prediction unit 102 and the inter-prediction unit 203 to perform history prediction. The motion vector candidate list HmvpCandList may be updated.

[0206] At the beginning of the slice, the historical motion vector prediction candidate list HmvpCandList is initialized. On the encoding side, a prediction method determination unit 106 selects the normal predicted vector mode or the normal merge mode. When the selected motion vector is selected, the history predicted motion vector candidate list HmvpCandList is updated. The inter prediction mode decoded by the bit sequence decoding unit 201 is a normal prediction vector mode or a normal In the normal merge mode, the historical motion vector predictor candidate list HmvpCandList is updated. Inter prediction vector used when performing inter prediction in prediction vector mode or normal merge mode. The measurement information is registered as the inter-prediction information candidate hMvpCand, and the encoding information storage memory on the encoding side is The history predicted motion vector candidate list provided in the coded information storage memory 205 on the decoding side is also stored. Among the inter prediction information registered in the HmvpCandList, there is If there is an inter-prediction motion vector with the same value as the information candidate hMvpCand, the history prediction motion vector candidate list is The element (inter prediction information) is deleted from the HmvpCandList, and the inter prediction information to be registered is If there is no inter-prediction with the same value as the information candidate hMvpCand, the historical predicted motion vector candidate The first element (inter prediction information) of the list HmvpCandList is deleted, and the history prediction motion vector Add the inter prediction information candidate hMvpCand to be registered at the end of the candidate list HmvpCandList. .

[0207] The encoding information storage memory 111 on the encoding side and the encoding information storage memory 2 on the decoding side according to the present invention The number of elements in the historical motion vector predictor candidate list HmvpCandList for 05 is six.

[0208] First, the historical motion vector predictor candidate list HmvpCandList is initialized for each slice. At the beginning of the slice, all elements of the history predicted motion vector candidate list HmvpCandList are assigned a history A motion vector predictor candidate is added and registered in the historical motion vector predictor candidate list HmvpCandList. The value of the number of historical motion vector predictor candidates NumHmvpCand that have been stored is set to 6 (step in FIG. 38). P2101).

[0209] Here, the historical motion vector predictor candidate list HmvpCandList is initialized in slice units (slices). It was originally intended to be performed on the first coding block of a picture, but it can also be performed on a picture-by-picture, tile-by-tile or tree-by-tree basis. - It can also be performed on a block row basis.

[0210] Figure 62 shows the history of motion vector prediction candidates added by initializing the list HmvpCandList. 10 is a table showing an example of candidate historical motion vectors. An example is shown in which the number of images is 4. The number of motion vector candidates varies from NumHmvpCand-1 to 0 depending on the slice type. The inter prediction information with a value of (0, 0) is used as a history prediction motion vector candidate. Add the motion vector prediction candidate list HmvpCandList to the motion vector candidate list HmvpCandList and use the history candidate list At this time, the history predicted motion vector index is set to (history predicted motion vector candidate The reference index refIdxLX (X is 0 or 1) starts from 0 and Set the value incremented by 1 up to (number of reference pictures numRefIdx-1). Then allows overlapping of history motion vector predictor candidates, and sets the value of 0 to refIdxLX. All values ​​are set in the number of historical motion vector predictor candidates NumHmvpCand, and the historical motion vector predictor By setting the value of NumHmvpCand, the number of motion vector predictor candidates, to a fixed value, invalid historical motion vector predictor candidates can be eliminated. In this way, the probability of adding a motion vector predictor candidate list or a merge candidate list is Generally, candidates with high historical predicted motion vector indexes are selected from candidates with high selection rates. By assigning a small reference index, coding efficiency can be improved. .

[0211] In addition, the list of motion vector prediction candidates is updated in units of slices. By filling the number of historical motion vector predictor candidates, the number of historical motion vector predictor candidates can be treated as a fixed value. Therefore, for example, the process of deriving a history predicted motion vector candidate and the process of deriving a history merge candidate can be simplified. This can be done.

[0212] Here, the value of the motion vector is set to (0, 0), which generally has a high selection probability. For example, the differential motion vector can be coded using values ​​such as (4,4), (0,32), and (-128,0). Alternatively, multiple predetermined values ​​may be set to improve the coding efficiency of the differential motion vector. That's fine.

[0213] Also, the history predicted motion vector index (the number of history predicted motion vector candidates NumHmvpC and -1), and the reference index refIdxLX (X is 0 or 1) starts from 0 (reference picture The number of objects (numRefIdx-1) is incremented by 1, but the historical forecast behavior is Vector indices may start from 0.

[0214] Figure 63 shows the history of motion vector prediction candidates added by initializing the list HmvpCandList. 10 is a table showing another example of candidate historical motion vector predictors. In this example, the number of reference pictures is two. The reference index is set so that there is no overlap between the historical motion vector predictor candidates in each element of pCandList. Inter prediction information with different values ​​of either the column or the motion vector is used as a historical prediction motion vector. The motion vector prediction candidate list is filled with the historical prediction candidate. The predicted motion vector index is calculated from the number of historical predicted motion vector candidates NumHmvpCand-1. The reference index refIdxLX (X is 0 or 1) starts from 0 and increases by the number of reference pictures numRefI dx-1), and then set the value incremented by 1. After that, refIdxLX is set to 0. The motion vector of the value is added as a historical predicted motion vector candidate. Set all values ​​in the number of complements NumHmvpCand and set the number of history motion vector predictor candidates NumHmvpCand By setting the value to a fixed value, invalid historical motion vector predictor candidates are eliminated.

[0215] In this way, the list of candidate predicted motion vectors is created for each slice, and the candidate predicted motion vectors are stored in the list of candidate predicted motion vectors without overlapping. By filling the vector candidates, the coding block can be further coded as described below. The merge candidate derivation unit 345 in the regular merge mode derivation unit 302 determines the merge candidate after the history merge candidate derivation unit 345. The processing of the filling section 346 can be omitted, and the amount of processing can be reduced.

[0216] Here, the values ​​of the motion vectors are set to small values ​​such as (0, 0) and (1, 0). If there is no overlap between the motion vector candidates, the value of the motion vector may be increased.

[0217] Also, the history predicted motion vector index (the number of history predicted motion vector candidates NumHmvpC and -1), and the reference index refIdxLX (X is 0 or 1) starts from 0 (reference picture The number of objects (numRefIdx-1) is incremented by 1, but the historical forecast behavior is Vector indices may start from 0.

[0218] Figure 64 shows the history of motion vector prediction candidates added by initializing the list HmvpCandList. 10 is a table showing another example of historical motion vector predictor candidates.

[0219] An example in which the slice type is a B slice is shown. In this example, the history of motion vector predictor candidates The reference is made so that there is no overlap between the historical motion vector predictor candidates in each element of the list HmvpCandList. If the index is 0, the inter prediction information with different motion vector values ​​is used as the historical prediction motion vector. The motion vector prediction candidate list is filled with the historical prediction candidate. The predicted motion vector index is calculated from the number of historical predicted motion vector candidates NumHmvpCand-1. The reference index refIdxLX (X is 0 or 1) is set to 0. All values ​​are set in the number of motion vector predictor candidates NumHmvpCand, and the number of historical motion vector predictor candidates NumHmvpCa By setting the value of nd to a fixed value, invalid historical motion vector predictor candidates are eliminated.

[0220] In this way, by setting the reference index to 0, the number of reference pictures is also taken into consideration. Since initialization can be performed without any need for manual setup, processing can be simplified.

[0221] Here, the value of the motion vector is a multiple of 2. However, if the reference index is 0 and the historical prediction motion vector is Other values ​​may be used as long as there is no overlap between the vector candidates.

[0222] Also, the history predicted motion vector index (the number of history predicted motion vector candidates NumHmvpC and -1), and the reference index refIdxLX (X is 0 or 1) starts from 0 (reference picture The number of objects (numRefIdx-1) is incremented by 1, but the historical forecast behavior is Vector indices may start from 0.

[0223] Next, for each coding block in the slice, the following historical motion vector predictor candidate list Hmvp The CandList update process is repeated (steps S2102 to S2111 in FIG. 38).

[0224] First, the initial setting is performed for each coding block. Set the value of identicalCandExist to FALSE (false) and set the index to be deleted, removeIdx, to 0. is set (step S2103 in FIG. 38).

[0225] Inter prediction information candidate hMvp to be registered in the history prediction motion vector candidate list HmvpCandList It is determined whether Cand exists (step S2104 in FIG. 38). When the determining unit 105 determines that the normal predicted motion vector mode or the normal merge mode is selected, Or, the bitstream decoding unit on the decoding side switches to the normal predicted motion vector mode or the normal merge mode. If the inter prediction mode is hMvpCand, the inter prediction mode is set to hMvpCand. The determining unit 105 determines whether the intra prediction mode, the sub-block prediction motion vector mode, or the sub-block prediction motion vector mode is an intra prediction mode. When the bitstream decoding unit on the decoding side determines that the bitstream is in intra prediction mode, mode, sub-block predicted motion vector mode or sub-block merge mode. If the motion vector prediction candidate list HmvpCandList is updated, the registered motion vector candidate list HmvpCandList is not updated. The inter prediction information candidate hMvpCand does not exist. If nd does not exist, steps S2105 to S2110 are skipped (steps S2105 to S2110 in FIG. 38). If there is an inter prediction information candidate hMvpCand to be registered, The process from step S2105 onwards is carried out (YES in step S2104 in FIG. 38).

[0226] Next, the input to be registered is added to each element of the history motion vector predictor candidate list HmvpCandList. It is determined whether or not there is an element identical to the target prediction information candidate hMvpCand (step S2105). Figure 39 is a flowchart of this identical element confirmation process. If the value of the number of vector candidates NumHmvpCand is 0 (NO in step S2121 of FIG. 39), The historical motion vector predictor candidate list HmvpCandList is empty and there are no identical candidates. Steps S2122 to S2125 are skipped and the same element confirmation process ends. When the value of the number of historical motion vector predictor candidates NumHmvpCand is greater than 0 (step S2 in FIG. 39), 121 YES), the historical predicted motion vector index hMvpIdx is between 0 and NumHmvpCand-1. Then, the processes of steps S2122 to S2125 are repeated (steps S2121 to S2125 in FIG. 39). S2125). First, the hMvpIdx-th element in the historical motion vector predictor candidate list, counting from 0, is Compare whether the element HmvpCandList[MvpIdx] is the same as the inter-prediction information candidate hMvpCand (see Figure 1). If they are the same (YES in step S2123 of FIG. 39), Set the value of TRUE to the flag identicalCandExist, which indicates whether a candidate exists. Set the value of hMVpIndex to the deletion target index removeIdx and end this identical element confirmation process. If they are not identical (NO in step S2123 of FIG. 39), increment hMvpIdx by 1. (Steps S2121 and S2125 in FIG. 39), and then perform the processing from step S2123 onwards. cormorant.

[0227] Here, the historical motion vector predictor candidate list is filled with historical motion vector predictor candidates. As a result, step S2121 in FIG. 39 can be omitted.

[0228] Returning to the flowchart of FIG. 38 again, the historical predicted motion vector candidate list HmvpCandList The element shift and addition process is performed (step S2106 in FIG. 38). Element shift / addition processing of the history predicted motion vector candidate list HmvpCandList in step S2106 First, the historical motion vector predictor candidate list HmvpCandList is Either remove the stored elements and then add the new elements, or add the new elements without removing any elements. Specifically, the flag "identicalCandE" indicates whether or not an identical candidate exists. Compare with xist to see if it is TRUE or NumHmvpCand is 6 (step S2 in FIG. 40). 141). The flag identicalCandExist, which indicates whether an identical candidate exists, is set to TRUE. Or, if NumHmvpCand satisfies any of the conditions of 6 (Y in step S2141 of FIG. 40), ES), excluding the elements stored in the history motion vector predictor candidate list HmvpCandList Add a new element from the list. Set the initial value of index i to the value of removeIdx + 1. The element shift process in step S2143 is repeated from the initial value to NumHmvpCand (see FIG. 4). Steps S2142 to S2144 of step 0. HMVPCandList[i - 1] is set to HMVPCandList[i] Shift the elements forward by copying the elements of i (step S2143 in FIG. 40), and Increment by 1 (steps S2142 and S2145 in FIG. 40). The (NumHmvpCand-1)th HMVPCandList, counting from 0, corresponds to the end of the motion vector candidate list. The inter prediction information candidate hMvpCand is added to t[NumHmvpCand-1] (step S214 in FIG. 40). 5) Finish the element shift and addition process of this historical predicted motion vector candidate list HMVPCandList. On the other hand, if the flag identicalCandExist indicating whether an identical candidate exists is set to TRUE, and NumHmvpCand does not satisfy any of the conditions of 6 (step S2141 in FIG. 40). NO), without excluding elements stored in the history motion vector predictor candidate list HmvpCandList Add a new element. Counting from 0, which corresponds to the end of the history motion vector predictor candidate list, Add the inter prediction information candidate hMvpCand to the (NumHmvpCand-1)th HMVPCandList[NumHmvpCand]. Then, NumHmvpCand is incremented by 1 (step S2145 in FIG. 40), and this history prediction The element shift and addition process for the measured motion vector candidate list HMVPCandList is completed.

[0229] Here, the history predicted motion vector candidate list is used in the predicted motion vector mode and merge mode. It shall apply to both, but may apply to only one of them.

[0230] As described above, in updating the history predicted motion vector candidate list, the history predicted motion vector This is because the same elements stored in the list of candidates are removed before adding new elements. , there are no overlapping elements in the history predicted motion vector candidate list, and the history predicted motion vector candidate The complement list consists of all different elements.

[0231] <Historical motion vector predictor candidate derivation process> Next, the history of predicted motion vector candidates in the normal predicted motion vector mode derivation unit 301 on the encoding side is The prediction motion vector mode derivation unit 323 and the normal prediction motion vector mode derivation unit 401 on the decoding side The processing procedure of step S304 in FIG. 20, which is common processing in the driver candidate derivation unit 423, is Method for deriving historical predicted motion vector candidates from historical predicted motion vector candidate list HMVPCandList FIG. 41 is a flowchart illustrating the procedure for deriving a historical motion vector predictor candidate. This is a flow chart.

[0232] The current number of motion vector predictor candidates, numCurrMvpCand, is the maximum number of motion vector predictor candidates in the list. The number of elements (here, 2) or more, or the number of history motion vector predictor candidates is 0. In this case (NO in step S2201 in FIG. 41), steps S2202 to S220 8 is omitted, and the procedure for deriving historical motion vector predictor candidates is completed. is smaller than 2, which is the maximum number of elements in the motion vector predictor candidate list (step If the answer is YES in S2201, the process proceeds to steps S2202 to S2208 in FIG.

[0233] Next, the index i ranges from 1 to the smaller of 4 and NumHmvpCand, as shown in Figure 41. The processes of steps S2203 to S2207 are repeated (steps S2202 to S2207 in FIG. 41). S2208). numCurrMvpCand is 2 or more, which is the maximum number of elements in the motion vector predictor candidate list. In this case (NO in step S2203 in FIG. 41), steps S2204 to S22 The process of step 08 is omitted, and the procedure for deriving the historical motion vector predictor candidate is completed. When Cand is smaller than 2, which is the maximum number of elements in the motion vector predictor candidate list (steps in FIG. 41), If the answer is YES in step S2203, the process proceeds to step S2204 and subsequent steps in FIG.

[0234] Next, the process from step S2205 to S2206 is performed when the variable Y is 0 and 1 (L0 and L1 ) (Steps S2204 to S2207 in FIG. 41). is equal to or greater than 2, which is the maximum number of elements in the motion vector predictor candidate list (step S2 in FIG. 41). 41. If NO in step S2205, the process from step S2206 to step S2208 in FIG. 41 is omitted, and the history forecast is The procedure for deriving predicted motion vector candidates is completed. If the number of elements is smaller than 2, which is the maximum number of elements in the list (YES in step S2205 in FIG. 41), 41, the processing from step S2206 onwards is carried out.

[0235] Next, the numCurrMvpCand-th candidate motion vector in the LY prediction candidate list is The element mvpListLY[numCurrMvpCand ] contains the historical predicted motion vector candidate HmvpCandList[NumHmvpCand - i] LY motion vector is added and numCurrMvpCand is incremented by 1 (see Figure 41). Step S2206).

[0236] The above processing from step S2205 to S2206 in Figure 41 is performed on both L0 and L1. (Steps S2204 to S2207 in FIG. 41).

[0237] The index i is incremented by 1 (steps S2202 and S2208 in FIG. 41). If the index i is equal to or smaller than 4 or NumHmvpCand, step S22 is performed again. The process from step 03 onwards is carried out (steps S2202 to S2208 in FIG. 41).

[0238] In this embodiment, as described above, in the historical motion vector predictor candidate derivation process, , the motion vectors of the elements of the history predicted motion vector candidate list and the predicted motion vector candidate list element of the history predicted motion vector candidate list without comparing it with the motion vector of the element of The motion vector of is added to the motion vector predictor candidate list.

[0239] By adopting such a configuration, if the number of historical motion vector predictor candidates is two or more, After the candidate derivation process for the history motion vector predictor candidate list is completed, the motion vector predictor candidate list is It is possible to guarantee that the maximum number of elements is reached. This allows the amount of processing and the circuit scale required to check whether the signal is correct or not to be reduced.

[0240] In the normal motion vector predictor mode, the motion vector predictor included in the motion vector predictor candidate list is used. This mode determines the motion information of the target block based on the motion vector and the difference vector. Since there is a possibility that an appropriate motion vector can be determined by the difference vector, it is necessary to use the predicted motion vector. Even if elements in the vector candidate list overlap, the code Therefore, the decrease in the conversion efficiency can be minimized.

[0241] In addition, the normal predicted motion vector mode uses the predicted motion vector candidate list as the L0 prediction and the L1 prediction. Therefore, the elements in the candidate motion vector predictor list for L0 prediction are overlapped. Even if the motion vector candidate list for L1 prediction overlaps, the elements are not overlapped. There are also cases where this is the case.

[0242] In addition, the normal motion vector predictor mode uses the motion vector predictor candidate and the reference index separately. Therefore, in the motion vector predictor candidate list, elements may overlap. does not affect the reference index.

[0243] In addition, the motion vector predictor candidate list contains at most two elements, so the predicted motion vector Even if elements in the motion vector candidate list overlap, the number of choices is reduced. There is only 1.

[0244] In addition, since the historical predicted motion vector candidate list does not contain the same elements, the historical predicted motion vector candidate list The comparison of elements of the motion vector predictor candidate list with elements of the motion vector predictor candidate list is essentially meaningful. The spatial prediction motion vector candidate derivation unit 421 and the temporal prediction motion vector candidate derivation unit 422 have the following characteristics. Only when only one element of the motion vector predictor candidate list is generated in unit 422, In addition, the normal predicted motion vector mode is generally selected. The motion vectors are used when the motion of the adjacent blocks is not similar. The elements of the candidate list may overlap with elements already added to the motion vector predictor candidate list. The possibility is low.

[0245] For the above reasons, even if elements of the motion vector predictor candidate list overlap, The proposed method minimizes the degradation of coding efficiency due to the reduction of the number of candidates for the motion vector prediction. This reduces the amount of processing required to compare the motion vectors of the motion vector predictor candidates with the corresponding motion vectors of the corresponding input motion vectors.

[0246] In addition, the list of historical motion vector predictor candidates is filled with non-overlapping historical motion vector predictor candidates. Then, the elements of the history motion vector predictor candidate list and the elements of the motion vector predictor candidate list are The elements of the history motion vector predictor candidate list are treated as motion vector predictor candidates without being compared with the By adding the motion vector to the supplementary list, the history prediction in the normal prediction motion vector mode derivation unit 301 is The processing of the predicted motion vector supplementing unit 325 subsequent to the motion vector candidate derivation unit 323 is omitted. It is possible.

[0247] <History merge candidate derivation process> Next, the history merge candidate derivation unit 345 of the normal merge mode derivation unit 302 on the encoding side, This is a common process between the normal merge mode derivation unit 401 and the history merge candidate derivation unit 423. 20, which is the processing procedure of step S304 of the historical predicted motion vector candidate list HmvpCandList The method for deriving history merge candidates from the above is explained in detail. 10 is a flowchart illustrating a processing procedure.

[0248] First, initialization is performed (step S2301 in FIG. 42). Set the value of FALSE for each (rrMergeCand -1)th element and set the variable numOrigMergeCand to the current Set numCurrMergeCand to the number of elements currently in the merge candidate list.

[0249] Next, the elements in the history predicted motion vector candidate list that are included in the merge candidate list are Add the elements that are not included in the list of merge candidates to the list of merge candidates. The initial value of the index hMvpIdx is set to 1, and this initial value is added. From the initial value to NumHmvpCand-1, steps S2303 to S2328 in FIG. 42 The addition process is repeated (steps S2302 to S2329 in FIG. 42). The number of elements registered in the list, numCurrMergeCand (maximum number of merge candidates, MaxNumMergeCand -1), all elements in the merge candidate list have been added as merge candidates. This history merge candidate derivation process ends (NO in step S2303 in FIG. 42). The number of elements registered in the merge candidate list, numCurrMergeCand, is (maximum number of merge candidates, MaxNumM If sameMotion is FALSE (false), the process from step S2304 onwards is carried out. ) is set (step S2304 in FIG. 42). Then, the initial value of index i is set to 0. , and the process proceeds from this initial value to numOrigMergeCand-1 in steps S2306 and S23 42. The process of step 07 is performed (S2305 to S2308 in FIG. 42). Counting from 0, the (NumHmvpCand - hMvpIdx)th element of the list is HmvpCandList[NumHmvpCand- hMvpI dx] is the same as the i-th element of the merge candidate list, counting from 0, mergeCandList[i]. The same value of a merge candidate is a value that the merge candidate has. If all components (inter prediction mode, reference index, motion vector) have the same value, If the merge candidates have the same value (YES in step S2306 of FIG. 39), , sameMotion and isPruned[i] are both set to TRUE (step S230 in FIG. 42). 7) If the values ​​are not the same (NO in step S2306 in FIG. 39), The process is skipped. Steps S2305 to S2308 in FIG. When the process is completed, it compares whether sameMotion is FALSE (step S2 in FIG. 42). 309), if sameMotion is FALSE (YES in step S2309 of FIG. 42), That is, the (NumHmvpCand - hMvpIdx)th candidate in the history motion vector predictor list, counting from 0. The element HmvpCandList[NumHmvpCand - hMvpIdx] does not exist in mergeCandList, so merge The historical predicted movement in the numCurrMergeCand-th mergeCandList[numCurrMergeCand] of the candidate list Counting from 0, the (NumHmvpCand - hMvpIdx)th element of the vector candidate list is HmvpCandList[Nu mHmvpCand - hMvpIdx] and increment numCurrMergeCand by 1 (see step in Figure 42). The index hMvpIdx is incremented by 1 (step S2310 in FIG. 42). 2302), the process of steps S2302 to S2311 in FIG. 42 is repeated.

[0250] When all elements in the history motion vector prediction candidate list have been checked, or the merge candidate list Once merge candidates have been added to all elements of the record, the process of deriving merge candidates for this history is complete. . In this embodiment, as described above, in the history merge candidate derivation process, the history prediction behavior Compares the elements of the merge vector candidate list with the elements of the current merge candidate list, and Only elements of the historical motion vector predictor candidate list that are not present in the merge candidate list are added to the merge candidate list. Add it to the list. Unlike the normal predicted motion vector mode, the normal merge mode is processed without using a differential vector. Since this mode directly determines the motion information of the target block, the current merge candidate list By prohibiting the addition of elements in the history merge candidate list that overlap with elements in Here, the elements of the history motion vector predictor candidate list and the current Although we have compared all candidates in the merge candidate list, we must consider at least the historical predicted motion vectors. Compare elements of the merge candidate list with elements of the current merge candidate list to improve coding efficiency. However, the present invention is not limited to this, as long as it can be implemented. For example, even if the number of elements in the history motion vector predictor candidate list to be compared is limited to 1 or 2, You can also limit the number of elements in the current merge candidate list to be compared to one or two. In normal merge mode, the merge candidate list contains the motion vectors of the L0 prediction and the L1 prediction. Therefore, as in the normal predicted motion vector mode, The predicted motion vectors for L0 prediction and L1 prediction cannot be adjusted separately. stomach. In addition, in normal merge mode, the merge candidate list contains the reference index of the L0 prediction and the L1 prediction. Therefore, it is not possible to use the predicted motion vector mode. In addition, the reference index for L0 prediction and the reference index for L1 prediction can be adjusted separately. I can't. In addition, the merge candidate list contains up to six elements, which is more than the predicted motion vector candidate list. Therefore, if you add a duplicate element to the merge candidate list, This increases the number of duplicate elements and makes it difficult to efficiently utilize the merge candidate list. In addition, the elements of the history predicted motion vector candidate list added to the merge candidate list are It is the element added most recently in the list of candidate motion vectors. The elements of the history motion vector predictor candidate list added to the image candidate list are This is the motion information that is spatially closest to the block. Generally, the normal merge mode is selected. The reason is that the motion of the adjacent block is similar, and the history motion vector candidate is The elements of the list are more likely to overlap with elements already added to the merge candidate list. . To address the above issues, we propose a method to reduce the number of merge candidate list elements and overlapping historical prediction motion vectors. By prohibiting the addition of elements to the list of candidate elements and increasing the number of valid choices, This can improve the efficiency of the process.

[0251] In addition, the maximum number of elements that can be included in the merge candidate list is set to 6. By increasing the number of elements in the candidate list beyond 2, the normal By increasing the probability of selecting the page mode, the overlap of elements in the motion vector predictor candidate list is reduced. The motion vectors of the history motion vector predictor candidates and the predicted motion vectors are compared while suppressing the degradation of coding efficiency. The number of comparison processes for motion vectors of vector candidates can be reduced. In addition to spatial merge candidates, we also provide temporal merge candidates, historical merge candidates, average merge candidates, and zero merge candidates. By including a variety of merge candidates, such as the normal merge candidates, the probability of selecting the normal merge mode can be increased. This prevents a decrease in coding efficiency due to overlapping elements in the motion vector predictor candidate list. , the ratio of the motion vector of the history motion vector predictor candidate to the motion vector of the motion vector predictor candidate The comparison process can be reduced.

[0252] <Sub-block temporal merge candidate derivation> Sub-block temporal merge candidates in the sub-block merge mode derivation unit 304 in FIG. 16 The operation of the derivation unit 381 will be described with reference to FIG.

[0253] First, it is determined whether the coding block is smaller than 8x8 pixels (S4002).

[0254] If the coding block is smaller than 8x8 pixels (S4002: Yes), the sub-block temporal merge candidate The flag indicating the existence of a complement is set to availableFlagSbCol=0 (S4003), and The process of the merge candidate derivation unit is completed. When torque prediction is disabled or when sub-block time merging is disabled In this case, the same processing as when the coding block is smaller than 8x8 pixels (S4002: Yes) is performed.

[0255] On the other hand, if the coding block is 8x8 pixels or larger (S4002: No), Next, neighboring motion information of the coding block to be coded is derived (S4004).

[0256] The process of deriving adjacent motion information of a coding block will be described with reference to FIG. The process of deriving adjacent motion information is similar to the process of the spatial motion vector predictor candidate derivation unit 321 described above. However, the order of searching adjacent blocks is A0, B0, B1, A1, and B2 is not searched. First, the coding information is acquired for the adjacent block n=A0 (S4052). The information includes a flag, availableFlagN, indicating whether adjacent blocks are available, and a reference list. and the motion vector mvLXN.

[0257] Next, it is determined whether adjacent block n is valid or invalid (S4054). If the flag indicating whether or not the data is available is "availableFlagN=1", the data is valid; otherwise, the data is invalid.

[0258] If the adjacent block n is valid (S4054: Yes), the reference index refIdxLXN is set to the adjacent The reference index of the adjacent block n is set to refIdxLXn (S4056). LXN is set as the motion vector mvLXn of the adjacent block n (S4056), The process of deriving information is completed.

[0259] On the other hand, if the adjacent block n is invalid (S4106: No), the adjacent block n is set to B0 and the code is The same process is repeated to loop through B1 and A1 in this order. The process of deriving neighboring motion information loops until the neighboring blocks are valid, and all neighbors are If the adjacent blocks A0, B0, B1, and A1 are invalid, the process of deriving the adjacent motion information of the blocks is terminated. do.

[0260] Referring again to FIG. 44, after the adjacent motion information is derived (S4004), the temporal motion A vector is derived (S4006).

[0261] The process of deriving a temporal motion vector will be described with reference to FIG. The temporal motion vector is initialized as tempMv=(0,0) (S4062).

[0262] Next, it is determined whether the adjacent motion information is valid or invalid (S4064). If the flag indicating whether the neighboring movement is available is "availableFlagN=1", it is valid, otherwise it is invalid. If the information is invalid (S4064: No), the process of deriving the temporal motion vector is terminated. do.

[0263] On the other hand, if the neighboring motion information is valid (S4064: Yes), L1 prediction is performed on the neighboring block N. It is determined whether the flag predFlagL1N indicating whether or not the p is being used is 1 (S4066). If redFlagL1N=0 (S4066: No), proceed to the next process (S4078). If (S4066: Yes), the P of all pictures registered in all reference lists It is determined whether the OC is equal to or less than the POC of the current picture to be coded (S4068). If the determination is true (S4068: Yes), the process proceeds to the next step (S4070).

[0264] If the slice type slice_type is a B slice and the flag collocated_from_l0_flag is 0, If (S4070: Yes and S4072: Yes), ColPic and reference picture RefPicList1[refIdx L1N] (pictures with reference index refIdxL1N in reference list L1) are the same. If this determination is true (S4074: Yes), the temporal motion vector t empMv=mvL1N (S4076). If this determination is false (S4074: No), the next process (S4 078) If the slice type slice_type is not a B slice and the flag collocated_from If m_l0_flag is not 0 (S4070: No or S4072: No), the next process (S40 Go to 78).

[0265] A flag predFlagL0N indicates whether L0 prediction is used in the neighboring block N. It is determined whether predFlagL0N is 1 (S4078). If predFlagL0N=1 (S4078: Yes), ColPi c and the reference picture RefPicList0[refIdxL0N] (reference index refIdxL0N of reference list L0) If this determination is true (S4080), :Yes), and the temporal motion vector tempMv=mvL0N (S4082). If so (S4080: No), the process of deriving the temporal motion vector ends.

[0266] Again, refer to FIG. 44. Next, ColPic is derived (S4016). This process is performed in the time Since this is the same as S4201 in the motion vector predictor candidate derivation unit 322, the explanation will be omitted. do.

[0267] Then, a coding block colCb for a different time is set (S4017). The block in the picture ColPic at the same time as the coding block to be processed is located at the bottom right of the center. The coding block is set as colCb. This coding block is the code shown in Figure 49. This corresponds to encryption block T1.

[0268] Next, the position where the temporal motion vector tempMv is added to the coding block colCb is The upper left position of the coding block colCb is (xColCb, yColCb) (S4018). If the temporal motion vector tempMv is (tempMv[0], tempMv[1]) with 1 / 16 pixel accuracy, The top left position of colCb is as follows: xColCb = Clip3( xCtb, xCtb + CtbSizeY + 3, xcolCb + ( tempMv[0] >> 4 ) ) yColCb = Clip3( yCtb, yCtb + CtbSizeY - 1, ycolCb + ( tempMv[1] >> 4 ) ) Here, the top left position of the treeblock is (xCtb, yCtb), and the size of the treeblock is CtbS. As shown in the above formula, the position after adding tempMv is significantly different from before adding tempMv. If this position is outside the screen, it is corrected to a range of about the size of the tree block. If this happens, the image will be corrected within the screen.

[0269] Then, the prediction mode PredMode of this coding block colCb is inter prediction (MODE_INTER If the prediction mode of colCb is not inter prediction (S4020), 4020: No), flag indicating the existence of sub-block time merge candidates availableFlagSbCol=0 (S4003), and the processing of the sub-block temporal merge candidate derivation unit is completed.

[0270] On the other hand, if the prediction mode of colCb is inter prediction (S4020: Yes), Here, for colCb, the inter prediction information is derived as follows (S4022, S4023). The central motion vector ctrMvLX for each reference list and a flag indicating whether LX prediction is used LX indicates the reference list, and in the derivation of reference list 0, LX is L0. In the derivation of reference list 1, LX becomes L1. This will be explained with reference to the following.

[0271] If the coding block colCb of a different time is not available (S4112: NO), or if the If the prediction mode PredMode is intra prediction (MODE_INTRA) (S4114: NO), the flag ava The ilableFlagLXCol and flag predFlagLXCol are both set to 0 (step S4116). mvCol is set to (0,0) (S4118), and the process of deriving inter prediction information is terminated. .

[0272] The coding block colCb is available (S4112: Yes) and the prediction mode PredMode is intra. If it is not prediction (MODE_INTRA) (S4114: YES), use the following procedure to set mvCol and refIdxCol. and calculate availableFlagCol.

[0273] Flag PredFlagLX[xP If [yPCol] is 1 (YES in S4120), the motion vector mvCol is the coding block col It is set to the same value as MvLX[xPCol][yPCol], the LX motion vector of Cb (S4122). The reference index refIdxCol is the same as the reference index RefIdxLX[xPCol][yPCol] of LX (S4124), and the list listCol is set to LX (S4126). , xPCol, yPCol are the upper left pixel of the coding block colCb in the picture colPic at different times. is an index indicating the position of

[0274] On the other hand, a flag PredFla indicating whether LX prediction of the coding block colCb is used If gLX[xPCol][yPCol] is 0 (NO in S4120), the following process is performed. First, all The POC of all pictures registered in the reference list is the same as that of the current picture to be coded. It is determined whether the result is below POC (S4128). And LY prediction of colCb is used. It is determined whether the flag PredFlagLY[xPCol][yPCol] indicating whether the current position is 1 or not (S4128). Here, LY prediction is defined as a reference list different from LX prediction. That is, when LX=L0, LY=L1, When LX=L1, LY=L0.

[0275] If this determination is true (S4128: Yes), the motion vector mvCol is The value is set to the same value as the LY motion vector MvLY[xPCol][yPCol] (S4130). The reference index refIdxCol is set to the same value as the reference index RefIdxLY[xPCol][yPCol] of LY. The list listCol is set to LX (S4134).

[0276] On the other hand, if this determination is false (S4128: No), the flag availableFlagLXCol and the flag pr edFlagLXCol are both set to 0 (step S4116), and the motion vector mvCol is set to (0,0). Then, the process of deriving inter prediction information is completed (S4118).

[0277] If inter prediction information can be obtained from the coding block colCb, the flag availableFlagLXCo Both l and flag predFlagLXCol are set to 1 (S4136).

[0278] Next, the motion vector mvCol is scaled to obtain a motion vector mvLXCol (S41 38). This process is the same as S4245 in the temporal motion vector predictor candidate derivation unit 322. Therefore, the description will be omitted.

[0279] Referring again to Figure 44, once the inter prediction information is derived for each reference list, the calculated The calculated motion vector mvLXCol is the center motion vector ctrMvLX, and the calculated flag predFlagLXCol is The flag is set to ctrPredFlagLX (S4022, S4023).

[0280] Then, it is determined whether the central motion vector is valid or invalid (S4024). If 0 and ctrPredFlagL1=0, it is invalid, otherwise it is invalid. If it is valid (S4024: No), the flag "available" indicates the existence of a sub-block temporal merge candidate. FlagSbCol is set to 0 (S4003), and the processing of the sub-block time merge candidate derivation part is completed. Complete.

[0281] On the other hand, if the central motion vector is valid (S4024: Yes), the sub-block temporal merge candidate The flag indicating the existence of a complement is set to availableFlagSbCol=1 (S4025), and the sub-block operation This process will be described with reference to FIG.

[0282] First, the number of sub-blocks in the width direction is calculated from the width cbWidth and height cBheight of the coding block colCb. numSbX and the number of sub-blocks in the height direction numSbY are calculated (S4152). LXSbCol=0 (S4152). After this process, the process is repeated in units of the prediction sub-block colSb. This iteration repeats the process of changing the height index ySbIdx from 0 to numSbY. Processing is performed while changing the width direction index xSbIdx from 0 to numSbX.

[0283] If the top left position of the coding block colCb is (xCb, yCb), then the left The top position (xSb, ySb) is calculated as follows: xSb = xCb + xSbIdx * sbWidth ySb = yCb + ySbIdx * sbHeight Next, the position where the temporal motion vector tempMv is added to the predicted sub-block colSb is The position of the top left corner of the predicted sub-block colSb is (xColSb, yColSb) (S4154). If the temporal motion vector tempMv is (tempMv[0], tempMv[1]) with 1 / 16 pixel accuracy, The top left position of colSb is as follows: xColSb = Clip3( xCtb, xCtb + CtbSizeY + 3, xSb + ( tempMv[0] >> 4 ) ) yColSb = Clip3( yCtb, yCtb + CtbSizeY - 1, ySb + ( tempMv[1] >> 4 ) ) Here, the top left position of the treeblock is (xCtb, yCtb), and the size of the treeblock is CtbS. As shown in the above formula, the position after adding tempMv is significantly different from before adding tempMv. If this position is outside the screen, it is corrected to a range of about the size of the tree block. If this happens, the image will be corrected within the screen.

[0284] Then, inter prediction information is derived for each reference list (S4156, S4158). Here, for the prediction sub-block colSb, the movement of each reference list in sub-block units is A vector mvLXSbCol and a flag availableFlagLXSbCo indicating whether the prediction sub-block is available or not LX indicates the reference list, and in the derivation of reference list 0, LX becomes L0, and the reference list In the derivation of step 1, LX becomes L1. The derivation of the inter prediction information is performed in steps S4022 and S4023 of FIG. 3, so the explanation is omitted.

[0285] After deriving the inter prediction information (S4156, S4158), the predicted sub-block colSb is valid. It is determined whether availableFlagL0SbCol=0 and availableFlagL1SbCol=0 (S4160). If colSb is invalid (S4160:No), it is determined that colSb is invalid, otherwise it is determined that colSb is valid. ), and the motion vector mvLXSbCol is set as the central motion vector ctrMvLX (S4162). A flag predFlagLXSbCol indicating whether LX prediction is used is set to the central motion vector. The flag ctrPredFlagLX is set as the sub-block motion information (S4162). Finish the derivation.

[0286] Again, refer to FIG. 44. Then, the motion vector mvL0SbCol of L0 and the motion vector mvL0SbCol of L1 are The tor mvL1SbCol is calculated as the sub-block merge mode in the sub-block merge mode derivation unit 304. The candidate is added to the merge candidate list subblockMergeCandList (S4028). This addition is made when the flag availableSbCol=1 indicates the existence of sub-block time merge candidates. This is the only step that is performed by the temporal merge candidate derivation unit 342.

[0287] The above description of the sub-block temporal merge candidate derivation unit 381 is for the encoding process. The same applies to decoding. The operation of the sub-block temporal merge candidate derivation unit 481 is the same as the decoding of the encoding in the above description. and is explained in the same way.

[0288] <Motion compensation prediction processing> The motion compensation prediction unit 306 predicts the current block being predicted during encoding. The motion compensation prediction unit 306 also obtains the inter prediction information. The inter prediction information is acquired from the inter prediction mode determination unit 305. The reference image is stored in the decoded image memory and the reference index is specified by the reference index. The reference picture is 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 at the position, a predicted signal is generated.

[0289] The reference mode for inter prediction is from a single reference picture, such as L0 prediction or L1 prediction. In the case of prediction, a prediction signal obtained from one reference picture is used as a motion compensation prediction signal, When the prediction mode is prediction from two reference pictures, such as BI prediction, The weighted average of the prediction signals obtained from the two reference pictures is used as the motion compensated prediction signal. The motion compensation prediction signal is then supplied to the prediction method determination unit. The ratio is set to 1:1, but other ratios may be used to perform weighted averaging. For example, The closer the picture interval between the picture and the reference picture, the higher the weighting ratio. The weighting ratio may be calculated based on the combination of picture intervals. This may be done using a correspondence table with weighting ratios.

[0290] 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 outputs the inter prediction information to the normal prediction motion vector mode derivation unit 401, A normal merge mode derivation unit 402, a sub-block predicted motion vector mode derivation unit 403, a sub-block predicted motion vector mode derivation unit 404, a sub-block predicted motion vector mode derivation unit 405, a sub-block predicted motion vector mode derivation unit 406, a sub-block predicted motion vector mode derivation unit 407, a sub-block predicted motion vector mode derivation unit 408, a sub-block predicted motion vector mode derivation unit The block merge mode is obtained from the block merge mode derivation unit 404 via the switch 408.

[0291] The motion compensation prediction unit 406 sends the obtained motion compensation prediction signal to the decoded image signal superimposing unit 207. Supply.

[0292] <About prediction direction> 57 to 61 are diagrams illustrating the prediction direction of motion compensation prediction. The process of predicting from the reference picture is defined as uni-prediction, and in the case of uni-prediction, either L0 prediction or L1 prediction is used. Prediction is a method of predicting a picture using one of two reference pictures registered in the reference list. Do the following.

[0293] FIG. 57 shows a uni-predictive coding example in which the L0 reference picture (RefL0Pic) is the coding target picture. FIG. 58 shows the case where the time is before CurPic. This shows the case where the reference picture for prediction is at a later time than the current picture. , the reference picture for L0 prediction in Figures 57 and 58 is changed to the reference picture for L1 prediction (RefL1 Pic) for uni-prediction.

[0294] The process of making predictions from two reference pictures is defined as bi-prediction, and in the case of bi-prediction, L0 prediction is used. Figure 59 shows a bi-prediction model that uses both L0 and L1 prediction. The reference picture for L1 prediction is located before the current picture and the reference picture for L1 prediction is coded. 60 shows a case where the L0 prediction is performed after the current picture. When the reference picture for L1 prediction and the reference picture for L2 prediction are located at a time earlier than the picture to be coded, FIG. 61 shows a bi-predictive picture with a reference picture for L0 prediction and a reference picture for L1 prediction. This shows the case where the L0 / L1 picture is at a later time than the picture to be coded. The relationship between the prediction type and time is not limited to L0 being the past direction and L1 being the future direction. In the case of bi-prediction, it is possible to perform L0 prediction and L1 prediction using the same reference picture. It is also possible to perform both of the motion compensation prediction and the bi-prediction. The decision may include, for example, information indicating whether L0 prediction is used or not and whether L1 prediction is used or not (for example, For example, the decision is made based on the flag.

[0295] <About reference indexes> In the embodiment of the present invention, in order to improve the accuracy of the motion compensation prediction, multiple This allows the optimum reference picture to be selected from a number of reference pictures. The reference picture used in the motion compensation prediction is used as a reference index, and The index is encoded into the encoded stream along with the encoded vector.

[0296] <Motion compensation processing based on normal predicted motion vector mode> The motion compensation unit 306 is also shown as the inter prediction unit 102 on the encoding side in FIG. As described above, in the inter prediction mode determination unit 305, the normal prediction motion vector mode derivation unit 3 When the inter prediction information according to 01 is selected, this inter prediction information is used as the inter prediction information. The reference mode of the block currently being processed is acquired from the measurement mode determination unit 305. The motion compensation prediction signal is generated by deriving a motion vector from the motion vector reference index. The compensated prediction signal is supplied to a prediction method determination unit 105 .

[0297] Similarly, the motion compensation unit 406 is also shown in the inter prediction unit 203 on the decoding side in FIG. In the decoding process, the switch 408 is set to the normal predicted motion vector mode derivation unit 401 so that the When the connection is established, the inter prediction information by the normal prediction motion vector mode derivation unit 401 is The reference mode, reference index, and motion vector of the currently processed block are obtained. The generated motion compensation prediction signal is used to generate a decoded image. The signal is supplied to an image signal superimposing unit 207 .

[0298] <Motion compensation processing based on normal merge mode> The motion compensation unit 306 is also shown as the inter prediction unit 102 on the encoding side in FIG. As described above, the inter prediction mode determination unit 305 determines whether the normal merge mode is When inter prediction information is selected, the inter prediction information is used to determine the inter prediction mode. The reference mode and reference index of the block currently being processed are acquired from the data acquisition unit 305. The generated motion compensation prediction signal is then used to derive a motion vector. The signal is supplied to the prediction method determination unit 105.

[0299] Similarly, the motion compensation unit 406 is also shown in the inter prediction unit 203 on the decoding side in FIG. During the decoding process, the switch 408 is connected to the normal merge mode derivation unit 402 so that In this case, the inter prediction information is obtained by the normal merge mode derivation unit 402, and the current processing target is The reference mode, reference index, and motion vector of the target block are derived, and the motion The generated motion compensation prediction signal is sent to the decoded image signal superimposing unit 207. Supplied.

[0300] <Motion compensation processing based on sub-block predicted motion vector mode> The motion compensation unit 306 is also shown as the inter prediction unit 102 on the encoding side in FIG. As described above, the inter prediction mode determination unit 305 determines whether the sub-block prediction motion vector mode is When the inter prediction information is selected by the derivation unit 303, the inter prediction information is The reference mode of the block currently being processed is acquired from the center prediction mode determination unit 305. The generated code, reference index, and motion vector are derived to generate a motion compensated prediction signal. The obtained motion compensation prediction signal is supplied to the prediction method determination unit 105 .

[0301] Similarly, the motion compensation unit 406 is also shown in the inter prediction unit 203 on the decoding side in FIG. In the decoding process, the switch 408 is set to the sub-block predicted motion vector mode derivation unit 406 so that the When connected to 403, the sub-block predicted motion vector mode derivation unit 403 Inter prediction information is obtained, and the reference mode and reference input of the currently processed block are set. The generated motion compensation prediction signal is generated based on the motion vector. The measured signal is supplied to a decoded image signal superimposing unit 207 .

[0302] <Motion compensation processing based on sub-block merge mode> The motion compensation unit 306 is also shown as the inter prediction unit 102 on the encoding side in FIG. As described above, the inter prediction mode determination unit 305 determines whether the sub-block merge mode is When the inter prediction information according to 4 is selected, this inter prediction information is used as the inter prediction The reference mode of the block currently being processed is acquired from the mode determination unit 305. The motion compensation prediction signal is generated by deriving the motion vector and the index. The compensated prediction signal is supplied to a prediction method determination unit 105 .

[0303] Similarly, the motion compensation unit 406 is also shown in the inter prediction unit 203 on the decoding side in FIG. During the decoding process, a switch 408 is connected to the sub-block merge mode derivation unit 404 so that the If the subblock merge mode is connected, the subblock merge mode derivation unit 404 obtains inter prediction information. The reference mode, reference index, and motion vector of the currently processed block are acquired. The generated motion compensation prediction signal is used as a decoded image signal. The signal is supplied to a signal superimposing unit 207.

[0304] <Motion compensation processing based on affine transformation prediction> In normal motion vector prediction mode and normal merge mode, the following flags are used: The following flags are used to indicate whether motion compensation is performed in the encoding process. The following flags are used based on the inter-prediction conditions determined by the inter-prediction mode determination unit 305: The value is reflected in the encoding and coded into the coded stream. Determine whether to perform motion compensation using an affine model based on the following flags in the program: .

[0305] sps_affine_enabled_flag is the flag for motion compensation using the affine model in inter prediction. If sps_affine_enabled_flag is 0, the sequence unit This prevents motion compensation using an affine model. and cu_affine_type_flag are conveyed in the CU syntax of the coded video sequence. If sps_affine_enabled_flag is 1, affine is not supported in the coded video sequence. Motion compensation based on the motion model can be used.

[0306] sps_affine_type_flag is the 6-parameter affine model for inter prediction. Indicates whether motion compensation is available.

[0307] If sps_affine_type_flag is 0, the motion compensation is performed using the 6-parameter affine model. Also, cu_affine_type_flag is used to suppress the Not transmitted in the syntax. If sps_affine_type_flag is 1, the encoded video Motion compensation using a six-parameter affine model is available for sequences.

[0308] If sps_affine_type_flag does not exist, it shall be set to 0.

[0309] When decoding a P or B slice, the current CU If r_affine_flag is 1, generate a motion compensation prediction signal for the CU currently being processed. To do this, affine model motion compensation is used.

[0310] If inter_affine_flag is 0, the affine model is not included in the currently processed CU. Not used.

[0311] If inter_affine_flag is not present, it shall be set to 0.

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

[0313] If cu_affine_type_flag is 0, the motion compensation prediction signal of the CU currently being processed is To generate the signal, motion compensation with a four-parameter affine model is used.

[0314] In motion compensation using the affine model, reference indices and motion vectors are calculated for each subblock. Since the torque is derived, the reference index that is processed in sub-block units is and motion vectors to generate a motion compensated prediction signal.

[0315] <Variation 1> A first modification of this embodiment will be described. This modification differs from this embodiment in that it uses merge differential operation. The difference is that a vector mode has been added, and only the differences from this embodiment will be explained. If umve_flag in FIG. 12 is 1, the merged motion vector difference mode is selected, and umve_flag If is 0, normal merge mode is used.

[0316] Next, the operation of the merge motion vector difference mode will be explained. one of the two merge candidates (merge candidates with merge index 0 and 1 in the merge candidate list) For each of the L0 prediction motion vectors and L1 prediction motion vectors of the two merge candidates, , a mode in which one merged differential motion vector can be added.

[0317] In the merged motion vector difference mode, the merged motion vector difference is expressed as a bitstream The data is coded by the coding unit 108 and decoded by the bit stream decoding unit 201 .

[0318] As mentioned above, the merge candidate list is also used in the merge differential motion vector mode. , prohibits adding elements of the history motion vector predictor candidate list that overlap with elements of the merge candidate list. By stopping the quantization and increasing the effective selection factors, the coding efficiency can be improved. .

[0319] Also, a merge differential motion vector mode has been added to ensure selection of normal predicted motion vector mode. By lowering the rate, the coding efficiency is reduced due to overlapping of elements in the motion vector predictor candidate list. While suppressing the motion vector of the history motion vector predictor candidate and the motion vector of the motion vector predictor candidate, The vector comparison process can be reduced. <Variation 2> A second modification of this embodiment will be described. This modification is different from this embodiment shown in FIG. The operations of the historical motion vector predictor candidate derivation units 323 and 423 are different from those of the present embodiment. Only the differences will be explained. FIG. 65 shows the procedure for deriving historical motion vector predictor candidates in Modification 2. FIG. 65 is a flowchart for explaining the process of the process of the present invention. The operation in Figure 65 is the same as that in Figure 41 except for step S2209.

[0320] If numCurrMvpCand is smaller than 2, which is the maximum number of elements in the motion vector predictor candidate list ( The process of step S2205 (YES) in FIG. 65 will be described.

[0321] Reference index of LY in the history motion vector predictor candidate HmvpCandList[NumHmvpCand - i] It is checked whether the reference index of LY of the coding block to be processed is the same (see FIG. 65). Step S2209), L of the history motion vector predictor candidate HmvpCandList[NumHmvpCand-i] If the reference index of Y and the reference index of LY of the coding block to be processed are the same, If the answer is YES in step S2209 of FIG. 65, the process proceeds to step S2206. The reference index of LY in the candidate HmvpCandList[NumHmvpCand - i] and the coding block to be processed If the reference indexes of the LYs of the blocks are not the same (NO in step S2209 of FIG. 65), Go to 2207.

[0322] As described above, the LY reference index of the history motion vector predictor candidate and the coding When the reference index of the LY of the block is the same, the motion vector of the history predicted motion vector candidate is By adding the vector to the candidate predicted motion vector list for LY prediction, the historical predicted motion vector is without comparing the motion vector of the motion vector candidate with the motion vector of the motion vector predictor candidate. Highly accurate historical motion vector predictor candidates can be added to the motion vector predictor candidate list.

[0323] In this embodiment, in the process of deriving a candidate predicted motion vector, the candidate predicted motion vector is The motion vector predictor candidate list is not compared with the elements of the motion vector predictor candidate list. The elements of the historical motion vector predictor candidate list are added to the motion vector predictor candidate list, while the elements of the historical motion vector predictor candidate list are added to the motion vector predictor candidate list. In the history merge candidate derivation process, the elements of the history merge candidate list and the elements of the merge list are and add to the merge list only those historical merge candidates that are not already in the merge list. The above configuration provides the following effects.

[0324] 1. In the process of deriving candidates for the history predicted motion vector candidate list, additional candidate derivation process is performed. This eliminates the need for a predictive motion estimation, reducing the amount of processing and the circuit size. Even if elements in the vector candidate list overlap, coding by reducing the number of choices is possible. The loss of efficiency can be kept to a minimum.

[0325] 2. In the history merge candidate derivation process, the history merge candidates that overlap with the elements of the merge list are By prohibiting the addition of elements to the complementary list, the target block can be processed without using the difference vector. In the normal merge mode, which determines the motion information of the This makes it possible to improve the coding efficiency.

[0326] 3. Fill the historical motion vector predictor candidate list with unique historical motion vector predictor candidates. The merge candidate derivation unit 345 in the normal merge mode derivation unit 302 This allows the processing of the merge candidate supplementation unit 346 to be omitted, thereby reducing the amount of processing. .

[0327] 4. Fill the historical motion vector predictor candidate list with unique historical motion vector predictor candidates. The elements of the history motion vector predictor candidate list and the elements of the motion vector predictor candidate list are The elements of the history motion vector candidate predictor list are converted into the predicted motion vector without comparison with the original motion vector. By adding the motion vector to the candidate list, the history prediction in the normal prediction motion vector mode derivation unit 301 is The process of the predicted motion vector supplementing unit 325 after the predicted motion vector candidate derivation unit 323 is omitted. It is possible.

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

[0329] In all the embodiments described above, the coded bitstream output by the image coding device The stream is specified so that it can be decoded according to the encoding method used in the embodiment. The image encoding device has a data format of can decode coded bitstreams of this particular data format.

[0330] In order to exchange coded bitstreams between an image coding device and an image decoding device, When a wired or wireless network is used, the data format appropriate for the transmission mode of the communication path In this case, the image coding device may convert the output bitstream into The coded bit stream is converted into coded data in a data format suitable for the transmission mode of the communication channel. a transmitting device that converts the encoded data into a digital signal and transmits it to a network; and a receiving device for restoring the encoded bit stream to a coded bit stream and supplying the coded bit stream to the image decoding device.

[0331] The transmitting device includes a memory for buffering the coded bit stream output by the image coding device. a packet processing unit for packetizing the coded bit stream; and a transmitting unit for transmitting the packetized encoded data. a receiving unit that receives packetized coded data via a packetizer; and a memory for packet processing of the coded data to generate a coded bit stream. and a packet processing unit for providing the packet to an image decoding device.

[0332] In addition, by adding a display unit for displaying the image decoded by the image decoding device to the configuration, In this case, the display unit may be a device that displays the decoded image signal generated by the decoded image signal superimposing unit 205. The decoded image signal stored in the decoded image memory 206 is read out and displayed on the screen.

[0333] In addition, by adding an imaging unit to the configuration and inputting the captured image to the image encoding device, In this case, the imaging unit inputs the captured image signal to the block division unit 101. To exert effort.

[0334] FIG. 66 shows an example of the hardware configuration of the encoding / decoding device of the present application. The present invention includes the configurations of an image encoding device and an image decoding device according to the embodiments of the present invention. The encoding / decoding device 9000 includes a CPU 9001, a codec IC 9002, an I / O interface interface 9003, memory 9004, optical disk drive 9005, network interface The interface 9006 and the video interface 9009 are connected to each other via a bus 9010. are connected by

[0335] The image encoding unit 9007 and the image decoding unit 9008 are typically implemented by a codec IC 9002 and The image encoding process of the image encoding device according to the embodiment of the present invention is implemented as an image encoding The image decoding process is executed by the decoding unit 9007 in the image decoding device according to the embodiment of the present invention. The encoding process is performed by the image encoding unit 9007. The I / O interface 9003 For example, a USB interface can be used to connect an external keyboard 9104 and mouse 9 The CPU 9001 receives input via the I / O interface 9003. The encoding / decoding device 9 executes the operation desired by the user based on the user's operation. 000. As a user operation using the keyboard 9104, mouse 9105, etc. The CODEC allows you to select whether to perform encoding or decoding functions, set the encoding quality, and There are input / output destinations for frames, input / output destinations for images, etc.

[0336] When the user desires to play back images recorded on the disk recording medium 9100 The optical disc drive 9005 reads the encoded video from the inserted disc recording medium 9100. The read encoded stream is sent to the decoder via bus 9010. The image decoding unit 9008 of the block IC 9002 receives the coded image data and sends it to the image decoding unit 9008. The image decoding process in the image decoding device according to the embodiment of the present invention is performed on the bit stream. The decoded image is then displayed on an external monitor 9103 via a video interface 9009. The encoding / decoding device 9000 also includes a network interface 9006. , and connects to an external distribution server 9106 and a mobile terminal 9107 via a network 9101. The user can change the image recorded on the disk recording medium 9100 and use it on the distribution server. If you want to play back the images recorded on the server 9106 or the mobile terminal 9107, The network interface 9006 receives the code from the input disk recording medium 9100. Instead of reading the encoded bitstream, the network 9101 Also, when the user desires to play back the images recorded in the memory 9004, In this case, the embodiment of the present invention is applied to the coded stream recorded in the memory 9004. The image decoding device according to the present invention performs image decoding processing.

[0337] The user captures an image using an external camera 9102 and encodes it into memory 9004. When an operation is desired, the video interface 9009 receives an image from the camera 9102. The image data is input and sent to the image encoding unit 9007 of the codec IC 9002 via the bus 9010. The image encoding unit 9007 encodes the image input via the video interface 9009. The image encoding process is performed in the image encoding device according to the embodiment of the present invention, and the encoded bits are The encoded bitstream is then sent to the memory via bus 9010. The user changes the memory 9004 and codes it on the disk recording medium 9100. If it is desired to record the encrypted stream, the optical disc drive 9005 may be The encoded stream is written to the inserted disc recording medium 9100.

[0338] A hardware configuration that has an image encoding device but does not have an image decoding device, or a hardware configuration that has an image decoding device However, it is also possible to realize a hardware configuration that does not include an image coding device. The hardware configuration is, for example, a codec IC 9002, an image encoding unit 9007, or This is realized by replacing the image decoding unit 9008 with the image decoding unit 9009.

[0339] The above encoding and decoding processes are carried out by hardware-based transmission, storage, and reception devices. It can be realized by using ROM (read only memory) or flash memory. Firmware stored in memory, etc., and software executed by a computer, etc. The firmware program and software program may be executed on a computer. The information may be provided by recording it on a recording medium that can be read by a computer or by wired or wireless network. It can be provided from a server via the network, or it can be data from terrestrial or satellite digital broadcasting. It may also be provided as a broadcast.

[0340] The present invention has been described above based on the embodiments. The embodiments are merely examples, and the respective structures thereof are not intended to be limiting. The fact that various variations are possible in the combination of components and treatment processes, and that such variations It will be understood by those skilled in the art that the embodiments are within the scope of the present invention. [Explanation of symbols]

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

Claims

1. Derive spatial motion information candidates from the motion information of blocks spatially adjacent to the block to be coded a spatial motion information candidate derivation unit for Temporal motion information candidates are derived from the motion information of blocks temporally adjacent to the block to be coded. a temporal motion information candidate derivation unit for A historical motion information calculation method deriving historical motion information candidates from a memory that holds motion information of coded blocks. an information candidate derivation unit; Equipped with The temporal motion information is obtained without comparing the motion information between the spatial motion information candidate and the temporal motion information candidate. Add the candidate information to the list of candidate information When the motion information of the spatial motion information candidate and the motion information of the history motion information candidate are not the same , adding the historical motion information candidate to the motion information candidate list. A video encoding device characterized by:

2. Derive spatial motion information candidates from the motion information of blocks spatially adjacent to the block to be coded and Temporal motion information candidates are derived from the motion information of blocks temporally adjacent to the block to be coded. and deriving historical motion information candidates from a memory that holds motion information of coded blocks; and, Equipped with The temporal motion information is obtained without comparing the motion information between the spatial motion information candidate and the temporal motion information candidate. Add the candidate information to the list of candidate information When the motion information of the spatial motion information candidate and the motion information of the history motion information candidate are not the same , adding the historical motion information candidate to the motion information candidate list. A video encoding method comprising:

3. Computer, Derive spatial motion information candidates from the motion information of blocks spatially adjacent to the block to be coded and Temporal motion information candidates are derived from the motion information of blocks temporally adjacent to the block to be coded. and deriving historical motion information candidates from a memory that holds motion information of coded blocks; and, A video encoding program for causing the above to function, The temporal motion information is obtained without comparing the motion information between the spatial motion information candidate and the temporal motion information candidate. Add the candidate information to the list of candidate information When the motion information of the spatial motion information candidate and the motion information of the history motion information candidate are not the same , adding the historical motion information candidate to the motion information candidate list. A video encoding program comprising:

4. Derive spatial motion information candidates from motion information of blocks spatially adjacent to the block to be decoded a spatial motion information candidate derivation unit; Temporal motion information candidates are derived from motion information of blocks temporally adjacent to the block to be decoded. a time motion information candidate derivation unit; A motion information memory for deriving motion information candidates from a memory that stores motion information of decoded blocks. a candidate information derivation unit; Equipped with The temporal motion information is obtained without comparing the motion information between the spatial motion information candidate and the temporal motion information candidate. Add the candidate information to the list of candidate information When the motion information of the spatial motion information candidate and the motion information of the history motion information candidate are not the same , adding the historical motion information candidate to the motion information candidate list. A video decoding device comprising:

5. Derive spatial motion information candidates from motion information of blocks spatially adjacent to the block to be decoded and Temporal motion information candidates are derived from motion information of blocks temporally adjacent to the block to be decoded. and deriving historical motion information candidates from a memory that holds motion information of decoded blocks; 、 Equipped with The temporal motion information is obtained without comparing the motion information between the spatial motion information candidate and the temporal motion information candidate. Add the candidate information to the list of candidate information When the motion information of the spatial motion information candidate and the motion information of the history motion information candidate are not the same , adding the historical motion information candidate to the motion information candidate list. A video decoding method comprising:

6. Computer, Derive spatial motion information candidates from motion information of blocks spatially adjacent to the block to be decoded and Temporal motion information candidates are derived from motion information of blocks temporally adjacent to the block to be decoded. and deriving historical motion information candidates from a memory that holds motion information of decoded blocks; 、 A video decoding program for causing the above to function, The temporal motion information is obtained without comparing the motion information between the spatial motion information candidate and the temporal motion information candidate. Add the candidate information to the list of candidate information When the motion information of the spatial motion information candidate and the motion information of the history motion information candidate are not the same , adding the historical motion information candidate to the motion information candidate list. A video decoding program comprising:

7. 3. A method for storing a bit stream generated by the video encoding method according to claim 2 on a recording medium. How to pay.

8. A transmission method for transmitting a bit stream generated by the moving image encoding method according to claim 2.

Citation Information

Patent Citations

  • Image decoding device, image decoding method, and image decoding program

    JP7711828B2

  • Method and apparatus for processing video signal based on inter prediction

    US20200137398A1

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

    WO2020003275A1

  • Simplified history based motion vector prediction

    WO2020065517A1

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

    JP1997172644A