Video encoding device, video encoding method, video encoding program, video decoding device, video decoding method, and video decoding program
By deriving block vector candidates and correcting reference positions, the method improves image encoding and decoding efficiency by utilizing adjacent decoded blocks, addressing the inefficiencies in existing technologies.
Patent Information
- Application Number
- JP2025131477
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2019-06-20
- Filing Date
- 2025-08-06
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2040-06-19
AI Technical Summary
Existing image encoding and decoding technologies do not effectively utilize decoded blocks adjacent to the block being coded or decoded, leading to poor prediction efficiency.
The solution involves deriving a block vector candidate from coding information stored in memory, selecting a reference block, correcting its reference position, and using a decoded image memory to obtain a prediction value, thereby enhancing prediction efficiency.
This approach enables highly efficient image encoding and decoding with reduced computational load.
Smart Images

Figure 2025159032000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to an image encoding and decoding technique for dividing an image into blocks and performing prediction. [Background 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] Patent Document 1 describes a method for generating a predicted image using decoded pixels adjacent to the block to be coded or decoded. An intra prediction technique for obtaining an image is disclosed. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Japanese Patent Application Laid-Open No. 2009-246975 Summary of the Invention [Problem to be solved by the invention]
[0005] However, the technology in Patent Document 1 does not use the decoded blocks adjacent to the block to be coded or decoded. Only pixels are used for prediction, and prediction efficiency is poor. [Means for solving the problem]
[0006] In one aspect of the present invention for solving the above problem, the coding information stored in the coding information storage memory is A block vector candidate for a target block in a target picture is derived from the information. a block vector candidate derivation unit for selecting a selected block vector from the block vector candidates; a selection unit for selecting a reference block to be referenced by the selected block vector; a reference position correction unit that corrects the reference position of the reference block so that the inside of the functional area is referenced; a reference block for a decoded image in the current picture based on a reference position of the reference block; The prediction value of the target block is obtained from the decoded image memory unit. [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] 1 is a block diagram of an image encoding device according to an embodiment of the present invention; [Figure 2] 1 is a block diagram of an image decoding device according to an embodiment of the present invention. [Figure 3] 10 is a flowchart illustrating an operation of dividing a tree block. [Figure 4] FIG. 10 is a diagram illustrating how an input image is divided into tree blocks. [Figure 5] FIG. 1 is a diagram illustrating a z-scan. [Figure 6A] FIG. 10 is a diagram showing the divided shapes of blocks. [Figure 6B] FIG. 10 is a diagram showing the divided shapes of blocks. [Figure 6C] FIG. 10 is a diagram showing the divided shapes of blocks. [Figure 6D] FIG. 10 is a diagram showing the divided shapes of blocks. [Figure 6E] FIG. 10 is a diagram showing the divided shapes of blocks. [Figure 7] 10 is a flowchart illustrating an operation of dividing a block into four parts. [Figure 8]10 is a flowchart illustrating an operation of dividing a block into two or three parts. [Figure 9] This is a syntax for expressing the shape of block division. [Figure 10A] FIG. 10 is a diagram illustrating intra prediction. [Figure 10B] FIG. 10 is a diagram illustrating intra prediction. [Figure 11] FIG. 10 is a diagram illustrating a reference block for inter prediction. [Figure 12A] This is a syntax for expressing a coding block prediction mode. [Figure 12B] This is a syntax for expressing a coding block prediction mode. [Figure 13] FIG. 10 is a diagram showing correspondence between syntax elements and modes related to inter prediction. [Figure 14] FIG. 10 is a diagram for explaining affine transformation motion compensation of two control points. [Figure 15] FIG. 10 is a diagram for explaining affine transformation motion compensation of three control points. [Figure 16] FIG. 2 is a block diagram showing a detailed configuration of the inter prediction unit 102 in FIG. [Figure 17] FIG. 17 is a block diagram showing a detailed configuration of a normal predicted motion vector mode derivation unit 301 in FIG. [Figure 18] FIG. 17 is a block diagram showing a detailed configuration of a normal merge mode derivation unit 302 in FIG. 16. [Figure 19] 17 is a flowchart for explaining a normal predicted motion vector mode derivation process of the normal predicted motion vector mode derivation unit 301 of FIG. 16. [Figure 20] 10 is a flowchart showing a processing procedure of a normal predicted motion vector mode derivation process. [Figure 21] 10 is a flowchart illustrating a processing procedure for normal merge mode derivation processing. [Figure 22] FIG. 3 is a block diagram showing a detailed configuration of an inter prediction unit 203 in FIG. 2. [Figure 23]FIG. 23 is a block diagram showing a detailed configuration of a normal predicted motion vector mode derivation unit 401 in FIG. 22. [Figure 24] FIG. 23 is a block diagram showing a detailed configuration of a normal merge mode derivation unit 402 in FIG. 22. [Figure 25] 23 is a flowchart for explaining a normal predicted motion vector mode derivation process of the normal predicted motion vector mode derivation unit 401 of FIG. 22. [Figure 26] FIG. 10 is a diagram illustrating a procedure for initializing and updating a history motion vector predictor candidate list. [Figure 27] 10 is a flowchart of a procedure for checking identical elements in the procedure for initializing and updating a history motion vector predictor candidate list. [Figure 28] 10 is a flowchart of an element shifting process procedure in the history motion vector predictor candidate list initialization / update process procedure. [Figure 29] 10 is a flowchart illustrating a procedure for deriving a historical motion vector predictor candidate. [Figure 30] 10 is a flowchart illustrating a history merge candidate derivation process procedure. [Figure 31A] FIG. 10 is a diagram illustrating an example of a history motion vector predictor candidate list update process. [Figure 31B] FIG. 10 is a diagram illustrating an example of a history motion vector predictor candidate list update process. [Figure 31C] FIG. 10 is a diagram illustrating an example of a history motion vector predictor candidate list update process. [Figure 32] FIG. 10 is a diagram illustrating motion compensation prediction in the case of L0 prediction in which the L0 reference picture (RefL0Pic) is located at a time earlier than the current picture (CurPic). [Figure 33] FIG. 10 is a diagram illustrating motion compensation prediction in the case where L0 prediction is performed and the reference picture for L0 prediction is located at a later time than the current picture. [Figure 34]FIG. 10 is a diagram illustrating the prediction direction of motion compensation prediction in bi-prediction, where the reference picture for L0 prediction is located at a time earlier than the current picture to be processed, and the reference picture for L1 prediction is located at a time later than the current picture to be processed. [Figure 35] FIG. 10 is a diagram illustrating the prediction direction of motion compensation prediction in bi-prediction when the reference picture for L0 prediction and the reference picture for L1 prediction are located at a time earlier than the current picture. [Figure 36] FIG. 10 is a diagram illustrating the prediction direction of motion compensation prediction in bi-prediction when the reference picture for L0 prediction and the reference picture for L1 prediction are located at a time later than the current picture. [Figure 37] 1 is a diagram illustrating an example of a hardware configuration of a coding / decoding device according to an embodiment of the present invention; [Figure 38] 10 is a flowchart illustrating a procedure for deriving average merge candidates. [Figure 39A] FIG. 10 is a diagram illustrating a valid reference area for intra block copying. [Figure 39B] FIG. 10 is a diagram illustrating a valid reference area for intra block copying. [Figure 40] FIG. 2 is a block diagram showing a detailed configuration of the intra prediction unit 103 in FIG. [Figure 41] FIG. 3 is a block diagram showing a detailed configuration of the intra prediction unit 204 in FIG. 2. [Figure 42] FIG. 10 is a block diagram of an intra block copy prediction unit 352. [Figure 43] FIG. 10 is a block diagram of an intra block copy prediction unit 362. [Figure 44] 10 is a flowchart illustrating a predicted intra block copy process of the intra block copy prediction section 352. [Figure 45] 10 is a flowchart illustrating a predicted intra block copy process of an intra block copy prediction section 362. [Figure 46] 10 is a flowchart illustrating a merge intra block copy process. [Figure 47]10 is a flowchart showing the processing steps of a block vector mode derivation process for predictive intra block copying. [Figure 48] 10 is a diagram illustrating the processing of the reference position correction unit 380 and the reference position correction unit 480. FIG. [Figure 49] FIG. 10 is a diagram illustrating how a reference position is corrected. [Figure 50A] 10A and 10B are diagrams illustrating the positions of the top left and bottom right of a rectangular referable area. [Figure 50B] 10A and 10B are diagrams illustrating the positions of the top left and bottom right of a rectangular referable area. [Figure 50C] 10A and 10B are diagrams illustrating the positions of the top left and bottom right of a rectangular referable area. [Figure 50D] 10A and 10B are diagrams illustrating the positions of the top left and bottom right of a rectangular referable area. [Figure 51] 10A and 10B are diagrams illustrating a process for correcting the reference position of a portion of a referenceable area that is not rectangular. [Figure 52A] FIG. 10 is a diagram illustrating how a reference position is corrected. [Figure 52B] FIG. 10 is a diagram illustrating how a reference position is corrected. [Figure 53] 10 is a diagram illustrating the processing of the reference position correction unit 380 and the reference position correction unit 480. FIG. [Figure 54A] FIG. 10 is a diagram illustrating how a referable area is divided into two. [Figure 54B] FIG. 10 is a diagram illustrating how a referable area is divided into two. [Figure 54C] FIG. 10 is a diagram illustrating how a referable area is divided into two. [Figure 54D] FIG. 10 is a diagram illustrating how a referable area is divided into two. [Figure 55] FIG. 10 is a diagram illustrating a process of dividing a referenceable area into two and correcting the reference position of each. 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 a predetermined size. In Figure 4, the size of the treeblock is 128x128 pixels. However, the size of the tree block is not limited to this and can be any size. The processing target (the encoding target in the encoding process, the decoding target in the decoding process) may be set. The tree blocks of the tree are arranged in raster scan order, i.e., from left to right and from top to bottom. The order is as follows: Inside each tree block, further recursive division is possible. After recursively dividing the tree block, the block to be coded and decoded is called the coding block. In addition, tree blocks and coding blocks are collectively defined as blocks. By dividing the blocks appropriately, efficient coding becomes possible. The size of the code can be a fixed value previously agreed upon between the coding device and the decoding device, or The size of the treeblock determined by the encoding device may be transmitted to the decoding device. Here, the maximum size of the treeblock is set to 128x128 pixels, and the treeblock size is set to The minimum size of the coding block is 16x16 pixels. The maximum size of the coding block is 64x64. The minimum size of a pixel,coding block is set to 4x4 pixels.
[0011] <Prediction mode> In the coding block unit, prediction is performed from the processed image signal of the image to be processed. Intra prediction (MODE_INTRA), and inter prediction (MO) that predicts from the image signal of the processed image. DE_INTER).
[0012] In the encoding process, a processed image is an image obtained by decoded a signal that has been encoded. It is used for codes, tree blocks, blocks, coding blocks, etc., and in the decoding process, is used for completed images, image signals, tree blocks, blocks, coding blocks, etc. .
[0013] This mode distinguishes between intra prediction (MODE_INTRA) and inter prediction (MODE_INTER). The prediction mode (PredMode) is defined as intra prediction (MODE_INTRA ), or inter prediction (MODE_INTER) as a value.
[0014] <Intra-block copy prediction> Intra Block Copy prediction is a decoding process for a current picture. This is a process of encoding / decoding a target block by referring to the previously processed pixels as predicted values. The distance from the target block to the reference pixel is expressed by a block vector. The block vector refers to the picture to be processed, and the reference picture is uniquely determined. The difference between block vectors and motion vectors is that the reference picture is The block vector is either a current picture or a processed picture. Using the AMVR, you can select either 1-pixel or 4-pixel accuracy.
[0015] Intra block copy supports two modes: predictive intra block copy and merge intra block copy. Two block copy modes are selectable.
[0016] The predicted intra block copy mode uses predicted block vectors derived from pre-processed information. The block vector of the target block is determined from the difference block vector. The predicted block vector is the same as the processed block adjacent to the current block. , derived from an index for identifying the predicted block vector. The index for identifying the block and the differential block vector are transmitted in the bit stream. do.
[0017] In the merge intra block copy mode, the difference motion vector is not transmitted. The block to be processed is determined from the intra block copy prediction information of the processed blocks adjacent to the block. This is a mode for deriving intra block copy prediction information for a block.
[0018] <Inter prediction> Inter-prediction, which predicts from the image signal of a processed image, refers to multiple processed images. It can be used as a picture. To manage multiple reference pictures, L0 (reference link) Two types of reference lists are defined: L1 (reference list 1) and L2 (reference list 2), and each has a reference index. P slices can use L0 prediction (Pred_L0) For B slices, L0 prediction (Pred_L0), L1 prediction (Pred_L1), and bi-prediction (Pred_BI) are available. ) is available. L0 prediction (Pred_L0) refers to the reference picture managed by L0. Inter prediction is performed using the reference picture managed by L1, and L1 prediction (Pred_L1) is performed using the reference picture managed by L1. Bi-prediction (Pred_BI) is inter-prediction where both L0 and L1 predictions are performed. Inter prediction refers to one reference picture managed in L0 and one in L1. Information specifying L0 prediction, L1 prediction, or bi-prediction is defined as an inter prediction mode. In the following processing, the constants and variables with the subscript LX in the output are L0, L1 It is assumed that processing is performed for each
[0019] <Predictive motion vector mode> The predicted motion vector mode is an index for specifying the predicted motion vector, a differential motion vector, and a The inter prediction vector, inter prediction mode, and reference index are transmitted, and the index of the block to be processed is This is a mode for determining the motion vector prediction information of the target block. A processed block that belongs to the same image as the target block, or a block that belongs to the processed image and has the same position as the target block A motion vector predictor candidate derived from a block located at or near (neighboring) the predicted motion vector candidate is used. The measured motion vector is derived from an index for identifying the measured motion vector.
[0020] <Merge mode> In merge mode, the target block is processed without transmitting differential motion vectors and reference indices. The processed blocks adjacent to the block to be processed or the blocks belonging to the processed image 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.
[0021] The processed blocks adjacent to the target block and the inter-processing blocks The spatial merge candidate is defined as a block belonging to the processed image. Blocks located in the same location as the block or in its vicinity (neighborhood), and the index of that block Inter-prediction information derived from super-prediction information is defined as a temporal merge candidate. The complement 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
[0022] <Adjacent 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 target block. T0 is a processed image. The block belongs to the same position as the processing target block in the processing target image or its vicinity ( It is a block located in the vicinity.
[0023] 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.
[0024] Details of how adjacent blocks are handled in predicted motion vector mode and merge mode The details will be described later.
[0025] <Affine transformation motion compensation> Affine transformation motion compensation divides a coding block into sub-blocks of a predetermined unit, and A motion vector is determined for each sub-block individually and motion compensation is performed. The motion vector of each sub-block is determined by the motion vector of the processed block adjacent to the current block, or is a block belonging to the processed image, which is at the same position as the target block or in its vicinity (neighborhood) based on one or more control points derived from inter prediction information of the block located at In this embodiment, the size of the sub-block is set to 4x4 pixels. The size is not limited to this, and the motion vector may be derived in units of pixels.
[0026] FIG. 14 shows an example of affine transformation motion compensation when there are two control points. A control point has two parameters, a horizontal component and a vertical component. The affine transformation in these two cases is called a four-parameter affine transformation. CP2 is the control point.
[0027] FIG. 15 shows an example of affine transformation motion compensation when there are three control points. A control point has two parameters, a horizontal component and a vertical component. The affine transformation in the three cases is called a six-parameter affine transformation. CP2 and CP3 are control points.
[0028] 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.
[0029] <Syntax of coding block> 12A, 12B, and 13 are used to represent the prediction modes of the coding blocks. The syntax for this will be described below. The pred_mode_flag in FIG. 12A indicates whether or not inter prediction is used. If pred_mode_flag is 0, it is inter prediction, and if pred_mode_flag is 1, it is In the case of intra prediction, it is intra block copy prediction. It sends a flag pred_mode_ibc_flag that indicates whether intra block copy prediction is enabled. If pred_mode_ibc_flag=1, send merge_flag. A flag indicating whether to use block copy mode or predicted intra block copy mode. If the merge intra block copy mode is selected (merge_flag=1), the merge Send index merge_idx. If it is not an intra block copy prediction (pred_mode_ibc _flag=0), normal intra prediction is used, and normal intra prediction information intra_pred_mode is sent.
[0030] In the case of inter prediction, merge_flag is sent. merge_flag specifies whether to use merge mode or This flag indicates whether to use the predicted motion vector mode. rge_flag=0), a flag indicating whether to apply the sub-block prediction motion vector mode, Send r_affine_flag when applying sub-block prediction motion vector mode (inter_affine ine_flag=1), sends cu_affine_type_flag. cu_affine_type_flag is used for sub-block prediction. In motion vector mode, this is a flag for determining the number of control points.
[0031] On the other hand, in the case of merge mode (merge_flag=1), the merge_subblock_flag in Figure 12B is sent. merge_subblock_flag is a flag that indicates whether to apply the subblock merge mode. In the case of subblock merge mode (merge_subblock_flag=1), the merge index If the subblock merge mode is not enabled (merge_subblock_idx), lock_flag=0), and the flag merge_triangle_flag that indicates whether to apply the triangle merge mode. If triangle merge mode is applied (merge_triangle_flag=1), the block is split. merge_triangle_split_dir and the direction of the split. Send triangle indices merge_triangle_idx0, merge_triangle_idx1. Meanwhile, triangle merge If no mode is applied (merge_triangle_flag=0), the merge index merge_idx is sent. do.
[0032] Figure 13 shows the values of each syntax element for inter prediction and the corresponding prediction modes. merge_flag=0,inter_affine_flag=0 indicates normal predicted motion vector mode (Inter Pr merge_flag=0,inter_affine_flag=1 corresponds to the sub-block predicted motion vector. Inter Affine Mode. merge_flag=1,merge_subblock_flag=0, merge_trianlge_flag=0 corresponds to the normal merge mode. merge_flag=1, merge_subblock_flag=0,merge_trianlge_flag=1 is the triangle merge mode (Triangle Merge merge_flag=1,merge_subblock_flag=1 corresponds to the subblock merge mode. (Affine Merge Mode) is supported.
[0033] <poc> POC (Picture Order Count) is a variable associated with the picture being coded. The value increases by one depending on the picture output order. It can determine whether a picture is the same as another picture, determine the order of pictures in the output order, and For example, if two pictures have the same POC, we can calculate the distance between them. If two pictures have different POC values, they are considered to be the same picture. If it does, the picture with the smaller POC value is determined to be the picture to be output first. The difference between the POCs of two pictures indicates the distance between the pictures along the time axis. (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.
[0034] FIG. 1 is a block diagram of an image coding device 100 according to a first embodiment. The image encoding device 100 includes a block division unit 101, an inter prediction unit 102, an intra prediction unit 103, and a A prediction unit 103, a decoded image memory 104, a prediction method determination unit 105, a residual generation unit 106, and an orthogonal A transform / quantization unit 107, a bit string encoding unit 108, an inverse quantization / inverse orthogonal transformation unit 109, and a decoding unit The image signal superimposing unit 110 and the coded information storage memory 111 are provided.
[0035] The block division unit 101 recursively divides the input image to generate coding blocks. The block division unit 101 divides the blocks to be divided into horizontal and vertical blocks. The four quadrants and the blocks to be divided can be arranged either horizontally or vertically. The block division unit 101 processes the generated coded blocks. The image signal of the processing target coding block is input to the inter prediction unit. 102, the intra prediction unit 103, and the residual generation unit 106. The unit 101 supplies information indicating the determined recursive division structure to the bit string encoding unit 108. The detailed operation of the lock dividing unit 101 will be described later.
[0036] The inter prediction unit 102 performs inter prediction on the coding block to be processed. The measurement unit 102 receives the inter-prediction information stored in the coded information storage memory 111 and the decoding information. A plurality of inter prediction information is calculated from the decoded image signal stored in the image memory 104. and deriving candidates for the inter prediction mode, selecting a suitable inter prediction mode from the derived candidates. and a predicted image signal according to the selected inter prediction mode. The inter prediction unit 102 supplies the data to the prediction method determination unit 105. The detailed configuration and operation of the inter prediction unit 102 will be described later. .
[0037] The intra prediction unit 103 performs intra prediction on the coding block to be processed. The measurement unit 103 measures the decoded image signal stored in the decoded image memory 104 as a reference pixel. and refers to the coding information stored in the coding information storage memory 111. Intra prediction generates a predicted image signal based on the encoding information. The intra prediction unit 103 selects an appropriate intra prediction mode from among a plurality of intra prediction modes. Then, the selected intra prediction mode and a predicted image according to the selected intra prediction mode are generated. The image signal is supplied to the prediction method determination unit 105. The detailed configuration and operation of the intra prediction unit 103 are This will be discussed later.
[0038] The decoded image memory 104 stores the decoded image generated by the decoded image signal superimposing unit 110 . The decoded image memory 104 transfers the stored decoded images to the inter prediction unit 102 and the intra prediction unit 103. The measurement unit 103 supplies the data.
[0039] The prediction method determination unit 105 determines the coding information for each of intra prediction and inter prediction. The evaluation is based on the amount of coding of the information and residual, the amount of distortion between the predicted image signal and the image signal to be processed, etc. In the case of intra prediction, the prediction method determination unit 10 5 is a bitstream encoding unit 1 which encodes intra prediction information such as an intra prediction mode as encoding information. In the case of the merge mode of inter prediction, the prediction method determination unit 105 supplies the merged sub-block merge mode (sub-block merge flag) The inter prediction information such as the inter frame coding information is supplied to the bitstream coding unit 108 as coding information. In the case of the predicted motion vector mode of the inter prediction, the prediction method determination unit 105 code, predicted motion vector index, L0, L1 reference index, differential motion vector information indicating whether it is a sub-block predicted motion vector mode (sub-block predicted motion vector) Inter prediction information such as a bit flag is supplied to the bitstream encoding unit 108 as encoding information. Furthermore, the prediction method determination unit 105 stores the determined coding information in the coding information storage memory 11. The prediction method determination unit 105 outputs the residual signal to the residual generation unit 106 and the prediction image signal to the decoded image 1. The signal is supplied to the signal superimposing unit 110.
[0040] The residual generation unit 106 generates a residual by subtracting a predicted image signal from an image signal to be processed. The generated signal is supplied to the orthogonal transform and quantization unit 107 .
[0041] The orthogonal transform and quantization unit 107 performs orthogonal transform and quantization on the residual in accordance with the quantization parameter. The generated residual is then input to a bitstream coding unit 10. 8 and the inverse quantization and inverse orthogonal transformation unit 109.
[0042] 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 105 for each coding block is Specifically, the bit string coding unit 108 encodes the coding information according to the coding block. If the prediction mode is inter prediction (MODE_INTER), In this case, the bitstream encoding unit 108 sets a flag for determining whether or not the merge mode is selected, a sub-block merge merge flag, merge index if in merge mode, index if not in merge mode Sub-prediction mode, predicted motion vector index, information about differential motion vector, Encoding information (inter prediction information) such as block prediction motion vector flags is stored in the specified syntax. The first bitstream is generated by encoding it according to the bitstream syntax rules. When MODE_INTRA is intra prediction, the bitstream coding unit 108 performs intra block coding. The flag that determines whether the block is an intra-block or not is coded according to a specified syntax. For copy, if in merge mode, the merge index, if not in merge mode Encoding information such as predicted block vector index, differential block vector (intra prediction If it is not an intra-block copy, the block copy information is coded according to the specified syntax. The encoding information (intra prediction information) such as intra prediction mode is encoded according to the specified syntax. By the above encoding, a first bit string is generated. The orthogonal transform and quantized residual are converted into entropy data in accordance with a specified syntax. The bit string encoding unit 108 encodes the first bit string and the second bit string to generate a second bit string. The second bitstream is multiplexed according to a specified syntax and a bitstream is output.
[0043] 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 is inversely quantized and inversely orthogonally transformed to calculate the residual, and the calculated residual is used as the decoded image. The signal is supplied to the image signal superimposing unit 110 .
[0044] The decoded image signal superimposing unit 110 outputs a predicted image signal according to the determination by the prediction method determining unit 105. The residuals that have been inversely quantized and inversely orthogonally transformed by the inverse quantization and inverse orthogonal transformation unit 109 are superimposed to form a decoded image. The decoded image signal superimposing unit 110 generates a decoded image and stores it in the decoded image memory 104. The coded image is filtered to reduce block distortion and other distortions caused by coding. The decoded image may then be stored in the decoded image memory 104.
[0045] The encoding information storage memory 111 stores the prediction mode (integer) determined by the prediction method determination unit 105. In the case of inter prediction, the code The coding information stored in the coding information storage memory 111 includes the determined motion vectors, the reference list, Inter prediction information such as L0 and L1 reference indexes, historical predicted motion vector candidate list, etc. In the case of the merge mode of the inter prediction, the coding information storage memory 111 includes The encoded information to be stored includes the merge index, sub-block merge index, and the above information. Inter prediction information (sub-block merge flag) indicating whether the sub-block is in the multi-mode or not is included. In the case of the inter-prediction predicted motion vector mode, the coding information storage memory 111 The encoded information to be stored includes the above information as well as the inter prediction mode, predicted motion vector, etc. An index, a differential motion vector, and information indicating whether it is a sub-block predicted motion vector mode. It includes inter prediction information such as sub-block prediction motion vector flags. In the case of prediction, the coding information stored in the coding information storage memory 111 includes the determined input. It includes intra prediction information such as intra prediction mode.
[0046] FIG. 2 shows the configuration of an image decoding apparatus according to an embodiment of the present invention, which corresponds to the image encoding apparatus of FIG. The image decoding device according to the embodiment includes a bitstream decoding unit 201, a block block division unit 202, inter prediction unit 203, intra prediction unit 204, coding information storage memory 205, an inverse quantization and inverse orthogonal transformation unit 206, a decoded image signal superimposition unit 207, and a decoded image memory Equipped with 208 harpoons.
[0047] The decoding process of the image decoding device of FIG. 2 is performed by the decoding device provided inside the image coding device of FIG. Since it corresponds to the processing, the coding information storage memory 205 in FIG. The configurations of the conversion unit 206, the decoded image signal superimposing unit 207, and the decoded image memory 208 are shown in FIG. The image encoding device includes an encoding information storage memory 111, an inverse quantization and inverse orthogonal transformation unit 109, a decoder, and a The decoded image signal superimposing unit 110 and the decoded image memory 104 and their corresponding functions It has.
[0048] The bitstream supplied to the bitstream decoder 201 conforms to the rules of the specified syntax. The bit string decoding unit 201 decodes the separated first bit string and Sequence, picture, slice, coding block unit information and coding block unit Specifically, the bitstream decoding unit 201 obtains the coded information by inter-coding block units. Prediction mode PredMode determines whether the prediction is intra prediction (MODE_INTER) or intra prediction (MODE_INTRA). When the prediction mode is inter prediction (MODE_INTER), the bitstream decoding unit 201 Flag to determine whether it is in merge mode, merge index if in merge mode, sub Block merge flag, inter prediction mode if predicted motion vector mode, prediction Motion vector index, differential motion vector, sub-block predicted motion vector flag, etc. The coding information (inter prediction information) is decoded according to a specified syntax and coded. information (inter prediction information) via the inter prediction unit 203 and the block division unit 202 The prediction mode is intra prediction (MODE_INTRA). In this case, the bitstream decoding unit 201 decodes the flag for determining whether or not the block is an intra block copy. In the case of intra-block copy, if it is merge mode, the merge index, If it is not a multi-mode, the symbols of the predicted block vector index, the difference block vector, etc. The encoding information (intra prediction information) is decoded according to the specified syntax. If it is not a copy, specify the coding information (intra prediction information) such as the intra prediction mode. By the above decoding, the coding information (intra prediction information) via the inter prediction unit 203 or the intra prediction unit 204 and the block division unit 202. The bit stream decoding unit 201 then supplies the separated second The bit string is decoded to calculate the orthogonally transformed and quantized residual, and the orthogonally transformed and quantized residual is is supplied to the inverse quantization and inverse orthogonal transformation unit 206.
[0049] The inter prediction unit 203 performs the inter prediction when the prediction mode PredMode of the coding block to be processed is set to inter prediction. When the prediction (MODE_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 the derived motion vector predictor candidates are used as the motion vector predictor candidates described later. The inter prediction unit 203 registers the motion vector predicted candidate in the motion vector predicted candidate list. From among the plurality of motion vector predictor candidates recorded, a bitstream decoder 201 decodes and supplies a motion vector predictor corresponding to the motion vector predictor index, and decoding the bitstream; The motion vector is calculated from the differential motion vector decoded by the unit 201 and the selected predicted motion vector. The calculated motion vector is stored in the coded information storage memory 205 together with other coded information. The coding information of the coding block to be supplied and stored here is the prediction mode PredMode , flags predFlagL0[xP][yP], predFlag indicating whether to use L0 prediction and L1 prediction L1[xP][yP], L0, L1 reference indices refIdxL0[xP][yP], refIdxL1[xP][yP], L0 , L1 motion vectors mvL0[xP][yP], mvL1[xP][yP], etc., where xP and yP are the The Prediction Mode PredMo is an index indicating the position of the top left pixel of the coding block in the Prediction Mode PredMo. When de is inter prediction (MODE_INTER) and the inter prediction mode is L0 prediction (Pred_L0) , the flag predFlagL0 indicating whether to use L0 prediction is 1, and the flag predFlagL0 indicating whether to use L1 prediction is 2. The flag predFlagL1 indicating this is 0. When the inter prediction mode is L1 prediction (Pred_L1), The flag predFlagL0 indicating whether to use L0 prediction is 0, and the flag predFlagL1 indicating whether to use L1 prediction is 1. The flag predFlagL1 is set to 1. When the inter prediction mode is bi-prediction (Pred_BI), Flag indicating whether prediction is used or not predFlagL0, Flag indicating whether L1 prediction is used or not predFlagL1 and predFlagL2 are both set to 1. Furthermore, the prediction mode PredMode of the coding block to be processed is When merging in inter prediction (MODE_INTER) mode, merging candidates are derived. Using the coding information of the already decoded coded block stored in the storage memory 205 , multiple merge candidates are derived and registered in a merge candidate list described later. The merge candidates are decoded by the bitstream decoder 201 and supplied from among the multiple merge candidates registered in the Select a merge candidate corresponding to the bin index, and perform L0 prediction of the selected merge candidate. Flags predFlagL0[xP][yP], predFlagL1[xP][yP], and L0 , the reference index of L1 refIdxL0[xP][yP], refIdxL1[xP][yP], the motion vector of L0, L1 Inter prediction information such as mvL0[xP][yP] and mvL1[xP][yP] is stored in the encoding information storage memory 205. Here, xP and yP are the indexes 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 203 will be described later.
[0050] The intra prediction unit 204 determines whether the prediction mode PredMode of the coding block to be processed is intra. In the case of prediction (MODE_INTRA), intra prediction is performed. The encoding information includes an intra-prediction mode. The decoding unit 201 decodes the image data according to the intra prediction mode included in the coded information. A predicted image signal is generated by intra-prediction from the decoded image signal stored in the memory 208. The generated predicted image signal is supplied to the decoded image signal superimposing unit 207. 204 corresponds to the intra prediction unit 103 of the image encoding device 100. The same processing as that of the intra prediction unit 103 is performed.
[0051] The inverse quantization and inverse orthogonal transformation unit 206 performs orthogonal transformation and quantization on the decoded bit stream by the bit stream decoding unit 201. The inverse orthogonal transform and inverse quantization are performed on the residual, and the inverse orthogonal transformed and inverse quantized residual is get.
[0052] The decoded image signal superimposing unit 207 superimposes the predicted image signal obtained by the inter prediction unit 203. or a predicted image signal obtained by intra-prediction in the intra prediction unit 204, and The decoded image is obtained by superimposing the residuals that have been inverse orthogonally transformed and inversely quantized by the orthogonal transform unit 206. The decoded image signal is stored in the decoded image memory 208. When storing the decoded image in the memory 208, the decoded image signal superimposing unit 207 performs coding on the decoded image. After filtering to reduce block distortion etc., the decoded image is stored in the decoded image memory 208. It may be stored.
[0053] 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).
[0054] 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).
[0055] 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). 6A is an example of a scan order, and 601 in FIG. 6A is an example in which the block to be processed is divided into four. The numbers 0 to 3 in 601 of A indicate the order of processing. For each divided block, the division process of FIG. 7 is recursively executed (step S1104 ).
[0056] 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).
[0057] 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).
[0058] 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, In other words, the division is completed by the recursive division process (step S1211). No further recursive division processing is performed on the blocks that have been divided.
[0059] 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).
[0060] If it is determined that the processing block should be divided into two, the processing block is divided into upper and lower (vertical ) (step S1203), and based on the result, the block to be processed is The block is divided into two parts vertically (step S1204), or the block to be processed is divided into two parts vertically (step S1205). Divide the image into two on the right (horizontal direction) (step S1205). The target block is divided into two parts, top and bottom (vertical direction), as shown in 602 of FIG. 6B, and the steps are As a result of the step S1205, the block to be processed is divided into left and right (horizontal) blocks as shown in 604 of FIG. 6D. (Directional) It is divided into two parts.
[0061] In step S1202, if it is not determined that the block to be processed is to be divided into two In other words, if it is determined that the block should be divided into three, the block to be processed is divided into top, middle and bottom (vertical direction). Based on the result of the determination, the block to be processed is moved up or down (step S1206). Divide the target block into three parts (vertically) (step S1207), or divide the target block into three parts (left, middle, right, and As a result of step S1207, the processing object is divided into three parts (horizontal direction) (step S1208). The block is divided into three parts (vertical direction) - top, middle and bottom, as shown in 603 of FIG. 6C. As a result of step S1208, the block to be processed is divided into left, center, and right (horizontal) blocks as shown in 605 of FIG. 6E. (Directional) It is divided into three parts.
[0062] Step S1204, Step S1205, Step S1207, Step S1208 After performing either of the above, for each block into which the processing target block is divided, The numbers 0 to 605 in FIGS. 2 shows the order of processing. For each divided block, 2-3 division processing in Fig. 8 is performed. The process is recursively executed (step S1210).
[0063] 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 bit string. , may be realized by transmitting the information to the decoding device.
[0064] When a block is divided, the block before the division is called the parent block, and each block after the division is called the parent block. The blocks are called child blocks.
[0065] 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 100. However, the block division of the image coding device 100 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 bit string. The difference is that the division shape is determined.
[0066] The syntax (syntax rules for bit strings) related to block division in the first embodiment is shown in FIG. coding_quadtree() represents the syntax for dividing a block into four parts. _type_tree() represents the syntax for splitting a block into two or three parts. it is a flag that indicates whether to divide the block into four parts. If you want to divide the block into four parts, use qt If you do not want to split into four, set qt_split=0. If you want to split into four (qt_split=1), For each block divided into four, recursively divide it into four (coding_quadtree(0), codin g_quadtree(1), coding_quadtree(2), coding_quadtree(3), arguments 0 to 3 correspond to the 6 in Figure 6A. (This corresponds to the number 01.) If you do not split into four (qt_split=0), follow the multi_type_tree() , determines the subsequent split. mtt_split is a flag indicating whether to split further. If further splitting is required (mtt_split=1), indicate whether to split vertically or horizontally. The flag mtt_split_vertical determines whether to split the image into two or three parts. mtt_split_vertical=1 indicates splitting in the vertical direction. mtt_split_vertical=0 indicates splitting horizontally, and mtt_split_binary=1 indicates splitting horizontally. mtt_split_binary=0 indicates that it will be split into two, and mtt_split_binary=0 indicates that it will be split into three. tt_split_binary=1), and recursively split each block into two (multi_t type_tree(0), multi_type_tree(1), arguments 0 to 1 correspond to 602 or 604 in Figure 6B to D. (These numbers correspond to the numbers.) When splitting into three (mtt_split_binary=0), the following is true for each of the three split blocks: and recursively splits the tree (multi_type_tree(0), multi_type_tree(1), multi_type_ tree(2), 0 to 2 correspond to the numbers 603 in Figure 6B or 605 in Figure 6E.) mtt_spli Hierarchical block division by recursively calling multi_type_tree until t=0. Do the following.
[0067] <Intra prediction> The intra prediction method according to the embodiment is performed by the intra prediction unit 100 of the image encoding device 100 in FIG. 103 and the intra prediction unit 204 of the image decoding device 200 in FIG.
[0068] An intra prediction method according to an 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.
[0069] <Explanation of the intra prediction unit 103 on the encoding side> FIG. 40 is a diagram showing a detailed configuration of the intra prediction unit 103 of the image encoding device 100 of FIG. The intra prediction unit 351 typically predicts the decoded pixels adjacent to the coding block to be processed. A predicted image signal is generated by normal intra prediction from the image, and a prediction signal is selected from a plurality of intra prediction modes. A suitable intra prediction mode is selected from the selected intra prediction mode and the selected A predicted image signal according to the intra prediction mode is supplied to the prediction method determination unit 105. 10A and 10B show examples of intra prediction. For example, the intra prediction mode 50 is An intra prediction image is generated 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. Intra prediction mode 0 is a planar mode, and the vertical and horizontal directions are This is a mode in which a two-dimensional intra-predicted image is created from reference pixels in both directions. This is an example of generating an intra-prediction image in the case of intra-prediction mode 40. For each pixel in the intra prediction mode, the value of the reference pixel in the direction indicated by the intra prediction mode is copied. If the reference pixel of the prediction mode is not an integer position, interpolation is performed using the reference pixel values of the surrounding integer positions. The reference pixel value is determined by:
[0070] The intra block copy prediction unit 352 receives the encoded image data to be processed from the decoded image memory 104. The decoded area of the image signal that is the same as the block is obtained, and the intra-block copy process is performed. The prediction method determining unit 105 generates a predicted image signal and supplies it to the prediction method determining unit 105. The detailed configuration and processing of the measurement unit 352 will be described later.
[0071] <Description of the intra prediction unit 204 on the decoding side> FIG. 41 is a diagram showing a detailed configuration of the intra-prediction unit 204 of the image decoding device 200 of FIG. 2. do.
[0072] The normal intra prediction unit 361 predicts a pixel from decoded pixels adjacent to the coding block to be processed. A predicted image signal is generated by normal intra prediction, and an appropriate intra prediction mode is selected from a plurality of intra prediction modes. the selected intra prediction mode and the selected intra prediction mode. A predicted image signal corresponding to the predicted image mode is obtained. This predicted image signal is input via a switch 364. The normal intra prediction unit 361 in FIG. corresponds to the normal intra prediction unit 351 in FIG. 40, and therefore detailed description thereof will be omitted. do.
[0073] The intra block copy prediction unit 362 receives the encoded image data to be processed from the decoded image memory 208. The decoded area of the image signal that is the same as the block is obtained, and the intra-block copy process is performed. This predicted image signal is superimposed on the decoded image signal via a switch 364. The detailed configuration and processing of the intra block copy prediction unit 362 will be described later. More details will be provided later.
[0074] <Inter prediction> The inter prediction method according to the embodiment is performed by the inter prediction unit 102 of the image encoding device shown in FIG. This is performed in the inter prediction unit 203 of the image decoding device in FIG.
[0075] 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.
[0076] <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 image encoding device of FIG. The normal motion vector predictor mode derivation unit 301 derives a plurality of normal motion vector predictor candidates. A predicted motion vector is selected by the motion vector prediction function, and the selected predicted motion vector is compared with the detected motion vector. The differential motion vector is calculated based on the detected inter prediction mode, reference index, and motion vector. The calculated differential motion vector is the inter prediction in normal prediction motion vector mode. This inter prediction information is supplied to the inter prediction mode determination unit 305. The detailed configuration and processing of the predictive motion vector mode derivation unit 301 will be described later.
[0077] 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 305. The reasoning behind this will be explained later.
[0078] The sub-block prediction motion vector mode derivation unit 303 calculates a plurality of sub-block prediction motion vectors. A motion vector candidate is derived to select a sub-block predictor motion vector, and the selected sub-block predictor motion vector is A differential motion vector is calculated between the estimated motion vector and the detected motion vector. Inter prediction mode, reference index, motion vector, calculated differential motion vector This becomes inter prediction information for the sub-block prediction motion vector mode. is supplied to the inter prediction mode determination unit 305.
[0079] 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 305.
[0080] The inter prediction mode determination unit 305 determines whether the normal prediction motion vector mode is derived from the normal prediction motion vector mode derivation unit 301 or the normal prediction motion vector mode derivation unit 302. A merge mode derivation unit 302, a sub-block predicted motion vector mode derivation unit 303, a sub-block Based on the inter prediction information supplied from the block merge mode derivation unit 304, The inter prediction mode determination unit 305 determines the prediction information. The measurement information is supplied to the motion compensation prediction unit 306 .
[0081] The motion compensation prediction unit 306 stores the decoded image in the decoded image memory 1 based on the determined inter prediction information. The motion compensation prediction unit 306 performs inter prediction on the reference image signal stored in the motion compensation prediction unit 306. The detailed configuration and processing will be described later.
[0082] <Description of the Inter Prediction Unit 203 on the Decoding Side> FIG. 22 is a diagram showing a detailed configuration of the inter prediction unit 203 of the image decoding device of FIG.
[0083] The normal motion vector predictor mode derivation unit 401 derives a plurality of normal motion vector predictor candidates. a predicted motion vector is selected, and the selected predicted motion vector and the decoded differential motion vector are The sum of the decoded inter prediction mode and reference index is calculated and used as the motion vector. In this case, the motion vector is the inter prediction information in the normal prediction motion vector mode. The center prediction information is supplied to the motion compensation prediction unit 406 via the switch 408. The detailed configuration and processing of the motion vector measurement mode derivation unit 401 will be described later.
[0084] 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.
[0085] The sub-block prediction motion vector mode derivation unit 403 calculates a plurality of sub-block prediction motion vectors. A motion vector candidate is derived to select a sub-block predictor motion vector, and the selected sub-block predictor motion vector is The sum of the estimated motion vector and the decoded differential motion vector is calculated and used as the motion vector. The decoded inter prediction mode, reference index, and motion vector are used for sub-block prediction. This inter prediction information is used as the inter prediction information for the motion vector mode. is supplied to the motion compensation prediction unit 406 via
[0086] 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. .
[0087] The motion compensation prediction unit 406 stores the decoded image data in the decoded image memory 2 based on the determined inter-prediction information. 08. The motion compensation prediction unit 406 performs inter-prediction on the reference image signal stored in the motion compensation prediction unit 406. The detailed configuration and processing of the motion compensation prediction unit 306 on the encoding side are the same as those of the motion compensation prediction unit 306 on the encoding side.
[0088] <Normal predicted motion vector mode derivation part (normal AMVP)> The normal predicted motion vector mode derivation unit 301 in FIG. 17 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 .
[0089] The normal predicted motion vector mode derivation unit 401 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 427 is included.
[0090] 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.
[0091] <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. In the explanation of the processing procedure of FIG. 19, the word "normal" shown in FIG. 19 may be omitted.
[0092] 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).
[0093] 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 predicted value of the block to be processed is calculated (steps S101 to S106 in FIG. 19). Prediction mode PredMode is inter prediction (MODE_INTER), and inter prediction mode is L0 prediction (Pr ed_L0), calculate the motion vector predictor candidate list mvpListL0 of L0, and The motion vector mvpL0 of L0 is selected, and the differential motion vector mvdL0 of 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 A motion vector candidate list mvpListL1 is calculated, a motion vector predictor mvpL1 is selected, and the motion vector of L1 is calculated. Calculate the differential motion vector mvdL1 of the current block mvL1. When bi-prediction (Pred_BI) is used, both L0 prediction and L1 prediction are performed, and the predicted motion vector of L0 is A motion vector candidate list mvpListL0 is calculated, a motion vector predictor mvpL0 for L0 is selected, and the motion vector A differential motion vector mvdL0 of the vector mvL0 is calculated, and a predicted motion vector candidate of L1 is calculated. A complementary list mvpListL1 is calculated, and a predicted motion vector mvpL1 of L1 is calculated. Then, the differential motion vector mvdL1 of the corresponding vector mvL1 is calculated.
[0094] 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 of LX is 0, and In the process of calculating the motion vector of LX, X of LX 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.
[0095] When the motion vector mvLX of LX is used (step S102 in FIG. 19: YES), Calculate the candidate predicted motion vectors of LX and construct a candidate predicted motion vector list mvpListLX of LX. (Step S103 in FIG. 19). A spatial motion vector predictor candidate derivation unit 321, a temporal motion vector predictor candidate derivation unit 322, a history A motion vector predictor candidate deriving unit 323 and a motion vector predictor candidate supplementing unit 325 generate a plurality of motion vector predictors. The motion vector predictor candidate list mvpListLX is constructed by deriving motion vector candidates. The detailed processing procedure of step S103 will be described later with reference to the flowchart of FIG. do.
[0096] 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). Here, in the motion vector predictor candidate list mvpListLX, a certain element (counting from 0) The motion vector mvLX and the motion vector predictor candidate are expressed as mvpListLX[i]. The difference between each candidate motion vector predictor mvpListLX[i] stored in the list mvpListLX is The differential motion vectors are calculated for each of the coded frames. The coding amount is calculated for each element (predictor motion vector candidate) of the predictor motion vector candidate list mvpListLX. Then, 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 The motion vector predictor mvpLX is selected as the motion vector predictor mvpLX, and its index i is obtained. There are multiple candidates for the predicted motion vector with the minimum amount of generated code in the candidate list mvpListLX. In this case, the index i in the motion vector predictor candidate list mvpListLX is a small number. The candidate motion vector predictor mvpListLX[i] represented by the following is used as the optimal motion vector predictor mvpLX. Select it and get its index i.
[0097] Next, the motion vector subtraction unit 328 subtracts the motion vector mvLX of LX selected from the motion vector mvLX of LX. Subtract the predicted motion vector mvpLX, mvdLX = mvLX - mvpLX The differential motion vector mvdLX of LX is calculated as follows (step S105 in FIG. 19).
[0098] <Normal predicted motion vector mode derivation unit (normal AMVP): Decoding side explanation> Next, the normal predicted motion vector mode processing procedure on the decoding side will be described with reference to FIG. 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 process of the block to be processed is performed as follows (steps S201 to S206 in FIG. 25). Prediction mode PredMode is inter prediction (MODE_INTER) and the target 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 processed 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.
[0099] 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. LX is used for inter prediction of the coding block being processed. This represents the inter prediction mode. In the process of calculating the L0 motion vector, X is 0, and in the L1 In the process of calculating the motion vector of L, X is 1. During processing, the LX being calculated is not based on the same reference list, but on information from another reference list. When referencing one reference list, the other reference list is represented as LY.
[0100] When the motion vector mvLX of LX is used (step S202 in FIG. 25: YES), LX 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.
[0101] 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).
[0102] Then, the motion vector adder 427 decodes the bit stream and supplies it to the bit stream decoder 201. Add the differential motion vector mvdLX of LX and the predicted motion vector mvpLX of LX, mvLX = mvpLX + mvdLX The motion vector mvLX of LX is calculated as follows (step S205 in FIG. 25).
[0103] <Normal predicted motion vector mode derivation part (normal AMVP): Motion vector prediction method> FIG. 20 shows a normal prediction motion vector mode derivation process of the image coding apparatus according to the embodiment of the present invention. Functions common to the motion vector mode derivation unit 301 and the normal predicted motion vector mode derivation unit 401 of the image decoding device 10 is a flowchart showing the processing procedure of a normal predicted motion vector mode derivation process having the following formula.
[0104] The normal predicted motion vector mode derivation unit 301 and the normal predicted motion vector mode derivation unit 40 1 includes a motion vector predictor candidate list mvpListLX. The mvpListLX has a list structure and is a prediction vector that indicates the location within the motion vector prediction candidate list. The motion vector index and the motion vector predictor candidate corresponding to the index are used as elements. The predicted motion vector index number starts from 0. The motion vector predictor candidate list mvpListLX is started and stored in the storage area of the motion vector predictor candidate list mvpListLX. In this embodiment, the motion vector predictor candidate list mvpListLX contains at least At least two candidate motion vector predictors (inter prediction information) can be registered. Furthermore, the motion vector predictor registered in the motion vector predictor candidate list mvpListLX is The variable numCurrMvpCand, which indicates the number of rule candidates, is set to 0.
[0105] The spatial motion vector predictor candidate derivation units 321 and 421 derive the spatial motion vector predictor candidate from the adjacent block on the left side. In this process, candidates for predicted motion vectors are derived from the adjacent block on the left ( A0 or A1) inter prediction information, i.e., whether or not a motion vector predictor candidate is available. A flag indicating whether the motion vector is a predicted motion vector mv LXA is derived, and the derived mvLXA is added to the motion vector predictor candidate list mvpListLX (FIG. 20 In the case of L0 prediction, X is set to 0, and in the case of L1 prediction, X is set to 1 (hereinafter, Next, the spatial prediction motion vector candidate derivation units 321 and 421 select the adjacent spatial prediction motion vector candidate on the upper side. In this process, the candidate predicted motion vectors are derived from the adjacent block on the upper side. Inter prediction information of the block (B0, B1, or B2 in FIG. 11), i.e., predicted motion vector A flag indicating whether a motion candidate is available or not, and a reference to the motion vector, reference index, etc. The predicted motion vector mvLXA and mvLXB are derived based on the calculated motion vector mvLXA and mvLXB. If so, mvLXB is added to the motion vector predictor candidate list mvpListLX (step S3 in FIG. 20). 02). The processing in steps S301 and S302 in FIG. 20 is performed by determining the position and number of adjacent blocks to be referenced. The difference is whether the candidate predicted motion vector for the coding block can be used. The flag availableFlagLXN indicates whether the motion vector is available or not, and the motion vector mvLXN and the reference index refIdxN( N indicates A or B, and so on.
[0106] Next, the temporal motion vector predictor candidate derivation units 322 and 422 calculate the temporal motion vector predictor candidate for the current processing target picture. A candidate motion vector predictor is derived from a block in a picture that is different in time from the image. In this process, motion vector predictor candidates of coding blocks of pictures at different times are used. The flag availableFlagLXCol indicates whether the motion vector mvLXCol and the reference index are available. The reference list refIdxCol and the reference list listCol are derived, and mvLXCol is used to create the predicted motion vector candidate list m Add it to vpListLX (step S303 in FIG. 20).
[0107] Note that temporal prediction is performed in units of sequences (SPS), pictures (PPS), or slices. It is assumed that the processing of the motion vector candidate derivation units 322 and 422 can be omitted.
[0108] 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.
[0109] Next, the motion vector predictor candidate supplementation units 325 and 425 generate the motion vector predictor candidate list mv Add motion vector predictor candidates with a predetermined value, such as (0,0), until pListLX is satisfied ( S305 in Figure 20).
[0110] <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 .
[0111] 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 .
[0112] FIG. 21 shows the normal merge mode derivation unit 302 and A normal merge mode having a function common to the normal merge mode derivation unit 402 of the image decoding device and the normal merge mode derivation unit 402 of the image decoding device. 10 is a flowchart illustrating the procedure of a code derivation process.
[0113] 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.
[0114] 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 merge candidates are represented by mergeCandList[i]. The candidate list mergeCandList must contain at least six merge candidates (inter-prediction information). Furthermore, the merge candidates registered in the mergeCandList The variable numCurrMergeCand, which indicates the number of merge candidates, is set to 0.
[0115] The spatial merge candidate derivation unit 341 and the spatial merge candidate derivation unit 441 are The encoded information stored in the encoded information storage memory 111 or the encoded information storage memory 205 of the image decoding device From the coding information stored in the block, each block adjacent to the block to be processed (B in FIG. 11) 1, A1, B0, A0, B2) to B1, A1, B0, A0, B2 The spatial merge candidates are derived in order and registered in the merge candidate list mergeCandList. (Step S401 in FIG. 21). Here, B1, A1, B0, A0, B2 or time marker We define N, which indicates one of the candidate blocks Col. A flag availableFlagN indicates whether the candidate can be used as a spatial merge candidate. Reference index refIdxL0N and L1 reference index refIdxL1N, L0 prediction is performed L0 prediction flag predFlagL0N indicates whether L1 prediction is performed or not, and L1 prediction flag predFlagL0N indicates whether L1 prediction is performed or not. The motion vector mvL0N of L0 and the motion vector mvL1N of L1 are derived. However, in this embodiment, the blocks included in the coding block to be processed are Since merge candidates are derived without referring to inter-prediction information, The spatial merge candidates using the inter prediction information of the blocks included in the matrix B are not derived.
[0116] 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 or not. L0 prediction flag predFlagL0Col indicating whether L1 prediction is performed and L1 prediction flag predFlagL0Col indicating whether L1 prediction is performed. The flag predFlagL1Col, the motion vector mvL0Col of L0, and the motion vector mvL1Col of L1 are Derive.
[0117] Note that time markers can be set in units of sequences (SPS), pictures (PPS), or slices. The processing of the merge candidate derivation unit 342 and the temporal merge candidate derivation unit 442 can be omitted. Let's say.
[0118] 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 candidate is registered in the mergeCandList (step S403 in FIG. 21).
[0119] The number of merge candidates registered in the merge candidate list mergeCandList is numCurrMergeC If and is smaller than the maximum number of merge candidates MaxNumMergeCand, the merge candidate list mergeCandL The number of merge candidates registered in ist is numCurrMergeCand, and the maximum number of merge candidates is MaxNumMergeCand. The history merge candidates are derived with nd as the upper limit and registered in the merge candidate list mergeCandList. can be.
[0120] 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 merge candidate list mergeCandList is then added to the mergeCandList (step S404 in FIG. 21).
[0121] The number of merge candidates registered in the merge candidate list mergeCandList is numCurrMergeC If and is smaller than the maximum number of merge candidates MaxNumMergeCand, the merge candidate list mergeCandL The number of merge candidates registered in ist is numCurrMergeCand, and the maximum number of merge candidates is MaxNumMergeCand. The average merge candidate is calculated with nd as the upper limit and registered in the merge candidate list mergeCandList. can be.
[0122] Here, the average merge candidate is the first merge candidate registered in the merge candidate list mergeCandList. The motion vectors of the merge candidate and the second merge candidate are averaged for each of the L0 prediction and the L1 prediction. The resulting motion vector is a new merge candidate.
[0123] 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, numCurrMergeCand, is less than the maximum number of merge candidates, M If it is smaller than axNumMergeCand, the merge candidate list mergeCandList contains The number of merge candidates numCurrMergeCand is the maximum number of merge candidates MaxNumMergeCand. The merge candidates are derived and registered in the merge candidate list mergeCandList (step S4 in FIG. 21). 05). In P slices, the maximum number of merge candidates is MaxNumMergeCand. A merge candidate having a prediction mode of L0 prediction (Pred_L0) with a value of (0,0) is added. In B slices, the prediction mode with a motion vector of (0,0) is bi-predictive (Pred_BI). The reference index when adding a merge candidate is the same as the index of the merge candidate already added. This is different from the reference index used.
[0124] Next, the merge candidate selection unit 347 and the merge candidate selection unit 447 select a 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, inter prediction information of the merge candidate, The inter-prediction mode determination unit 305 supplies the inter-prediction mode data to the motion compensation prediction unit 306. The merge candidate selection unit 447 on the side selects merge candidates based on the decoded merge index. The motion compensation prediction unit 406 selects a merge candidate and supplies the selected merge candidate to the motion compensation prediction unit 406 .
[0125] <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 Methods for initializing and updating the historical motion vector predictor candidate list HmvpCandList in preparation for 5 FIG. 26 shows the procedure for initializing and updating the history motion vector predictor candidate list. 1 is a flowchart illustrating the above.
[0126] 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. The prediction unit 102 and the inter-prediction unit 203 include a history prediction motion vector candidate list update unit. It may be set to update the historical motion vector predictor candidate list HmvpCandList.
[0127] At the beginning of the slice, the historical motion vector prediction candidate list HmvpCandList is initialized. On the encoding side, the prediction method decision unit 105 decides whether to use the normal predicted motion vector mode or the normal merge mode. When the selected motion vector prediction candidate list HmvpCandList is updated, The prediction information decoded by the bitstream decoding unit 201 is in the normal predicted motion vector mode or the normal In the merge mode, the historical motion vector predictor candidate list HmvpCandList is updated.
[0128] Used when performing inter prediction in normal predicted motion vector mode or normal merge mode. The inter prediction information is used as the inter prediction information candidate hMvpCand in the history prediction motion vector candidate list. The inter prediction information candidate hMvpCand is registered in the HmvpCandList. The reference index for L0 and L1, refIdxL1, indicates whether L0 prediction is performed. an L0 prediction flag predFlagL0 and an L1 prediction flag predFl indicating whether or not L1 prediction is performed; It includes agL1, a motion vector mvL0 for L0, and a motion vector mvL1 for L1.
[0129] The encoding information storage memory 111 on the encoding side and the encoding information storage memory 205 on the decoding side are provided. The elements (i.e., the image) registered in the history motion vector predictor candidate list HmvpCandList are Among the inter prediction information candidates, there is inter prediction information with the same value as the inter prediction information candidate hMvpCand. If it exists, remove the element from the historical motion vector predictor candidate list HmvpCandList. On the other hand, if there is no inter-prediction information with the same value as the inter-prediction information candidate hMvpCand, , delete the first element of the history predicted motion vector candidate list HmvpCandList, and The inter-prediction information candidate hMvpCand is added to the end of the vector candidate list HmvpCandList.
[0130] 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.
[0131] First, the historical motion vector predictor candidate list HmvpCandList is initialized for each slice. (Step S2101 in FIG. 26) At the beginning of the slice, the historical predicted motion vector candidate list Hm All elements of vpCandList are emptied and registered in the history predicted motion vector candidate list HmvpCandList. The number of recorded historical motion vector predictor candidates (current number of candidates). The value of NumHmvpCand is set to 0. do.
[0132] Note that the initialization of the historical motion vector predictor candidate list HmvpCandList is performed on a slice-by-slice basis ( However, it is possible to perform this on a picture-by-picture, tile-by-tile or tree block basis. It may be performed on a row-by-row basis.
[0133] 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 S2107 in FIG. 26).
[0134] First, the initial setting is performed for each coding block. Set the value of the parameter "identicalCandExist" to FALSE (false) and delete the target index that indicates the candidate for deletion. The index removeIdx is set to 0 (step S2103 in FIG. 26).
[0135] It is determined whether or not there is an inter-prediction information candidate hMvpCand to be registered (steps in FIG. 26 ). The prediction method determination unit 105 on the encoding side determines whether the normal prediction motion vector mode or When the normal merge mode is determined, or when the bitstream decoding unit 201 on the decoding side performs normal prediction, When decoded as a motion vector mode or normal merge mode, the inter prediction information The information is set as the inter prediction information candidate hMvpCand to be registered. Intra prediction mode, sub-block prediction motion vector mode or sub-block merge mode, or when the bitstream decoding unit 201 on the decoding side determines that the bitstream is an intra-prediction mode, Decoded as sub-block predicted motion vector mode or sub-block merge mode In this case, the historical motion vector predictor candidate list HmvpCandList is not updated, and the registered image is There is no inter prediction information candidate hMvpCand. If it does not exist, steps S2105 to S2106 are skipped (step S in FIG. 26). 2104: NO). If there is an inter-prediction information candidate hMvpCand to be registered, The processing from S2105 onwards is carried out (step S2104 in FIG. 26: YES).
[0136] Next, the input to be registered is added to each element of the history motion vector predictor candidate list HmvpCandList. The elements (inter prediction information) with the same value as the inter prediction information candidate hMvpCand, i.e., the same elements It is determined whether or not it exists (step S2105 in FIG. 26). 10 is a flowchart of a processing procedure. (Step S2121 in FIG. 27: NO), the historical motion vector predictor candidate list HmvpCa Since the ndList is empty and there are no identical candidates, steps S2122 to S2125 in FIG. 27 are executed. The number of historical motion vector predictor candidates NumHmvpC is If the value of and is greater than 0 (YES in step S2121 of FIG. 27), the history predicted motion vector The process of step S2123 is repeated for the data index hMvpIdx from 0 to NumHmvpCand-1. First, the history of the motion vector predictor candidate list is returned (steps S2122 to S2125 in FIG. 27). The hMvpIdx-th element HmvpCandList[hMvpIdx] counting from 0 in the list is the inter prediction information candidate hM If it is the same as vpCand (step S2123 in FIG. 27), Step S2123: YES), a flag "identicalCandE" indicating whether an identical candidate exists or not, Set the value of xist to TRUE and the deletion target index remo to indicate the position of the element to be deleted. Set the current value of the history predicted motion vector index hMvpIdx to veIdx and check the same element. If they are not the same (step S2123 in FIG. 27: NO), increase hMvpIdx by 1. If the history predicted motion vector index hMvpIdx is less than or equal to NumHmvpCand-1, If so, the process from step S2123 onwards is carried out.
[0137] Returning to the flowchart of FIG. 26 again, the historical predicted motion vector candidate list HmvpCandList The element shift and addition process is performed (step S2106 in FIG. 26). Step S2106: Shifting / adding elements of the history predicted motion vector candidate list HmvpCandList 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. xist is compared to determine whether it is TRUE or NumHmvpCand is 6 (step S2141 in FIG. 28). ) The flag identicalCandExist indicates whether an identical candidate exists or not. If the number of candidates NumHmvpCand is 6, any of the conditions is satisfied (step S2141 in FIG. 28: YES), excluding the elements stored in the historical motion vector predictor candidate list HmvpCandList Add a new element from the index i. Set the initial value of the index i to the value of removeIdx + 1. The element shift process in step S2143 is repeated from the initial value of NumHmvpCand to NumHmvpCand. Steps S2142 to S2144 of 28). HmvpCandList[i - 1] is set to HmvpCandList[i ] is copied to shift the elements forward (step S2143 in FIG. 28), and i is Increment by 1 (steps S2142 to S2144 in FIG. 28). The (NumHmvpCand-1)th motion vector candidate HmvpCandLi, counting from 0, corresponds to the end of the motion vector candidate list. The inter prediction information candidate hMvpCand is added to st[NumHmvpCand-1] (step S21 in FIG. 28). 45) Finish the element shift and addition process of this history predicted motion vector candidate list HmvpCandList. On the other hand, if the flag identicalCandExist indicating whether an identical candidate exists is set to TRUE, If neither of the conditions of NumHmvpCand and NumHmvpCand is 6 is satisfied (step S2141 in FIG. 28: N O), without excluding the elements stored in the history predicted motion vector candidate list HmvpCandList, Add the inter prediction information candidate hMvpCand to the end of the history prediction motion vector candidate list (Figure 28 step S2146). Here, the end of the history motion vector predictor candidate list is 0 It is the NumHmvpCand-th HmvpCandList[NumHmvpCand] counting from the beginning. Increment by 1 and shift the elements of this history predicted motion vector candidate list HmvpCandList. and the addition process ends.
[0138] FIG. 31 is a diagram illustrating an example of a process for updating the history motion vector predictor candidate list. The elements (inter prediction information) are registered in the historical predicted motion vector candidate list HmvpCandList When adding a new element to the list, the previous element of the history motion vector predictor candidate list HmvpCandList is added. The new inter-prediction information is compared with the previous inter-prediction information (Fig. 31A). If the value is the same as the third element HMVP2 from the beginning of the vector candidate list HmvpCandList, The element HMVP2 is deleted from the motion vector predictor candidate list HmvpCandList, and the following elements HMVP3 to HM VP5 is shifted forward one by one and stored in the history prediction motion vector candidate list HmvpCandLis A new element is added to the end of t (FIG. 31B), and the history motion vector predictor candidate list HmvpCan The update of the dList is completed (Figure 31C).
[0139] <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 motion vector predictor candidates from historical motion vector predictor candidate list HmvpCandList FIG. 29 is a flowchart illustrating the procedure for deriving a historical motion vector predictor candidate. This is a flow chart.
[0140] The number of current motion vector predictor candidates numCurrMvpCand is the motion vector predictor candidate list mvpLis The maximum number of elements in tLX (here, 2) or more, or the number of history motion vector predictor candidates is NumHm If the value of vpCand is 0 (NO in step S2201 in FIG. 29), step S22 in FIG. The process from S2202 to S2209 is omitted, and the procedure for deriving the historical motion vector predictor candidate is completed. The current number of motion vector predictor candidates numCurrMvpCand is the motion vector predictor candidate list mvpLis If the number of elements of tLX is smaller than 2, and the number of history motion vector predictor candidates NumHmvpCa If the value of nd is greater than 0 (YES in step S2201 in FIG. 29), Process steps S2202 to S2209.
[0141] Next, the index i is 1 to 4 and the number of historical motion vector predictor candidates is numCheckedHMVP The process of steps S2203 to S2208 in FIG. 29 is repeated until the smaller value of Cand is reached. The current number of motion vector predictor candidates, nu, is returned (steps S2202 to S2209 in FIG. 29). When mCurrMvpCand is equal to or greater than 2, which is the maximum number of elements in the motion vector predictor candidate list mvpListLX. (Step S2203 in FIG. 29: NO), Steps S2204 to S2209 in FIG. 29 The process for deriving the historical motion vector predictor candidate is omitted, and the procedure for deriving the current motion vector predictor candidate is terminated. The number of motion vector candidates, numCurrMvpCand, is the maximum number of elements in the motion vector predictor candidate list, mvpListLX. If it is smaller than 2 (step S2203 in FIG. 29: YES), step S2 in FIG. Processes 204 and beyond.
[0142] Next, the process from step S2205 to S2207 is performed when Y is 0 and 1 (L0 and L1). This is performed for each of the current predicted motion vectors (steps S2204 to S2208 in FIG. 29). The number of motion vector predictor candidates, numCurrMvpCand, is the maximum number of elements in the motion vector predictor candidate list, mvpListLX. If the number of the digits is 2 or more (step S2205 in FIG. 29: NO), the process proceeds from step S2206 in FIG. 29. Therefore, the process of S2209 is omitted, and the procedure for deriving the historical motion vector predictor candidate is terminated. The number of current motion vector predictor candidates numCurrMvpCand is the motion vector predictor candidate list mvpListLX If the number of elements is smaller than 2, which is the maximum number of elements (step S2205 in FIG. 29: YES), The process from step S2206 onwards is carried out.
[0143] Next, the motion vector to be coded / decoded is included in the history predicted motion vector candidate list HmvpCandList. It is an element of the same reference index as the vector reference index refIdxLX, and the predicted motion vector If the element is different from any element in the vector list mvpListLX (step S2206 in FIG. 29), :YES), the numCurrMvpCand-th element mvpL counting from 0 in the motion vector predictor candidate list istLX[numCurrMvpCand] is the LY of the history predicted motion vector candidate HmvpCandList[NumHmvpCand - i] (Step S2207 in FIG. 29), and the current motion vector predictor candidate Increment the number of historical motion vector predictor candidates, numCurrMvpCand, by 1. In the list, there is a reference index that is the same as the reference index refIdxLX of the motion vector to be coded / decoded. element of the motion vector predictor list mvpListLX, and an element different from any element of the motion vector predictor list mvpListLX is If not (step S2206 in FIG. 29: NO), the additional processing of step S2207 is skipped. Upload.
[0144] The above steps S2205 to S2207 in Figure 29 are performed on both L0 and L1. (Steps S2204 to S2208 in FIG. 29). Increment the index i by 1. , the index i is the smaller value of 4 or the number of historical motion vector predictor candidates NumHmvpCand. In the following cases, the process from step S2203 onward is performed again (steps S2202 to S2203 in FIG. 29). S2209).
[0145] <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 402 and the history merge candidate derivation unit 445. 21, which is the processing procedure of step S404, The method for deriving merge candidates will now be described in detail. Figure 30 shows the history merge candidate derivation process. 10 is a flowchart for explaining the process.
[0146] First, initialization is performed (step S2301 in FIG. 30). 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.
[0147] Next, set the initial value of the index hMvpIdx to 1, and then calculate from this initial value to NumHmvpCand. 30. Then, the additional processing from step S2303 to step S2310 in FIG. 30 is repeated (FIG. 3 Steps S2302 to S2311 of step 0. Elements registered in the current merge candidate list If the number of merge candidates is not less than (MaxNumMergeCand-1), the merge Since merge candidates have been added to all elements in the candidate list, the merge candidate derivation process is The process ends (NO in step S2303 in FIG. 30). If the number of elements in the merge candidate list, numCurrMergeCand, is less than or equal to (MaxNumMergeCand-1), Execute the process from step S2304 onwards. Set the value of sameMotion to FALSE (see Figure 30). (Step S2304) Next, the initial value of index i is set to 0, and The processing of steps S2306 and S2307 in FIG. 30 is repeated up to numOrigMergeCand-1 (FIG. 30 (S2305 to S2308). Counting from 0 in the history motion vector prediction candidate list (NumHmvp Cand - hMvpIdx)-th element HmvpCandList[NumHmvpCand- hMvpIdx] is the merge candidate list Counting from 0, compare whether the value is the same as the i-th element mergeCandList[i] (step in Figure 30). P2306).
[0148] The same value of a merge candidate means that all components (inter prediction mode, reference If the values of the merge candidates (reference index, motion vector) are the same, the merge candidates are considered to have the same value. If the complements are the same and isPruned[i] is FALSE (YES in step S2306 of FIG. 30), Set both sameMotion and isPruned[i] to TRUE (step S2307 in FIG. 30). If the values are not the same (NO in step S2306 in FIG. 30), the process in step S2307 is performed. The process from step S2305 to step S2308 in FIG. 30 is repeated. When the process is completed, compare whether sameMotion is FALSE (step S230 in FIG. 30). 9), if sameMotion is FALSE (YES in step S2309 of FIG. 30), that is, That is, the (NumHmvpCand - hMvpIdx)th element counting from 0 in the history motion vector candidate list. Since the element HmvpCandList[NumHmvpCand - hMvpIdx] does not exist in mergeCandList, it is not a merge candidate. The numCurrMergeCand-th mergeCand in the list is mergeCandList[numCurrMergeCand], which stores the history predicted movement vector. The (NumHmvpCand - hMvpIdx)th element of the candidate list, counting from 0, is HmvpCandList[NumHmv pCand - hMvpIdx] and increment numCurrMergeCand by 1 (step 30 in Figure 30). The index hMvpIdx is incremented by 1 (step S23 in FIG. 30). 02), steps S2302 to S2311 in FIG. 30 are repeated.
[0149] 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. .
[0150] <Average merge candidate derivation process> Next, the average merge candidate derivation unit 344 of the normal merge mode derivation unit 302 on the encoding side, This is a common process between the normal merge mode derivation unit 402 and the average merge candidate derivation unit 444. 21, step S403, which is the processing procedure for deriving average merge candidates, is explained in detail. 38 is a flowchart illustrating the procedure for deriving average merge candidates.
[0151] First, an initialization process is performed (step S1301 in FIG. 38). Set numCurrMergeCand to the number of elements currently in the merge candidate list.
[0152] Next, the merge candidate list is scanned from the top to determine two pieces of motion information. Let the index i=0 indicating the first motion information, and the index j=1 indicating the second motion information. Steps S1302 to S1303 in FIG. 38) If the number of elements, numCurrMergeCand, is not less than (the maximum number of merge candidates, MaxNumMergeCand-1), Since merge candidates have been added to all elements in the history candidate list, this history merge candidate derivation process The process ends (step S1304 in FIG. 38). If the number of elements to be merged is numCurrMergeCand (the maximum number of merge candidates, MaxNumMergeCand-1), the The processing from step S1305 onwards is carried out.
[0153] The i-th motion information of the merge candidate list, mergeCandList[i], and the j-th motion information of the merge candidate list, It is determined whether or not both of the pieces of information mergeCandList[j] are invalid (step S130 in FIG. 38). 5) If both are invalid, the average merge candidate of mergeCandList[i] and mergeCandList[j] If mergeCandList[i] and mergeCandList[j] are both invalid, If not, the following process is repeated with X set to 0 and 1 (steps S1306 to S1309 in FIG. 38). 1314).
[0154] Determine whether the LX prediction of mergeCandList[i] is valid (step S1307 in FIG. 38). If the LX prediction of mergeCandList[i] is valid, then the LX prediction of mergeCandList[j] is valid. It is determined whether the LX prediction of mergeCandList[j] is valid (step S1308 in FIG. 38). In other words, if both the LX prediction of mergeCandList[i] and the LX prediction of mergeCandList[j] are valid, If the LX prediction motion vector of mergeCandList[i] and the LX prediction motion vector of mergeCandList[j] are The motion vector of the LX prediction obtained by averaging the motion vectors and the reference index of the LX prediction in mergeCandList[i] The average merge candidate of the LX prediction with the variance is derived and set as the LX prediction of averageCand, and avera LX prediction of geCand is enabled (step S1309 in FIG. 38). In 08, if the LX prediction of mergeCandList[j] is not valid, i.e., the LX of mergeCandList[i] If the prediction is valid and the LX prediction of mergeCandList[j] is invalid, then the LX of mergeCandList[i] The average merge candidate of the LX prediction with the motion vector and reference index of the prediction is calculated as aver The LX prediction of ageCand is set to LX prediction of averageCand, and the LX prediction of averageCand is enabled (step S13 in FIG. 38). 10). In step S1307 of FIG. 38, if the LX prediction of mergeCandList[i] is not valid, Determine whether the LX prediction of mergeCandList[j] is valid (step S1311 in FIG. 38). ) If the LX prediction of mergeCandList[j] is valid, i.e., the LX prediction of mergeCandList[i] is If invalid and the LX prediction of mergeCandList[j] is valid, the LX prediction of mergeCandList[j] The average merge candidate of LX prediction with the motion vector and reference index of and LX prediction is set to be valid (step S1312 in FIG. 38). In step S1311 of FIG. 38, if the LX prediction of mergeCandList[j] is not valid, that is, That is, if both the LX prediction of mergeCandList[i] and the LX prediction of mergeCandList[j] are invalid, LX prediction of averageCand is disabled (step S1312 in FIG. 38).
[0155] The average merge candidate averageCand generated as above for the L0 prediction, L1 prediction, or BI prediction is , add the numCurrMergeCandth candidate in the merge candidate list to mergeCandList[numCurrMergeCand] Then, numCurrMergeCand is incremented by 1 (step S1315 in FIG. 38). , the process of deriving the average merge candidate is completed.
[0156] The average merge candidate is calculated by dividing the horizontal and vertical components of the motion vector. It is averaged.
[0157] <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 mode is acquired from the inter prediction mode determination unit 305. The image data and motion vectors are derived and stored in the decoded image memory 104 as specified by the reference index. The reference picture to be used 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 where the image was projected, a predicted signal is generated.
[0158] In inter prediction, the inter prediction mode is a single reference picture, such as L0 prediction or L1 prediction. In the case of prediction from a reference picture, the prediction signal obtained from one reference picture is used as the motion compensated prediction signal. The inter prediction mode is BI prediction, and the prediction mode is from two reference pictures. In the case of prediction, the weighted average of the predicted signals obtained from two reference pictures is used as the motion vector. The motion compensation prediction signal is supplied to the prediction method determination unit 105. The ratio of the weighted average of the predictions is 1:1, but weighted averages can also be performed using other ratios. For example, if the picture interval between the picture to be predicted and the reference picture is close, The weighting ratio may be increased as the value of the pixel increases. This may be done using a correspondence table of combinations of channel intervals and weighting ratios.
[0159] 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. The prediction unit 406 supplies the obtained motion compensation prediction signal to the decoded image signal superimposing unit 207 .
[0160] <About inter prediction mode> The process of making predictions from a single reference picture is defined as uni-prediction, and in the case of uni-prediction, it is called L0 prediction. Or L1 prediction, which is a prediction using one of the two reference pictures registered in the reference lists L0 and L1. Predictions are made using either one of them.
[0161] FIG. 32 shows a uni-predictive picture in which the L0 reference picture (RefL0Pic) is the picture to be processed. 33 shows the case where the time is before CurPic. 1. Similarly, the case where the reference picture to be processed is later than the current picture is shown in FIG. 32 and 33, the reference picture for L0 prediction is changed to the reference picture for L1 prediction (RefL1Pi It is also possible to replace it with c) and perform uni-prediction.
[0162] 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. The bi-prediction is expressed as BI prediction using 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 located before the current picture. Figure 35 shows a case where the picture is bi-predictive and has a reference to L0 prediction. This indicates that the reference picture and the reference picture for L1 prediction are located at a time earlier than the picture being processed. FIG. 36 shows a bi-predictive coding example in which a reference picture for L0 prediction and a reference picture for L1 prediction are processed. This shows the case where the picture is located after the picture to be processed.
[0163] In this way, the relationship between the L0 / L1 prediction type and time is that L0 is the past direction and L1 is the future direction. In the case of bi-prediction, the same reference picture can be used. It is also possible to perform L0 prediction and L1 prediction using the same. The decision as to whether to use L0 prediction or bi-prediction is made based on, for example, whether to use L1 prediction or not. The determination is made based on information (for example, a flag) indicating whether or not the message is being sent.
[0164] <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 coded into the bitstream along with the differential motion vector.
[0165] <Motion compensation processing based on normal predicted motion vector mode> The motion compensation prediction unit 306 is also shown as the inter prediction unit 102 on the encoding side in FIG. In this way, the inter prediction mode determination unit 305 performs normal prediction motion vector mode derivation. When the inter prediction information by the unit 301 is selected, the inter prediction information is - The inter prediction mode of the block currently being processed is acquired from the prediction mode determination unit 305. The estimation mode, reference index, and motion vector are derived to generate a motion compensated prediction signal. The generated motion compensation prediction signal is supplied to the prediction method determination unit 105.
[0166] Similarly, the motion compensation prediction unit 406 also performs the same function as the inter prediction unit 203 on the decoding side in FIG. As shown, during the decoding process, the switch 408 is turned on to the normal predicted motion vector mode derivation unit 40 When connected to 1, inter prediction by the normal prediction motion vector mode derivation unit 401 The information is acquired and the inter prediction mode and reference index of the currently processed block are The generated motion compensation prediction signal is then used to derive a motion vector. The signal is supplied to a decoded image signal superimposing unit 207.
[0167] <Motion compensation processing based on normal merge mode> The motion compensation prediction unit 306 is also shown as the inter prediction unit 102 on the encoding side in FIG. In this way, the inter prediction mode determination unit 305 determines whether the normal merge mode is When inter prediction information by the inter prediction mode is selected, this inter prediction information is used as the inter prediction mode. the inter prediction mode of the block currently being processed, obtained from the prediction mode determination unit 305; A reference index and a motion vector are derived, and a motion compensation prediction signal is generated. The compensated prediction signal is supplied to the prediction method determination unit 105 .
[0168] Similarly, the motion compensation prediction unit 406 also performs the same function as the inter prediction unit 203 on the decoding side in FIG. As shown, during the decoding process, switch 408 is normally connected to merge mode derivation unit 402. If so, the inter prediction information is obtained from the normal merge mode derivation unit 402, and the current processing The inter prediction mode, reference index, and motion vector of the block being processed are The generated motion compensation prediction signal is used as a decoded image signal. The paper is supplied to the folding section 207.
[0169] <Motion compensation processing based on sub-block predicted motion vector mode> The motion compensation prediction unit 306 is also shown as the inter prediction unit 102 on the encoding side in FIG. In this way, the inter prediction mode determination unit 305 determines the sub-block predicted motion vector model. When the inter prediction information is selected by the code derivation unit 303, this inter prediction information The inter prediction mode determination unit 305 obtains the inter prediction mode of the block currently being processed. Derives the center prediction mode, reference index, and motion vector, and generates a motion compensated prediction signal. The generated motion compensation prediction signal is supplied to the prediction method determination unit 105.
[0170] Similarly, the motion compensation prediction unit 406 also performs the same function as the inter prediction unit 203 on the decoding side in FIG. As shown, during the decoding process, a switch 408 controls the sub-block predicted motion vector mode. When the sub-block prediction motion vector mode derivation unit 403 is connected to the sub-block prediction motion vector mode derivation unit 403, Inter prediction information is obtained by the current block being processed. The generated code, reference index, and motion vector are derived to generate a motion compensated prediction signal. The resulting motion compensation prediction signal is supplied to the decoded image signal superimposing unit 207 .
[0171] <Motion compensation processing based on sub-block merge mode> The motion compensation prediction unit 306 is also shown as the inter prediction unit 102 on the encoding side in FIG. In this way, the inter prediction mode determination unit 305 includes a sub-block merge mode derivation unit When the inter prediction information by 304 is selected, this inter prediction information is Inter prediction of the block currently being processed, obtained from the prediction mode determination unit 305 The mode, reference index, and motion vector are derived, and a motion compensation prediction signal is generated. The resulting motion compensation prediction signal is supplied to the prediction method determination unit 105.
[0172] Similarly, the motion compensation prediction unit 406 also performs the same function as the inter prediction unit 203 on the decoding side in FIG. As shown, during the decoding process, a switch 408 controls the sub-block merge mode derivation unit 404. , the inter prediction information by the sub-block merge mode derivation unit 404 is and obtains the inter prediction mode and reference index of the currently processed block. , a motion vector is derived, and a motion compensation prediction signal is generated. The generated motion compensation prediction signal is , and is supplied to the decoded image signal superimposing unit 207.
[0173] <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 bitstream is then coded into the bitstream. Determine whether to perform motion compensation using an affine model based on the following flags in the program: .
[0174] sps_affine_enabled_flag is the flag for motion compensation using the affine model in inter prediction. If sps_affine_enabled_flag is 0, it indicates whether or not affine is available. The motion compensation is suppressed so that it is not based on the affine model. cu_affine_type_flag specifies the CU (Coded Block) syntax of the coded video sequence. If sps_affine_enabled_flag is 1, the encoded video sequence is not transmitted. In this case, affine model motion compensation can be used.
[0175] sps_affine_type_flag is the 6-parameter affine model for inter prediction. Indicates whether motion compensation is available. If sps_affine_type_flag is 0, 6 parameters are used. It is suppressed so that it is not motion compensation by the affine model. Also, cu_affine_type_flag is not conveyed in the CU syntax of a coded video sequence. If e_flag is 1, the coded video sequence is generated using a 6-parameter affine model. If sps_affine_type_flag is not present, it is assumed to be 0. do.
[0176] 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 motion compensation is used. If inter_affine_flag is 0, If this is set, no affine model is used for the current CU. If lag is not present, it is assumed to be 0.
[0177] 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, a 6-parameter affine model of motion compensation is used. If e_flag is 0, the motion compensation prediction signal for the CU currently being processed is generated. In this paper, motion compensation using a four-parameter affine model is used.
[0178] 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.
[0179] The four-parameter affine model is defined as the horizontal and vertical components of the motion vectors of the two control points. The motion vector of a sub-block is derived from the four vertical component parameters. This is a mode in which motion compensation is performed at the pixel position.
[0180] <Intra Block Copy (IBC)> The valid reference area for intrablock copying will be described with reference to Figure 39. The effective reference area is determined by using the tree block unit as the intra block copy reference block. 39A. 500, 501, 502, 503, and 504 in FIG. 504 is the coding tree block to be processed. This is the target coding block. The processing order of the coding tree blocks is 500, 501, 502. , 503, and 504 in this order. The three coding tree blocks 501, 502, and 504 processed immediately before the coding tree block 504 are 03 is set as the valid reference area of the coding block 505 to be processed. The coding tree block processed before 1 and before the coding block to be processed 505 Regardless of whether the processing has been completed or not, the coding tree including the coding block to be processed 505 is All areas included in the leaf block 504 are set as invalid reference areas.
[0181] FIG. 39B shows the intra block copy reference blocks, which are obtained by dividing the coding tree block into four units. This is an example of determining a valid reference area as a lock. 516 is the coding tree block to be processed. Lee block 515 is divided into four parts: 506, 507, 508, and 509. 516 is divided into 510, The image is divided into four parts, 511, 512, and 513. 514 is the coding block to be processed. The processing order of the reference block for the traffic block copy is 506, 507, 508, 509, 510. , 511, 512, 513 in this order. In this case, the processing target coding block 514 is included. The three intra blocks processed immediately before the intra block copy reference block 511 The copy reference blocks 508, 509, and 510 are used as valid references for the coding block 514 to be processed. The coding tree processed before the intra block copy reference block 508 is block, and whether processing has been completed before the encoding block to be processed 514. Regardless of the above, the intra block copy reference block 51 including the coding block 514 to be processed All areas included in 1 are invalid reference areas.
[0182] <Predictive Intra Block Copy: Encoding Side Explanation> The procedure of the predictive intra block copy process on the encoding side will be described with reference to FIG.
[0183] First, the block vector detection unit 375 detects the block vector mvL (see the step in FIG. 44). Next, the IBC spatial block vector candidate derivation unit 371, IB C history prediction block vector candidate derivation unit 372, IBC prediction block vector candidate supplementation unit 373, IBC prediction block vector candidate selection unit 376, block vector subtraction unit 378 Then, calculate the difference block vector of the block vector used in the predicted block vector mode. (Steps S4501 to S4503 in FIG. 44).
[0184] Calculate predicted block vector candidates and construct a block vector candidate list mvpList. (Step S4501 in FIG. 44). Spatial block vector candidate derivation unit 371, IBC history block vector candidate derivation unit 372 , an IBC prediction block vector candidate supplementation unit 373 selects a plurality of prediction block vector candidates. Step S45 in FIG. 44 is a process for deriving the vectors of the predicted block vector candidates mvpList. The detailed processing procedure of step 01 will be described later using the flowchart of FIG.
[0185] Next, the IBC prediction block vector candidate selection unit 376 selects the prediction block vector A prediction block vector mvpL is selected from the candidate list mvpListL (step S45 in FIG. 44). 02). The block vector mvL and the predicted block vector candidate list mvpListL are stored in Each differential block is a difference between each predicted block vector and the candidate mvpListL[i]. The amount of code when encoding these differential block vectors is calculated as a predicted block. The predicted block vector is calculated for each element of the block vector candidate list mvpListL. Among the elements registered in the candidate list mvpListL, the coding amount for each candidate of the prediction block vector The candidate mvpListL[i] of the predicted block vector that minimizes is set as the predicted block vector mvpL. The prediction block vector candidate list mvpListL is selected and its index i is obtained. If there are multiple candidates for the predicted block vector that will have the smallest amount of generated code among the predicted block vectors, The prediction where index i in the block vector candidate list mvpListL is represented by a small number Select the candidate block vector mvpListL[i] as the optimal predicted block vector mvpL, and Get the index i of
[0186] Next, a block vector subtraction unit 378 subtracts the prediction vector mvL selected from the block vector mvL. Subtract the block vector mvpL, mvdL = mvL - mvpL The differential block vector mvdL is calculated as follows (step S4503 in FIG. 44).
[0187] <Predicted Intra Block Copy: Decoding Side Explanation> Next, the prediction block vector mode processing procedure on the decoding side will be described with reference to FIG. On the signal side, an IBC spatial prediction block vector candidate derivation unit 471, an IBC history block vector The IBC prediction block vector is generated by the vector candidate derivation unit 472 and the IBC prediction block vector supplementation unit 473. Calculate the block vector used in the Tor mode (steps S4600 to S4601 in FIG. 45). 02). Specifically, the predicted block vector candidate list mvpListL is calculated, and the predicted block A vector mvpL is selected, and a block vector mvL is calculated.
[0188] Calculate the predicted block vector candidates and construct the predicted block vector candidate list mvpListL. (Step S4601 in FIG. 45). BC spatial block vector candidate derivation unit 471, IBC history block vector candidate derivation unit 4 72, the IBC block vector supplementing unit 473 calculates multiple prediction block vector candidates. Then, the prediction block vector candidate list mvpListL is constructed. Next, the IBC prediction block vector The candidate selection unit 476 selects the predicted block vector candidate list mvpListL from the bitstream decoding unit 201 The prediction corresponding to the index mvpIdxL of the prediction block vector decoded and supplied The candidate block vector mvpListL[mvpIdxL] is used as the selected predicted block vector mvpL. (Step S4601 in FIG. 45). 8, the difference block vector mvdL and the prediction block vector mvdL are decoded and supplied by the bit stream decoding unit 201. Add the lock vector mvpL, mvL = mvpL + mvdL The block vector mvL is calculated as follows (step S4602 in FIG. 45).
[0189] <Prediction Block Vector Mode: Block Vector Prediction Method> FIG. 47 shows the intra block copy prediction unit of the video encoding device according to the embodiment of the present invention. 352 and the intra block copy prediction unit 362 of the video decoding device have a common function. 10 is a flowchart showing the processing procedure of a predicted intra block copy mode derivation process. .
[0190] In the intra block copy prediction unit 352 and the intra block copy prediction unit 362, A prediction block vector candidate list mvpListL is provided. mvpListL has a list structure and is a prediction block vector candidate list. The block vector index and the predicted block vector candidate corresponding to the index are A memory area is provided for storing the number of predicted block vector indexes as elements. The characters start from 0, and the predicted block vector candidate list mvpListL is stored in the memory area of the predicted block vector candidate list mvpListL. In this embodiment, the predicted block vector candidate list is stored. The mvpListL can register three prediction block vector candidates. Furthermore, the predicted block vectors registered in the predicted block vector candidate list mvpListL are The variable numCurrMvpIbcCand indicating the number of candidates is set to 0.
[0191] The IBC spatial block vector candidate derivation units 371 and 471 are A candidate prediction block vector is derived from the vector (step S4801 in FIG. 47). In this process, the predicted block vector candidate of the adjacent block on the left (A0 or A1) is used. A flag availableFlagLA indicating whether the block vector mvLA is available or not is derived, and mvLA is added to the predicted block vector candidate list mvpListL. The vector candidate derivation units 371 and 471 select the adjacent block (B0, B1 or B2) on the upper side. ) (Step S4802 in FIG. 47). In the process, a flag indicating whether a motion vector predictor candidate of the adjacent block on the upper side is available is used. The lag availableFlagLB and the block vector mvLB are derived. If mvLA and mvLB are not equal, In step S4 of FIG. 47, mvLB is added to the predicted block vector candidate list mvpListL. The processing of S401 and S402 is the same except for the position and number of adjacent blocks to be referenced. The flag availa indicates whether the prediction block vector candidate of the coding block is available. bleFlagLN and a motion vector mvLN (N is A or B, and so on below) are derived.
[0192] Next, the IBC history block vector candidate derivation units 372 and 472 calculate the history block vectors. The historical block vector candidates registered in the block candidate list HmvpIbcCandList are used to predict the block vector. The block vector candidate list mvpListL is added to this block vector candidate list mvpListL (step S4803 in FIG. 47). For details of the registration process procedure in step S4803, please refer to the flowchart in Figure 29. In the explanation of the operation, the motion vector is a block vector, and the list of reference indices is L0. , the historical predicted motion vector candidate list HmvpCandList is converted into the historical block vector candidate list Hmvp The operation should be the same as when IbcCandList is used, so the explanation will be omitted.
[0193] Next, the IBC prediction block vector supplementation units 373 and 473 are used to select the prediction block vector candidates. Add a block vector of a given value, such as (0,0), until the complementary list mvpListL is filled ( S4804 in Figure 47).
[0194] <Merge intra block copy mode derivation part> The intra block copy prediction unit 352 in FIG. 42 is an IBC spatial block vector candidate deriving unit. 371, an IBC history block vector candidate derivation unit 372, an IBC block vector interpolation unit Filling unit 373, reference position correction unit 380, reference area boundary correction unit 381, IBC merge candidate selection The IBC prediction mode determining unit 377 includes a block 374 and an IBC prediction mode determining unit 377 .
[0195] The intra block copy prediction unit 362 in FIG. 43 is an IBC spatial block vector candidate deriving unit. 471, an IBC history block vector candidate derivation unit 472, an IBC block vector interpolation unit Filling unit 473, IBC merge candidate selection unit 474, reference position correction unit 480, reference area boundary correction section 481, and block copy section 477.
[0196] FIG. 46 shows the intra block copy prediction unit of the video encoding device according to the embodiment of the present invention. 352 and the intra block copy prediction unit 362 of the video decoding device have a common function. 10 is a flowchart illustrating a procedure for deriving a merge intra block copy mode. do.
[0197] In the intra block copy prediction unit 352 and the intra block copy prediction unit 362, It has a merge intra block copy candidate list, mergeIbcCandList. The mergeIbcCandList is a list structure of merge intrablock copy candidates. The merge index indicates the location of the copy candidate and the merge A storage area is provided for storing intra block copy candidates as elements. The index number starts from 0 and is the merge intra-block copy candidate list mergeIbc Merge intra block copy candidates are stored in the CandList storage area. mergeIbcCandList is a merge intra block copy candidate list. The merge candidates for index i are represented by mergeIbcCandList[i]. In this case, the merge candidate list mergeCandList must contain at least three merge intra-block candidates. Furthermore, merge intra block copy candidates can be registered. Indicates the number of merge intra block copy candidates registered in the supplementary list mergeIbcCandList. Set the variable numCurrMergeIbcCand to 0.
[0198] IBC space block vector candidate derivation unit 371 and IBC space block vector candidate derivation unit The output unit 471 receives the encoded information storage memory 111 of the video encoding device or the encoded information storage memory 111 of the video decoding device. From the coding information stored in the coding information storage memory 205, The spatial merge candidates A and B are derived from the adjacent blocks on the side and top. The candidate page is registered in the merge intra block copy candidate list mergeIbcCandList (Figure 4 Here, we define N, which indicates either spatial merge candidate A or B. The intra block copy prediction information of block N is used as the spatial block vector merge candidate N. Derive a flag availableFlagN indicating whether it is available as a block vector mvL. However, in this embodiment, the block containing the coding block to be processed Since the block vector merge candidates are derived without referring to other coding blocks, The spatial block vector merge candidates included in the block containing the coding block to be processed are derived. I won't give it out.
[0199] Next, the IBC history block vector candidate derivation unit 372 and the IBC history block vector candidate derivation unit 373 are The block candidate derivation unit 472 registers the block candidate vector in the history prediction block vector candidate list HmvpIbcCandList. Merge the historical predicted block vector candidates into the intra block copy candidate list me In this embodiment, the merg Block vectors added to eIbcCandList and historical predicted block vector candidates If the vectors have the same value, they shall not be added to mergeIbcCandList.
[0200] Next, the IBC prediction block vector supplementation unit 373 and the IBC prediction block vector supplementation unit 374 are The fill section 473 is registered in the merge intra block copy candidate list mergeIbcCandList. The number of merge candidates numCurrMergeIbcCand is less than the maximum number of intra-block merge candidates MaxNumM If less than mergeIbcCand, merge intra block copy candidate list mergeIbcCandList The number of merge candidates registered in t is numCurrMergeIbcCand, and the maximum number of merge candidates is MaxNumMergeI Derive additional intra-block merge candidates with bcCand as the upper limit and perform intra-block merge. The mergeIbcCandList copy candidate list is registered in the mergeIbcCandList (step S4703 in FIG. 46). A block vector with a value of (0,0) with the number of merge candidates as its upper limit, MaxNumMergeIbcCand. is added to the merge intra block copy candidate list mergeIbcCandList.
[0201] Next, the IBC merge candidate selection unit 374 and the IBC merge candidate selection unit 474 select the merge candidates. Intrablock copy candidates registered in the mergeIbcCandList One of the IBC merge candidates is selected (step S4704 in FIG. 46). The selection unit 374 obtains the decoded image at the reference position from the decoded image memory 104 and compares it with the code amount. The merge candidate is selected by calculating the amount of the merge error. The merge index indicating the complement is supplied to the IBC prediction mode determination unit 377. The mode determination unit 377 calculates the amount of code and the amount of distortion to determine whether the mode is merge mode or not. The result is supplied to the prediction method determination unit 105. On the other hand, the decoding side selects IBC merge candidates. In unit 474, based on the decoded merge index, an intra block merge candidate is selected. and supplies the selected intra block merging candidate to the reference position correcting unit 480.
[0202] Next, the reference position correction unit 380 and the reference position correction unit 480 perform intra-block marking. The reference position of the candidate page is corrected (step S4705 in FIG. 46). The processing by the correction unit 380 and the reference position correction unit 480 will be described in detail later.
[0203] Next, the reference area boundary correction unit 381 and the reference area boundary correction unit 481 perform intrablock The reference area boundary is corrected for the black merge candidate (step S4706 in FIG. 46). The processing of the reference position correction unit 381 and the reference position correction unit 481 will be described in detail later.
[0204] The block copy unit 477 obtains the decoded image at the reference position from the decoded image memory 208, The block copy unit 477 supplies the decoded image signal to the decoded image signal superimposing unit 207. and the chrominance components are copied.
[0205] The above block vector mvL indicates the block vector of luminance. For mvC, if the color difference format is 420, mvC = ( ( mvL >> ( 3 + 2 ) ) * 32 The x and y components of mvC are processed using the above formula.
[0206] <Reference position correction section> FIG. 48 is a flowchart illustrating the processing of the reference position correction unit 380 and the reference position correction unit 480. Now, the unit of the intra block copy reference block is the coding tree block. It is assumed that the image is a CTU and its size is not 128x128 pixels.
[0207] First, the positions of the top left and bottom right of the reference block are calculated (S6001). indicates a block that the current coding block references using a block vector. If the top left of the reference block is (xRefTL, yRefTL) and the bottom right is (xRefBR, yRefBR), then ( xRefTL, yRefTL ) = ( xCb + ( mvL
[0000] >> 4 ), yCb + ( mvL
[0001] >> 4 ) ) ( xRefBR, yRefBR ) = ( xRefTL + cbWidth - 1, yRefTL + cbHeight - 1 ) Here, the position of the coding block to be processed is (xCb, yCb), and the block vector is (mvL[ The width of the coding block to be processed is cbWidth and the height is cbHeight.
[0208] Next, it is determined whether the size of the CTU is 128 x 128 pixels (S6002). is not 128x128 pixels (S6002: NO), so the top left and bottom right positions of the accessible area The upper left corner of the accessible area is calculated as (xAvlTL, yAvlTL) and the lower right corner as (xAvlBR , yAvlBR), then NL = Min( 1, 7 - CtbLog2SizeY ) - ( 1 << ((7 - CtbLog2SizeY) << 1) ) ( xAvlTL, yAvlTL ) = ( ((xCb >> CtbLog2SizeY) + NL) << CtbLog2SizeY, (yCb >> CtbLog2SizeY) << CtbLog2SizeY ) ( xAvlBR, yAvlBR ) = ( ((xCb >> CtbLog2SizeY) << CtbLog2SizeY) - 1, (((yCb >> CtbLog2SizeY) + 1) << CtbLog2SizeY) - 1 ) Here, the size of the CTU is CtbLog2SizeY.
[0209] Next, it is determined whether the reference position in the x direction of the reference block is smaller than the top left corner of the referenceable area. If the determination is false (S6004: NO), the next process is performed (S6006). On the other hand, if the judgment is true (S6004: YES), align it with the top left corner of the accessible area. The reference position in the x direction is corrected (S6005).
[0210] 49 is a diagram showing how the reference position is corrected. 6001 is a coding tree to be processed. 6001 indicates the block, 6002 indicates the coding block to be processed, and 6003 indicates the accessible area. If the reference block r2 is located at 6011, the reference position in the x direction is It is smaller than the top left corner of the area (S6004: YES). Therefore, xRefTL = xAvlTL, which is 6012. The reference position is corrected to the position (S6005). Here, as in S6001, xRefBR=x Since it is RefTL+cbWidth-1, xRefBR will also be corrected when xRefTL is corrected. In this correction of the reference position, the block vector mvL[0] may be corrected. , mvL[0] = (xAvlTL - xCb) << 4 This makes xRefTL=xAvlTL, so the reference position can be corrected.
[0211] In this way, if the reference block is located outside the accessible region, the reference position By correcting this, it becomes possible to refer to it.
[0212] Now, the block vector candidate list constructed in the intra block copy prediction unit 352 is Suppose some block vectors in the list are outside the referenceable region. If the position is not corrected, reference by those block vectors is not possible, so The block vectors cannot be candidates for the IBC merge mode. When correcting the reference position in the block vector candidate list, Therefore, the block vectors are inside the accessible region. All block vectors can be candidates for the IBC merge mode. Therefore, the IBC merge mode selection unit 374 selects the merge mode for all block vectors. The optimal prediction mode can be selected from the candidates for each IBC merge mode. This improves the efficiency of the process.
[0213] Now, the block vector candidate list constructed in the intra block copy prediction unit 362 is Suppose some block vectors in the list are outside the referenceable region. If the position is not corrected, reference by those block vectors is not possible, so The IBC merge mode using the block vectors cannot be decoded. In a non-standard coder, the block vectors are used to indicate the IBC merge mode. However, due to malfunctions, Such merge indexes may be encoded to generate a bitstream. Or, a part of the bit stream may be missing due to packet loss, etc., and decoding may fail. The result may be such a merge index. When attempting to decode the stream, an attempt to reference outside the accessible region results in an incorrect position. As a result, the decoding device may access the decoded image memory. On the other hand, when the reference position is corrected in the present invention, All block vectors in the constructed block vector candidate list are in the referenceable region. Therefore, even if such an incomplete bitstream is decoded, the referenceable area The reference position is corrected to the inside of the area, making it possible to refer to the image. This guarantees the memory access range. As a result, the decoded result is the same depending on the decoder. This allows the decoding process to continue, thereby improving the robustness of the decoding device.
[0214] In addition, when correcting the block vector in the correction of the reference position, the target is the luminance block vector. Here, the chrominance block vector is a block vector of the luminance block. In other words, if the luminance block vector is corrected, the chrominance block vector is calculated. Therefore, there is no need to correct the reference position again for color differences. When block vectors are not corrected, it is necessary to determine whether they can be referenced in both luminance and chrominance. In comparison with the conventional method, the amount of processing can be reduced.
[0215] In addition, when correcting the block vector in the correction of the reference position, the corrected block The vector is stored in the encoding information storage memory as the block vector of the encoding block to be processed. 111 or the coded information storage memory 205. The lock vector points to the same location. Here, the decoded result is saved in the decoded image memory. In this filtering process, the block boundary is deblocked. The strength of the filter is controlled by the difference between the block vectors of the two blocks facing the boundary. If the block vector is not corrected, the corrected reference position and the block vector are This improves coding efficiency by providing a more appropriate filter strength compared to when the pointing position is different. It can be done.
[0216] Next, check whether the reference position in the y direction of the reference block is smaller than the top left corner of the accessible area. If the determination is false (S6006: NO), the next process (S6008 On the other hand, if the judgment is true (S6006: YES), align it with the top left corner of the accessible area. The reference position in the y direction is corrected (S6007).
[0217] Now, if the reference block r4 is located at 6021, the reference position in the y direction is It is smaller than the upper left corner of the available area (S6006: YES). Therefore, yRefTL = yAvlTL, and it is 60 The reference position is corrected to the position of 22 (S6007). Here, as in S6001, yRef Since BR=yRefTL+cbHeight-1, yRefBR is also corrected when yRefTL is corrected. In this correction of the reference position, the block vector mvL[1] may be corrected. Mari, mvL[1] = (yAvlTL - yCb) << 4 This results in yRefTL=yAvlTL, so the reference position can be corrected.
[0218] Next, check whether the reference position in the x direction of the reference block is greater than the bottom right corner of the accessible area. If the determination is false (S6008: NO), the next process (S6010 On the other hand, if the judgment is true (S6008: YES), align it with the bottom right of the accessible area and proceed to Then, the reference position in the x direction is corrected (S6009).
[0219] Now, if the reference block r7 is located at 6031, the reference position in the x direction is It is larger than the bottom right corner of the available area (S6008: YES). Therefore, xRefBR = xAvlBR, and it is 60 The reference position is corrected to the position of 32 (S6009). Here, xRef BR=xRefTL+cbWidth-1, that is, xRefTL=xRefBR-(cbWidth-1), so xRefBR was corrected. In this correction of the reference position, the block base You can also correct the vector mvL[0]. mvL[0] = (xAvlBR - (xCb + cbWidth - 1)) << 4 This makes xRefBR=xAvlBR, so the reference position can be corrected.
[0220] Next, check whether the reference position in the y direction of the reference block is greater than the bottom right corner of the accessible area. If the determination is false (S6010: NO), the process ends. If the judgment is true (S6010: YES), the reference in the y direction is aligned with the bottom right of the accessible area. The position is corrected (S6011).
[0221] Now, if the reference block r5 is located at 6041, the reference position in the y direction is It is larger than the bottom right corner of the available area (S6010: YES). Therefore, yRefBR = yAvlBR, and it is 60 The reference position is corrected to the position of 42 (S6011). Here, as in S6001, yRef BR=yRefTL+cbHeight-1, that is, yRefTL=yRefBR-(cbHeight-1), so correct yRefBR. In this correction of the reference position, the block The vector mvL[1] may be corrected. mvL[1] = (yAvlBR - (yCb + cbHeitght - 1)) << 4 This makes yRefBR=yAvlBR, so the reference position can be corrected.
[0222] Here, we will explain the case where the reference block r1 is located at 6051. In this case, , the reference position in the x direction is corrected in the same way as when the reference block is r2. As in the case of r4, the reference position in the y direction is corrected. It is located at 6052, which is inside the irradiable area.
[0223] If reference block r3 is located at 6061, then reference block r6 is located at 6062. If the reference block r8 is located at 6063, then the x and y directions are The reference position is corrected. As a result, each reference block is positioned within the accessible area. do.
[0224] This completes the process when the size of the CTU is not 128x128 pixels. If the size is 128x128 pixels (S6002: YES), the upper left corner of the accessible area is And the position of the bottom right corner is calculated (S6012).
[0225] FIG. 50 is a diagram for explaining the positions of the top left and bottom right corners when the accessible area is rectangular. In the case of FIG. 50A, the coding tree block 6101 to be processed is divided into four parts. The coding block 6102 to be processed is located at the top left of the division. The area is an inverted L-shape, as shown by the hatched area in 6103. If the accessible area is rectangular, The range is the rectangular range of 6103. When the referenceable area is rectangular, the reference block If the top left corner of the block is (xRefTL, yRefTL) and the bottom right corner is (xRefBR, yRefBR), offset[4] = {0, 64, 128, 128} NL = -offset[3 - blk_idx], NR = offset[blk_idx] ( xAvlTL, yAvlTL ) = ( (xCb >> CtbLog2SizeY) << CtbLog2SizeY + NL, (yCb >> CtbLog2SizeY) << CtbLog2SizeY ) ( xAvlBR, yAvlBR ) = ( ((xCb >> CtbLog2SizeY) << CtbLog2SizeY) - 1 + NR, (((yCb >> CtbLog2SizeY) + 1) << CtbLog2SizeY) - 1 ) Here, blk_idx is an index indicating the position of the coding block to be processed. The coding tree block to be processed is divided into four parts, and the coding block to be processed is the left If the target coding block is located above, blk_idx=0. If they are located at the top right, bottom left, and bottom right, respectively, blk_idx is 1, 2, and 3. 50B to 50D are diagrams showing the case where blk_idx=1 to 3, respectively. FIG.
[0226] Next, the reference position of the non-rectangular referable area is corrected (S6013). 10 is a flowchart illustrating a process for correcting the reference position of a portion of a referenceable area that is not rectangular. First, calculate the top left position of the accessible area (S6021). The accessible area is shown in Figure 5. Since it is a diagonal line part of 0, except for the case of blk_idx=3, there are two positions in the upper left corner, 6111 and 6112. If they are (X1, Y1) and (X2, Y2), then offset[4] = {64, 128, 64, 0}, NL = offset[blk_idx] (X1, Y1) = (xAvlTL, yAvlTL + 64) (X2, Y2) = (xAvlTL + NL, yAvlTL) This becomes:
[0227] Next, it is determined whether or not to correct the reference position to match the top left corner of the referenceable area (S602 2) In this judgment, if blk_idx is not 3 and the reference block is located in an area smaller than X2 and Y1, If it is, it is judged as true (S6022: YES). If it is false (S6022: NO), Then, proceed to the next process (S6026).
[0228] Next, the difference in the x direction between the reference block and the accessible area is If the determination is true (S6023), it is determined whether the difference is smaller than the difference in the y direction. 23: YES), the reference position in the x direction is corrected (S6024). On the other hand, if the judgment is false ( S6023: NO), and correct the reference position in the y direction (S6025).
[0229] FIG. 52A is a diagram showing how the reference position is corrected in S6024 and S6025. Now, blk_idx=0. If the reference block r1 is located at 6201, blk_i dx=3 and the upper left corner of the reference block is X2 (x direction of 6112) and Y1 (y direction of 6111) It is located in a smaller area (S6022: YES). Also, the reference block and the referenceable block are The difference in the x direction of the area is smaller than the difference in the y direction of the reference block and the referable area (S6 023:YES). Therefore, xRefTL=xAvlTL+NL, and the reference position in the x direction is set at position 6202. (S6024) Here, as in S6001, xRefBR=xRefTL+cbWidth-1 Therefore, when xRefTL is corrected, xRefBR is also corrected. In correcting the position, the block vector mvL[0] may be corrected. mvL[0] = (xAvlTL + NL - xCb) << 4 This makes xRefTL=xAvlTL+NL, so the reference position can be corrected.
[0230] On the other hand, if the reference block r2 is located at 6203, blk_idx is not 3 and the reference block The upper left corner of the reference block is located in an area smaller than X2 (x direction of 6112) and Y1 (y direction of 6111). (S6022: YES). Also, the difference in the x direction between the reference block and the accessible area is is not smaller than the difference in the y direction between the reference block and the accessible area (S6023: NO Therefore, the reference position in the y direction is corrected to the position 6204 by setting yRefTL=yAvlTL+64 (S 6025). Here, as in S6001, yRefBR = yRefTL + cbHeight - 1, so yR Correcting efTL also corrects yRefBR. The block vector mvL[0] may be corrected by mvL[1] = (yAvlTL + 64 - yCb) << 4 This results in yRefTL=yAvlTL+64, so the reference position can be corrected.
[0231] Here, let us assume that the reference block r3 is located at 6205. In this case, the reference block The difference in the x direction of the accessible area is smaller than the difference in the y direction between the reference block and the accessible area. Therefore, the reference position in the x direction is corrected in the same way as the reference block r1. At this point, the reference block is located at 6206 (S6024). However, by the processing of S6006 and S6007 described later, The reference position is corrected. In the end, the reference block is inside the accessible area.
[0232] Next, the bottom right position of the accessible area is calculated (S6026). The accessible area is shown in Figure 50. Since it is the shaded area, except for the case where blk_idx=0, there are two points at the bottom right, 6113 and 6114. If they are (X3, Y3) and (X4, Y4), offset[4] = {0, 64, 128, 64}, NR = offset[blk_idx] (X3, Y3) = (xAvlBR, yAvlBR - 64) (X4, Y4) = (xAvlBR - NR, yAvlBR) This becomes:
[0233] Next, it is determined whether or not to correct the reference position to match the bottom right of the referable area (S602 7) In this judgment, if blk_idx is not 0 and the reference block is located in an area larger than X4 and Y3, If it is, it is judged as true (S6027: YES). If it is false (S6027: NO), Then, the process ends.
[0234] Next, the difference in the x direction between the reference block and the accessible area is If the determination is true (S6028), it is determined whether the difference is smaller than the difference in the y direction. 28: YES), the reference position in the x direction is corrected (S6029). On the other hand, if the judgment is false ( S6028: NO), and correct the reference position in the y direction (S6030).
[0235] FIG. 52B is a diagram showing how the reference position is corrected in S6029 and S6030. Now, blk_idx=3. If the reference block r1 is located at 6211, blk_i dx=0 and the bottom right of the reference block is X4 (x direction of 6114) and Y3 (y direction of 6113) It is located in a larger area (S6027: YES). Also, the reference block and the referenceable The difference in the x direction of the area is smaller than the difference in the y direction of the reference block and the referable area (S6 028:YES). Therefore, the reference position in the x direction is added to the position 6212 with xRefBR=xAvlBR. Correct (S6029). Here, as in S6001, xRefBR = xRefTL + cbWidth - 1, and Therefore, xRefTL = xRefBR - (cbWidth - 1), so xRefTL is also corrected when xRefBR is corrected. In this correction of the reference position, the block vector mvL[0] is corrected. is also good. mvL[0] = (xAvlBR - NR - (xCb + cbWitdh - 1)) << 4 This makes xRefBR=xAvlBR, so the reference position can be corrected.
[0236] On the other hand, if the reference block r2 is located at 6213, blk_idx is not 0 and the reference block The bottom right corner of the reference block is located in an area larger than X4 (x direction of 6114) and Y3 (y direction of 6113). (S6027: YES). Also, the difference in the x direction between the reference block and the accessible area is is not smaller than the difference in the y direction between the reference block and the accessible area (S6028: NO Therefore, the reference position in the y direction is corrected to the position 6214 by setting yRefBR=yAvlBR (S60 30). Here, as in S6001, yRefBR = yRefTL + cbHeight - 1, that is, yRefTL = yRe Since it is fBR-(cbHeight-1), yRefTL will also be corrected when yRefBR is corrected. In this correction of the reference position, the block vector mvL[1] may be corrected. , mvL[1] = (yAvlBR - 64 - (yCb + cbHeight - 1)) << 4 This makes yRefBR=yAvlBR, so the reference position can be corrected.
[0237] Here, let us assume that the reference block r3 is located at 6215. In this case, the reference block The difference in the x direction of the accessible area is smaller than the difference in the y direction between the reference block and the accessible area. Therefore, the reference position in the y direction is corrected in the same way as for the reference block r2. At this point, the reference block is located at 6216 (S6030). However, by the processing in S6008 and S6009 described later, The reference position of the block is corrected. As a result, the reference block is inside the accessible area.
[0238] In FIG. 52, the process of correcting the reference position has been described using the examples of blk_idx=0 and 3. In the cases of 1 and 2, the reference position is corrected in the same way as in the cases of blk_idx=0 and 3.
[0239] After the process of correcting the reference position of the non-rectangular referable area (S6013), The process from step 04 to step S6011 is performed. This completes the process when the CTU size is 128x128 pixels. will end.
[0240] Now, in the process of correcting the reference position of the non-rectangular referable area (S6013), Then, the reference position in the x direction is corrected to match the top left of the referenceable area (S6024). Then, the reference position in the x direction of the reference block is smaller than the top left corner of the accessible area. Therefore, the result of S6004 is always false (S6004: NO). If S6024 is processed, S6004 and S6005 may not be processed. Similarly, if S6025 is processed, S6006 and S6007 should not be processed. If S6029 is processed, S6008 and S6009 are not processed. If S6030 is processed, S6010 and S6011 can be processed. It is okay to not do this.
[0241] In the flowchart of FIG. 51, the comparison process in step S6023 is omitted, and Alternatively, step S6025 may be always executed. Similarly, the comparison process in step S6028 may be omitted. Alternatively, a configuration may be adopted in which step S6029 is always executed, or step S60 In such a configuration, the access can be performed by simple processing. This makes it possible to correct the lighting position.
[0242] In FIG. 48, when the size of the CTU is 128x128 pixels, S6012, S6013 and The reference position is corrected using the processes from S6004 to S6011. As shown in 53, the referenceable area is divided into two parts, and the reference position of each part is corrected (S6 101) can also be realized.
[0243] FIG. 54 is a diagram for explaining how the accessible area is divided into two. Unlike the rectangular accessible area in Figure 54, the accessible area is divided into two parts. The coding tree block (6101) to be processed is divided into four parts. If the block (6102) is located at the top left, blk_idx=0. If the target coding block is located in the upper right, lower left, or lower right, blk_idx is 1, 2 , 3. FIG. 54A shows the case where blk_idx=0. Similarly, FIGS. 54B to 54D 6A and 6B show the cases where blk_idx=1 to 3, respectively. 1) is referred to as referenceable area A, and the other referenceable area (6302) is referred to as referenceable area B.
[0244] FIG. 55 shows the process of dividing the referable area into two and correcting the reference position of each (S61 55 is a flowchart for explaining the same process as in FIG. First, calculate the top left and bottom right positions of the accessible area A. The top left corner of the accessible area A is set to (xAvlTL, yAvlTL) and the bottom right corner is set to (xAvlBR, yAvlBR), then xOffsetTL[4] = {-128, -128, -64, 0}, yOffsetTL[4] = {64, 64, 64, 0} xOffsetBR[4] = {0, 0, 0, 128}, yOffsetBR[4] = {128, 128, 128, 64} ( xAvlTL, yAvlTL ) = ( (xCb >> CtbLog2SizeY) << CtbLog2SizeY + xOffsetTL[blk_idx], (yCb >> CtbLog2SizeY) << CtbLog2SizeY + yOffsetTL[blk_idx]) ( xAvlBR, yAvlBR ) = ( ((xCb >> CtbLog2SizeY) << CtbLog2SizeY) - 1 + xOffsetBR[blk_idx], (((yCb >> CtbLog2SizeY) + 1) << CtbLog2SizeY) - 1 + yOffsetBR[blk_idx] ) This becomes:
[0245] Next, whether the reference block is outside the referenceable area A or not is determined. out_xRefTL = xRefTL < xAvlTL out_yRefTL = yRefTL < yAvlTL out_xRefBR = xRefBR > xAvlBR out_yRefBR = yRefBR > yAvlBR (S6112).
[0246] Next, the top left and bottom right positions of the referenceable area B are calculated (S6113). If the top left of area B is (xAvlTL, yAvlTL) and the bottom right is (xAvlBR, yAvlBR), then xOffsetTL[4] = {-64, 0, 0, 0}, yOffsetTL[4] = {0, 0, 0, 0} xOffsetBR[4] = {0, 64, 128, 64}, yOffsetBR[4] = {128, 64, 64, 128} ( xAvlTL, yAvlTL ) = ( (xCb >> CtbLog2SizeY) << CtbLog2SizeY + xOffsetTL[blk_idx], (yCb >> CtbLog2SizeY) << CtbLog2SizeY + yOffsetTL[blk_idx]) ( xAvlBR, yAvlBR ) = ( ((xCb >> CtbLog2SizeY) << CtbLog2SizeY) - 1 + xOffsetBR[blk_idx], (((yCb >> CtbLog2SizeY) + 1) << CtbLog2SizeY) - 1 + yOffsetBR[blk_idx] ) This becomes:
[0247] Next, the reference position in the x direction of the reference block is smaller than the top left corner of the referenceable area A, and It is determined whether the reference position of the block in the x direction is smaller than the top left corner of the referenceable area B (S6 If the determination is false (S6114: NO), the process proceeds to the next step (S6116). If the answer is true (S6114: YES), the reference area in the x direction is aligned with the top left corner of the referenceable area B. The reference position is corrected (S6005). The processing of S6005 has already been explained, so we will not explain it here. Omitted.
[0248] Next, the reference position in the y direction of the reference block is smaller than the top left corner of the referenceable area A, and the reference Determine whether the reference position in the y direction of the reference block is smaller than the top left corner of the referenceable area B (S If the determination is false (S6116: NO), the process proceeds to the next step (S6118). On the other hand, if the judgment is true (S6116: YES), the upper left corner of the accessible area B is aligned with the y-axis. The reference position is corrected (S6007). The processing of S6007 has already been explained, so the explanation will be omitted here. is omitted.
[0249] Next, the reference position in the x direction of the reference block is greater than the bottom right corner of the referenceable area A, and It is determined whether the reference position of the block in the x direction is greater than the bottom right corner of the referenceable area B (S6 If the determination is false (S6118: NO), the process proceeds to the next step (S6120). If the judgment is true (S6118: YES), the reference area in the x direction is aligned with the bottom right of the referenceable area B. The reference position is corrected (S6009). The processing of S6009 has already been explained, so we will not explain it here. Omitted.
[0250] Next, the reference position in the y direction of the reference block is greater than the bottom right corner of the referenceable area A, and It is determined whether the reference position of the block in the y direction is greater than the bottom right corner of the referenceable area B (S6 120). If the determination is false (S6120: NO), the process ends. On the other hand, if the determination is true, If the answer is YES (S6120), the reference position in the y direction is adjusted to match the bottom right of the referable area B. The processing of S6011 has already been explained, so the explanation will be omitted.
[0251] As a result, when the size of the CTU is 128x128 pixels, the reference block is Even if the object is located outside the referenceable area, it can be referenced by correcting the reference position. By dividing the area into two and correcting the reference position of each, processing is simplified and the amount of calculation is reduced. Here, one of the accessible areas (6301) is referred to as accessible area A. The other accessible area (6302) is set as accessible area B. Swap area A and referenceable area B, and change one of the referenceable areas (6301) to referenceable area B. The other accessible area (6302) may be processed as accessible area A.
[0252] In this embodiment, it is determined whether the size of the CTU is 128 x 128 pixels (S6002), and the process is terminated. This is because the intra block copy reference block is replaced by the coding tree block. It may be determined whether the CTU is a unit divided into four, or whether the size of the CTU is the maximum size of the coding block. It may also be possible to determine whether the size is larger than the large size.
[0253] All of the above-described embodiments may be combined in multiple ways.
[0254] In all the embodiments described above, the bitstream output by the image coding device is a specific data so that it can be decoded according to the encoding method used in the embodiment. The bitstream is compatible with HDDs, SSDs, and flash memory. The information may be provided by recording it on a computer-readable recording medium such as an optical disk. The image may be provided from a server via a wired or wireless network. The image decoding device corresponding to the image encoding device can decode the image data in this specific data format regardless of the providing means. The bitstream of the bit can be decoded.
[0255] To exchange bitstreams between the image coding device and the image decoding device, a wired or When a wireless network is used, the data is bit-coded into a data format suitable for the transmission mode of the communication channel. In this case, the bitstream output by the image coding device may be converted and transmitted. The stream is converted into coded data in a format suitable for the transmission mode of the communication channel and transmitted over the network. a transmitting device that receives coded data from a network and decodes it into a bit stream; The image encoding device includes a receiving device that transmits the image data to the image decoding device. Memory to buffer the output bitstream and packetize the bitstream a packet processing unit and a transmitter for transmitting packetized encoded data over a network; The receiving device receives packetized encoded data via a network. a receiving unit for receiving the encoded data, a memory for buffering the received encoded data, and a packet and a packet processing unit that processes the data to generate a bitstream and provides the bitstream to the image decoding device.
[0256] To exchange bitstreams between the image coding device and the image decoding device, a wired or When a wireless network is used, in addition to the transmitting device and receiving device, A relay device may be provided to receive the coded data transmitted by the device and supply it to the receiving device. The relay device includes a receiving unit that receives packetized coded data transmitted from the transmitting device, and a receiving unit that receives the packetized coded data. a memory for buffering the transmitted coded data, and a memory for buffering the packetized coded data and the network data. The relay device further includes a transmitter for transmitting the packetized encoded data to the a reception packet processing unit that processes packets to generate a bit stream; and a transmission packet processing unit that packetizes the bit stream. is also good.
[0257] 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 207. The decoded image signal stored in the decoded image memory 208 is read out and displayed on the screen.
[0258] 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.
[0259] FIG. 37 shows an example of the hardware configuration of the encoding / decoding device according to this embodiment. The image encoding device includes the configuration of an image encoding device and an image decoding device according to an embodiment of the present invention. The encoding / decoding device 9000 includes a CPU 9001, a codec IC 9002, an I / O O interface 9003, memory 9004, optical disk drive 9005, network It has a network interface 9006 and a video interface 9009, and each part is connected via a bus. Connected by 9010.
[0260] 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 decoding process is performed by the image decoding unit 9008. The I / O interface 9003 For example, a USB interface is used to connect an external keyboard 9104 and mouse 91 The CPU 9001 receives input via the I / O interface 9003. The encoding / decoding device 90 executes the operation desired by the user based on the user's operation. 00. User operations using the keyboard 9104, mouse 9105, etc. , select whether to perform encoding or decoding functions, set the encoding quality, and There are input / output destinations for programs, input / output destinations for images, etc.
[0261] When the user desires to play back images recorded on the disk recording medium 9100 The optical disc drive 9005 reads the bitstream from the inserted disc recording medium 9100. The read bitstream is then sent to the codec I via bus 9010. The image decoder 9008 of the C9002 receives the input bitstream. The image decoding process is performed on the image data in the image decoding device according to the embodiment of the present invention. The image is sent to an external monitor 9103 via a video interface 9009. The encoding / decoding device 9000 has a network interface 9006. It is possible to connect to an external distribution server 9106 and a mobile terminal 9107 via the network 9101. The user converts the image recorded on the disk recording medium 9100 to the image data recorded on the distribution server 9106. If you want to play back images recorded on the mobile terminal 9107, The interface 9006 receives a bitstream from the input disc recording medium 9100. Instead of reading out the bit stream, the bit stream is acquired from the network 9101. When the user desires to play back an image recorded in memory 9004, 004, an image decoding apparatus according to an embodiment of the present invention The image decoding process is performed in the above.
[0262] 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. An image encoding process is performed in the image encoding device according to the embodiment of the present invention, and a bitstream is The bitstream is then sent to memory 9004 via bus 9010. The user changes the memory 9004 and sends the bit stream to the disk recording medium 9100. If you wish to record a program, the optical disc drive 9005 will The bitstream is written to the disc recording medium 9100.
[0263] 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.
[0264] 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 a wired or wireless network. It can be provided from a server via the network, or it can be provided as terrestrial or satellite digital broadcasting data. It may also be provided as a broadcast.
[0265] The present invention has been described above based on the embodiments. The embodiments are merely examples, and each structure thereof is not intended to be limiting. The combination of components and processes can be varied in many ways, and these 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]
[0266] 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 generation unit, 107 orthogonal transformation and quantization unit, 108 bit string encoding unit, 10 9 inverse quantization and inverse orthogonal transformation unit, 110 decoded image signal superposition unit, 111 coding information storage unit 200 image decoding device; 201 bit string decoding unit; 202 block 203 inter prediction unit, 204 intra prediction unit, 205 coding information storage unit storage memory, 206 inverse quantization and inverse orthogonal transformation unit, 207 decoded image signal superposition unit, 20 8 Decoded image memory.< / poc>
Claims
1. An image encoding device that encodes an image in units of intra block copy reference blocks, a block vector candidate list generating unit that derives block vector candidates for a target block in a target picture from the coding information stored in the coding information storage memory and generates a block vector candidate list; a history block vector candidate derivation unit that adds a history prediction block vector candidate registered in a history prediction block vector candidate list to the block vector candidate list; a replenishing unit for replenishing the block vector candidate list with (0, 0) so as to fill the block vector candidate list; a selection unit for selecting a selected block vector from the block vector candidate list; an encoding unit that encodes a block vector index indicating a position of the selected block vector in the block vector candidate list; a reference position correcting unit that corrects a reference position of a reference block referenced by the selected block vector so that the reference block references an inside of a referenceable area; a prediction unit that obtains decoded pixels in the current picture from a decoded image memory as predicted values of the current block based on a reference position of the reference block; The image encoding device is characterized in that the reference position correction unit sets a fixed number of intra block copy reference blocks that were encoded immediately before the intra block copy reference block that includes the block to be processed as a referenceable area, and sets intra block copy reference blocks that precede the referenceable area as invalid reference areas regardless of whether the encoding process has been completed.
2. An image coding method for coding in units of intra block copy reference blocks, comprising: a block vector candidate list generating step of deriving block vector candidates for a target block in a target picture from the coding information stored in the coding information storage memory to generate a block vector candidate list; a history block vector candidate derivation step of adding a history prediction block vector candidate registered in a history prediction block vector candidate list to the block vector candidate list; a step of filling the block vector candidate list with (0,0) so as to fill the block vector candidate list; a selection step of selecting a selected block vector from the block vector candidate list; an encoding step of encoding a block vector index indicating a position of the selected block vector in the block vector candidate list; a reference position correcting step of correcting a reference position of a reference block referenced by the selected block vector so that the reference block references an inside of a referenceable area; Based on the reference position of the reference block, the decoded pixels in the processing target picture are a prediction step of obtaining a predicted value of the target block from a decoded image memory, An image encoding method characterized in that the reference position correction step sets a fixed number of intra block copy reference blocks encoded immediately before the intra block copy reference block including the block to be processed as referenceable areas, and sets intra block copy reference blocks before the referenceable areas as invalid reference areas regardless of whether the encoding process has been completed.
3. An image encoding program for encoding in units of intra block copy reference blocks, a block vector candidate list generating step of deriving block vector candidates for a target block in a target picture from the coding information stored in the coding information storage memory to generate a block vector candidate list; a history block vector candidate derivation step of adding a history prediction block vector candidate registered in a history prediction block vector candidate list to the block vector candidate list; a step of filling the block vector candidate list with (0,0) to fill the block vector candidate list; a selection step of selecting a selected block vector from the block vector candidate list; an encoding step of encoding a block vector index indicating a position of the selected block vector in the block vector candidate list; a reference position correcting step of correcting a reference position of a reference block referenced by the selected block vector so that the reference block references an inside of a referenceable area; Based on the reference position of the reference block, the decoded pixels in the processing target picture are a prediction step of obtaining a predicted value of the target block from a decoded image memory; An image encoding program characterized in that the reference position correction step sets a fixed number of intra block copy reference blocks encoded immediately before the intra block copy reference block including the block to be processed as a referenceable area, and sets an intra block copy reference block before the referenceable area as an invalid reference area regardless of whether the encoding process has been completed.
4. An image decoding device that decodes in units of intra block copy reference blocks, a block vector candidate list generating unit that derives block vector candidates for a target block in a target picture from the coding information stored in the coding information storage memory and generates a block vector candidate list; a history block vector candidate derivation unit that adds a history prediction block vector candidate registered in a history prediction block vector candidate list to the block vector candidate list; a replenishing unit for replenishing the block vector candidate list with (0, 0) so as to fill the block vector candidate list; a decoding unit for decoding a block vector index indicating a position of the selected block vector in the block vector candidate list; a selection unit that selects the selected block vector from the block vector candidate list based on the block vector index; a reference position correcting unit that corrects a reference position of a reference block referenced by the selected block vector so that the reference block references an inside of a referenceable area; Based on the reference position of the reference block, the decoded pixels in the processing target picture are a prediction unit that obtains a predicted value of the target block from a decoded image memory, The image decoding device is characterized in that the reference position correction unit sets a fixed number of intra block copy reference blocks decoded immediately before the intra block copy reference block including the block to be processed as a referenceable area, and sets intra block copy reference blocks before the referenceable area as invalid reference areas regardless of whether the decoding process has been completed.
5. An image decoding method for decoding in units of intra block copy reference blocks, a block vector candidate list generating step of deriving block vector candidates for a target block in a target picture from the coding information stored in the coding information storage memory to generate a block vector candidate list; a history block vector candidate derivation step of adding a history prediction block vector candidate registered in a history prediction block vector candidate list to the block vector candidate list; a step of filling the block vector candidate list with (0,0) so as to fill the block vector candidate list; a decoding step of decoding a block vector index indicating a position of the selected block vector in the block vector candidate list; a selection step of selecting the selected block vector from the block vector candidate list based on the block vector index; a reference position correcting step of correcting a reference position of a reference block referenced by the selected block vector so that the reference block references an inside of a referenceable area; Based on the reference position of the reference block, the decoded pixels in the processing target picture are a prediction step of obtaining a predicted value of the target block from a decoded image memory, An image decoding method characterized in that the reference position correction step sets a fixed number of intra block copy reference blocks decoded immediately before the intra block copy reference block including the block to be processed as a referenceable area, and sets intra block copy reference blocks before the referenceable area as invalid reference areas regardless of whether the decoding process has been completed.
6. An image decoding program for decoding in units of intra block copy reference blocks, a block vector candidate list generating step of deriving block vector candidates for a target block in a target picture from the coding information stored in the coding information storage memory to generate a block vector candidate list; a history block vector candidate derivation step of adding a history prediction block vector candidate registered in a history prediction block vector candidate list to the block vector candidate list; a step of filling the block vector candidate list with (0,0) so as to fill the block vector candidate list; a decoding step of decoding a block vector index indicating a position of the selected block vector in the block vector candidate list; a selection step of selecting the selected block vector from the block vector candidate list based on the block vector index; a reference position correcting step of correcting a reference position of a reference block referenced by the selected block vector so that the reference block references an inside of a referenceable area; Based on the reference position of the reference block, the decoded pixels in the processing target picture are a prediction step of obtaining a predicted value of the target block from a decoded image memory; An image decoding program characterized in that the reference position correction step sets a fixed number of intra block copy reference blocks decoded immediately before the intra block copy reference block including the target block as a referenceable area, and sets an intra block copy reference block before the referenceable area as an invalid reference area regardless of whether the decoding process has been completed.
7. 3. A storage method for generating a bitstream according to the image coding method of claim 2 and storing the bitstream on a recording medium.
8. A transmission method for generating a bitstream according to the image coding method of claim 2 and transmitting the bitstream.
Citation Information
Patent Citations
Search region determination for intra block copy in video coding
US20150271517A1
Method and Apparatus of Constrained Intra Block Copy for Coding Video
US20160241875A1
Method of Intra Picture Block Copy for Screen Content and Video Coding
US20170280159A1
Method and system of decoded picture buffer for intra block copy mode
US20180184093A1
Method and apparatus for encoding and / or decoding information about intra-prediction mode of video
JP2009246975A