Image decoding device, image decoding method, and image decoding program
By deriving block vector candidates and correcting reference area boundaries, the image encoding and decoding process achieves improved prediction efficiency and reduced load.
Patent Information
- Application Number
- JP2024035712
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-06-25
- Filing Date
- 2024-03-08
- Publication Date
- 2025-01-22
- Estimated Expiration
- 2040-06-25
AI Technical Summary
Existing image encoding and decoding technologies utilize only decoded pixels adjacent to the block for prediction, leading to poor prediction efficiency.
Derive a block vector candidate from encoded information and select a reference block vector using a block vector candidate derivation unit, predicting decoded pixels based on the position of the target block, and correct reference area boundaries using a reference area boundary correction unit.
This approach enables highly efficient image encoding and decoding with reduced computational load.
Smart Images

Figure 0007619503000001 
Figure 0007619503000002 
Figure 0007619503000003
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. By appropriately setting the inter-frame prediction and frame prediction, the coding efficiency is improved. do.
[0003] In Patent Document 1, a prediction image is generated by 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] JP 2009-246975 A 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 encoded 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, a coding information storage memory stores a coding A block vector candidate of a processing target block in a processing 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 from among a plurality of referenceable regions, the reference block being selected by the selected block vector; A referenceable area including a predetermined position of a block is determined, and a previous area including the predetermined position of the reference block is determined. For a first divided reference block included in the referenceable area, A decoded pixel in the current picture based on a position of the current block is predicted. The reference block is obtained as a reference block not including a predetermined position from the decoded image memory unit. For the second divided reference block included in the region, a predetermined value is set as the predicted value of the processing target block. and a reference area boundary correction unit that uses the measured value as a reference area boundary correction unit. Effect of the Invention
[0007] According to the present invention, highly efficient image encoding / decoding processing can be realized with a low load. [Brief description of the drawings]
[0008] [Figure 1] 1 is a block diagram of an image encoding device according to an embodiment of the present invention. [Diagram 2] 1 is a block diagram of an image decoding device according to an embodiment of the present invention. [Diagram 3] 13 is a flowchart for explaining an operation of dividing a tree block. [Figure 4] FIG. 13 is a diagram showing how an input image is divided into tree blocks. [Diagram 5] FIG. 1 is a diagram illustrating a z-scan. [Figure 6] FIG. 13 is a diagram showing the divided shapes of blocks. [Figure 7] 13 is a flowchart for explaining an operation of dividing a block into four. [Figure 8] 13 is a flowchart for explaining an operation of dividing a block into two or three. [Figure 9] This is a syntax for expressing the shape of block division. [Figure 10] FIG. 1 is a diagram illustrating intra prediction. [Figure 11] FIG. 13 is a diagram for explaining reference blocks for inter prediction. [Figure 12] This is a syntax for expressing a coding block prediction mode. [Figure 13] FIG. 13 is a diagram showing the correspondence between syntax elements and modes relating to inter prediction. [Figure 14] FIG. 13 is a diagram for explaining affine transformation motion compensation of two control points. [Figure 15] FIG. 13 is a diagram for explaining affine transformation motion compensation of three control points. [Figure 16] FIG. 2 is a block diagram showing a detailed configuration of the inter prediction unit 102 in FIG. [Figure 17] 17 is a block diagram showing a detailed configuration of a normal predicted motion vector mode derivation unit 301 in FIG. 16. [Figure 18] 17 is a block diagram showing a detailed configuration of a normal merge mode derivation unit 302 in FIG. 16. [Figure 19] 17 is a flowchart for explaining a normal predicted motion vector mode derivation process of the normal predicted motion vector mode derivation unit 301 of FIG. 16. [Figure 20] 13 is a flowchart showing a processing procedure of a normal predicted motion vector mode derivation process. [Figure 21] 13 is a flowchart illustrating a procedure for a normal merge mode derivation process. [Figure 22] FIG. 3 is a block diagram showing a detailed configuration of an inter prediction unit 203 in FIG. 2. [Figure 23] 23 is a block diagram showing a detailed configuration of a normal predicted motion vector mode derivation unit 401 in FIG. 22. [Figure 24] 23 is a block diagram showing a detailed configuration of a normal merge mode derivation unit 402 in FIG. 22. [Diagram 25]23 is a flowchart for explaining a normal predicted motion vector mode derivation process of the normal predicted motion vector mode derivation unit 401 in FIG. 22. [Figure 26] 13 is a flowchart illustrating a procedure of a history motion vector predictor candidate list initialization / update process. [Figure 27] 13 is a flowchart of a procedure of a same element confirmation process in the procedure of a history predicted motion vector candidate update process. [Figure 28] 13 is a flowchart of an element shifting process procedure in the history motion vector predictor candidate update process procedure. [Figure 29] 13 is a flowchart illustrating a procedure of a process of deriving a history predicted motion vector candidate. [Diagram 30] 13 is a flowchart illustrating a history merging candidate derivation process procedure. [Diagram 31] 11 is a diagram illustrating an example of a history motion vector predictor candidate list update process. FIG. [Diagram 32] FIG. 13 is a diagram illustrating a valid reference area for intra block copying. [Diagram 33] FIG. 13 is a diagram illustrating motion compensation prediction in the case of L0 prediction in which an L0 reference picture (RefL0Pic) is located at a time earlier than a current picture (CurPic). [Diagram 34] 13 is a diagram for explaining motion compensation prediction in the case where L0 prediction is performed and a reference picture for L0 prediction is located at a later time than the current picture to be processed. FIG. [Diagram 35] FIG. 13 is a diagram for explaining motion compensation prediction in a bi-predictive case where a reference picture for L0 prediction is located at a time earlier than a current picture to be processed and a reference picture for L1 prediction is located at a time later than the current picture to be processed. [Diagram 36] 13 is a diagram for explaining the prediction direction of motion compensation prediction in bi-prediction where the reference picture for L0 prediction and the reference picture for L1 prediction are located at a time earlier than the current picture to be processed. FIG. [Figure 37] 13 is a diagram for explaining the prediction direction of motion compensation prediction in bi-prediction where the reference picture for L0 prediction and the reference picture for L1 prediction are at a time later than the current picture. FIG. [Figure 38] 13 is a flowchart illustrating an average merging candidate derivation process; [Figure 39] 11 is a table showing information regarding merge motion vector difference. [Diagram 40] FIG. 13 is a diagram illustrating the derivation of a merge differential motion vector. [Diagram 41] 2 is a block diagram showing a detailed configuration of an intra prediction unit 103 in FIG. 1. [Diagram 42] 3 is a block diagram showing a detailed configuration of an intra prediction unit 204 in FIG. 2. [Diagram 43] FIG. 13 is a block diagram of an intra block copy prediction unit 352. [Diagram 44] FIG. 13 is a block diagram of an intra block copy prediction unit 362. [Diagram 45] 13 is a flowchart illustrating a predictive intra block copy process of the intra block copy predictor 352. [Figure 46] 13 is a flowchart illustrating a predictive intra block copy process of the intra block copy predictor 362. [Figure 47] 13 is a flowchart illustrating a merge intra block copy process. [Figure 48] 13 is a flowchart showing a processing procedure of a block vector mode derivation process for predictive intra block copy. [Figure 49] 13 is a diagram for explaining the processing of the reference position correction unit 380 and the reference position correction unit 480. FIG. [Figure 50] FIG. 13 is a diagram showing how a reference position is corrected. [Figure 51] 13 is a diagram illustrating the positions of the top left and bottom right when the referenceable area is rectangular. FIG. [Figure 52] 13A and 13B are diagrams illustrating a process for correcting the reference position of a portion where the referenceable area is not rectangular. [Figure 53] FIG. 13 is a diagram showing how a reference position is corrected. [Figure 54] 13 is a diagram for explaining the processing of the reference position correction unit 380 and the reference position correction unit 480. FIG. [Figure 55] FIG. 13 is a diagram for explaining how a referenceable area is decomposed into two. [Figure 56] FIG. 13 is a diagram illustrating a process of dividing a referenceable area into two and correcting the reference position of each. [Figure 57] 11 is a diagram for explaining a memory space of a reference area when a coding tree block unit is used as an intra block copy reference block. FIG. [Figure 58] 13 is a diagram illustrating the memory space of a reference area when a valid reference area is determined by dividing a coding tree block into four units and using the units as intra block copy reference blocks. FIG. [Figure 59] 13 is a flowchart illustrating a reference area boundary correction procedure. [Figure 60] 13 is a diagram for explaining division of a reference block in memory space when a coding tree block unit is used as an intra block copy reference block. FIG. [Figure 61] 13 is a diagram for explaining division of a reference block in memory space when a valid reference area is determined by dividing a coding tree block into four units and using the units as intra block copy reference blocks. FIG. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[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 tree block 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, and the decoding target in the decoding process) may be set. The tree blocks of the tree are sorted 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 partitioning is possible. After recursively dividing the tree block, the block to be coded and decoded is called the coding block. In addition, the tree block and the coding block 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 tree block determined by the encoding device may be transmitted to the decoding device. Here, the maximum size of the tree block is set to 128x128 pixels, and the tree block 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> The processed image (coded block in the coding process) is A decoded image, image signal, tree block, block, coding block, etc. In the decoding process, the decoded image, image signal, tree block, block, etc. are used. Intra prediction (MO) is used to predict the surrounding image signals. DE_INTRA), and inter prediction (MODE_INTER) which predicts from the image signal of the processed image. Switch between intra prediction (MODE_INTRA) and inter prediction (MODE_INTER) The prediction mode (PredMode) is defined as an intra prediction mode ( It has the values MODE_INTRA, or inter prediction (MODE_INTER).
[0012] <Intra Block Copy Prediction> Intra block copy prediction is a method for decoding a picture to be processed. This is a process of encoding / decoding a target block by referring to previously encoded pixels as predicted values. The distance from the processing 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 picture they refer to is The block vector is either a current picture or a processed picture. Using the multi-pixel resolution (AMVR), you can select either 1-pixel or 4-pixel accuracy.
[0013] Intra block copy supports predictive intra block copy mode and merge intra block copy mode. Two block copy modes are available.
[0014] The predicted intra block copy mode uses predicted block vectors derived from previously processed information. A model that determines the block vector of the target block from the difference block vector and the The prediction block vector is the same as the processed block adjacent to the current block. , derived from an index for identifying a prediction block vector. The index for identifying the vector and the difference block vector are transmitted in the bit stream. do.
[0015] The merge intra block copy mode does not transmit differential motion vectors, but The intra block copy prediction information of the processed blocks adjacent to the block is used to determine the intra block copy prediction information of the processed blocks. This is a mode for deriving intra block copy prediction information for a block.
[0016] <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 reference picture. To manage multiple reference pictures, L0 (reference link) Two types of reference lists, L0 (reference list 0) and L1 (reference list 1), are defined, and the reference indexes are The L0 prediction (Pred_L0) is available for P slices. For B slices, L0 prediction (Pred_L0), L1 prediction (Pred_L1), and bi-prediction (Pred_BI ) is available. L0 prediction (Pred_L0) refers to the reference picture managed by L0. Inter prediction is used to predict the frame rate of a frame, and L1 prediction (Pred_L1) uses a reference picture managed by L1. This is the inter prediction to refer to. Bi-prediction (Pred_BI) is performed with both L0 prediction and L1 prediction, Inter prediction refers to one reference picture managed in L0 and one in L1. Information specifying L0 prediction, L1 prediction, and 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
[0017] <Predictive motion vector mode> The predicted motion vector mode is an index for specifying a predicted motion vector, Transmits the inter prediction vector, inter prediction mode, and reference index, and the index of the block to be processed. The predicted motion vector is determined based on the motion vector of the block adjacent to the current 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 candidate predicted motion vector is derived from a block located at or near the block. The measured motion vector is derived from an index for identifying the measured motion vector.
[0018] <Merge mode> In the merge mode, the difference motion vector and reference index are not transmitted, and the target block is merged. The processed blocks adjacent to the block to be processed or blocks belonging to the processed image The inter prediction information of the block located at the same position as the block or in its vicinity (neighborhood) is used for processing. This is a mode for deriving inter prediction information for the current block.
[0019] The processed blocks adjacent to the block to be processed and the inter-blocks of the processed blocks The spatial merge candidate is defined as a block belonging to the processed image. Blocks that are in the same location as the block or in its vicinity (neighborhood), and the index of that block Inter prediction information derived from the super prediction information is defined as a temporal merge candidate. The complement is registered in the merge candidate list, and the merge index is used to predict the block to be processed. Identify which merge candidates to use.
[0020] <Adjacent block> FIG. 11 shows the procedure for deriving inter prediction information in the predicted motion vector mode and the merge mode. A0, A1, A2, B0, B1, B2, B3 is a processed block adjacent to the block to be processed. T0 is a processed image. The block to be processed is located at the same position as the coding block to be processed in the image to be processed or in the vicinity (nearby It is a block located next to
[0021] A1 and A2 are located to the left 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.
[0022] Details of how adjacent blocks are treated in predictive motion vector mode and merge mode The details will be described later.
[0023] <Affine transformation motion compensation> In the affine transformation motion compensation, a coding block is divided into sub-blocks of a predetermined unit, and each sub-block is The motion vector is set for each subblock and motion compensation is performed. The motion vector of the block is determined by the processed block adjacent to the current block or the processed block. A block belonging to the image that is located at the same position as the processing target block or in its vicinity (neighborhood) The control points are derived based on one or more control points derived from the inter prediction information of the block. In this embodiment, the size of the subblock is 4x4 pixels. This is not a limitation, and the motion vector may be derived on a pixel-by-pixel basis.
[0024] FIG. 14 shows an example of affine transformation motion compensation for two control points. Since the control point has two parameters, a horizontal component and a vertical component, the control point has two The affine transformation in this case is called a four-parameter affine transformation. are the control points. Figure 15 shows an example of affine transformation motion compensation when there are three control points. In the case of , the three control points have two parameters, a horizontal component and a vertical component, so An affine transformation with three control points is called a six-parameter affine transformation. CP1, CP2, and CP3 are control points.
[0025] Affine transformation motion compensation is available in both the predicted motion vector mode and the merge mode. It is also available in the predictive motion vector mode. The mode in which the affine transformation is performed is defined as the subblock prediction motion vector mode, and the merge mode is A mode in which motion compensation is applied is defined as a sub-block merging mode.
[0026] <Syntax of coding block> Using Fig. 12(a), Fig. 12(b), and Fig. 13, the prediction mode of the coding block is The syntax for encoding / decoding (the syntax rules for the encoded bit string) is explained in Figure 12. The pred_mode_flag in (a) is a flag indicating whether or not the prediction is inter prediction. If pred_mode_flag is 0, it is inter prediction, and if pred_mode_flag is 1, it is intra prediction. In the case of intra prediction, a flag pred_mod indicating whether it is an intra block copy prediction is used. e_ibc_flag is encoded / decoded. In case of intra block copy prediction (pred_mode_ib c_flag=1) encodes / decodes merge_flag. merge_flag is the merge intra block A flag indicating whether to use the copy mode or the predicted intra block copy mode. If the merge intra block copy mode is selected (merge_flag=1), the merge index 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 coded. Encrypt / decrypt.
[0027] In the case of inter prediction, merge_flag is coded / decoded. merge_flag is the merge mode This is a flag indicating whether the motion vector prediction mode is to be used or the motion vector prediction mode. In this case (merge_flag=0), it indicates whether to apply the sub-block prediction motion vector mode. The sub-block prediction motion vector mode is coded / decoded. If inter_affine_flag=1 is applied, cu_affine_type_flag is encoded / decoded. _affine_type_flag determines the number of control points in the sub-block prediction motion vector mode. This is a flag to specify
[0028] On the other hand, in the case of merge mode (merge_flag=1), the regular_merge_flag in Figure 12(b) is used. regular_merge_flag is a flag that indicates whether to apply the regular merge mode. In the case of regular merge mode (regular_merge_flag=1), On the other hand, if the normal merge mode is not selected (reg ular_merge_flag=0), flag merge_s indicating whether to apply the subblock merge mode Encode / decode ubblock_flag. In the case of subblock merge mode (merge_subblock_flag), lag=1), the merge index merge_subblock_idx is encoded / decoded. If the block merge mode is not selected (merge_subblock_flag=0), the direction to split the block is _triangle_split_dir and the merge triangle index for each of the two partitions split. The code is encoded / decoded using the merge_triangle_idx0 and merge_triangle_idx1.
[0029] Figure 13 shows the values of each syntax element and the corresponding prediction modes. , inter_affine_flag=0 corresponds to normal predicted motion vector mode (Inter Pred Mode) merge_flag=0,inter_affine_flag=1 is the sub-block prediction motion vector mode (Inter merge_flag=1,regular_merge_flag=1 corresponds to the regular merge mode ( Merge Mode). merge_flag=1,regular_merge_flag=0,merge_subblock_flag=0 corresponds to Triangle Merge Mode. merge_flag=1,regular_merg e_flag=0,merge_subblock_flag=1 is the subblock merge mode (Affine Merge Mode) Corresponds to.
[0030] <poc> POC (Picture Order Count) is a variable associated with the picture to be coded, The value is set to a value that increases by 1 in the picture output order. It can also determine whether a picture is a frame or not, determine the order of pictures in the output order, and For example, we can calculate the distance between the POCs of two pictures. If the POC of two pictures is different, they are considered to be the same picture. The picture with the smaller POC value is the one that will be output first. The difference in POC between two pictures indicates the distance between the pictures along the time axis.
[0031] (First embodiment) Regarding the image encoding device 100 and the image decoding device 200 according to the first embodiment of the present invention, He explains.
[0032] FIG. 1 is a block diagram of an image coding device 100 according to a first embodiment. The video encoding device in this embodiment includes an image encoding device 100, a block division unit 101, and an inter prediction unit. unit 102, intra prediction unit 103, decoded image memory 104, prediction method determination unit 105, residual A signal generating unit 106, an orthogonal transform and quantization unit 107, a bit string encoding unit 108, and a dequantization and dequantization unit 109. The image processing apparatus includes an orthogonal transform unit 109, a decoded image signal superimposing unit 110, and an encoded information storage memory 111. can.
[0033] The block division unit 101 recursively divides an input image to generate coding blocks. The block division unit 101 divides the blocks to be divided into horizontal and vertical blocks. The quadrants to be divided and whether the block to be divided is to be divided horizontally or vertically. The generated image signal of the coding block to be processed is divided into two parts. The signal is supplied to the prediction unit 102, the intra prediction unit 103, and the residual signal generation unit 106. The block division unit 10 supplies information indicating the recursive division structure to the bit string encoding unit 108. The detailed operation of 1 will be described later.
[0034] The inter prediction unit 102 performs inter prediction on the coding block to be processed. Inter prediction information stored in the storage memory, A plurality of inter-prediction information candidates are derived from a decoded image signal, and an appropriate one is selected from the plurality of candidates. and selects the selected inter prediction mode and the selected inter prediction mode. The prediction method determination unit 105 supplies a prediction image signal corresponding to the inter prediction mode. The detailed configuration and operation of unit 102 will be described later.
[0035] The intra prediction unit 103 performs intra prediction on the coding block to be processed. The measurement is performed using the same image signal as the encoded block to be processed stored in the decoded image memory 104. The prediction method determination unit 105 generates a prediction image signal from the decoded area. The detailed configuration and operation of the error prediction unit 103 will be described later.
[0036] The decoded image memory 104 stores the decoded image generated by the decoded image signal superimposing unit 110 . The decoded image stored in the decoded image memory is then subjected to an inter-prediction by the inter-prediction unit 102 and an intra-prediction by the intra-prediction unit 103. The measurement unit 103 supplies the signal.
[0037] The prediction method determination unit 105 determines the amount of coding information and residual signal code, the predicted image, and The optimum prediction mode is determined by evaluating the distortion between the image signal and the image signal to be processed. In case of merge mode of inter prediction, The merge index, information indicating whether or not the sub-block merge mode is selected (sub-block merge The coding information of the prediction motion flag of the inter prediction is supplied to the bit string coding unit 108. In case of vector mode, inter prediction mode, predicted motion vector index, L0, L 1 reference index, differential motion vector, information indicating whether it is a sub-block mode (sub Block prediction motion vector flag) and other coding information are supplied to the bit stream coding unit 108. The determined coding information is supplied to the coding information storage memory 111.
[0038] The residual signal generating unit 106 subtracts the predicted image signal from the image signal to be processed to generate a residual signal. A difference signal is generated and supplied to the orthogonal transformation and quantization unit 107 .
[0039] The orthogonal transform and quantization unit 107 performs orthogonal transform and quantization on the residual signal in accordance with the quantization parameter. The orthogonal transform and quantization are performed to generate a residual signal, which is then inversely transmitted to the bit stream coding unit 108. The resulting signal is supplied to the quantization and inverse orthogonal transformation unit 109.
[0040] 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 prediction mode PredMode for each coding block, If the prediction mode is intra prediction (PRED_INTRA), the A flag (pred_mode_ibc_flag) that determines whether or not an intra block copy is performed is encoded. In case of intrablock copy, merge index if merge mode, merge mode Otherwise, coding information such as predicted block vector index, difference block vector, etc. The first encoded bit is generated by encoding the first bit according to a prescribed syntax (syntax rules for encoded bit strings). In case of inter prediction (PRED_INTER), determine whether merge mode is used or not. flags, subblock merge flag, merge index if merge mode, merge If not in inter prediction mode, the predicted motion vector index and differential motion vector are used. The information on the torque, sub-block prediction motion vector flag, and other coding information are specified below. The first encoded bit string is generated according to the syntax (syntax rules for encoded bit strings). The bit string coding unit 108 also generates a regulated residual signal that has been orthogonally transformed and quantized. The second encoded bit string is then entropy-encoded according to a specified syntax to generate a second encoded bit string. The first coded bit stream and the second coded bit stream are multiplexed according to a prescribed syntax to generate a video signal. It outputs a bit stream.
[0041] The inverse quantization and inverse orthogonal transformation unit 109 performs the orthogonal transformation supplied from the orthogonal transformation and quantization unit 107. The quantized residual signal is inversely quantized and inversely orthogonally transformed to calculate the residual signal, and the decoded image signal is The signal is supplied to the superimposing unit 110.
[0042] The decoded image signal superimposing unit 110 outputs a predicted image signal according to the determination by the prediction method determining unit 105. The inverse quantization and inverse orthogonal transformation unit 109 superimposes and decodes the residual signal that has been inverse quantized and inverse orthogonal transformed. The decoded image is generated and stored in the decoded image memory 104. After performing filtering to reduce block distortion and other distortions, the decoded image memory 104 may be stored in
[0043] The coding information storage memory 111 stores the prediction mode (inference mode) determined by the prediction method determination unit 105. The coding information storage memory 111 stores coding information such as sub-prediction or intra-prediction. The coding information stored in the 3D prediction block includes a determined motion vector, a reference list, and In addition to the reference index, in case of inter prediction merge mode, the merge index, Encoding information of information indicating whether or not the sub-block merge mode is selected (sub-block merge flag) In the case of the predicted motion vector mode of the inter prediction, the inter prediction mode, the predicted motion vector L0 and L1 reference indices, differential motion vectors, sub-block motion vectors, In the case of intra prediction, The determined intra-prediction mode, etc. The construction of the complement list is described below.
[0044] FIG. 2 shows a configuration of a video decoding device according to an embodiment of the present invention, which corresponds to the video encoding device shown in FIG. 2 is a block diagram showing the configuration of the video decoding device according to the embodiment. A block division unit 202, an inter prediction unit 203, an intra prediction unit 204, and a coding information storage memory The memory 205, the inverse quantization and inverse orthogonal transformation unit 206, the decoded image signal superimposition unit 207, and the decoded image signal superimposition unit 209 are connected to the decoded image signal superimposition unit 208. The image memory 208 is provided.
[0045] The decoding process of the video decoding device of FIG. 2 is provided inside the video encoding device of FIG. Since this corresponds to the decoding process, the coding information storage memory 205 in FIG. The orthogonal transform unit 206, the decoded image signal superimposing unit 207, and the decoded image memory 208 are configured as follows: , the inverse quantization and inverse orthogonal transformation unit 109 and the decoded image signal superimposition unit 110 of the video encoding device of FIG. , the encoded information storage memory 111, and the decoded image memory 104. It has the function of
[0046] The bit stream supplied to the bit stream decoder 201 follows the rules of the prescribed syntax. The separated first coded bit stream is decoded to obtain a sequence, a picture, a slice, and a The information on the coding block unit and the coding information on the coding block unit are obtained. In general, prediction is done by inter prediction (PRED_INTER) or intra prediction (PRED_INTRA) on a per coding block basis. ) and partition mode PartMode are decoded. In the case of ED_INTRA, a flag (pred_mode_ibc_fl) that determines whether or not it is an intra block copy ag). In the case of intra block copy, if it is merge mode, the merge index is decrypted. If not in merge mode, the predicted block vector index, the difference block vector It decodes the coded information such as the bit string according to a specified syntax (the syntax rules for the coded bit string). The coding information is then fed to an inter prediction unit 203 or an intra prediction unit 204, and In the case of inter prediction (PRED_INTER), it is determined whether the prediction mode is a merge mode or not. The flag to determine, the merge index if in merge mode, and the subblock merge flag If the predicted motion vector mode is an inter prediction mode, the predicted motion vector index The coding information for the subblock prediction motion vector flag, the differential motion vector, and the subblock prediction motion vector flag is The decoding unit 202 decodes the encoded information according to a prescribed syntax described later, and outputs the decoded information to the inter prediction unit 203 or The separated second The coded bit sequence is decoded to calculate the orthogonally transformed and quantized residual signal, and the orthogonally transformed and quantized residual signal is calculated. The resulting residual signal is supplied to the inverse quantization and inverse orthogonal transformation unit 206 .
[0047] The inter prediction unit 203 detects that the prediction mode PredMode of the coding block to be processed is inter When the prediction (PRED_INTER) is in the predicted motion vector mode, the coding information storage memory 205 A plurality of predictive motion vectors are generated by using the coding information of the already decoded image signal stored in A candidate motion vector is derived and registered in a motion vector predictor candidate list described later. The bitstream decoding unit 201 selects a motion vector predictor candidate from among the multiple motion vector predictor candidates registered in the supplementary list. Selecting a predicted motion vector according to the decoded and supplied predicted motion vector index; The bitstream decoder 201 decodes the difference vector and the selected predicted motion vector to generate a motion vector. The vector is calculated and 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 is the prediction mode PredMode, the partition mode Pa Flags indicating whether to use rtMode, L0 prediction, and L1 prediction: predFlagL0[xP][yP], pr edFlagL1[xP][yP], L0 and 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 pixel The prediction mode is an index that indicates the position of the top left pixel of the coding block in the block. PredMode is inter prediction (MODE_INTER) and inter prediction mode is L0 prediction (Pred_L0) In this case, the flag predFlagL0 indicating whether to use L0 prediction is 1, and whether to use L1 prediction is 2. The flag predFlagL1 indicating whether the inter prediction mode is L1 prediction (Pred_L1) is set to 0. In this case, the flag predFlagL0 indicating whether to use L0 prediction is 0, and whether to use L1 prediction is The flag predFlagL1 indicating whether the inter prediction mode is bi-prediction (Pred_BI) is set to 1. , a flag predFlagL0 indicating whether to use L0 prediction, and a flag predFlagL0 indicating whether to use L1 prediction. The flags predFlagL1 and predFlagL2 are both set to 1. Furthermore, the prediction mode Pred When the mode is inter prediction (PRED_INTER) and merging mode is selected, merging candidates are derived. The coding information of the already decoded coding block stored in the coding information storage memory 205 is Using the above, multiple merge candidates are derived and registered in a merge candidate list described later. Among the multiple merge candidates registered in the list, the bit stream is decoded by the bit stream decoding unit 201 and supplied. Select a merge candidate that corresponds to the merge index of the selected merge candidate, and make an L0 prediction for the selected merge candidate. , and flags predFlagL0[xP][yP], predFlagL1[xP][yP] indicating whether to use L1 prediction , the reference indices of L0 and L1, refIdxL0[xP][yP], refIdxL1[xP][yP], the motion of L0 and L1 The inter-prediction information such as the vectors mvL0[xP][yP] and mvL1[xP][yP] is stored in the coding information storage memory 2. 05, where xP and yP are the positions of the top left pixel of the coding block in the picture. The detailed configuration and operation of the inter prediction unit will be described later.
[0048] The intra prediction unit 204 detects whether the prediction mode PredMode of the coding block to be processed is intra. In the prediction (PRED_INTRA) step, intra prediction is performed. The encoding information includes the intra-prediction mode, and the decoded image is A predicted image signal is generated by intra-prediction from the decoded image signal stored in the image memory 208. The intra prediction unit 20 generates a prediction image signal and supplies the prediction image signal to the decoded image signal superimposition unit 207. 4 corresponds to the intra prediction unit 103 of the image encoding device 100, The predictor 103 performs the same process as the predictor 103.
[0049] The inverse quantization and inverse orthogonal transformation unit 206 performs orthogonal transformation and quantization on the bit string decoded by the bit string decoding unit 201. The inverse orthogonal transform and inverse quantization are performed on the converted residual signal. Obtain the residual signal.
[0050] The decoded image signal superimposing unit 207 receives the predicted image signal inter-predicted by the inter prediction unit 203. 203, or a predicted image signal obtained by intra-prediction in the intra-prediction unit 204, and The decoded signal is obtained by superimposing the residual signal that has been inversely orthogonally transformed and inversely quantized by the orthogonal transform unit 206. The decoded image signal is decoded and stored in the decoded image memory 208. When encoding, a filtering process is performed on the decoded image to reduce block distortion caused by encoding. After this, the image may be stored in the decoded image memory 208.
[0051] 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 given size. Each tree block is sorted in a predetermined order, i.e., in a raster order (step S1001). The tree block is scanned in the scan order (step S1002) and the inside of the tree block to be processed is divided. (Step S1003).
[0052] FIG. 7 is a flowchart showing the detailed operation of the division process in step S1003. Then, it is determined whether or not the block to be processed is to be divided into four (step S1101).
[0053] 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 upper left, upper right, lower left, and lower right are scanned in this order (step S1103). 6 is an example of a scan order, and 601 in FIG. 6 is an example in which the processing target block is divided into four. The numbers 0 to 3 in 601 indicate the order of processing. For each of the blocks, the division process in FIG. 7 is recursively performed (step S1104).
[0054] If it is determined that the processing target block is not to be divided into four, it is divided into two or three (step S1 105).
[0055] 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, i.e., how many parts to divide into 2 or 3 parts. It is determined whether or not to perform either of these (step S1201).
[0056] When it is not determined that the processing block should be divided into 2-3 blocks, i.e., when it is determined that the processing block should not be divided If so, the division ends (step S1211) and the process returns to the upper hierarchical block.
[0057] If it is determined that the block to be processed should be divided into 2-3, the block to be processed is further divided into 2 It is determined whether or not to divide (step S1202).
[0058] If it is determined that the processing block should be divided into two, the processing block is divided vertically. Based on the result, the processing target block is Divide the target block vertically (step S1204), or divide the target block horizontally ( Step S1205). As a result of step S1204, the processing target block is 602 in FIG. As shown in FIG. 1, the image is divided vertically into two parts, and the result of step S1205 is is divided horizontally into two parts as shown at 604 in FIG.
[0059] 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, whether or not to divide the block vertically Based on the result, the processing target block is divided vertically. (step S1207), or divide the processing target block horizontally (step S 1208). As a result of step S1207, the processing target block is as shown in 603 of FIG. , and vertically divided into three. As a result of step S1208, the processing target block is As shown in 605, it is divided horizontally into three parts.
[0060] After executing either step S1204 or step S1205, the processing target block is Each divided block is scanned from left to right and from top to bottom (step S1209 The numbers 0 to 3 in 602 to 605 in FIG. 6 indicate the order of processing. The 2-3 division process in FIG. 8 is recursively executed for the block (step S1210).
[0061] The recursive block splitting described here is done by dividing the number of times or the number of blocks to be processed. The necessity of division may be restricted depending on the size of the image. By making a prearrangement between the decoder and the decoder, the decoder can be realized without transmitting information. Alternatively, the encoding device may determine information that limits the necessity of division and record it in the encoded bit string. The signal may be transmitted to the decoding device by the above-mentioned method.
[0062] Here, when a block is divided, the block before the division is called the parent block, and the block after the division is called the parent block. Each block in is called a child block.
[0063] 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 In the unit 101, an optimization method such as optimal shape estimation by image recognition and strain rate optimization is applied, 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 encoded bit string. The difference is in determining the lock split shape.
[0064] Syntax for block division in the first embodiment (syntax rules for encoded bit strings) The coding_quadtree() syntax is shown in Figure 9. ,multi_type_tree() represents the syntax for dividing a block into two or three parts. qt_split is a flag that indicates whether to split a block into four. If you do not want to split into 4, set qt_split=1. If you do not want to split into 4, set qt_split=0. 1) For each block divided into four, recursively divide it into four (coding_quadtree(0), c coding_quadtree(1), coding_quadtree(2), coding_quadtree(3)). split=0) determines the subsequent split according to multi_type_tree(). mtt_split A flag that indicates whether to split the image further. If further splitting is performed (mtt_split=1), the image is split vertically. The flag mtt_split_vertical indicates whether to split the image horizontally or vertically, and the flag mtt_split_vertical indicates whether to split the image horizontally or vertically. Refer to mtt_split_binary, which is a flag that determines whether to split the vertical or horizontal axis into three parts. al=1 indicates a vertical split, mtt_split_vertical=0 indicates a horizontal split mtt_split_binary=1 indicates splitting into two parts, mtt_split_binary=0 indicates splitting into three parts. This indicates that the tree is to be split by recursively calling multi_type_tree until mtt_split=0 is reached. This allows for hierarchical block division.
[0065] <Intra prediction> The intra prediction method according to the embodiment is carried out by the intra prediction unit 10 of the video encoding device shown in FIG. 3 and the inter prediction unit 203 of the video decoding device of FIG.
[0066] The intra prediction method according to the embodiment will be described with reference to the drawings. The method is performed in both encoding and decoding processes on a coding block basis.
[0067] <Description of the intra prediction unit 103 on the encoding side> FIG. 41 is a diagram showing a detailed configuration of the intra-prediction unit 103 of the video encoding device of FIG. The normal intra prediction unit 351 performs intra prediction based on 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. and selects the selected intra prediction mode and the selected intra prediction mode. The prediction image signal corresponding to the stray prediction mode is supplied to the prediction method determination unit 105. 10(a) shows an example of intra prediction. For example, intra prediction mode 50 corresponds to the vertical direction. Intra prediction mode 1 generates an intra prediction image by copying pixels. C mode, in which all pixel values of the processing target block are the average value of the reference pixels. Intra prediction mode 0 is a planar mode, and the reference frames in the vertical and horizontal directions are This is a mode that creates a two-dimensional intra-prediction image from scratch. This is an example of generating an intra-prediction image in the case of prediction mode 40. The value of the reference pixel in the direction indicated by the intra prediction mode is copied to the image. If the reference pixel of the code is not an integer position, the pixel value is interpolated from the reference pixel values of the neighboring integer positions. A reference pixel value is determined.
[0068] 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 determination unit 105 generates a prediction image signal and supplies it to the prediction method determination unit 105. The detailed configuration and processing of the measurement unit 352 will be described later.
[0069] <Description of the intra prediction unit 204 on the decoding side> FIG. 42 is a diagram showing a detailed configuration of the intra prediction unit 204 of the video decoding device of FIG.
[0070] The normal intra prediction unit 361 predicts a pixel value 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. and selects the selected intra prediction mode and the selected intra prediction mode. A predicted image signal corresponding to the prediction mode is obtained. This predicted image signal is input to the switch 364. The normal intra prediction unit 361 in FIG. Since this corresponds to the normal intra prediction unit 351 in FIG. do.
[0071] 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 then superimposed on the decoded image signal via a switch 364. The detailed configuration and processing of the intra block copy prediction unit 362 are described below. More details will be provided later.
[0072] <Inter Prediction> The inter prediction method according to the embodiment is performed by the inter prediction unit 10 of the video encoding device in FIG. 2 and is implemented in the inter prediction unit 203 of the video decoding device of FIG.
[0073] The inter prediction method according to the embodiment will be described with reference to the drawings. The method is performed in both encoding and decoding processes on a coding block basis.
[0074] <Description of the inter prediction unit 102 on the encoding side> FIG. 16 is a diagram showing a detailed configuration of the inter-prediction unit 102 of the video 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, and a difference vector between the detected motion vector and the predicted motion vector is calculated. Inter prediction mode, reference index, motion vector, and calculated difference vector This inter prediction information is the inter prediction information for the normal prediction motion vector mode. The normal predicted motion vector mode derivation unit 301 supplies the motion vector to the normal predicted motion vector mode determination unit 305. The detailed configuration and processing will be described later.
[0075] The normal merge mode derivation unit 302 derives a plurality of normal merge candidates and determines the normal merge candidates. Select the inter prediction information for normal merge mode to obtain the inter prediction information for normal merge mode. The prediction mode determination unit 305 receives the merge mode. The theory will be explained later.
[0076] The sub-block prediction motion vector mode derivation unit 303 determines a plurality of sub-block prediction motion vectors. Then, vector candidates are derived to select sub-block predicted motion vectors, and the detected motion vector and The difference vector of the detected inter prediction mode, reference index, motion vector, and The calculated difference vector is used as inter prediction information for normal prediction motion vector mode. This inter prediction information is supplied to the inter prediction mode determination unit 305. The detailed configuration and processing of the predictive motion vector mode derivation unit 303 will be described later.
[0077] The sub-block merging mode derivation unit 304 derives a plurality of sub-block merging candidates. Select sub-block merging candidates and obtain inter prediction information for sub-block merging mode This inter prediction information is supplied to the inter prediction mode determination unit 305. The detailed configuration and processing of the merge mode derivation unit 304 will be described later.
[0078] 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 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 is determined from the inter prediction mode determination unit 305. The prediction information is provided to a motion compensation prediction unit 306 .
[0079] The motion compensation prediction unit 306 stores the decoded image in the decoded image memory 1 based on the determined inter prediction information. Inter prediction is performed on the reference image signal stored in 04. For details on the configuration and processing, More details will be given later.
[0080] <Description of the Inter Prediction Unit 203 on the Decoding Side> FIG. 22 is a diagram showing a detailed configuration of the inter prediction unit 203 of the video decoding device of FIG.
[0081] The normal prediction motion vector mode derivation unit 401 derives a plurality of normal prediction motion vector candidates. A predicted motion vector is selected, and a difference vector between the detected motion vector and the predicted motion vector is calculated. The inter prediction mode, reference index, motion vector, and difference vector are normal prediction This inter prediction information is the motion vector mode inter prediction information. The normal prediction motion vector mode derivation unit 40 The detailed configuration and processing of 1 will be described later.
[0082] The normal merge mode derivation unit 402 derives a plurality of normal merge candidates and determines the normal merge candidates. Select and obtain inter prediction information for normal merge mode. This inter prediction information is switched The merge mode derivation unit 402 normally supplies the merge mode derivation signal to the motion compensation prediction unit 406 via the merge mode derivation unit 408. The detailed configuration and processing will be described later.
[0083] The sub-block prediction motion vector mode derivation unit 403 selects a plurality of sub-block prediction motion vectors. Then, vector candidates are derived to select sub-block predicted motion vectors, and the detected motion vector and The difference vector of the detected inter prediction mode, reference index, motion vector, and The calculated difference vector is used as inter prediction information for normal prediction motion vector mode. This inter prediction information is supplied to the motion compensation prediction unit 406 via the switch 408. do.
[0084] The subblock merging mode derivation unit 404 derives multiple subblock merging candidates. Select sub-block merging candidates and obtain inter prediction information for sub-block merging mode This inter prediction information is supplied to the motion compensation prediction unit 406 via the switch 408. The motion compensation prediction unit 406 performs the decoded image memory based on the determined inter prediction information. Inter prediction is performed on the reference image signal stored in 208. This is the same as for the encoding side.
[0085] <Normal predicted motion vector mode derivation part (normal AMVP)> The normal prediction motion vector mode derivation unit 301 in FIG. unit 321, a temporal predicted motion vector candidate derivation unit 322, and a historical predicted motion vector candidate derivation unit 3 23, a predicted motion vector candidate supplementation unit 325, a normal motion vector detection unit 326, a predicted motion vector candidate The image processing unit 320 includes a vector candidate selection unit 327 and a motion vector subtraction unit 328.
[0086] The normal prediction motion vector mode derivation unit 401 in FIG. unit 421, a temporal predicted motion vector candidate derivation unit 422, and a historical predicted motion vector 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.
[0087] The normal prediction motion vector mode derivation unit 301 on the encoding side and the normal prediction 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 FIG. 19 and FIG. 25. 19 is a diagram showing a normal motion vector mode derivation unit 301 on the encoding side. FIG. 25 is a flowchart showing a procedure for deriving a predicted motion vector mode. The normal motion vector mode derivation unit 401 performs a normal predicted motion vector mode derivation process. 6 is a flowchart.
[0088] <Normal prediction motion vector mode derivation part (normal AMVP): Explanation on the encoding side> The normal prediction motion vector mode derivation process procedure on the encoding side will be described with reference to FIG. In the description of the processing procedure of FIG. 19, the term motion vector in the specification and the normal motion vector in FIG. The term vector corresponds to this.
[0089] First, the normal motion vector detection unit 326 detects the inter prediction mode and the reference index. First, a normal motion vector is detected (step S100 in FIG. 19).
[0090] Next, the spatial prediction motion vector candidate derivation unit 321 and the temporal prediction motion vector candidate derivation unit 3 22, a history prediction motion vector candidate derivation unit 323, a prediction motion vector candidate supplement unit 325, A predicted motion vector candidate selection unit 327 and a motion vector subtraction unit 328 select a normal predicted motion vector The difference motion vectors of the motion vectors used in the inter prediction of the mode are set for L0 and L1, respectively. Specifically, the prediction of the processing target block 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 Then, 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 predicted motion vector mvpL1 is selected, and the motion vector of L1 is calculated. Calculate the differential motion vector mvdL1 of the to-be-processed block mvL1. When bi-prediction (Pred_BI) is used, both L0 and L1 predictions are performed, and the predicted motion vector of L0 is A motion vector candidate list mvpListL0 is calculated, a motion vector predictor mvpL0 of L0 is selected, and the motion vector predictor 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, a predicted motion vector mvpL1 of L1 is calculated, and the motion vector of L1 is calculated. Then, the differential motion vector mvdL1 of the corresponding to the tor mvL1 is calculated.
[0091] 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 difference motion vector of L0, X is 0, and the difference motion vector of L1 is In the process of calculating the difference motion vector of LX, X is 1. If you want to refer to information from another list, not LX, use LY as the other list. represent.
[0092] 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 prediction motion vector candidate derivation unit 321, a temporal prediction motion vector candidate derivation unit 322, a history A motion vector predictor candidate derivation unit 323 and a motion vector predictor candidate supplement 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 process of step S103 will be described later with reference to the flowchart of FIG. do.
[0093] Next, the motion vector predictor candidate selection unit 327 selects a motion vector predictor candidate list for LX. Select a predicted motion vector mvpLX for LX from the mvpListLX (step S104 in FIG. 19). The motion vector mvLX and each predicted motion vector stored in the predicted motion vector candidate list mvpListLX are The motion vector candidate mvpListLX[i] is used as the difference between the motion vector candidate mvpListLX[i] and each of the motion vector candidates mvpListLX[i]. The amount of code required to encode these differential motion vectors is estimated by the motion vector candidate list mvpLis Then, the motion vector predictor candidate list mvpListLX is calculated for each element of tLX. Among the elements, the candidate motion vector predictor that has the smallest amount of coding for each candidate motion vector predictor Select mvpListLX[i] as the predicted motion vector mvpLX and obtain its index i. The predicted motion vector with the smallest amount of generated code in the predicted motion vector candidate list mvpListLX is If there are multiple candidates, the index in the motion vector predictor candidate list mvpListLX is used. The candidate mvpListLX[i] of the predicted motion vector represented by the smallest number is used as the optimal predicted motion vector. mvpLX and obtain its index i.
[0094] 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 Then, the differential motion vector mvdLX of LX is calculated as (Step S105 in FIG. 19).
[0095] <Normal predicted motion vector mode derivation part (normal AMVP): Decoding side explanation> Next, a normal predicted motion vector mode process 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 4 22, the history prediction motion vector candidate derivation unit 423 and the prediction motion vector candidate supplementation unit 425, The motion vectors used in inter prediction in normal prediction motion vector mode are divided into L0 and L1. Specifically, the process of the processing block is performed as follows (steps S201 to S206 in FIG. 25). Prediction mode PredMode is inter prediction (MODE_INTER) and the processing target block is inter prediction When the mode is L0 prediction (Pred_L0), calculate the predicted motion vector candidate list mvpListL0 of L0. 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 A motion vector candidate list mvpListL1 is calculated, a predicted motion vector mvpL1 is selected, and the motion vector of L1 is calculated. If the inter prediction mode of the processing target block is bi-predictive (Pred_BI), Then, 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.
[0096] As with the encoding side, the decoding side also performs motion vector calculation processing for each of L0 and L1. However, the same processing is performed for both L0 and L1. Therefore, in the following explanation, L1 is represented as a common LX. LX is used for inter prediction of the coding block being processed. It represents the inter prediction mode. In the process of calculating the motion vector of L0, X is 0, and in the process of calculating the motion vector of L1, In the process of calculating the motion vector of X, X is 1. Also, in the process of calculating the motion vector of LX, During processing, the LX is calculated by referencing information from another reference list, not the same reference list. When referring to one reference list, the other reference list is represented as LY.
[0097] When the motion vector mvLX of LX is used (step S202 in FIG. 25: YES), 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 prediction motion vector candidate derivation unit 421, a temporal prediction motion vector candidate derivation unit 422, a history A motion vector predictor candidate derivation unit 423 and a motion vector predictor candidate supplement unit 425 generate a plurality of motion vector predictors. Then, the motion vector predictor candidate list mvpListLX is constructed. The detailed process of step S203 will be described later with reference to the flowchart of FIG. do.
[0098] 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 selected as the predicted motion vector. The vector mvpLX is extracted (step S204 in FIG. 25).
[0099] 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 Then, the motion vector mvLX of LX is calculated (step S205 in FIG. 25).
[0100] <Normal predicted motion vector mode derivation part (normal AMVP): Motion vector prediction method> FIG. 20 shows a normal prediction motion vector mode guide of a video encoding device according to an embodiment of the present invention. The motion vector mode derivation unit 301 and the normal prediction motion vector mode derivation unit 401 of the video decoding device are common to the motion vector mode derivation unit 301 and the normal prediction motion vector mode derivation unit 401 of the video decoding device. 1 is a flowchart showing a processing procedure of a normal predicted motion vector mode derivation process having a function. do.
[0101] The normal prediction motion vector mode derivation unit 301 and the normal prediction motion vector mode derivation unit 40 1, a motion vector predictor candidate list mvpListLX is provided. The mvpListLX has a list structure and is a prediction vector that indicates the location within the predicted motion vector candidate list. The motion vector index and the motion vector predictor candidate corresponding to the index are used as elements. The motion vector predictor index number starts from 0. The motion vector predictor candidate list mvpListLX is stored in the storage area of the motion vector predictor candidate list mvpListLX. In this embodiment, the motion vector predictor candidate list mvpListLX is stored at least It is assumed that two predicted motion vector candidates (inter prediction information) can be registered. Furthermore, the motion vector predictor registered in the motion vector predictor candidate list mvpListLX is The variable numCurrMvpCand indicating the number of candidates is set to 0.
[0102] The spatial prediction motion vector candidate derivation units 321 and 421 derive the spatial prediction motion vector candidate from the adjacent block on the left. In this process, the candidate predicted motion vector is derived from the adjacent block on the left (A0 or A1) is a flag availableFlagLXA indicating whether the predicted motion vector candidate is available or not; Then, the motion vector mvLXA and the reference index refIdxA are derived, and mvLXA is used as the predicted motion vector candidate. Add it to the complement list mvpListLX (step S301 in FIG. 20). Note that when L0, X is 0. When L1, X is set to 1 (similarly below). Next, the spatial prediction motion vector candidate derivation unit 32 1 and 421 are the predicted motion vectors from the adjacent blocks (B0, B1 or B2) on the upper side. In this process, the motion vector candidate of the adjacent block on the upper side is derived. A flag availableFlagLXB indicating whether the motion vector mvLXB and the reference index are available or not. If mvLXA and mvLXB are not equal, mvLXB is used as the predicted motion vector candidate. Add it to the complement list mvpListLX (Step S302 in FIG. 20). The processes in S301 and S302 are the same except for the positions and numbers of adjacent blocks to be referenced. A flag indicating whether a motion vector predictor candidate for the coding block is available. , and the motion vector mvLxN, the reference index refIdxN (N is A or B, and so on). Put out.
[0103] Next, the temporal motion vector predictor candidate derivation units 322 and 422 calculate the current processing target picture The motion vector prediction candidates are derived from coding blocks in a picture that is different in time from the image. In this process, the predicted motion vectors of coding blocks in pictures of different times are obtained. A flag indicating whether a motion candidate is available or not, and a motion vector mvLXCol , derive the reference index refIdxCol and the reference list listCol, and use mvLXCol as the predicted motion vector. In step S303 of FIG. 20, the VP is added to the rule candidate list mvpListLX. A detailed explanation of the derivation process procedure of 3 will be omitted.
[0104] Note that the temporal prediction motion vector is calculated in units of sequence (SPS), picture (PPS) or slice. It is assumed that the processing of the torque candidate derivation units 322 and 422 can be omitted.
[0105] Next, the history prediction motion vector candidate derivation units 323 and 423 calculate the history prediction motion vector candidate. The historical predicted motion vector candidates registered in the auxiliary list HmvpCandList are used as the predicted motion vector candidates. The mvpListLX is added to the auxiliary list (step S304 in FIG. 20). The registration process will be described in detail later with reference to the flowchart of FIG.
[0106] Next, the motion vector predictor candidate supplementation units 325 and 425 generate the motion vector predictor candidate list mv Add a motion vector of a given value, such as (0,0), until pListLX is satisfied (S3 in FIG. 20). 05).
[0107] <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 A candidate derivation unit 342, an average merge candidate derivation unit 344, a history merge candidate derivation unit 345, and a merge It includes a candidate supplementation unit 346 and a merge candidate selection unit 347 .
[0108] 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 A candidate derivation unit 442, an average merge candidate derivation unit 444, a history merge candidate derivation unit 445, and a merge It includes a candidate supplementation unit 446 and a merge candidate selection unit 447 .
[0109] FIG. 21 shows the normal merge mode derivation unit 302 of the video encoding device according to the embodiment of the present invention. A normal merge mode derivation unit 402 of the video decoding device has a common function. 11 is a flowchart illustrating a procedure for a dimode derivation process.
[0110] The steps will be explained below in order. The slice type slice_type is explained for the B slice, but for the P slice, However, if the slice type slice_type is P slice, the inter prediction model can be applied. There is only L0 prediction (Pred_L0) as a mode, L1 prediction (Pred_L1) and bi-prediction (Pred_BI) are also supported. Since there is no L1, processing related to L1 can be omitted.
[0111] In the normal merge mode derivation unit 302 and the normal merge mode derivation unit 402, The merge candidate list mergeCandList has a list structure, A merge index that indicates the location within the merge candidate list, and the merge A memory area is provided to store 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 The merge candidates are represented by mergeCandList[i]. The candidate list mergeCandList must contain at least six merge candidates (inter prediction information). In addition, the merge candidates registered in the mergeCandList can be The variable numCurrMergeCand, which indicates the number of merge candidates, is set to 0.
[0112] In the spatial merging candidate derivation unit 341 and the spatial merging candidate derivation unit 441, The encoded information storage memory 111 or the encoded information storage memory 205 of the video decoding device is stored in the From the stored coding information, the blocks adjacent to the left and above the block to be processed are Derive spatial merge candidates A and B, and create a merge candidate list, mergeC, of the derived spatial merge candidates. The spatial merge candidates A and B are registered in the andList (step S401 in FIG. 21). Define N, which indicates one of the temporal merge candidates Col. Inter prediction information of block N A flag indicating whether a spatial merge candidate N can be used as a spatial merge candidate. The reference index refIdxL0N of L0 and the reference index refIdxL1N of L1 of the complement N, A L0 prediction flag predFlagL0N indicates whether L0 prediction is performed or not, and a L1 prediction flag predFlagL0N indicates whether L1 prediction is performed or not. The L1 prediction flag predFlagL1N indicates the motion vector mvL0N of L0, and the motion vector mvL1 of L1 indicates the motion vector mvL1 of L1. However, in this embodiment, N is derived from the block including the coding block to be processed. Since the merge candidates are derived without referring to other coding blocks included in the block, Spatial merging candidates contained in blocks that contain elephant coding blocks are not derived.
[0113] Next, the temporal merge candidate derivation unit 342 and the temporal merge candidate derivation unit 442 determine different time Then, a temporal merge candidate is derived from the pictures between the first and second pictures, and the derived temporal merge candidate is called a merge candidate. The time merge candidates are registered in the list mergeCandList (step S402 in FIG. 21). availableFlagCol, a flag indicating whether L0 prediction of temporal merge candidates is performed L0 prediction flag predFlagL0Col indicating whether L0 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 A detailed description of the process in step S402 will be omitted.
[0114] Note that the temporal merge candidate derivation is performed in units of sequences (SPS), pictures (PPS), or slices. It is assumed that the processing of the extraction unit 342 and the temporal merge candidate derivation unit 442 can be omitted.
[0115] Next, the history merging candidate derivation unit 345 and the history merging candidate derivation unit 445 perform history prediction Mark the historical predicted motion vector candidates registered in the motion vector candidate list HmvpCandList. The mergeCandList is added to the merge candidate list (step S403 in FIG. 21). The detailed process of step 3 will be described later with reference to the flowchart of FIG.
[0116] Next, the average merge candidate derivation unit 344 and the average merge candidate derivation unit 444 calculate the merge candidates. Derive average merge candidates from the complement list mergeCandList and merge the derived average merge candidates. The merge candidate list is registered in mergeCandList (step S404 in FIG. 21). The detailed process of step 04 will be described later with reference to the flowchart of FIG.
[0117] Next, the merge candidate supplementation unit 346 and the merge candidate supplementation unit 446 create 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 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 the P slice, the maximum number of merge candidates is limited to MaxNumMergeCand. The prediction mode with the motion vector value (0,0) in the index is L0 prediction (Pred_L0) Add merge candidates for B slices. For B slices, the motion vectors are ( 0,0) is added as a merge candidate whose prediction mode is bi-predictive (Pred_BI).
[0118] Next, the merging candidate selection unit 347 and the merging candidate selection unit 447 select the merging 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 the distortion amount. A merge index indicating the selected merge candidate is generated. On the other hand, the decoding side merge candidate selection unit 447 supplies the decoded Based on the merge index, a merge candidate is selected, and the selected merge candidate is motion-compensated. The result is supplied to the compensation prediction unit 406.
[0119] <Update of historical motion vector prediction candidate list> Next, the coding information storage memory 111 on the coding side and the coding information storage memory 20 on the decoding side For details on how to initialize and update the historical motion vector prediction candidate list HmvpCandList in preparation for version 5, FIG. 26 is a flowchart for explaining the procedure for initializing and updating the history predicted motion vector candidate list. 1 is a flowchart showing the process of
[0120] In this embodiment, the history motion vector predictor candidate list HmvpCandList is updated based on the coding information. The information storage memory 111 and the encoded information storage memory 205 are assumed to be implemented. A history candidate list update unit is provided in the prediction unit 102 and the inter-prediction unit 203 to perform history prediction. An update of the motion vector candidate list HmvpCandList may be performed.
[0121] 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 selects the normal prediction vector mode or the normal merge mode. When the selected candidate is selected, the history motion vector predictor candidate list HmvpCandList is updated. The inter prediction mode decoded by the bit sequence decoding unit 201 is a normal prediction vector mode or In the normal merge mode, the historical motion vector predictor candidate list HmvpCandList is updated.
[0122] Inter prediction mode used for inter prediction in normal prediction vector mode or normal merge mode. The inter prediction information is used as the inter prediction information candidate hMvpCand, and the historical predicted motion vector candidate list is Register it in HmvpCandList. The inter-prediction information candidate hMvpCand contains the reference index of L0. refIdxL0 and L1 reference index refIdxL1, L0 prediction indicating whether L0 prediction is performed a prediction flag predFlagL0 indicating whether or not L1 prediction is performed; and a L1 prediction flag predFlagL1 indicating whether or not L1 prediction is performed. The motion vector mvL0 of L0 and the motion vector mvL1 of L1 are included. The motion vector history prediction memory 111 and the coding information storage memory 205 on the decoding side Among the elements (i.e., inter prediction information) registered in the candidate list HmvpCandList, If there is inter-prediction information with the same value as the inter-prediction information candidate hMvpCand, the history prediction The element is deleted from the motion vector candidate list HmvpCandList. If there is no inter prediction information with the same value as the candidate hMvpCand, the history prediction motion vector candidate The first element of the auxiliary list HmvpCandList is deleted, and the history motion vector prediction candidate list HmvpCand The inter-prediction information candidate hMvpCand is added to the end of List.
[0123] 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.
[0124] First, initialize the historical motion vector predictor candidate list HmvpCandList in slice units. (Step S2101 in FIG. 26). At the beginning of the slice, the history predicted motion vector candidate list Hm All elements of vpCandList are emptied and registered in the historical motion vector prediction candidate list HmvpCandList. The value of the number of recorded historical motion vector predictor candidates NumHmvpCand is set to 0.
[0125] Note that the initialization of the historical predicted motion vector candidate list HmvpCandList is performed on a slice-by-slice basis ( However, it was decided to implement it on a picture-by-picture, tile-by-tile or tree block basis. This may be done on a row-by-row basis.
[0126] Next, for each coding block in the slice, the following historical motion vector predictor candidate list Hmvp The process of updating the CandList is repeated (steps S2102 to S2107 in FIG. 26).
[0127] First, the initial setting is performed for each coding block. Set the value of the tag "identicalCandExist" to FALSE and set the index to be deleted, "removeIdx", to 0. (Step S2103 in FIG. 26).
[0128] Inter prediction information candidate hMvp to be registered in the history prediction motion vector candidate list HmvpCandList It is determined whether Cand exists (step S2104 in FIG. 26). When the determination unit 105 determines that the normal predicted motion vector mode or the normal merge mode is selected, Or, the bitstream decoding unit 201 on the decoding side uses the normal predicted motion vector mode or the normal merge motion vector mode. If the inter prediction mode is decoded as the encoding mode, the inter prediction mode is set to hMvpCand. The method determining unit 105 determines whether the intra prediction mode, the sub-block prediction motion vector mode, or the sub-block prediction motion vector mode is an intra prediction mode, When the subblock merge mode is determined, or when the bitstream decoding unit 201 on the decoding side determines that the in- tra prediction mode, sub-block predicted motion vector mode or sub-block merge mode When the motion vector prediction candidate list HmvpCandList is decoded as Therefore, the inter prediction information candidate hMvpCand to be registered does not exist. If the information candidate hMvpCand does not exist, steps S2105 to S2106 are skipped (see FIG. 26: NO in step S2104). If so, the process proceeds to step S2105 and thereafter (step S2104 in FIG. 26: YES). .
[0129] Next, the input motion vector to be registered is added to each element of the history motion vector candidate list HmvpCandList. It is determined whether an element identical to the target prediction information candidate hMvpCand exists (step S2105). Figure 27 is a flow chart of the same element confirmation process. If the value of the number of candidate vectors NumHmvpCand is 0 (step S2121 in FIG. 27: NO), The historical motion vector prediction candidate list HmvpCandList is empty and there is no identical candidate. Steps S2122 to S2125 are skipped, and the same element confirmation process ends. When the value of the number of historical motion vector predictor candidates NumHmvpCand is greater than 0 (step S2 in FIG. 27), 121:YES), the historical predicted motion vector index hMvpIdx is between 0 and NumHmvpCand-1. Then, the process of step S2123 is repeated (steps S2122 to S2125 in FIG. 27). First, the hMvpIdx-th element HmvpCandList, counting from 0 in the history motion vector predictor candidate list, t[hMvpIdx] is compared with the inter-prediction information candidate hMvpCand to see if it is the same as the candidate hMvpCand (see step 27 in FIG. 27). If they are the same (step S2123 in FIG. 27: YES), the same candidate exists. Set the value of TRUE to the flag identicalCandExist, which indicates whether the index is deleted. Set the value of hMVpIndex to the removeIdx box and end this identical element confirmation process. If so (step S2123 in FIG. 27: NO), hMvpIdx is incremented by 1, and the history predicted motion If the vector index hMvpIdx is equal to or smaller than NumHmvpCand-1, the process proceeds to step S2123. Processing is performed (steps S2122 to S2125 in FIG. 27).
[0130] Returning to the flowchart of FIG. 26, the historical motion vector predictor candidate list HmvpCandList The element shift and addition process is performed (step S2106 in FIG. 26). Step S2106: Shifting / adding elements of the history prediction motion vector candidate list HmvpCandList 1 is a flowchart of a processing procedure. First, in the historical motion vector predictor candidate list HmvpCandList, Either remove the stored elements and then add the new elements, or add the new elements without removing any elements. Specifically, the flag "identicalC" indicates whether or not an identical candidate exists. A comparison is made to see whether andExist is TRUE or NumHmvpCand is 6 (step S21 in FIG. 28). 41). The flag identicalCandExist, which indicates whether an identical candidate exists, is TRUE or If NumHmvpCand satisfies any of the 6 conditions (Step S2141 in FIG. 28: YES) Then, the elements stored in the history motion vector predictor candidate list HmvpCandList are removed, and the new Add an element that is not a member of the current element. Set the initial value of index i to the value of removeIdx + 1. The element shift process in step S2143 is repeated from NumHmvpCand to NumHmvpCand. (Steps S2142 to S2144). HMVPCandList[ i - 1 ] is assigned the element of HMVPCandList[ i ]. Shift the elements forward by copying (step S2143 in FIG. 28) and change i by 1 in. (Steps S2142 to S2144 in FIG. 28). When the element shift process in step S2143 is completed, the history prediction motion vector is The inter-prediction information candidate hMvpCand is added to the end of the list of inter-prediction information candidates (step S2 in FIG. 28). 145). Here, the end of the history motion vector predictor candidate list is the end of the history motion vector predictor candidate list, counting from 0 (NumHmvp This is the historical predicted motion vector candidate HMVPCandList[NumHmvpCand-1]. Shifting and adding elements of the complement list HMVPCandList is completed. Meanwhile, whether the same candidate exists is checked. Flag indicating whether or not identicalCandExist is TRUE and NumHmvpCand is 6 If neither of the above conditions is satisfied (step S2141 in FIG. 28: NO), the history of the motion vector predictor candidate list is The elements in the history motion vector predictor candidate list are deleted without excluding the elements stored in the HmvpCandList. Finally, the inter-prediction information candidate hMvpCand is added (step S2146 in FIG. 28). The end of the history motion vector predictor candidate list is the NumHmvpCand-th HMVPC andList[NumHmvpCand]. In addition, NumHmvpCand is incremented by 1 to obtain the current historical prediction. The element shift / addition process of the motion vector candidate list HMVPCandList ends.
[0131] FIG. 31 is a diagram for explaining an example of a process of updating a history prediction motion vector list. Six elements (inter prediction information) are registered in the motion vector candidate list HMVPCandList. When adding new inter prediction information, the history prediction motion vector candidate list HMVP Each element of CandList is compared with the new inter prediction information from the front (Figure 31(a)). The inter prediction information is the third one from the top of the history prediction motion vector candidate list HMVPCandList. If the value is the same as that of the element HMVP2, the element HMV P2 is deleted and the elements HMVP3 to HMVP5 are shifted forward one by one. New inter prediction information is added to the end of the vector candidate list HMVPCandList (Figure 31). (b)), and then the update of the historical motion vector predictor candidate list HMVPCandList is completed (FIG. 31(c) )).
[0132] <Historical Prediction Motion Vector 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 history prediction motion vector mode derivation unit 401 on the decoding side The process of step S304 in FIG. 20 is common to all the torque candidate derivation units 423. Method for deriving historical predicted motion vector candidates from the historical predicted motion vector candidate list HMVPCandList FIG. 29 is a flowchart for explaining a procedure for deriving a historical motion vector predictor candidate. This is a low chart.
[0133] The number of current motion vector predictor candidates numCurrMvpCand is the motion vector predictor candidate list mvpList t The maximum number of elements in LX (here, 2) or more, or the number of history motion vector predictor candidates NumHmvp If the value of Cand is 0 (step S2201 in FIG. 29: NO), The process of steps S2202 to S2209 is omitted, and the procedure of the historical motion vector predictor candidate derivation process is terminated. The number of current motion vector predictor candidates numCurrMvpCand is the motion vector predictor candidate list mvpListL If the number of elements in X is less than 2, and the number of historical motion vector predictor candidates NumHmvpCand If the value is greater than 0 (step S2201 in FIG. 29: YES), step S Processing from 2202 to S2209 is carried out.
[0134] Next, the index i goes from 1 to 4 and the number of history motion vector predictor candidates NumHmvpCand The process of steps S2203 to S2208 in FIG. 41 is repeated until the smaller value is reached ( (Steps S2202 to S2209 in FIG. 29) The current number of motion vector predictor candidates, numCurrM When vpCand is equal to or greater than 2, which is the maximum number of elements in the motion vector predictor candidate list mvpListLX (see FIG. 2), 9: NO), and the processing of steps S2204 to S2209 in FIG. The process of deriving the historical motion vector predictor candidate is omitted and the current motion vector predictor candidate deriving process is terminated. The number of candidates, numCurrMvpCand, is the maximum number of elements in the motion vector predictor candidate list, mvpListLX, 2 If it is smaller (step S2203 in FIG. 29: YES), step S2204 in FIG. 29 The following process is carried out.
[0135] Next, the process from step S2205 to S2207 is performed when Y is 0 and 1 (L0 and L1). The process is repeated 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 first pair is two or more (step S2205 in FIG. 29: NO), the process proceeds from step S2206 in FIG. Therefore, the process of S2209 is omitted, and the process of 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 in (step S2205 in FIG. 29: YES), The process proceeds to step S2206 and thereafter.
[0136] Next, refer to LY in the history prediction motion vector candidate list HmvpCandList[NumHmvpCand - i]. When the index is the same as the reference index refIdxLX of the motion vector to be coded / decoded (Step S2206 in FIG. 29: YES) Then, counting from 0 in the motion vector predictor candidate list, the numCurrMvpCand-th element mvpListLX[ numCurrMvpCand] is the (NumHmvpCand-i)th candidate in the history prediction motion vector candidate list, counting from 0 Add the LY motion vector of element HmvpCandList[[NumHmvpCand - i]] (step in Figure 29) S2207), the number of current predicted motion vector candidates, numCurrMvpCand, is incremented by 1. The reference index of LY in the history prediction motion vector candidate list HmvpCandList[NumHmvpCand - i] If the reference index refIdxLX of the motion vector to be coded / decoded is not the same as Step S2206 in FIG. 29: NO), and the additional process of step S2207 are skipped.
[0137] The above steps S2205 to S2207 in FIG. 29 are performed on both L0 and L1. (Steps S2204 to S2208 in FIG. 29).
[0138] The index i is incremented by 1, and the index i becomes 4 and the history predicted motion vector candidate is If the number of complements NumHmvpCand is smaller than the smaller value, the process returns to step S2203. (Steps S2202 to S2209 in FIG. 29).
[0139] <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. The history from the history merge candidate list HmvpCandList, which is the processing procedure of step S403 in The method of deriving merge candidates will now be described in detail. Figure 30 shows the history merge candidate derivation process. 1 is a flowchart for explaining the process.
[0140] First, an initialization process 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 Sets numCurrMergeCand, the number of elements currently in the merge candidate list.
[0141] Next, set the initial value of the index hMvpIdx to 1, and then run the Then, the additional processing from step S2303 to step S2310 in FIG. 30 is repeated (FIG. 3 0 steps S2302 to S2311). Elements registered in the current merge candidate list If the number of merge candidates, numCurrMergeCand, is not less than (MaxNumMergeCand-1), Since merge candidates have been added to all elements in the candidate list, the process of deriving merge candidates in this history is The process ends (step S2303 in FIG. 30: NO). If the number of elements in the merge candidate list, numCurrMergeCand, is less than or equal to (Maximum number of merge candidates, MaxNumMergeCand-1) (see Figure 30 step S2303: YES), and then process steps S2304 and onward.
[0142] First, the value FALSE is set to sameMotion (step S2304 in FIG. 30). The initial value of index i is set to 0, and the index i is increased from this initial value to 1 in step S2 of FIG. The process goes to steps S2306 and S2307 (S2305 to S2308 in FIG. 30).
[0143] Next, counting from 0 in the history motion vector prediction candidate list, Element HmvpCandList[NumHmvpCand-hMvpIdx] and the i-th element in the merge candidate list, counting from 0 It is compared whether the element mergeCandList[i] has the same value or not (step S2306 in FIG. 30). A merge candidate has the same value if all components of the merge candidate (inter prediction mode, The values of the reference index and motion vector are the same. The processing of S2306 is performed if hMvpIdx is greater than NumHmvpCand-2 and mergeCandList[i] is not a spatial Only if it is a merge candidate and isPruned[i] is FALSE. Step S2306: YES, set both sameMotion and isPruned[i] to TRUE. (Step S2307 in FIG. 30). If the values are not the same (Step S2306 in FIG. 30: O), skip the process of step S2307. When the loop process up to step S2308 is completed, check whether sameMotion is FALSE. If sameMotion is FALSE (step S2309 in FIG. 30), (P2309: YES), mergeCandList[nu mCurrMergeCand], counting from 0 in the history prediction motion vector candidate list (NumHmvpCand - hMvp Add the (HmvpCandList[NumHmvpCand - hMvpIdx])th element and set numCurrMergeCand by 1. (Step S2310 in FIG. 30). Increment the index hMvpIdx by 1. (Step S2302 in FIG. 30), and steps S2302 to S2311 in FIG. Repeat the process.
[0144] All elements in the history motion vector prediction candidate list are checked or the merge candidate list is Once all elements in the history have been added with merge candidates, the process of deriving merge candidates for this history is complete. .
[0145] <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 average merge candidate derivation unit 444 of the normal merge mode derivation unit 402 on the side. A detailed description is given of the method for deriving average merging candidates, which is the processing procedure in step S404 of 38 is a flowchart illustrating the procedure of the average merging candidate derivation process.
[0146] First, an initialization process is performed (step S1301 in FIG. 38). Sets numCurrMergeCand, the number of elements currently in the merge candidate list.
[0147] 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, the history merge candidate derivation process The process is then terminated (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.
[0148] 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 candidates 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).
[0149] 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). That is, if the LX prediction of mergeCandList[i] and the LX prediction of mergeCandList[j] are both valid, If so, the motion vector of the LX prediction in mergeCandList[i] and the motion vector of the LX prediction in 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 averaging function is calculated and set to the LX prediction of averageCand. The LX prediction of geCand is validated (step S1309 in FIG. 38). In step 08, if the LX prediction of mergeCandList[j] is not valid, i.e., the LX prediction of mergeCandList[i] If the prediction is valid and the LX prediction of mergeCandList[j] is invalid, Derive the average merge candidate of the LX prediction with the motion vector and reference index of the prediction, and The LX prediction of ageCand is set to the 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 sets the LX prediction of averageCand to valid (step S1312 in FIG. 38). In step S1311 of FIG. 38, if the LX prediction of mergeCandList[j] is not valid, i.e. That is, if both the LX prediction of mergeCandList[i] and the LX prediction of mergeCandList[j] are invalid, The LX prediction of averageCand is disabled (step S1312 in FIG. 38).
[0150] The average merge candidate averageCand of the L0 prediction, L1 prediction, or BI prediction generated as above is , and add it to mergeCandList[numCurrMergeCand], the numCurrMergeCand-th merge candidate in the merge candidate list. Then, numCurrMergeCand is incremented by 1 (step S1315 in FIG. 38). , completing the process of deriving the average merging candidates.
[0151] The average merge candidate is calculated by dividing the horizontal and vertical components of the motion vector. It is averaged.
[0152] <Motion compensation prediction processing> The motion compensation prediction unit 306 predicts the current block being predicted during coding. The motion compensation prediction unit 306 obtains the position and size of the inter prediction information. The inter prediction mode is obtained from the inter prediction mode determination unit 305. The reference image memory is used to derive the reference coordinates and motion vectors specified by the reference index. The reference picture is moved from the same position as the image signal of the prediction block by the amount of the motion vector. After acquiring the image signal at the position, a prediction signal is generated.
[0153] 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 called the motion compensated prediction signal. The prediction mode is a prediction mode from two reference pictures, such as BI prediction. In the case of prediction, the weighted average of the prediction signals obtained from two reference pictures is used as the motion vector. The bi-predictive prediction signal is supplied to the prediction method determination unit. The weighted average ratio is 1:1, but other ratios may be used to perform the weighted average. For example, the closer the picture interval between the picture to be predicted and the reference picture, the The weighting ratio may be increased. Alternatively, a correspondence table of interval combinations and weighting ratios may be used.
[0154] 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, The block merge mode is obtained from the subblock merge mode derivation unit 404 via the switch 408.
[0155] The motion compensation prediction unit 406 outputs the obtained motion compensation prediction signal to the decoded image signal superimposition unit 207. Supply.
[0156] <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. L0 prediction and L1 prediction are forward predictions (using the forward reference image) It can be a backward prediction (prediction that refers to a backward reference image) or a backward prediction (prediction that refers to a backward reference image). 33 and 34 are diagrams for explaining motion compensation prediction in L0 prediction (uni-prediction).
[0157] FIG. 33 shows an example in which the inter prediction mode is L0 prediction and the reference picture of L0 (RefL0Pi c) is located before the picture to be processed (CurPic). indicates that the L0 prediction is performed and the L0 reference picture is located after the current picture. Similarly, the reference pictures for L0 prediction in Fig. 33 and Fig. 34 are used as reference pictures for L1 prediction. It can also be replaced with Cha (RefL1Pic) for uniprediction.
[0158] The process of making predictions from two reference pictures is defined as bi-prediction, and in the case of bi-prediction, it is called L0 prediction. The term "bi-prediction" refers to the use of both L1 prediction and L2 prediction. FIG. 35 is a diagram for explaining prediction. The reference picture for L1 prediction is before the current picture and is after the current picture. FIG. 36 shows a case where the L0 prediction reference picture and the L1 prediction reference picture are bi-predictive. This shows a case where the prediction reference picture is located at a time earlier than the picture to be processed. Bi-predictive, where the reference picture for L0 prediction and the reference picture for L1 prediction are closer to the processing target picture This shows the case where the time is after the time.
[0159] In this way, the relationship between the prediction type and time of L0 / L1 is as follows: L0 is forward prediction (forward reference image) L1 is backward prediction (prediction that references a backward reference image) and L2 is backward prediction (prediction that references a backward reference image). In the case of bi-prediction, the same reference picture can be used for L0 prediction. In addition, the motion compensation prediction may be performed in a uni-predictive or bi-predictive manner. The decision as to whether to use L0 prediction or L1 prediction is made based on, for example, whether to use L0 prediction or L1 prediction. The decision is based on the information (e.g., flags) that is displayed.
[0160] <About reference indexes> In the embodiment of the present invention, in order to improve the accuracy of the motion compensation prediction, This makes it possible to select the most suitable reference picture from among a number of reference pictures. The reference picture used in the motion compensation prediction is used as a reference index, and The index is encoded into the encoded stream along with the encoded vector.
[0161] <Motion compensation process based on normal predicted motion vector mode> The motion compensation prediction unit 306 is also shown in 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 obtained from the prediction mode determination unit 305. The prediction mode, reference index, and motion vector are derived, and a motion compensation prediction signal is generated. The generated motion compensation prediction signal is supplied to the prediction method determination unit 105.
[0162] Similarly, the motion compensation prediction unit 406 also performs the same processing as the inter prediction unit 203 on the decoding side in FIG. As shown, during the decoding process, a 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 obtained 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.
[0163] <Motion compensation processing based on normal merge mode> The motion compensation prediction unit 306 is also shown in 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, the inter prediction information is the inter prediction mode of the block currently being processed, obtained from the inter 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 a prediction method determination unit 105.
[0164] Similarly, the motion compensation prediction unit 406 also performs the same processing as the inter prediction unit 203 on the decoding side in FIG. As shown, during the decoding process, the switch 408 is normally connected to the merge mode derivation unit 402. If the merge mode is not set, the inter prediction information is obtained from the normal merge mode derivation unit 402, and the current process is performed. The inter prediction mode, reference index, and motion vector of the block being processed are The generated motion compensation prediction signal is multiplied by the decoded image signal. The signal is supplied to the folding unit 207. <Merged Motion Vector Difference (MMVD)> The top two merge candidates (those with merge index 0 and 1 in the merge candidates list) A differential motion vector can be added to the motion vector of the candidate image. The resulting vector is called the merged differential motion vector.
[0165] When the merging motion vector difference is added in the merging candidate selection unit 347 on the encoding side, The motion vector to which the merge differential motion vector is added is determined by the inter prediction mode determination unit 305. The bitstream coding unit 108 also supplies the merged data to the motion compensation prediction unit 306 via the merged data. Information about the merged differential motion vector is encoded. , an index mmvd_distance_idx indicating the distance to be added to the motion vector, and a motion vector The index mmvd_direction_idx indicates the direction in which to add the value. These indexes are , are defined as shown in the tables in Fig. 39(a) and Fig. 39(b). The x and y components of the vector offset MmvdOffset are set to MmvdOffset[0] and MmvdOffset[1], respectively. This can be expressed as: MmvdOffset[0] = ( MmvdDistance << 2 ) * MmvdSign[0] MmvdOffset[1] = ( MmvdDistance << 2 ) * MmvdSign[1] The merged motion vector difference is the merged motion vector offset MmvdOffs The details of deriving the merged differential motion vector are given below for the decoding side. I will explain it below.
[0166] On the decoding side, if a merged motion vector difference exists, it is provided to the bitstream decoding unit 201. Separating information about merge difference motion vectors from the bitstream provided, The merge candidate selection unit 447 also derives a motion vector offset MmvdOffset. A merge differential motion vector is derived from the coded merge differential motion vector offset. This merged difference motion vector is added to the motion vector, and then the motion vector is converted to the motion vector. The result is supplied to the compensation prediction unit 406.
[0167] The merging candidate selection unit 447 derives the merging motion vector difference mMvdLX as shown in FIG. First, the inter prediction mode of the coding block is It is determined whether or not the prediction is bi-predictive (PRED_BI) (S4402). 02: No), and it is determined whether it is L0 prediction (PRED_L0) (S4404). (S4404: Yes), mMvdL0 = MmvdOffset mMvdL1 = 0 As a result, the process of deriving the merged motion vector difference is completed (S4406). (S4404:No), mMvdL0 = 0 mMvdL1 = MmvdOffset This completes the process of deriving a merge differential motion vector (S4408).
[0168] On the other hand, in the case of bi-prediction (S4402: Yes), the current picture currPic and the reference picture The POC difference is calculated for each reference list and designated as currPocDiffL0 and currPocDiffL1, respectively ( S4410). Here, the difference in POC between picA and picB, DiffPicOrderCnt(picA, picB), is DiffPicOrderCnt( picA, picB ) = [POC of picA] - [POC of picB] Also, the reference picture RefPicList0[refIdxL0] indicates the reference index of the reference list L0. Similarly, the reference picture RefPicList1[refIdxL1] is , which is the picture indicated by the reference index refIdxL1 in the reference list L1.
[0169] Next, it is determined whether -currPocDiffL0 * currPocDiffL1 >= 0 (step S4412 If this determination is true (step S4412: Yes), mMvdL0 = MmvdOffset mMvdL1 = -MmvdOffset This is the end of the process of deriving the merge motion vector difference (step S4414). On the other hand, if this determination is false (step S4412: No), mMvdL0 = MmvdOffset mMvdL1 = MmvdOffset Next, the absolute value of the difference in POC from the reference list L0 is calculated based on the reference list L1. If the absolute value of the difference between the POC of the first L1 and the POC of the second L2 is not less than the absolute value (step S4418), If so (step S4418: Yes), set X=0 and Y=1 (step S4420), and The differential motion vector mMvdL1 is scaled (step S4424). indicates that when Y=0, it is mMvdL0, and when Y=1, it is mMvdL1. On the other hand, if this judgment is false, If so (step S4418: No), set X=1 and Y=0 (step S4422), and The motion vector mMvdL0 is scaled (step S4424). Scaling of mMvdLY is td = Clip3( -128, 127, currPocDiffLX ) tb = Clip3( -128, 127, currPocDiffLY ) tx = ( 16384 + Abs( td ) >> 1 ) / td distScaleFactor = Clip3( -4096, 4095, ( tb * tx + 32 ) >> 6 ) mMvdLY = Clip3( -131072, 131071, Sign( distScaleFactor * mMvdLY ) * ((Abs( distScaleFactor * mMvdLY ) + 127 ) >> 8 ) ) Here, currPocDiffLX is derived as currPocDiffL0 when X=0, and cu when X=1. Similarly, when Y=0, currPocDiffLY is currPocDiffL0. Y=1 indicates that it is currPocDiffL1. Clip3(x,y,z) is the minimum for the value z. A function that limits the value to x and the maximum value to y. Sign(x) is a function that returns the sign of the value x. The value is 1 if the value x is positive, 0 if the value x is 0, and -1 if the value x is negative. Abs(x) returns the absolute value of the value x. The >> function shifts the left operand to the right by the number of bits in the right operand. This is a bit operator that indicates that the merged motion vector difference is derived. The process ends.
[0170] The merge differential motion vector is calculated based on the top two motion vectors of the subblock merge candidates. In this case, the index mmvd_dis indicating the distance to be added to the motion vector is tance_idx is defined as shown in the table in Figure 39(c). The operation of the merging candidate selection unit 386 is the same as that of the merging candidate selection unit 347, and therefore a description thereof will be omitted. The operation of the sub-block merging candidate selection unit 486 is the same as that of the merging candidate selection unit 447. Therefore, the description will be omitted.
[0171] As mentioned above, MmvdDistance is defined as shown in the tables in Figure 39(a) and Figure 39(c). These tables are defined at quarter-pixel accuracy, so the merged differential motion vectors generated are The rules may contain fractional pixel precision. However, the pixel precision in these tables is assumed to be 1. The merged motion vector difference is generated by encoding / decoding the flag indicating the merged motion vector difference on a slice-by-slice basis. The vector can be modified to not include fractional pixel precision.
[0172] <Adaptive Motion Vector Resolution (AMVR)> The resolution of the differential motion vector can be adaptively changed for each coding block. This resolution is called the adaptive motion vector resolution.
[0173] We will now explain the use of adaptive motion vector resolution for normal motion vector prediction mode. In this case, the spatial prediction motion vector candidate derivation units 321 and 421 and the temporal prediction motion vector candidate derivation units 422 and 423 are The motion vector candidate derivation units 322 and 422, the historical motion vector candidate derivation units 323 and In step 423, the derived candidate motion vectors are rounded according to the resolution. You can select from 1 / 4, 1, or 4 pixel accuracy. If you do not change the resolution, the accuracy will be 1 / 4 pixel. The processing is performed according to the resolution of the motion vector in the coding block being processed. That is, the derived candidate motion vector mvX is rightShift = leftShift = MvShift + 2 offset = ( 1 << ( rightShift - 1 ) ) mvX = ( ( mvX + offset - ( mvX >= 0 ) ) >> rightShift ) << leftShift However, if rightShift=0, offset=0. When the resolution of the motion vector in the coding block is 1 / 4 pixel accuracy, MvShift=0. Similarly, if the resolution of the motion vector is 1 pixel accuracy, MvShift=2, and the motion vector When the resolution is 4 pixels, MvShift=4. The above formulas are used to process the x and y components of mvX. will be done.
[0174] The adaptive motion vector resolution is used for the sub-block predicted motion vector mode. In this case, the resolution is different from the normal predicted motion vector mode. That is, the affine inheritance predicted motion vector candidate derivation units 361 and 461 and the affine construction The motion vector predictor candidate derivation units 362 and 462 and the affine identical motion vector predictor candidate In the derivation units 363 and 463, the derived candidate motion vectors are rounded according to the resolution. The resolution can be selected from 1 / 16, 1 / 4, and 1 pixel accuracy. If the resolution is not changed, the resolution is set to 1 / 4 pixel. The rounding process is performed according to the resolution of the motion vector in the coding block being processed. That is, the derived candidate motion vector mvX is rounded according to the above formula. Here, the resolution of the motion vector in the coding block to be processed is 1 / 4 pixel. In the case of raw precision, MvShift = 0. Similarly, when the resolution of the motion vector is 1 / 16 pixel precision, In the above, MvShift=-2, and when the resolution of the motion vector is 1 pixel accuracy, MvShift=2. The x and y components of mvX are processed according to the above formula.
[0175] <Intra Block Copy (IBC)> The valid reference area for intra block copying will be described with reference to FIG. 32. FIG. 32(a) shows The coding tree block unit is used as the intra block copy reference block, and the valid reference area This is an example of determining the number of times ... 505 is a coding tree block, and 504 is a coding tree block to be processed. is the coding block to be processed. The processing order of the coding tree block is 500, 501 , 502, 503, 504 in that order. In this case, the coding block 505 to be processed is included The three coding tree blocks 501, 502, and 503 processed immediately before the coding tree block 504 02, 503 are the valid reference areas of the coding block 505 to be processed. The coding tree blocks processed before block 501 and the coding block to be processed 50 Regardless of whether the processing is completed before 5, the processing target coding block 505 is included All areas included in the coding tree block 504 are set as invalid reference areas.
[0176] FIG. 32(b) shows how the coding tree block is divided into four units as intra-block copy bases. This is an example of determining the effective reference area as a quasi-block. 16 is a coding tree block, and 516 is the coding tree block to be processed. The coding tree block 515 is divided into four parts, 506, 507, 508, and 509. The block is divided into four parts, 510, 511, 512, and 513. 514 is the coding block to be processed. The processing order of the intra block copy reference block is 506, 507, 508, 509. In this case, the order of the coding block to be processed is 511, 512, and 513. The three intra block copies processed immediately before the intra block copy reference block 511 including 4 The block copy reference blocks 508, 509, and 510 are the block to be processed of the coding block 514. The valid reference area is the area processed before the intra block copy reference block 508. Whether the processing is completed before the encoding tree block and the processing target encoding block 514 Regardless of whether or not the intra block copy reference block including the processing target coding block 514 is The entire area included in the block 511 is set as an invalid reference area.
[0177] <Memory space of reference area> The memory space for storing the processed image of the reference region is explained. The memory of the reference area when the intra block copy reference block is the same as the original block unit. FIG. 57(a) is a diagram for explaining the space. 4, 505 are coding tree blocks. The coding tree block 503 is the coding The coding tree block 500 and the coding tree block 501 are coding tree blocks. ,Encoding tree block 502, a processed encoding tree block, which is a processing target encoding The coding tree blocks 504 and 505 correspond to the reference region of the coding tree block 503. These are unprocessed coding tree blocks. 600, 601, 602, and 603 in FIG. 57(a) is the memory space, and the memory space 600 is the processed image of the coding tree block 500. Similarly, the memory space 601 stores the processed image of the coding tree block 501. The image is stored in the memory space 602, and the processed image of the coding tree block 502 is stored in the memory space 603. The memory space 603 is stored in accordance with the processing of the coding tree block 503 to be processed. When the processing of the coding tree block 503 is completed, the next coding tree block Then, processing of the leaf block 504 is started.
[0178] The process when the process of the coding tree block 503 is completed will be explained with reference to FIG. 57(b). At this time, the coding tree block 504 is the coding tree block to be processed. Furthermore, the coding tree block 503 becomes the reference region, and the coding tree block 50 At this time, the processed image of the coding tree block 503 is The processed image of the coding tree block 503 is stored in the memory space 603 that was previously stored. The processed coding tree block 500 stored in the memory space 600 is The image is not a reference region of the coding tree block 504 and is therefore unnecessary information. The processed images of the coding tree block 504 to be processed are stored in the memory space 600 in sequence. After the processing of the coding tree block 504 is completed, the coding tree block 50 Start processing 5.
[0179] FIG. 58 shows the intra block copy reference block for each of the four divisions of the coding tree block. This is a diagram to explain the memory space of the reference area when determining the valid reference area as a block. In FIG. 58(a), 510 and 511 are coding tree blocks. Block 510 is a processed coding tree block, and coding tree block 511 is The coding tree block 510 is a coding tree block to be processed. 0, 501, 502, and 503, and the coding tree block 511 is a block Block 504 is the block to be processed. Blocks 501, 502, and 503 are processed blocks, and block 50 is the block to be processed. This corresponds to the reference area of 4. Blocks 505, 506, and 507 are unprocessed blocks. In FIG. 58(a), 600, 601, 602, and 603 are memory spaces. 1 stores the processed image of block 501. Similarly, memory space 602 stores the processed image of block 501. The processed image of block 502 is stored in memory space 603, and the processed image of block 503 is stored in memory space 604. The memory space 600 stores the processed image data according to the processing of the block 504 to be processed. When the process of block 504 is completed, the process of block 505 is started. Start.
[0180] Using FIG. 58(b), the process when the process of block 504 is completed will be described. Then, block 505 becomes the coding tree block to be processed. Block 504 becomes the reference area, and block 501 is no longer the reference area. The memory space 600, which has been storing the processed images of block 4 in sequence, contains the processed images of block 504. The processed image of block 501 stored in memory space 601 is The image is not the reference area of block 505, but is unnecessary information. The processed images of the block 505 to be processed are stored sequentially. Once complete, processing of coding tree block 506 begins next.
[0181] Using FIG. 58(c), the process when the process of block 504 is completed will be described. Then, block 506 becomes the block to be processed. Furthermore, block 505 is the reference area. As a result, the coding tree block 502 is no longer a reference region. The processed images of the coding tree block 506 to be processed are sequentially stored in the image space 602. .
[0182] Using FIG. 58(d), the process when the process of block 505 is completed will be described. Then, block 507 becomes the block to be processed. Furthermore, block 506 is the reference area. As a result, the coding tree block 503 is no longer a reference region. The processed images of the coding tree block 507 to be processed are sequentially stored in the image space 603. .
[0183] <Predictive Intra Block Copy: Encoding Side Explanation> The predictive intra block copy processing procedure on the encoding side will be described with reference to FIG.
[0184] First, the block vector detection unit 375 detects the block vector mvL (see the block diagram of FIG. 45). Step S4500).
[0185] Next, the IBC spatial block vector candidate derivation unit 371, the IBC history prediction block vector A vector candidate derivation unit 372, an IBC prediction block vector candidate supplementation unit 373, and an IBC prediction block vector candidate derivation unit 374. A block vector candidate selection unit 376 and a block vector subtraction unit 378 select a predicted block vector. Calculate the difference block vector of the block vector used in the linear mode (step 45 in Fig. (S4501~S4503).
[0186] Calculate the predicted block vector candidates and construct the block vector candidate list mvpList. (Step S4501 in FIG. 45). A spatial block vector candidate derivation unit 371, an IBC history block vector candidate derivation unit 372 Then, the IBC prediction block vector candidate supplementation unit 373 selects a plurality of prediction block vector candidates. The prediction block vector candidate list mvpList is constructed by deriving the vectors. The detailed process of step 01 will be described later with reference to the flowchart of FIG.
[0187] 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. 45). 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 the difference block vectors is calculated. Then, 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 for which is the smallest 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 prediction block vector that has the smallest amount of generated code among the prediction blocks, The prediction where index i in the block vector candidate list mvpListL is a small number. Select the candidate block vector mvpListL[i] as the optimal predicted block vector mvpL, and Get the index i of
[0188] Next, the 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. 45).
[0189] <Intra block copy (prediction): Decoding side explanation> Next, a procedure of the prediction block vector mode process on the decoding side will be described with reference to FIG. On the other hand, the IBC spatial prediction block vector candidate derivation unit 471 and the IBC history block vector candidate derivation unit 472 are A vector candidate deriving unit 472 and an IBC predicted block vector supplementing unit 473 Calculate the block vector used in the torque mode (steps S4600 to S4601 in FIG. 46). 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.
[0190] Calculate the predicted block vector candidates and construct the predicted block vector candidate list mvpListL. (Step S4601 in FIG. 46). BC space block vector candidate derivation unit 471, IBC history block vector candidate derivation unit 4 72, the IBC block vector supplement unit 473 calculates multiple prediction block vector candidates. Then, the prediction block vector candidate list mvpListL is constructed. A detailed description of the process will be omitted.
[0191] Next, the IBC prediction block vector candidate selection unit 476 selects the prediction block vector candidate list. A prediction block vector mvpListL is decoded and supplied by the bit stream decoding unit 201. Select the candidate mvpListL[mvpIdxL] of the predicted block vector corresponding to the index mvpIdxL of The vector mvpL is extracted as the predicted block vector mvpL (Step S4601 in FIG. 46).
[0192] Next, the block vector adder 478 decodes the bit string in the bit string decoder 201 and supplies it to the block vector adder 478. Add the difference block vector mvdL and the predicted block vector mvpL to each other, mvL = mvpL + mvdL (Step S4602 in FIG. 46).
[0193] <Prediction block vector mode: Block vector prediction method> FIG. 48 shows an intra block copy prediction unit of a video encoding device according to an 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 a procedure of a predictive intra block copy mode derivation process. .
[0194] 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 vector that indicates the location within the 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 to store the number of predicted block vector indexes as elements. The character starts 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 prediction 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, which indicates the number of candidates, is set to 0. The IBC spatial block vector candidate derivation units 371 and 471 are Then, candidates for the prediction block vector are derived from the vectors (step S4801 in FIG. 48). In this case, the predicted block vector candidate of the adjacent block on the left (A0 or A1) can be used. A flag, availableFlagLA, indicating whether the block vector mvLA can be used, and a block vector mvLA are derived. Then, add the IBC spatial block vector to the candidate list mvpListL. The torque candidate derivation units 371 and 471 select the adjacent block (B0, B1 or B2) on the upper side. A candidate prediction block vector from the vectors is derived (step S4802 in FIG. 48). In this method, a flag indicating whether a motion vector predictor candidate of an upper adjacent block is available is used. Derive the availableFlagLB and block vector mvLB, and if mvLA and mvLB are not equal, , mvLB is added to the predicted block vector candidate list mvpListL. The processing of S4801 and S4802 is the same except for the position and number of adjacent blocks to be referenced. A flag indicating whether a prediction block vector candidate of a coding block is available or not. eFlagLN and a motion vector mvLN (N is A or B, and so on below) are derived.
[0195] Next, the IBC history block vector candidate derivation units 372 and 472 derive the history block vectors. The prediction block is made by using the historical block vector candidates registered in the candidate list HmvpIbcCandList. The vector candidate list mvpListL is added to this block vector candidate list mvpListL (step S4803 in FIG. 48). For details of the registration process in step S4803, see the flowchart in Figure 29. In the explanation of the operation, the motion vector is a block vector, and the list of reference indexes 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.
[0196] Next, the IBC prediction block vector supplement units 373 and 473 are Add a block vector of a given value, such as (0,0), until the complement list mvpListL is filled ( S4804 in Figure 48).
[0197] <Merge intra block copy mode derivation part> The intra block copy prediction unit 352 in FIG. 371, an IBC history block vector candidate derivation unit 372, an IBC block vector complement A filling unit 373, a reference position correction unit 380, a reference area boundary correction unit 381, and an IBC merge candidate selection unit The prediction mode determining unit 377 includes an IBC prediction mode determining unit 374 and an IBC prediction mode determining unit 377.
[0198] The intra block copy prediction unit 362 in FIG. 471, an IBC history block vector candidate derivation unit 472, an IBC block vector complement A filling unit 473, an IBC merge candidate selection unit 474, a reference position correction unit 480, and a reference area boundary correction unit The block copy unit 477 includes a block copy unit 481 .
[0199] FIG. 47 shows an intra block copy prediction unit of a video encoding device according to an 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 for explaining a procedure of a merge intra block copy mode derivation process. do.
[0200] 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 the merge intra block copy candidate list mergeIbc Merge intra block copy candidates are stored in the CandList storage area. The merge intra block copy candidate list mergeIbcCandList lists the merge intra block copy candidates. The merge candidates for index i are represented as mergeIbcCandList[i]. In this case, the merge candidate list mergeCandList must contain at least three merge intra-block codes. In addition, 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.
[0201] The IBC space block vector candidate derivation unit 371 and the 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 left and right. The candidate for the merge block copy is registered in the 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 the spatial block vector merge candidate N Derive a flag, availableFlagN, indicating whether the vector can be used as a block vector, mvL. However, in this embodiment, the block including the coding block to be processed Since the block vector merging 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. Not put out.
[0202] Next, the IBC history block vector candidate derivation unit 372 and the IBC history block vector candidate derivation unit 373 The vector candidate derivation unit 472 registers the vector candidate 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 blocks of historical prediction block vector candidates If the vectors have the same value, they shall not be added to mergeIbcCandList.
[0203] Next, the IBC prediction block vector supplementation unit 373 and the IBC prediction block vector supplementation unit The filler 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 ergeIbcCand, the merge intra block copy candidate list mergeIbcCandList The number of merge candidates registered in t is numCurrMergeIbcCand, which is the maximum number of merge candidates. Derive additional intra block merge candidates with bcCand as the upper limit and merge intra block candidates. The mergeIbcCandList is registered in the copy candidate list mergeIbcCandList (step S4703 in FIG. 47). A block vector with a value of (0,0) with the number of merge candidates, MaxNumMergeIbcCand, as its upper limit. Add it to the merge intra block copy candidate list, mergeIbcCandList.
[0204] Next, the IBC merge candidate selection unit 374 and the IBC merge candidate selection unit 474 select the merge candidates. Intrablocks registered in the intrablock copy candidate list mergeIbcCandList Then, one of the IBC merge candidates is selected (step S4704 in FIG. 47). 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. A merge candidate is selected by calculating the amount of the intra block merge candidate. The IBC prediction mode determination unit 377 receives a merge index indicating the IBC prediction mode. The mode determination unit 377 calculates the amount of code and the amount of distortion to determine whether or not the mode is a merge mode. The result is supplied to the prediction method determination unit 105. In unit 474, intra block merging candidates are selected based on the decoded merging index. and supplies the selected intra block merging candidate to the reference position correction unit 480.
[0205] Next, the reference position correction unit 380 and the reference position correction unit 480 perform intra-block marking. The process of correcting the reference position of the page candidate is performed (step S4705 in FIG. 47). The processing by the correction section 380 and the reference position correction section 480 will be described in detail later.
[0206] Next, the reference area boundary correction unit 381 and the reference area boundary correction unit 481 perform intra-block The process of correcting the reference area boundary for the check merge candidate is performed (step S4706 in FIG. 47). The processing performed by the reference position correction unit 381 and the reference position correction unit 481 will be described in detail later.
[0207] 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.
[0208] 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 Using the above formula, the x and y components of mvC are processed respectively.
[0209] <Reference position correction section> FIG. 49 is a diagram for explaining the processing of the reference position correction unit 380 and the reference position correction unit 480. Now, the unit of intra block copy reference block is coding tree block (CTU). and its size is not 128x128 pixels.
[0210] First, the positions of the top left and bottom right of the reference block are calculated (S6001). indicates a block that the processing target coding block refers to using a block vector. If the top left corner of the reference block is (xRefTL, yRefTL) and the bottom right corner 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.
[0211] 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.
[0212] Next, determine 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), the upper left corner of the accessible area is aligned. The reference position in the x direction is corrected (S6005).
[0213] 50 is a diagram showing how to correct the reference position. 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. Let's say that the reference block r2 is located at 6011. Then, the reference position in the x direction is It is smaller than the upper left corner of the area (S6004: YES). Therefore, xRefTL = xAvlTL, so 6012 The reference position is corrected to the position of (S6005). Here, as in S6001, xRefBR=x Since it is RefTL+cbWidth-1, xRefBR will be corrected along with the correction of xRefTL. 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.
[0214] In this way, if the reference block is located outside the accessible region, By correcting the above, it becomes possible to refer to the data.
[0215] Now, the block vector candidate list constructed in the intra block copy prediction unit 352 is Suppose some of the 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, all blocks in the block vector candidate list are The block vector is inside the accessible region. Therefore, the access by all block vectors is All block vectors can be candidates for the IBC merge mode. Therefore, in the IBC merge mode selection unit 374, The optimal prediction mode can be selected from the candidates of each IBC merge mode. This improves the efficiency of the process.
[0216] Now, the block vector candidate list constructed in the intra block copy prediction unit 362 is Suppose some of the 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 the case of a coding device that does not have such a block vector, the IBC merge mode is indicated by the block vector. The page index operates as if it were not coded. However, due to malfunctions, Such merge indexes may be encoded to generate a bitstream. Or, due to packet loss, some part of the bit stream is missing, and the decoding is not possible. Such a merge index may result. When attempting to decode the stream, an invalid position is reached because the reference is outside the accessible region. 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 is The reference position is corrected to the inside of the region, 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 decode device. This allows the decoding process to be continued, thereby improving the robustness of the decoding device.
[0217] 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 vector that is divided by the luminance block vector. 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 difference. 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.
[0218] In addition, when correcting a block vector in the correction of the reference position, the corrected block The vector is stored in the coding information storage memory as a block vector of the coding 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 stored in the decoded image memory. In this filtering process, the block boundaries are 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 Compared to when the position is different, the strength of the filter is more appropriate, improving coding efficiency. It can be done.
[0219] 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 to the top left of the accessible area. Then, the reference position in the y direction is corrected (S6007).
[0220] 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 is set to 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 makes it so that yRefTL=yAvlTL, and the reference position can be corrected.
[0221] 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 to the bottom right of the accessible area. Then, the reference position in the x direction is corrected (S6009).
[0222] 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, so 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 vector is You can also correct the vector mvL[0]. That is, mvL[0] = (xAvlBR - (xCb + cbWidth - 1)) << 4 This makes xRefBR=xAvlBR, so the reference position can be corrected.
[0223] 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 answer is true (S6010: YES), the reference in the y direction is aligned to the bottom right of the accessible area. The position is corrected (S6011).
[0224] 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, so 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 yRefBR is corrected. In this correction of the reference position, the block The vector mvL[1] may be corrected. That is, mvL[1] = (yAvlBR - (yCb + cbHeitght - 1)) << 4 This makes it so that yRefBR=yAvlBR, and the reference position can be corrected.
[0225] Here, we will explain the case where the reference block r1 is located at 6051. In this case, In the same way as when the reference block is r2, the reference position in the x direction is corrected. As in the case of r4, the reference position in the y direction is corrected. As a result, the reference block r1 is It is located at 6052 inside the illuminatable area.
[0226] 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, the x and y directions are calculated as above. The reference position is corrected. As a result, each reference block is located within the accessible area. do.
[0227] 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 bottom right position is calculated (S6012).
[0228] FIG. 51 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. 51(a), the coding tree block 6101 to be processed is divided into four. , the coding block 6102 to be processed is located at the upper left of the division. The available area is an inverted L-shape, as shown by the shaded area in 6103. If the available area is rectangular, In this case, the range is the rectangular range of 6103. If the top left corner of the block is (xRefTL, yRefTL) and the bottom right corner is (xRefBR, yRefBR), then 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. 51(b) to 51(d) are diagrams showing the case where k_idx=0. Similarly, FIG. 51(b) to FIG. 51(d) are diagrams showing the case where blk FIG. 13 is a diagram showing the cases where _idx=1 to 3.
[0229] Next, the reference position of the non-rectangular referable area is corrected (S6013). 1 is a diagram illustrating a process for correcting the reference position of a portion where the referenceable area is not rectangular. The upper left position of the accessible area is calculated (S6021). The accessible area is the shaded area in Figure 51. So, except for the case of blk_idx=3, there are two positions of the top left corner, 6111 and 6112. If (X1, Y1) and (X2, Y2) are offset[4] = {64, 128, 64, 0}, NL = offset[blk_idx] (X1, Y1) = (xAvlTL, yAvlTL + 64) (X2, Y2) = (xAvlTL + NL, yAvlTL) It becomes.
[0230] 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, blk_idx=3 is not satisfied 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).
[0231] Next, the difference in the x direction between the reference block and the accessible area is It is determined whether the difference is smaller than the difference in the y direction (S6023). 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).
[0232] FIG. 53(a) 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, then b lk_idx=3 and the upper left corner of the reference block is X2 (x direction of 6112) and Y1 (y direction of 6111). In addition, the reference block and the reference 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 ( S6023:YES). Therefore, the reference in the x direction is set to the position 6202 as xRefTL=xAvlTL+NL. The position is corrected (S6024). Here, as in S6001, xRefBR=xRefTL+cbWidt h-1, so when xRefTL is corrected, xRefBR is also corrected. In correcting the reference position, the block vector mvL[0] may be corrected. mvL[0] = (xAvlTL + NL - xCb) << 4 This makes it so that xRefTL=xAvlTL+NL, and the reference position can be corrected.
[0233] On the other hand, if the reference block r2 is located at 6203, blk_idx=3 is not true and the reference 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 referenceable area is not smaller than the difference between the reference block and the accessible area in the y direction (S6023:NO Therefore, the reference position in the y direction is corrected to the position of 6204 by setting yRefTL=yAvlTL+64 (S 6025). Here, as in S6001, yRefBR = yRefTL + cbHeight - 1, so yR The yRefBR is also corrected according to the correction of the efTL. Then, the block vector mvL[0] may be corrected. mvL[1] = (yAvlTL + 64 - yCb) << 4 This makes it so that yRefTL=yAvlTL+64, and the reference position can be corrected.
[0234] Here, let us assume that the reference block r3 is located at 6205. In this case, the reference block and The difference in the x direction of the accessible area is smaller than the difference in the y direction of the reference block and the accessible area. Therefore, the reference position in the x direction is corrected in the same way as for the reference block r1. At this point, the reference block is located at 6206 (S6024). However, by the processing in S6006 and S6007 described later, Correct the reference position. In the end, the reference block is inside the referenceable area.
[0235] Next, the bottom right position of the accessible area is calculated (S6026). The accessible area is shown in FIG. Since this is the shaded area, except for the case where blk_idx=0, there are two positions at the bottom right: 6113 and 6114. If they are (X3, Y3) and (X4, Y4), then offset[4] = {0, 64, 128, 64}, NR = offset[blk_idx] (X3, Y3) = (xAvlBR, yAvlBR - 64) (X4, Y4) = (xAvlBR - NR, yAvlBR) It becomes.
[0236] Next, it is determined whether or not to correct the reference position to match the bottom right corner of the referenceable area (S602 7). In this judgment, blk_idx is not 0 and the reference block is located in an area larger than X4 and Y3. If it is set, it is judged as true (S6027: YES). If it is false (S6027: NO), Then, the process ends.
[0237] Next, the difference in the x direction between the reference block and the accessible area is It is determined whether the difference is smaller than the difference in the y direction (S6028). 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).
[0238] FIG. 53(b) 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, then b lk_idx=0 is not the same as the reference block, and the lower right corner of the reference block is X4 (x direction of 6114) and Y3 (y direction of 6113). The reference block and the reference are located in a larger area (S6027: YES). 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 ( S6028:YES). Therefore, the reference position in the x direction is set to 6212 with xRefBR=xAvlBR. Correct (S6029). Here, as in S6001, xRefBR = xRefTL + cbWidth - 1 In other words, xRefTL = xRefBR - (cbWidth - 1), so xRefTL is corrected by correcting xRefBR. In this correction of the reference position, the block vector mvL[0] is corrected. That is, mvL[0] = (xAvlBR - NR - (xCb + cbWitdh - 1)) << 4 This makes xRefBR=xAvlBR, so the reference position can be corrected.
[0239] On the other hand, if the reference block r2 is located at 6213, blk_idx is not 0 and the reference 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 between the reference block and the accessible area in the y direction (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 be corrected along with the correction of yRefBR. 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 it so that yRefBR=yAvlBR, and the reference position can be corrected.
[0240] Now, let us assume that the reference block r3 is located at 6215. In this case, the reference block and The difference in the x direction of the accessible area is smaller than the difference in the y direction of the reference block and the accessible area. (S6028: NO). 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. In the end, the reference block is inside the referenceable area.
[0241] In FIG. 53, the process of correcting the reference position is described using the cases of blk_idx=0 and 3 as examples. In the cases of 1 and 2, the reference position is corrected in the same manner as in the cases of blk_idx=0 and 3.
[0242] After the process of correcting the reference position of the non-rectangular referenceable area (S6013), The process from 04 to S6011 is performed. This completes the process when the CTU size is 128x128 pixels. will end.
[0243] 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 corner 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 you have processed S6024, you may choose not to process S6004 and S6005. Similarly, if you process S6025, do not process S6006 and S6007. If S6029 is processed, S6008 and S6009 are not processed. If you have performed S6030, you can also perform S6010 and S6011. It is okay to not do this.
[0244] In the flowchart of FIG. 52, the comparison process of step S6023 is omitted, and Alternatively, step S6025 may always be 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 participation can be made by simple processing. This makes it possible to correct the illumination position.
[0245] In FIG. 49, 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 FIG. 54, the referenceable area is divided into two and the reference position of each is corrected (S6 101) can also be used.
[0246] FIG. 55 is a diagram for explaining how the accessible area is divided into two. Unlike the previous example, which uses a rectangular accessible area, in Figure 55 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 in the upper left corner, 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. 55(a) shows the case where blk_idx=0. Similarly, from FIG. 55(b), FIG. 55(d) shows the cases where blk_idx=1 to 3. The area (6301) is referred to as referenceable area A, and the other referenceable area (6302) is referred to as referenceable area B. This is area B.
[0247] FIG. 56 shows the process of dividing the referenceable area into two and correcting the reference position of each (S61 56 is a diagram for explaining step 01). In FIG. 56, the same processes as in FIG. 49 are assigned the same step numbers. First, the top left and bottom right positions of the accessible area A are calculated (S6 111). The top left corner of the accessible area A is (xAvlTL, yAvlTL) and the bottom right corner is (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] ) become.
[0248] Next, whether the reference block is outside the referenceable area A or not out_xRefTL = xRefTL < xAvlTL out_yRefTL = yRefTL < yAvlTL out_xRefBR = xRefBR > xAvlBR out_yRefBR = yRefBR > yAvlBR (S6112).
[0249] Next, the upper left and lower right positions of the referenceable area B are calculated (S6113). If the top left corner of area B is (xAvlTL, yAvlTL) and the bottom right corner 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] ) It becomes.
[0250] 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 upper 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 process of S6005 has already been explained, so we will not explain it here. Omitted.
[0251] 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 answer 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 process of S6007 has already been explained, so we will not explain it here. is omitted.
[0252] 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 answer 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.
[0253] 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 corner of the referable area B. The process of S6011 has already been explained, so the explanation will be omitted.
[0254] From the above, 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, the processing is simplified and the amount of calculation is reduced. Here, one of the accessible areas (6301) is designated 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. and the other referenceable area (6302) may be processed as referenceable area A.
[0255] In this embodiment, it is determined whether the size of the CTU is 128x128 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 be determined whether the size is larger than the large size.
[0256] <Reference area boundary correction section> FIG. 59 explains the processing of the reference area boundary correction unit 381 and the reference area boundary correction unit 481. 1 is a flowchart for
[0257] First, change the top left position of the reference block to ( xRefTL, yRefTL ) = ( xCb + ( mvL
[0000] >> 4 ), yCb + ( mvL
[0001] >> 4 ) ) ( xRefBR, yRefBR ) = ( xRefTL + cbWidth - 1, yRefTL + cbHeight - 1 ) (step S1401). This procedure is the same as step S6001 in FIG. The procedure is the same, so the explanation will be omitted.
[0258] Next, calculate the top left and bottom right positions of each of the accessible areas A, B, and C (step S Here, the accessible area A is the intra-block area to be processed. It is the intra block copy reference block processed immediately before the intra block copy reference block. Referenceable area B is the intrablock copy reference block processed immediately before referenceable area A. The referenceable area C is the intrablock copy reference block processed immediately before the referenceable area B. FIG. 57 shows the coding tree block unit as an intra block copy base. In the example of FIG. 57(a), the coding tree block 503 is a quasi-block. is the coding tree block to be processed. At this time, the coding tree block 502 is A corresponds to the referenceable area A, a coding tree block 501 corresponds to the referenceable area B, and The tree block 500 corresponds to the accessible region C. FIG. This is an example in which a unit divided into four is used as the intra block copy reference block. In the example of a), the coding tree block 504 is the intra block copy reference block to be processed. At this time, the coding tree block 503 corresponds to the accessible area A, and the coding The coding tree block 502 corresponds to the referenceable area B, and the coding tree block 501 corresponds to the referenceable area B. This corresponds to the feasible region C.
[0259] The upper left position of the accessible areas A, B, and C are (xAvlATL, yAvlATL), (xAvlBTL, yAvl The bottom right positions of the accessible areas A, B, and C are respectively (xAvlCTL, yAvlCTL). , (xAvlABR, yAvlABR), (xAvlBBR, yAvlBBR), (xAvlCBR, yAvlCBR). Coding tree When the block unit is the intra block copy reference block, (xAvlATL, yAvlATL) , (xAvlBTL, yAvlBTL), (xAvlCTL, yAvlCTL), (xAvlABR, yAvlABR), (xAvlBBR, yAvlBBR) , (xAvlCBR, yAvlCBR), respectively. (xAvlATL, yAvlATL) = ( (xCb >> CtbLog2SizeY) << (CtbLog2SizeY) - (1 << CtbLo g2SizeY), (yCb >> CtbLog2SizeY) << (CtbLog2SizeY)) (xAvlABR, yAvlABR) = (xAvlATL + cbWidth - 1, yAvlATL + cbHeight - 1 ) (xAvlATL, yAvlATL) = ( (xCb >> CtbLog2SizeY) << (CtbLog2SizeY) - 2*(1 << Ctb Log2SizeY)), (yCb >> CtbLog2SizeY) << (CtbLog2SizeY)) (xAvlBBR, yAvlBBR) = (xAvlBTL + cbWidth -1, yAvlBTL + cbHeight - 1 ) (xAvlATL, yAvlATL) = ( (xCb >> CtbLog2SizeY) << (CtbLog2SizeY) - 3*(1 << Ctb Log2SizeY), (yCb >> CtbLog2SizeY) << (CtbLog2SizeY)) (xAvlCBR, yAvlCBR) = (xAvlCTL + cbWidth -1, yAvlCTL + cbHeight - 1 ) The coding tree block is divided into four units, which are called intra block copy reference blocks. Then, (xAvlATL, yAvlATL), (xAvlBTL, yAvlBTL), (xAvlCTL, yAvlCTL) are R, (xAvlATL, yAvlATL) = ( (xCb >> (CtbLog2SizeY-1)) << (CtbLog2SizeY-1) - (1 << (CtbLog2SizeY-1)), (yCb >> (CtbLog2SizeY-1)) << ((CtbLog2SizeY-1))+ (1<<(CtbLog2SizeY-1))) (xAvlABR, yAvlABR) = (xAvlATL + cbWidth - 1, yAvlATL + cbHeight - 1 ) (xAvlBTL, yAvlBTL) = ( (xCb >> (CtbLog2SizeY-1)) << (CtbLog2SizeY-1) - (1 << (CtbLog2SizeY)), (yCb >> (CtbLog2SizeY-1)) << ((CtbLog2SizeY-1))+ (1<<(CtbLog2SizeY-1))) (xAvlBBR, yAvlBBR) = (xAvlBTL + cbWidth -1, yAvlBTL + cbHeight - 1 ) (xAvlCTL, yAvlCTL) = ( (xCb >> (CtbLog2SizeY-1)) << (CtbLog2SizeY-1) - (1 << (CtbLog2SizeY-1)), (yCb >> (CtbLog2SizeY-1)) << ((CtbLog2SizeY-1))+ (1<<(CtbLog2SizeY-1))) (xAvlCBR, yAvlCBR) = (xAvlCTL + cbWidth -1, yAvlCTL + cbHeight - 1 ) Let us assume that.
[0260] Next, the referenceable area including the upper left position of the reference block is determined (step S1405 ) Specifically, the top left and bottom right positions of the accessible areas A, B, and C, and the top left position of the reference block The referenceable area that contains the top left position of the reference block is compared with the reference block that contains the reference block. This is considered to be a possible area.
[0261] Next, the referenceable area including the top left position of the reference block includes the bottom right position of the reference block. It is determined whether the referenceable area includes the upper left position of the reference block (step S1406). However, if the lower right position of the reference block is included, the flow chart of FIG. 59 is terminated.
[0262] If the accessible area including the top left position of the reference block does not include the bottom right position of the reference block, If so, the reference block is corrected (step S1407). This will be explained with reference to FIG. 60. FIG. 60 shows the coding tree block unit as an intra-block code. FIG. 60(a) shows an example of a case where the coding block 5 to be processed is used as the reference block. 05, block vector 507 is set. Accessible area B (503) includes the top left position of the reference block, but does not include the bottom right position of the reference block. 60(b), the reference block 508 is divided into a reference block 509 in the memory space. The divided reference block 509 is a reference block The area is included in the accessible area B (503), which is the accessible area that includes the top left corner of the block. The divided reference block 510 is included in a reference area different from the referenceable area B (503). In this embodiment, when constructing a reference image of the reference block 510, 2, an area corresponding to the divided reference block 509 and an area corresponding to the divided reference block 510 Specifically, for the area corresponding to the divided reference block 509, In the case of a segmented reference image, a reference image is created based on the position indicated by the block vector. The area corresponding to the reference block 510 is stored in the memory space 600 without referring to the memory space 600. A reference image is created by setting a certain value. Here, the certain value is the maximum pixel value. If MaxPixelValue is used, MaxPixelValue / 2 is used. For the corresponding area, instead of a predetermined value, the memory space including the divided reference block 509 is For example, a reference image may be constructed from the divided reference block 5 We can also construct a reference image by horizontally copying the rightmost pixel of 09. good.
[0263] FIG. 61 shows the intra block copy reference block for each of the four divisions of the coding tree block. FIG. 61(a) shows an example of a case where the following is performed for the coding block 509 to be processed: This is the case where a block vector 508 is set. The accessible area C (501) is the reference block The upper left position of the block is included, but the lower right position of the reference block is not included. In this case, As shown, the reference block 510 is divided into a divided reference block 511 and a divided reference block 512 in the memory space. The divided reference block 511 is arranged in the upper left corner of the reference block. The referenceable area C (501) is a referenceable area that includes the divided reference block. The lock 512 is a reference block included in a reference area different from the referenceable area C (501). In this embodiment, when constructing the reference image of the reference block 510, a divided reference The area corresponding to the block 511 and the area corresponding to the divided reference block 512 are different. Specifically, for the area corresponding to the divided reference block 511, A reference image is created based on the position indicated by the vector. For the area corresponding to 11, a predetermined value is set without referring to the memory space 602. The reference image is created by performing the above operation. e, MaxPixelValue / 2. However, in the area corresponding to the divided reference block 512, Instead of a predetermined value, a reference value from the memory space 601 including the divided reference block 511 is used. For example, the bottommost divided reference block 511 may be configured to construct a reference image. A reference image may be constructed by vertically copying the pixel located at
[0264] By adopting this configuration, when determining the reference block for intra block copying, When a light image is divided and arranged in memory space, multiple Therefore, it is possible to avoid accessing the reference block of the intra block copy. The amount of processing required to configure a lock can be reduced.
[0265] In all the embodiments described above, the encoded bitstream output by the image encoding device is The stream is specified so that it can be decoded according to the encoding method used in the embodiment. The encoded bit stream is stored on HDD, SSD, flash memory, and other storage devices. Provided by recording it on a computer-readable recording medium such as a flash memory or optical disk. Alternatively, the information may be provided from a server via a wired or wireless network. Therefore, the image decoding device corresponding to this image coding device can reproduce this specific data regardless of the providing means. The present invention is capable of decoding encoded bitstreams in the data format.
[0266] In order to exchange encoded bitstreams between an image encoding device and an image decoding device, When a wired or wireless network is used, the data format appropriate for the transmission mode of the communication path In this case, the image coding device may convert the output bit stream into The encoded bit stream is converted into encoded data in a data format suitable for the transmission mode of the communication channel. a transmitting device that converts the encoded data into a digital signal and transmits it to a network; A receiving device is provided for restoring the encoded bit stream to an image decoding device. The receiving device includes a memory for buffering the coded bit stream output by the image coding device, A packet processing unit that packetizes the encoded bit stream and transmits the packets via a network. and a transmitting unit for transmitting the coded data. a receiving unit for receiving packetized coded data and a buffer for buffering the received coded data; The memory for storing the encoded data is a memory for processing packets to generate an encoded bit stream and for displaying the image. and a packet processing unit for providing the packet to an image decoding device.
[0267] In order to exchange encoded bitstreams between an image encoding device and an image decoding device, When a wired or wireless network is used, in addition to a transmitting device and a receiving device, Even if a relay device is provided to receive the encoded data transmitted by the transmitting device and supply it to the receiving device, The relay device includes a receiving section for receiving packetized encoded data transmitted from the transmitting device. a memory for buffering the received coded data; and a transmitting unit for transmitting the packetized coded data to the network. a reception packet processing unit that processes the received data into packets to generate an encoded bit stream; A recording medium for storing the encoded bit stream and a transmission device for packetizing the encoded bit stream. The communication packet processing unit may include a communication packet processing unit.
[0268] 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 display 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.
[0269] In addition, an imaging unit is added to the configuration, and the captured image is input to the image encoding device. In this case, the imaging unit inputs an image signal captured by the imaging unit to the block division unit 101. To exert effort.
[0270] The above coding and decoding processes are carried out by hardware-based transmission, storage, and reception devices. It is of course possible to realize it 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 may be provided from a server via the Internet, or it may be provided as terrestrial or satellite digital broadcasting data. It may also be provided as a broadcast.
[0271] The present invention has been described above based on the embodiments. The embodiments are merely examples, and each of the structures The combination of components and processes can be modified in many different ways, and these modifications It will be appreciated by those skilled in the art that the embodiments are within the scope of the present invention. [Explanation of symbols]
[0272] 100 image encoding device, 101 block division unit, 102 inter prediction unit, 103 intra prediction unit, 104 decoded image memory, 105 prediction method determination unit, 10 6 residual signal generation unit, 107 orthogonal transformation and quantization unit, 108 bit string encoding unit, 109 inverse quantization and inverse orthogonal transformation unit, 110 decoded image signal superposition unit, 111 coding information information storage memory, 200 image decoding device, 201 bit string decoding unit, 202 block A block division unit, 203 an inter prediction unit, 204 an intra prediction unit, and 205 coding information Storage memory, 206 inverse quantization and inverse orthogonal transformation unit, 207 decoded image signal superposition unit, 2 08 Decoded image memory.< / poc>
Claims
1. A method for dividing a coding tree block into one or more intra block copy reference blocks. In an image coding apparatus, The coding information stored in the coding information storage memory is used to select the coding target in the coding target picture. a block vector candidate derivation unit that derives block vector candidates for a block; a selection unit for selecting a selected block vector from the block vector candidates; A predetermined number of the intra block copies immediately before the intra block copy reference block to be coded A storage unit for storing an encoded image of the copy reference block; The encoded image of the intra block copy reference block including the encoding target block Remove all images from the visible area, The upper left and lower right positions of the reference block indicated by the selected block vector are both referenceable. A reference area boundary correction unit that determines whether the reference area is included in the available area; Equipped with The reference area boundary correction unit is configured to correct the intra block copy reference block A predetermined number of intra block copies processed before the intra block copy reference block are All the coded images of the copy reference block are excluded from the accessible area. The upper left and lower right positions of the reference block indicated by the selected block vector are both referenceable. If the reference block is included in the available area, the reference block is used as a predicted image of the picture to be coded. 、 1. An image encoding device comprising:
2. A method for dividing a coding tree block into one or more intra block copy reference blocks.
1. An image coding method comprising: The coding information stored in the coding information storage memory is used to select the coding target in the coding target picture. a block vector candidate derivation step of deriving a block vector candidate of a block; a selection step of selecting a selected block vector from the block vector candidates; A predetermined number of the intra block copies immediately before the intra block copy reference block to be coded a storing step of storing the encoded image of the copied reference block; The encoded image of the intra block copy reference block including the encoding target block Remove all images from the visible area, The upper left and lower right positions of the reference block indicated by the selected block vector are both referenceable. A reference area boundary correction step for determining whether the reference area is included in the functional area; having The reference area boundary correction step is a step of correcting a boundary of an intra block copy reference block to be coded. The intra block copy reference block is a reference block for copying intra blocks that have been processed before the predetermined number of intra block copy reference blocks. Excluding all encoded images of the block copy reference block from the referenceable area; The upper left and lower right positions of the reference block indicated by the selected block vector are both referenceable. If the reference block is included in the available area, the reference block is used as a predicted image of the picture to be coded. 、 13. An image coding method comprising:
3. A method for dividing a coding tree block into one or more intra block copy reference blocks. In the image encoding program, The coding information stored in the coding information storage memory is used to select the coding target in the coding target picture. a block vector candidate derivation step of deriving a block vector candidate of a block; a selection step of selecting a selected block vector from the block vector candidates; A predetermined number of the intra block copies immediately before the intra block copy reference block to be coded a storing step of storing the encoded image of the copied reference block; The encoded image of the intra block copy reference block including the encoding target block Remove all images from the visible area, The upper left and lower right positions of the reference block indicated by the selected block vector are both referenceable. A reference area boundary correction step for determining whether the reference area is included in the functional area; having The reference area boundary correction step is a step of correcting a boundary of an intra block copy reference block to be coded. The intra block copy reference block is a reference block for copying intra blocks that have been processed before the predetermined number of intra block copy reference blocks. Excluding all encoded images of the block copy reference block from the referenceable area; The upper left and lower right positions of the reference block indicated by the selected block vector are both referenceable. If the reference block is included in the available area, the reference block is used as a predicted image of the picture to be coded. 、 2. An image encoding program comprising:
4. A method for dividing a coding tree block into one or more intra block copy reference blocks. In the image decoding device, A block to be decoded in a picture to be decoded is extracted from the coding information stored in the coding information storage memory. a block vector candidate derivation unit for deriving a block vector candidate of the block; a selection unit for selecting a selected block vector from the block vector candidates; A predetermined number of intra blocks immediately before the intra block copy reference block to be decoded a storage unit for storing a decoded image of the copy reference block; A decoded image of the intra block copy reference block including the block to be decoded is All are excluded from the visible area, The upper left and lower right positions of the reference block indicated by the selected block vector are both within the referenceable area. a reference area boundary correction unit that determines whether the reference area boundary is included in the reference area; Equipped with The reference area boundary correction unit is configured to correct a predetermined number of blocks immediately before the intra block copy reference block to be decoded. The intra block copy processed before the intra block copy reference block - Exclude all decoded images of the reference block from the accessible area; The upper left and lower right positions of the reference block indicated by the selected block vector are both within the referenceable area. If the reference block is included in the region, the reference block is set as a predicted image of the current picture.
2. An image decoding device comprising:
5. A method for dividing a coding tree block into one or more intra block copy reference blocks. In the image decoding method, A block to be decoded in a picture to be decoded is extracted from the coding information stored in the coding information storage memory. A block vector candidate derivation step of deriving a block vector candidate of the block; a selection step of selecting a selected block vector from the block vector candidates; A predetermined number of intra blocks immediately before the intra block copy reference block to be decoded a storing step of storing the decoded image of the copy reference block; All decoded images of the intra block copy reference block including the block to be decoded are and exclude it from the visible area, The upper left and lower right positions of the reference block indicated by the selected block vector are both referenceable. A reference area boundary correction step for determining whether the reference area is included in the functional area; having The reference area boundary correction step is performed by directly correcting the intra block copy reference block to be decoded. The intra block copy reference block is a reference block that has been processed before the predetermined number of intra block copy reference blocks. All decrypted images of the lock copy reference block are excluded from the accessible area; The upper left and lower right positions of the reference block indicated by the selected block vector are both referenceable. If the reference block is included in the available area, the reference block is set as a predicted image of the current picture.
2. An image decoding method comprising:
6. A method for dividing a coding tree block into one or more intra block copy reference blocks. In the image decoding program, A block to be decoded in a picture to be decoded is extracted from the coding information stored in the coding information storage memory. A block vector candidate derivation step of deriving a block vector candidate of the block; a selection step of selecting a selected block vector from the block vector candidates; A predetermined number of intra blocks immediately before the intra block copy reference block to be decoded a storing step of storing the decoded image of the copy reference block; A decoded image of the intra block copy reference block including the block to be decoded is All are excluded from the visible area, The upper left and lower right positions of the reference block indicated by the selected block vector are both referenceable. A reference area boundary correction step for determining whether the reference area is included in the functional area; having The reference area boundary correction step is performed by directly correcting the intra block copy reference block to be decoded. The intra block copy reference block is a reference block that has been processed before the predetermined number of intra block copy reference blocks. All decrypted images of the lock copy reference block are excluded from the accessible area; The upper left and lower right positions of the reference block indicated by the selected block vector are both referenceable. If the reference block is included in the available area, the reference block is set as a predicted image of the current picture.
2. An image decoding program comprising:
7. The bit stream generated by the moving image encoding method according to claim 2 is stored on a recording medium. Storage method.
8. A transmission method for transmitting a bit stream generated by the moving image encoding method according to claim 2.
Citation Information
Patent Citations
Method and apparatus for encoding and / or decoding information about intra-prediction mode of video
JP2009246975A
Video encoding device, video encoding method, video encoding program, video decoding device, video decoding method, and video decoding program
WO2020256102A1
Moving-image encoding device, moving-image encoding method, moving-image encoding program, moving-image decoding device, moving-image decoding method and moving-image decoding program
WO2020256105A1