Method and apparatus for encoding / decoding video signals
Through the use of intra-block copy mode and motion information table, IBC merge candidate lists are generated and IBC motion information table is updated, which solves the problem of insufficient compression efficiency in high-definition video services and improves the prediction efficiency of video signal encoding/decoding.
Patent Information
- Application Number
- CN202080004349.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-02-26
- Filing Date
- 2020-02-26
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2040-02-26
AI Technical Summary
The existing video encoding technology has the problem of insufficient compression efficiency in high-definition video services, especially the performance of the HEVC standard has gradually shown limitations.
The intra-block copy mode and motion information table are used to derive the block vector, generate the IBC merge candidate list, select the merge candidates and update the IBC motion information table, and improve the prediction efficiency through the adjacent relationship with the adjacent blocks.
Improve the prediction efficiency of video signal encoding/decoding and enhance the performance of video compression.
Smart Images

Figure CN112514380B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to a video signal encoding / decoding method and apparatus thereof. Background Art
[0002] As display panels become larger, higher quality video services are required. The biggest problem with high-definition video services is the greatly increased amount of data. In order to solve the above problems, research on improving video compression rates is being actively carried out. As a representative example, the Joint Collaboration Team on Video Coding (JCT-VC) was established in 2009 by the Moving Picture Experts Group (MPEG) and the Video Coding Experts Group (VCEG) under the International Telecommunication Union-Telecommunication (ITU-T). JCT-VC proposed High Efficiency Video Coding (HEVC), a video compression standard with a compression performance about twice that of H.264 / AVC and approved as a standard on January 25, 2013. However, with the rapid development of high-definition video services, the performance of HEVC has gradually shown its limitations. Summary of the Invention
[0003] Technical issues
[0004] The present disclosure is directed to providing a prediction method using an intra block copy mode when encoding / decoding a video signal and a device for performing the method.
[0005] The present disclosure is directed to providing a method for deriving a block vector of a current block when encoding / decoding a video signal and a device for performing the method.
[0006] The present invention is directed to a method of deriving a block vector by using a motion information table when encoding / decoding a video signal and an apparatus for performing the method.
[0007] Technical objectives obtainable from the present disclosure are not limited to the above-mentioned technical objectives, and other unmentioned technical objectives may be clearly understood from the following description by those having ordinary skill in the technical field to which the present disclosure pertains.
[0008] Technical Solution
[0009] According to the present disclosure, a video signal decoding / encoding method includes: generating an intra block copy (IBC) merge candidate list for a current block; selecting any one of the IBC merge candidates included in the IBC merge candidate list; deriving a block vector of the current block based on the selected IBC merge candidate; and obtaining a predicted sample of the current block based on the block vector.
[0010] Here, the IBC merge candidate list includes IBC merge candidates derived based on an IBC motion information table, and the IBC motion information table includes IBC motion information candidates derived from a block to which the IBC mode is applied before the current block.
[0011] In the video signal decoding / encoding method according to the present disclosure, the method may further include: after decoding of the current block is completed, updating the IBC motion information table with the block vector of the current block.
[0012] Here, when the same IBC merge candidate as the block vector is included in the IBC motion information table, the IBC merge candidate is removed and the block vector is added to the IBC motion information table.
[0013] In the video signal decoding / encoding method according to the present disclosure, when the size of the current block is smaller than a threshold, the IBC motion information table is not updated based on the block vector of the current block.
[0014] In the video signal decoding / encoding method according to the present disclosure, the IBC merge candidate list may include IBC merge candidates derived from available neighboring blocks adjacent to the current block, and different numbers of available neighboring blocks may be determined according to the size of the current block.
[0015] In the video signal decoding / encoding method according to the present disclosure, the maximum number of IBC merge candidates that can be included in the IBC merge candidate list may be equal to or smaller than the maximum number of merge candidates that can be included in the general merge candidate list.
[0016] It is to be understood that the foregoing summarized features are exemplary aspects of the following detailed description of the present disclosure and do not limit the scope of the present disclosure.
[0017] Beneficial effects
[0018] According to the present disclosure, the intra block copy mode may be used to improve the efficiency of prediction.
[0019] According to the present disclosure, a method of deriving a block vector by using neighboring blocks adjacent to a current block is provided, thereby improving prediction efficiency.
[0020] According to the present disclosure, a method of deriving a block vector by using a motion information table is provided, thereby improving prediction efficiency.
[0021] Effects obtainable from the present disclosure may not be limited to the above-mentioned effects, and other unmentioned effects may be clearly understood from the following description by those having ordinary skill in the technical field to which the present disclosure pertains. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1is a diagram illustrating a block diagram of a video encoding device (encoder) according to an embodiment of the present disclosure.
[0023] Figure 2 is a diagram illustrating a block diagram of a video decoding device (decoder) according to an embodiment of the present disclosure.
[0024] Figure 3 is a diagram illustrating a basic coding tree unit according to an embodiment of the present disclosure.
[0025] Figure 4 is a diagram illustrating various partition types of a coding block.
[0026] Figure 5 is a diagram illustrating an example of aspects of partitioning a CTU.
[0027] Figure 6 is a flowchart of an inter-frame prediction method according to an embodiment of the present disclosure.
[0028] Figure 7 is a flowchart of the process of deriving current block motion information in merge mode.
[0029] Figure 8 is a diagram illustrating candidate blocks used to derive merge candidates.
[0030] Figure 9 is a diagram showing the positions of basic sample points.
[0031] Figure 10 is a diagram illustrating an example of candidate blocks for deriving merge candidates.
[0032] Figure 11 is a diagram showing an example in which the positions of basic points are changed.
[0033] Figure 12 is a diagram showing an example in which the positions of basic points are changed.
[0034] Figure 13 2 is a diagram for explaining the updating aspect of the motion information table.
[0035] Figure 14 is a diagram illustrating an update aspect of a motion information table.
[0036] Figure 15 is a diagram illustrating an example in which the index of stored motion information candidates is updated.
[0037] Figure 16 is a diagram showing the positions of representative sub-blocks.
[0038] Figure 17 This shows an example of generating a motion information table in the inter prediction mode.
[0039] Figure 18 is a diagram illustrating an example of generating a motion information table for each motion vector resolution.
[0040] Figure 19 is a diagram illustrating an example in which motion information of a block to which a merge offset encoding method is applied is stored in a separate motion information table.
[0041] Figure 20 is a diagram illustrating an example of adding motion information candidates included in a long-term motion information table to a merge candidate list.
[0042] Figure 21 is a diagram illustrating an example of performing redundancy check on only a part of the merge candidates.
[0043] Figure 22 is a diagram illustrating an example in which a redundancy check for a specific merge candidate is omitted.
[0044] Figure 23 is a diagram illustrating an example in which a candidate block included in the same merge processing area as the current block is set to be unusable as a merge candidate.
[0045] Figure 24 is a diagram illustrating an example of deriving a merge candidate for a current block when the current block is included in a merge processing region.
[0046] Figure 25 is a diagram showing a temporary motion information table.
[0047] Figure 26 is a diagram illustrating an example of making the motion information table and the temporary motion information table consistent.
[0048] Figure 27 is a diagram illustrating aspects of prediction based on intra block copy mode.
[0049] Figure 28 is a flowchart illustrating a process of predicting a current block based on an intra block copy mode according to an embodiment of the present disclosure.
[0050] Figure 29 is a diagram illustrating an example of an order in which IBC merge candidates are added to an IBC merge candidate list.
[0051] Figure 30 is a diagram illustrating an example of adding an IBC motion information candidate to an IBC merge candidate list.
[0052] Figure 31 is a diagram illustrating the updating aspect of the IBC motion information table.
[0053] Figure 32is a diagram illustrating an offset vector according to a value of distance_idx indicating a size of the offset vector and a value of direction_idx indicating a direction of the offset vector.
[0054] Figure 33 is a diagram illustrating an example of an unavailable area according to the location of a current block. DETAILED DESCRIPTION
[0055] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
[0056] Image encoding and decoding are performed on a block basis. In an example, encoding / decoding processes such as transform, quantization, prediction, in-loop filtering, reconstruction, etc. may be performed on a coding block, a transform block, or a prediction block.
[0057] Hereinafter, the encoding / decoding target block is referred to as a “current block.” In an example, the current block may refer to a coding block, a transform block, or a prediction block according to a current process of encoding / decoding.
[0058] In addition, the term "unit" used in this specification represents a basic unit for performing a specific encoding / decoding process, and "block" can be understood to mean a sample array having a predetermined size. Unless otherwise specified, "block" and "unit" can be used interchangeably. In examples described later, coding blocks and coding units can be understood to have the same meaning.
[0059] Figure 1 is a diagram illustrating a block diagram of an image encoding device (encoder) according to an embodiment of the present disclosure.
[0060] Reference Figure 1 , the image encoding apparatus 100 may include a picture partition unit 110, prediction units 120 and 125, a transform unit 130, a quantization unit 135, a rearrangement unit 160, an entropy encoding unit 165, an inverse quantization unit 140, an inverse transform unit 145, a filter unit 150, and a memory 155.
[0061] Figure 1 The components described in the figure are shown separately to illustrate different characteristic functions in the image encoding device, and the figure does not indicate that each component is composed of a separate hardware or software unit. That is, each component is listed only for the convenience of explanation, and at least two of the components may constitute a single component, or a single component may be divided into multiple components that can perform its functions. Even embodiments in which the components are integrated and embodiments in which the components are divided are included in the scope of the present disclosure unless they depart from the spirit of the present disclosure.
[0062] In addition, some components are not essential components for performing the necessary functions of the present disclosure, but are optional components used only to improve performance. The present disclosure can be implemented using essential components for realizing the spirit of the present disclosure other than components used only to improve performance, and a structure including only essential components other than optional components used only to improve performance is also included in the scope of the present disclosure.
[0063] The picture partition unit 110 may partition an input picture into at least one processing unit. In this regard, a processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU). In the picture partition unit 110, a single picture may be partitioned into a combination of multiple coding units, prediction units, and transform units, and the picture may be encoded by selecting a combination of coding units, prediction units, and transform units according to a predetermined condition (e.g., a cost function).
[0064] For example, a single picture can be partitioned into multiple coding units. To partition a picture into coding units, a recursive tree structure such as a quadtree structure can be used, and a coding unit derived from a root such as a single image or a maximum coding unit can be partitioned into other coding units and can have as many child nodes as the partitioned coding units. Coding units that are no longer partitioned according to specific restrictions become leaf nodes. That is, when it is assumed that only square partitions are available for a single coding unit, a single coding unit can be partitioned into up to four other coding units.
[0065] Hereinafter, in an embodiment of the present disclosure, a coding unit may be used as a unit for encoding or may be used as a unit for decoding.
[0066] The prediction units may be obtained by partitioning a single coding unit into at least one square or rectangle having the same size, or may be partitioned into prediction units in such a manner that one prediction unit may be different in shape and / or size from another prediction unit.
[0067] When a prediction unit is generated based on a coding block on which intra prediction is being performed, when the coding unit is not a minimum coding unit, intra prediction may be performed without performing partitioning into a plurality of N×N prediction units.
[0068] Prediction units 120 and 125 may include an inter-frame prediction unit 120 for performing inter-frame prediction and an intra-frame prediction unit 125 for performing intra-frame prediction. Whether inter-frame prediction or intra-frame prediction is performed on a prediction unit may be determined, and detailed information based on each prediction method (e.g., intra-frame prediction mode, motion vector, reference picture, etc.) may be determined. In this regard, the processing unit on which prediction is performed may be different from the processing unit that determines the prediction method and its details. For example, the prediction method, prediction mode, etc. may be determined based on the prediction unit, and prediction may be performed based on the transform unit. The residual value (residual block) between the generated prediction block and the original block may be input to the transform unit 130. Furthermore, prediction mode information, motion vector information, etc. used for prediction may be encoded using the residual value by the entropy encoding unit 165 and transmitted to the decoder. When a specific encoding mode is used, the original block is encoded as is and transmitted to the decoding unit without generating a prediction block by the prediction unit 120 or 125.
[0069] The inter-frame prediction unit 120 may predict a prediction unit based on information about at least one of a previous picture and a subsequent picture of the current picture, or in some cases, may predict a prediction unit based on information about some coding regions in the current picture. The inter-frame prediction unit 120 may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.
[0070] The reference picture interpolation unit may receive reference picture information from the memory 155 and generate pixel information of integer pixels or smaller pixels from the reference picture. In the case of luma pixels, an 8-tap DCT-based interpolation filter with different coefficients may be used to generate pixel information about integer pixels or smaller pixels in 1 / 4 pixel units. In the case of chroma signals, a 4-tap DCT-based interpolation filter with different filter coefficients may be used to generate pixel information about integer pixels or smaller pixels in 1 / 8 pixel units.
[0071] The motion prediction unit may perform motion prediction based on the reference picture interpolated by the reference picture interpolation unit. As a method for calculating a motion vector, various methods may be used, such as a full search based block matching algorithm (FBMA), a three-step search (TSS) algorithm, a new three-step search (NTS) algorithm, etc. Based on the interpolated pixels, the motion vector may have a motion vector size in units of 1 / 2 pixel or 1 / 4 pixel. The motion prediction unit may predict the current prediction unit by changing the motion prediction method. As a motion prediction method, various methods may be used, such as a skip method, a merge method, an advanced motion vector prediction (AMVP) method, an intra-block copy method, etc.
[0072] The intra-frame prediction unit 125 can generate a prediction unit based on information about reference pixels around the current block (which is pixel information in the current picture). When the neighboring block of the current prediction unit is a block on which inter-frame prediction is performed, and therefore the reference pixel is a pixel on which inter-frame prediction is performed, the reference pixel included in the block on which inter-frame prediction is performed can be replaced with information about the reference pixel of the neighboring block on which intra-frame prediction is performed. In other words, when a reference pixel is unavailable, at least one reference pixel among the available reference pixels can be used to replace the unavailable reference pixel information.
[0073] Prediction modes in intra-frame prediction may include a directional prediction mode that uses reference pixel information according to the prediction direction and a non-directional mode that does not use directional information when performing prediction. The mode used to predict luma information may be different from the mode used to predict chroma information. To predict chroma information, information about the intra-frame prediction mode used to predict luma information or information about the predicted luma signal may be used.
[0074] When performing intra prediction, if the size of the prediction unit is the same as that of the transformation unit, intra prediction can be performed on the prediction unit based on pixels located to the left, above the left, and above the prediction unit. However, when performing intra prediction, if the size of the prediction unit is different from that of the transformation unit, intra prediction can be performed based on the transformation unit using reference pixels. In addition, intra prediction using N×N partitions can be used only for the smallest coding unit.
[0075] In the intra prediction method, a prediction block may be generated after applying an adaptive intra smoothing (AIS) filter to reference pixels according to a prediction mode. The type of the AIS filter applied to the reference pixels may vary. In order to perform the intra prediction method, an intra prediction mode for the current prediction unit may be predicted from intra prediction modes of prediction units existing around the current prediction unit. When the prediction mode for the current prediction unit is predicted by using mode information predicted from neighboring prediction units, when the intra prediction mode for the current prediction unit is the same as the intra prediction mode of the neighboring prediction unit, information indicating that the current prediction unit and the neighboring prediction unit have the same prediction mode may be transmitted by using predetermined flag information. When the prediction mode for the current prediction unit is different from the prediction mode of the neighboring prediction unit, entropy coding may be performed to encode information about the prediction mode for the current block.
[0076] Furthermore, a residual block including information on a residual value, which is a difference value between a prediction unit predicted by the prediction unit 120 or 125 and an original block of the prediction unit, may be generated. The generated residual block may be input to the transform unit 130.
[0077] Transform unit 130 may transform a residual block using a transform method such as discrete cosine transform (DCT) or discrete sine transform (DST), wherein the residual block includes information about residual values between the original block and the prediction unit generated by prediction unit 120 or 125. In this regard, the DCT transform kernel includes at least one of DCT2 or DCT8, and the DST transform kernel includes DST7. Whether to apply DCT or DST to transform the residual block may be determined based on information about the intra prediction mode of the prediction unit used to generate the residual block. Transformation may be skipped for the residual block. A flag indicating whether to skip transformation for the residual block may be encoded. Transform skipping may be permitted for residual blocks whose size is less than or equal to a threshold, residual blocks of luma components, or residual blocks of chroma components in a 4:4:4 format.
[0078] The quantization unit 135 may quantize the value transformed into the frequency domain by the transform unit 130. The quantization coefficient may vary according to the importance of the block or image. The value calculated in the quantization unit 135 may be provided to the inverse quantization unit 140 and the rearrangement unit 160.
[0079] The rearrangement unit 160 may perform rearrangement on coefficient values with respect to the quantized residual values.
[0080] The rearrangement unit 160 may convert the coefficients in the two-dimensional block form into coefficients in the one-dimensional vector form using a coefficient scanning method. For example, the rearrangement unit 160 may scan from the DC coefficient to the coefficients in the high frequency domain using a zigzag scanning method to convert the coefficients into the one-dimensional vector form. Depending on the size of the transform unit and the intra-frame prediction mode, vertical scanning or horizontal scanning may be used instead of zigzag scanning, wherein the coefficients in the two-dimensional block form are scanned in the column direction in vertical scanning and the coefficients in the two-dimensional block form are scanned in the row direction in horizontal scanning. In other words, the zigzag scanning, vertical scanning, and horizontal scanning method to be used may be determined based on the size of the transform unit and the intra-frame prediction mode.
[0081] The entropy encoding unit 165 may perform entropy encoding based on the value calculated by the rearrangement unit 160. The entropy encoding may use various encoding methods, such as Exponential Golomb coding, Context Adaptive Variable Length Coding (CAVLC), or Context Adaptive Binary Arithmetic Coding (CABAC).
[0082] The entropy coding unit 165 may encode various types of information obtained from the rearrangement unit 160 and the prediction units 120 and 125 (such as information about residual value coefficients and information about block types of coding units, information about prediction modes, information about partition units, information about prediction units, information about partition units, information about prediction units and information about sending units, information about motion vectors, information about reference frames, information about block interpolation, filtering information, and the like).
[0083] The entropy encoding unit 165 may entropy encode the coefficients of the coding unit input from the rearrangement unit 160 .
[0084] The inverse quantization unit 140 may perform inverse quantization on the value quantized in the quantization unit 135, and the inverse transform unit 145 may perform inverse transform on the value transformed in the transform unit 130. Residual values generated by the inverse quantization unit 140 and the inverse transform unit 145 may be added to a prediction unit predicted by a motion estimation unit, a motion compensation unit, or an intra prediction unit included in the prediction units 120 and 125 to generate a reconstructed block.
[0085] The filter unit 150 may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).
[0086] A deblocking filter removes block distortion caused by boundaries between blocks in a reconstructed image. To determine whether to perform deblocking, the application of a deblocking filter to the current block is determined based on the pixels in the number of rows and columns included in the block. When a deblocking filter is applied to a block, a strong or weak filter is applied depending on the desired deblocking filter strength. Furthermore, when applying a deblocking filter, when performing horizontal filtering and vertical filtering, the horizontal and vertical filtering can be configured to be processed in parallel.
[0087] The offset correction unit can correct the original image by offsetting the image on which deblocking is performed in units of pixels. To perform offset correction on a specific picture, a method of applying an offset to an area determined after partitioning the pixels of the image into a predetermined number of areas or a method of applying an offset based on edge information of each pixel can be used.
[0088] Adaptive loop filtering (ALF) may be performed based on a value obtained by comparing a filtered reconstructed image with an original image. Pixels included in an image may be partitioned into predetermined groups, a filter to be applied to each of the groups may be determined, and filtering may be performed separately for each group. Information on whether ALF is applied may be transmitted for each coding unit (CU) of a luminance signal, and the shape and filter coefficients of the ALF filter to be applied may vary based on each block. Alternatively, an ALF filter having the same shape (fixed shape) may be applied regardless of the characteristics of the block to which the filter is applied.
[0089] In the memory 155, the reconstructed block or picture calculated by the filter unit 150 may be stored. When inter prediction is performed, the stored reconstructed block or picture may be provided to the prediction unit 120 or 125.
[0090] Figure 2 is a diagram illustrating a block diagram of an image decoding device (decoder) according to an embodiment of the present disclosure.
[0091] Reference Figure 2 , the image decoding apparatus 200 may include: an entropy decoding unit 210 , a rearrangement unit 215 , an inverse quantization unit 220 , an inverse transform unit 225 , prediction units 230 and 235 , a filter unit 240 , and a memory 245 .
[0092] When an image bitstream is input from an encoder, the input bitstream may be decoded according to an inverse process of the image encoding apparatus.
[0093] The entropy decoding unit 210 may perform entropy decoding according to the inverse process of the entropy encoding performed by the entropy encoding unit of the image encoder. For example, in association with the method performed by the image encoder device, various methods such as exponential Golomb coding, context-adaptive variable length coding (CAVLC), or context-adaptive binary arithmetic coding (CABAC) may be applied.
[0094] The entropy decoding unit 210 may decode information about intra prediction and inter prediction performed by the encoder.
[0095] The rearrangement unit 215 may rearrange the bitstream entropy-decoded by the entropy decoding unit 210 based on the rearrangement method used in the encoder. Coefficients represented in the form of a one-dimensional vector may be reconstructed and rearranged into coefficients in the form of a two-dimensional block. The rearrangement unit 215 may perform the rearrangement by receiving information related to coefficient scanning performed in the encoder and performing inverse scanning based on the scanning order performed in the encoder.
[0096] The inverse quantization unit 220 may perform inverse quantization based on the quantization parameter received from the encoder and the coefficient value of the rearranged block.
[0097] The inverse transform unit 225 may perform an inverse transform (i.e., inverse DCT or inverse DST) opposite to the transform (i.e., DCT or DST) performed on the quantization result by the transform unit in the image encoder. In this regard, the DCT transform core may include at least one of DCT2 or DCT8, and the DST transform core may include DST7. Alternatively, when the transform is skipped in the image encoder, the inverse transform is not performed in the inverse transform unit 225. The inverse transform may be performed based on the transmission unit determined by the image encoder. The inverse transform unit 225 of the image decoder may selectively perform a transform method (e.g., DCT or DST) based on multiple pieces of information such as the prediction method, the size of the current block, and the prediction direction.
[0098] The prediction unit 230 or 235 may generate a prediction block based on information related to the prediction block received from the entropy decoding unit 210 and information about a previously decoded block or picture received from the memory 245 .
[0099] As described above, when performing intra prediction, as an operation of the image encoder, when the size of the prediction unit is the same as that of the transformation unit, intra prediction can be performed on the prediction unit based on pixels located to the left, above the left, and above the prediction unit. However, when performing intra prediction, when the size of the prediction unit is different from that of the transformation unit, intra prediction can be performed based on the transformation unit using reference pixels. In addition, intra prediction using N×N partitions can be used only for the smallest coding unit.
[0100] Prediction units 230 and 235 may include a PU determination module, an inter-frame prediction unit, and an intra-frame prediction unit. The PU determination unit may receive various types of information input from the entropy decoding unit 210 (such as information about the prediction unit, information about the prediction mode of the intra-frame prediction method, information about the motion prediction of the inter-frame prediction method, etc.), divide the prediction unit in the current coding unit, and determine whether to perform inter-frame prediction or intra-frame prediction on the prediction unit. By using the information required for inter-frame prediction of the current prediction unit received from the image encoder, the inter-frame prediction unit 230 may perform inter-frame prediction on the current prediction unit based on information about at least one of a previous picture and a subsequent picture of the current picture including the current prediction unit. Alternatively, inter-frame prediction may be performed based on information about some pre-reconstructed areas in the current picture including the current prediction unit.
[0101] In order to perform inter prediction, which method of skip mode, merge mode, AMVP mode, or intra block copy mode to use as a motion prediction method for a prediction unit included in the coding unit may be determined based on the coding unit.
[0102] The intra-frame prediction unit 235 can generate a prediction block based on information about pixels within the current picture. When the prediction unit is a prediction unit for which intra-frame prediction has been performed, intra-frame prediction can be performed based on information about the intra-frame prediction mode of the prediction unit received from the image encoder. The intra-frame prediction unit 235 may include an adaptive intra-frame smoothing (AIS) filter, a reference pixel interpolation module, or a DC filter. The AIS filter can perform filtering on the reference pixels of the current block and can determine whether to apply the filter based on the prediction mode for the current prediction unit. When AIS filtering is performed on the reference pixels of the current block, information about the AIS filter received from the image encoder and the prediction mode of the prediction unit can be used. When the prediction mode for the current block is a mode in which AIS filtering is not applied, the AIS filter may not be applied.
[0103] When the prediction mode of the prediction unit is a prediction mode for performing intra-frame prediction based on pixel values obtained by interpolating reference pixels, the reference pixel interpolation unit may interpolate the reference pixels to generate reference pixels having integer or smaller units. When the prediction mode for the current prediction unit is a prediction mode for generating a prediction block without interpolating reference pixels, the reference pixels may not be interpolated. When the prediction mode for the current block is the DC mode, the DC filter may generate the prediction block through filtering.
[0104] The reconstructed block or the reconstructed picture may be provided to the filter unit 240. The filter unit 240 may include a deblocking filter, an offset correction module, and an ALF.
[0105] Information on whether a deblocking filter has been applied to a corresponding block or a corresponding picture and information on whether a strong filter or a weak filter is applied when the deblocking filter is applied may be received from the image encoder. A deblocking filter of the image decoder may receive information on the deblocking filter from the image encoder, and the image decoder may perform deblocking filtering on the corresponding block.
[0106] The offset correction unit may perform offset correction on the reconstructed image based on the type of offset correction applied to the image when encoding is performed, information about the offset value, and the like.
[0107] ALF may be applied to a coding unit based on information on whether ALF is applied, information on an ALF coefficient, etc. received from an encoder. The above ALF information may be provided by being included in a specific parameter set.
[0108] In the memory 245 , the reconstructed picture or the reconstructed block may be stored to be used as a reference picture or a reference block, and the reconstructed picture may be provided to the output unit.
[0109] Figure 3 is a diagram illustrating a basic coding tree unit according to an embodiment of the present disclosure.
[0110] The largest coding block may be defined as a coding tree block. A single picture may be partitioned into multiple coding tree units (CTUs). A CTU may be a coding unit of the largest size and may be referred to as a largest coding unit (LCU). Figure 3 is a diagram illustrating an example of partitioning a single picture into a plurality of CTUs.
[0111] The size of a CTU can be defined at the picture level or the sequence level. Similarly, information indicating the size of a CTU can be signaled via a picture parameter set or a sequence parameter set.
[0112] In an example, the size of the CTU for the entire picture in the sequence may be set to 128×128. Alternatively, either 128×128 or 256×256 may be determined as the size of the CTU at the picture level. In an example, the CTU may be set to have a size of 128×128 in the first picture and a size of 256×256 in the second picture.
[0113] A coding block may be generated by partitioning a CTU. A coding block represents a basic unit for performing encoding / decoding. In an example, prediction or transformation may be performed for each coding block, or a prediction coding mode may be determined for each coding block. In this regard, a prediction coding mode represents a method of generating a predicted image. In an example, a prediction coding mode may include intra prediction, inter prediction, current picture reference (CPR), intra block copy (IBC), or combined prediction. For a coding block, a prediction block of the coding block may be generated by using a prediction coding mode of at least one of intra prediction, inter prediction, current picture reference, or combined prediction.
[0114] Information indicating the prediction coding mode for the current block may be signaled in the bitstream. In an example, the information may be a 1-bit flag indicating whether the prediction coding mode is intra mode or inter mode. When the prediction coding mode for the current block is determined to be inter mode, current picture reference or combined prediction may be available.
[0115] The current picture reference sets the current picture as the reference picture and obtains the prediction block for the current block from an already encoded / decoded region within the current picture. In this context, the current picture refers to the picture that includes the current block. Information indicating whether the current picture reference is applied to the current block can be signaled in the bitstream. In an example, this information can be a 1-bit flag. When the flag is true, the prediction coding mode for the current block can be determined to be current picture reference, and when the flag is false, the prediction coding mode for the current block can be determined to be inter-frame prediction.
[0116] Alternatively, the prediction coding mode for the current block may be determined based on a reference picture index. In this example, when the reference picture index indicates the current picture, the prediction coding mode for the current block may be determined as current picture reference. When the reference picture index indicates a picture other than the current picture, the prediction coding mode for the current block may be determined as inter-frame prediction. In other words, current picture reference is a prediction method that uses information about an already encoded / decoded area within the current picture, while inter-frame prediction is a prediction method that uses information about another already encoded / decoded picture.
[0117] Combined prediction refers to a combined coding mode that combines at least two of intra-frame prediction, inter-frame prediction, and current picture reference. In an example, when combined prediction is applied, a first prediction block may be generated based on any one of intra-frame prediction, inter-frame prediction, or current picture reference, and a second prediction block may be generated based on the other of intra-frame prediction, inter-frame prediction, or current picture reference. Once the first prediction block and the second prediction block are generated, a final prediction block may be generated by calculating an average or weighted sum of the first prediction block and the second prediction block. Information indicating whether combined prediction is applied to the current block may be signaled in the bitstream. This information may be a 1-bit flag.
[0118] Figure 4 is a diagram illustrating various partition types of a coding block.
[0119] The coding block may be partitioned into multiple coding blocks based on quadtree partitioning, binary tree partitioning, or ternary tree partitioning. The partitioned coding block may be further partitioned into multiple coding blocks based on quadtree partitioning, binary tree partitioning, or ternary tree partitioning.
[0120] Quadtree partitioning represents a method of partitioning the current block into four blocks. As a result of quadtree partitioning, the current block can be partitioned into four square partitions (refer to Figure 4 (a) "SPLIT_QT").
[0121] Binary tree partitioning refers to a method of partitioning a current block into two blocks. The operation of partitioning the current block into two blocks along the vertical direction (i.e., using a vertical line passing through the current block) may be referred to as vertical binary tree partitioning, and the operation of partitioning the current block into two blocks along the horizontal direction (i.e., using a horizontal line passing through the current block) may be referred to as horizontal binary tree partitioning. As a result of the binary tree partitioning, the current block may be partitioned into two non-square partitions. Figure 4 "SPLIT_BT_VER" of (b) is a diagram showing the result of vertical binary tree partitioning, and Figure 4 "SPLIT_BT_HOR" in (c) is a diagram showing the result of horizontal binary tree partitioning.
[0122] Ternary tree partitioning refers to a method for partitioning a current block into three blocks. Partitioning the current block into three blocks along the vertical direction (i.e., using two vertical lines passing through the current block) may be referred to as vertical ternary tree partitioning, and partitioning the current block into three blocks along the horizontal direction (i.e., using two horizontal lines passing through the current block) may be referred to as horizontal ternary tree partitioning. As a result of ternary tree partitioning, the current block may be partitioned into three non-square partitions. In this regard, the width / height of the partition located at the center of the current block may be twice the width / height of the other partitions. Figure 4 "SPLIT_TT_VER" of (d) is a diagram showing the result of vertical ternary tree partitioning, and Figure 4 "SPLIT_TT_HOR" of (e) is a diagram showing the result of ternary tree partitioning in the horizontal direction.
[0123] The number of partitions of a CTU can be defined as the partition depth. The maximum partition depth of a CTU can be determined at the sequence level or the picture level. Therefore, the maximum partition depth of a CTU can vary based on the sequence or picture.
[0124] Alternatively, the maximum partition depth may be determined independently for each partitioning method. In an example, the maximum partition depth allowed for quadtree partitioning may be different from the maximum partition depth allowed for binary tree partitioning and / or ternary tree partitioning.
[0125] The encoder may signal information indicating at least one of a partition type and a partition depth of a current block in a bitstream, and the decoder may determine the partition type and partition depth of a CTU based on the information obtained by parsing the bitstream.
[0126] Figure 5 is a diagram illustrating an example of aspects of partitioning a CTU.
[0127] An operation of partitioning a coding block by using quadtree partitioning, binary tree partitioning, and / or ternary tree partitioning may be referred to as multi-tree partitioning.
[0128] A coding block generated by partitioning a coding block by applying multi-tree partitioning may be referred to as a sub-coding block. When the partition depth of the coding block is k, the partition depth of the sub-coding block is set to k+1.
[0129] On the contrary, for a coding block with a partition depth of k+1, the coding block with a partition depth of k may be referred to as a parent coding block.
[0130] The partition type of the current coding block may be determined based on at least one of a partition type of a parent coding block and a partition type of a neighboring coding block. In this regard, the neighboring coding block may be a block adjacent to the current coding block, and may include at least one of an upper neighboring block, a left neighboring block, or a neighboring block adjacent to the upper left corner of the current coding block. In this regard, the partition type may include whether quadtree partitioning is applied, whether binary tree partitioning is applied, the direction of the binary tree partitioning, whether ternary tree partitioning is applied, or the direction of the ternary tree partitioning.
[0131] In order to determine the partition type of the coding block, information indicating whether the coding block is partitioned can be signaled in the bitstream. This information is a 1-bit flag "split_cu_flag", and when the flag is true, it can indicate that the coding block is partitioned by the multi-tree partitioning method.
[0132] When split_cu_flag is true, information indicating whether the coding block is partitioned by quadtree partitioning can be signaled in the bitstream. This information is a 1-bit flag split_qt_flag, and when this flag is true, the coding block can be partitioned into four blocks.
[0133] In the example, Figure 5 In the example shown in , a CTU is partitioned by quadtree partitioning, and thus four coding blocks with a partition depth of 1 are generated. Furthermore, quadtree partitioning is again applied to the first and fourth coding blocks of the four coding blocks generated by quadtree partitioning. As a result, four coding blocks with a partition depth of 2 can be generated.
[0134] In addition, by applying quadtree partitioning again to the coding block with a partition depth of 2, a coding block with a partition depth of 3 may be generated.
[0135] When quadtree partitioning is not applied to a coding block, whether binary tree partitioning or ternary tree partitioning is performed on the coding block may be determined based on at least one of the size of the coding block, whether the coding block is located at a picture boundary, the maximum partition depth, or the partition type of the neighboring block. When it is determined that binary tree partitioning or ternary tree partitioning is performed on the coding block, information indicating the partition direction may be signaled in the bitstream. This information may be a 1-bit flag mtt_split_cu_vertical_flag. Based on this flag, it may be determined whether the partition direction is vertical or horizontal. In addition, information indicating which of binary tree partitioning or ternary tree partitioning is applied to the coding block may be signaled in the bitstream. This information may be a 1-bit flag mtt_split_cu_binary_flag. Based on this flag, it may be determined whether binary tree partitioning or ternary tree partitioning is applied to the coding block.
[0136] In the example, Figure 5In the example shown in , vertical binary tree partitioning is applied to a coding block with a partition depth of 1, vertical ternary tree partitioning is applied to a left coding block in the coding block generated by partitioning, and vertical binary tree partitioning is applied to a right coding block.
[0137] Inter-frame prediction is a predictive coding mode that predicts the current block by using information about the previous picture. In this example, a block at the same position as the current block in the previous picture (hereinafter, the co-located block) can be set as the prediction block of the current block. Hereinafter, the prediction block generated based on the co-located block of the current block may be referred to as the co-located prediction block.
[0138] Conversely, when an object that existed in the previous picture has moved to another location in the current picture, the current block can be effectively predicted by using the motion of the object. For example, when the direction and size of the object's motion are determined by comparing the previous picture with the current picture, a prediction block (or predicted image) for the current block can be generated based on the object's motion information. Hereinafter, a prediction block generated by using motion information may be referred to as a motion prediction block.
[0139] A residual block may be generated by subtracting a prediction block from a current block. In this regard, when an object moves, the energy of the residual block may be reduced by using a motion prediction block instead of a co-located prediction block, thereby improving compression performance of the residual block.
[0140] As above, the operation of generating a prediction block by using motion information may be referred to as motion estimation prediction. In most inter predictions, a prediction block may be generated based on motion compensation prediction.
[0141] The motion information may include at least one of a motion vector, a reference picture index, a prediction direction, and a bidirectional weighting factor index. The motion vector indicates the direction and size of motion of an object. The reference picture index specifies the reference picture of the current block among the reference pictures included in the reference picture list. The prediction direction indicates either unidirectional L0 prediction, unidirectional L1 prediction, or bidirectional prediction (L0 prediction and L1 prediction). At least one of L0 motion information and L1 motion information may be used depending on the prediction direction of the current block. The bidirectional weighting factor index specifies the weighting factor applied to the L0 prediction block and the weighting factor applied to the L1 prediction block.
[0142] Figure 6 is a flowchart of an inter-frame prediction method according to an embodiment of the present disclosure.
[0143] Reference Figure 6 The inter-frame prediction method includes: determining an inter-frame prediction mode for a current block S601, obtaining motion information of the current block according to the determined inter-frame prediction mode S602, and performing motion compensation prediction for the current block based on the obtained motion information S603.
[0144] In this regard, the inter-frame prediction mode may refer to various methods for determining the motion information of the current block, and includes an inter-frame prediction mode using translational motion information and an inter-frame prediction mode using affine motion information. In an example, the inter-frame prediction mode using translational motion information may include a merge mode and a motion vector prediction mode, and the inter-frame prediction mode using affine motion information may include an affine merge mode and an affine motion vector prediction mode. The motion information about the current block may be determined based on neighboring blocks adjacent to the current block or information obtained by parsing a bitstream.
[0145] The motion information of the current block can be derived from the motion information of another block. In this regard, the other block may be a block that was encoded / decoded using inter-frame prediction before the current block. Setting the motion information of the current block to be the same as the motion information of the other block may be defined as a merge mode. Furthermore, setting the motion vector of the other block to a predicted value of the motion vector of the current block may be defined as a motion vector prediction mode.
[0146] Figure 7 is a flow chart of a process for deriving motion information of a current block in merge mode.
[0147] A merge candidate of the current block may be derived S701. The merge candidate of the current block may be derived from a block encoded / decoded by inter prediction before the current block.
[0148] Figure 8 is a diagram illustrating candidate blocks used to derive merge candidates.
[0149] The candidate block may include at least one of a neighboring block or a non-neighboring block, wherein the neighboring block includes samples adjacent to the current block and the non-neighboring block includes samples not adjacent to the current block. Hereinafter, samples used to determine the candidate block are defined as basic samples. Furthermore, basic samples adjacent to the current block are referred to as neighboring basic samples, and basic samples not adjacent to the current block are referred to as non-neighboring basic samples.
[0150] Neighboring basic samples may be included in the neighboring columns of the leftmost column of the current block or the neighboring rows of the top row of the current block. In an example, when the coordinates of the top left sample of the current block are (0, 0), at least one of the blocks including basic samples at positions (-1, H-1), (W-1, -1), (W, -1), (-1, H), or (-1, -1) may be used as candidate blocks. Referring to the diagram, neighboring blocks with indices 0 to 4 may be used as candidate blocks.
[0151] A non-neighboring base sample indicates a sample whose x-axis distance or y-axis distance from a base sample adjacent to the current block has a predefined value. In this example, at least one of a block including a base sample whose x-axis distance from the left base sample is a predefined value, a block including a non-neighboring sample whose y-axis distance from the upper base sample is a predefined value, or a block including a non-neighboring sample whose x-axis distance and y-axis distance from the upper left base sample are predefined values may be used as a candidate block. The predefined value may be a natural number such as 4, 8, 12, 16, or the like. Referring to the accompanying drawings, at least one of the blocks indexed 5 to 26 may be used as a candidate block.
[0152] Sample points that are not located on the same vertical line, horizontal line, or diagonal line as adjacent basic sample points may be set as non-adjacent basic sample points.
[0153] Figure 9 is a diagram showing the positions of basic sample points.
[0154] As in Figure 9 In the example shown in , the x-coordinate of the upper non-adjacent basic sample point can be set to be different from the x-coordinate of the upper adjacent basic sample point. As an example, when the position of the upper adjacent basic sample point is (W-1, -1), the position of the upper non-adjacent basic sample point that is N away from the upper adjacent basic sample point on the y-axis is set to ((W / 2)-1, -1-N), and the position of the upper non-adjacent basic sample point that is 2N away from the upper adjacent basic sample point on the y-axis is set to (0, -1-2N). In other words, the positions of non-adjacent basic sample points can be determined based on the positions of adjacent basic sample points and the distances from the adjacent basic sample points.
[0155] Hereinafter, among the candidate blocks, a candidate block including neighboring basic samples is referred to as a neighboring block, and a block including non-neighboring basic samples is referred to as a non-neighboring block.
[0156] When the distance between the current block and the candidate block is equal to or greater than a threshold, the candidate block is set to be unavailable as a merge candidate. The threshold may be determined based on the size of the coding tree unit. As an example, the threshold may be set to the value of the height of the coding tree unit (ctu_height) or a value obtained by adding an offset to the height of the coding tree unit or subtracting an offset from the height of the coding tree unit (ctu_height±N). The offset N is a value predefined in the encoder and decoder and may be set to 4, 8, 16, 32, or ctu_height.
[0157] When a difference between the y-axis coordinate of the current block and the y-axis coordinate of a sample included in the candidate block is greater than a threshold value, it is determined that the candidate block is not usable as a merge candidate.
[0158] Optionally, candidate blocks that do not belong to the same coding tree unit as the current block may be set as unavailable as merge candidates. In an example, when a base sample is outside the upper boundary of the coding tree unit to which the current block belongs, the candidate block including the base sample may be set as unavailable as a merge candidate.
[0159] When the upper boundary of the current block is adjacent to the upper boundary of the coding tree unit, multiple candidate blocks are determined to be unavailable as merge candidates, and thus the encoding / decoding efficiency of the current block may be reduced. To solve this problem, the candidate blocks may be arranged so that the number of candidate blocks located to the left of the current block is greater than the number of candidate blocks located above the current block.
[0160] Figure 10 is a diagram illustrating an example of candidate blocks for deriving merge candidates.
[0161] As in Figure 10 In the example shown in , the upper blocks belonging to the N block columns above the current block and the left blocks belonging to the M block columns on the left side of the current block can be set as candidate blocks. Here, by setting M to be greater than N, the number of left candidate blocks can be set to be greater than the number of upper candidate blocks.
[0162] As an example, the difference between the y-axis coordinate of the basic sample point in the current block and the y-axis coordinate of the upper block that can be used as the candidate block can be set to not more than N times the height of the current block. In addition, the difference between the x-axis coordinate of the basic sample point in the current block and the x-axis coordinate of the left block that can be used as the candidate block can be set to not more than M times the width of the current block.
[0163] As an example, Figure 10 The example in shows that blocks belonging to two block columns above the current block and blocks belonging to five block columns on the left of the current block are set as candidate blocks.
[0164] As another example, when the candidate block does not belong to the same coding tree unit as the current block, a block belonging to the same coding tree unit as the current block or a block including basic samples adjacent to a boundary of the coding tree unit is used instead of the candidate block to derive a merge candidate.
[0165] Figure 11 is a diagram showing an example in which the positions of basic points are changed.
[0166] When a base sample is included in a coding tree unit different from the current block and the base sample is not adjacent to a boundary of the coding tree unit, the base sample is not used, but base samples adjacent to the boundary of the coding tree unit are used to determine a candidate block.
[0167] As an example, in Figure 11In the examples shown in (a) and (b), when the upper boundary of the current block touches the upper boundary of the coding tree unit, the basic samples above the current block belong to a coding tree unit different from the current block. Among the basic samples belonging to a coding tree unit different from the current block, the basic samples that are not adjacent to the upper boundary of the coding tree unit can be replaced with samples adjacent to the upper boundary of the coding tree unit.
[0168] As an example, Figure 11 In the example shown in (a), the basic sample at position 6 can be replaced by the sample at position 6' located at the upper boundary of the coding tree unit, and as shown in FIG. Figure 11 In the example shown in (b), the base sample at position 15 may be replaced with the sample at position 15' located at the upper boundary of the coding tree unit. Here, the y coordinate of the replacement sample is changed to a position adjacent to the coding tree unit, and the x coordinate of the replacement sample may be set to be the same as that of the base sample. As an example, the sample at position 6' may have the same x coordinate as the sample at position 6, and the sample at position 15' may have the same x coordinate as the sample at position 15.
[0169] Alternatively, the result obtained by adding the offset to the x-coordinate of the base sample or subtracting the offset from the x-coordinate of the base sample may be set as the x-coordinate of the replacement sample. As an example, when an adjacent base sample and a non-adjacent base sample located above the current block have the same x-coordinate, the result obtained by adding the offset to the x-coordinate of the base sample or subtracting the offset from the x-coordinate of the base sample may be set as the x-coordinate of the replacement sample. This is to prevent the replacement sample that replaces a non-adjacent base sample from being located at the same position as another non-adjacent base sample or an adjacent base sample.
[0170] Figure 12 is a diagram showing an example in which the positions of basic points are changed.
[0171] When a base sample that is included in a coding tree unit different from the current block and is not adjacent to the boundary of the coding tree unit is replaced with a sample located at a boundary of the coding tree unit, a value obtained by adding an offset to the x-coordinate of the base sample or subtracting the offset from the x-coordinate of the base sample may be set as the x-coordinate of the replacement sample.
[0172] As an example, in Figure 12In the example shown in , the basic sample at position 6 and the basic sample at position 15 may be replaced by the sample at position 6' and the sample at position 15', respectively, where the y coordinates of the sample at position 6' and the sample at position 15' are the same as the row adjacent to the upper boundary of the coding tree unit. Here, the x coordinate of the sample at position 6' may be set to a value obtained by subtracting W / 2 from the x coordinate of the basic sample at position 6. The x coordinate of the sample at position 15' may be set to a value obtained by subtracting W-1 from the x coordinate of the basic sample at position 15.
[0173] and Figure 11 and Figure 12 Unlike the example shown in , the y coordinate of a row located above the uppermost row of the current block or the y coordinate of the upper boundary of the coding tree unit may be set as the y coordinate of the replacement sample point.
[0174] Although not shown, the sample that replaces the base sample may be determined based on the left boundary of the coding tree unit. In an example, when the base sample is not included in the same coding tree unit as the current block and is not adjacent to the left boundary of the coding tree unit, the base sample is replaced with a sample adjacent to the left boundary of the coding tree unit. Here, the replacement sample may have the same y coordinate as the base sample, or may have a y coordinate obtained by adding an offset to the y coordinate of the base sample or subtracting the offset from the y coordinate of the base sample.
[0175] Thereafter, the block including the replacement sample point may be set as a candidate block, and a merge candidate for the current block may be derived based on the candidate block.
[0176] Merge candidates may be derived from temporally neighboring blocks included in a picture different from the current block. In an example, merge candidates may be derived from co-located blocks included in a co-located picture. Any of the reference pictures included in the reference picture list may be set as a co-located picture. Index information identifying a co-located picture in the reference pictures may be signaled in the bitstream. Alternatively, a reference picture with a predefined index among the reference pictures may be determined as a co-located picture.
[0177] The motion information of the merge candidate may be set to be the same as the motion information of the candidate block. In an example, at least one of a motion vector, a reference picture index, a prediction direction, or a bidirectional weight index of the candidate block may be set as the motion information of the merge candidate.
[0178] A merge candidate list including merge candidates may be generated S702 .
[0179] The indexes of the merge candidates in the merge candidate list may be assigned according to a predetermined order. In an example, the indexes may be assigned in the order of the merge candidates derived from the left neighboring block, the merge candidates derived from the upper neighboring block, the merge candidates derived from the upper right neighboring block, the merge candidates derived from the lower left neighboring block, the merge candidates derived from the upper left neighboring block, and the merge candidates derived from the temporal neighboring blocks.
[0180] When multiple merge candidates are included in the merge candidate list, at least one merge candidate from the multiple merge candidates may be selected ( S703 ). Specifically, information for specifying any one of the multiple merge candidates may be signaled in the bitstream. In this example, information merge_idx indicating an index of any one of the merge candidates included in the merge candidate list may be signaled in the bitstream.
[0181] When the number of merge candidates included in the merge candidate list is less than a threshold, the motion information candidate included in the motion information table may be added as a merge candidate to the merge candidate list. In this regard, the threshold may be the maximum number of merge candidates that can be included in the merge candidate list or a value minus an offset from the maximum number of merge candidates. The offset may be a natural number such as 1 or 2.
[0182] The motion information table includes motion information candidates derived from blocks encoded / decoded based on inter-frame prediction in the current picture. In an example, the motion information of the motion information candidates included in the motion information table may be set to be the same as the motion information of the blocks encoded / decoded based on inter-frame prediction. In this regard, the motion information may include at least one of a motion vector, a reference picture index, a prediction direction, or a bidirectional weight index.
[0183] The motion information candidates included in the motion information table may also be referred to as inter region merging candidates or prediction region merging candidates.
[0184] The maximum number of motion information candidates that can be included in the motion information table can be predefined in the encoder and decoder. In an example, the maximum number of motion information candidates that can be included in the motion information table can be 1, 2, 3, 4, 5, 6, 7, 8 or more (e.g., 16).
[0185] Optionally, information indicating the maximum number of motion information candidates that can be included in a motion information table can be signaled in the bitstream. The information can be signaled at the sequence level, the picture level, or the slice level. The information can indicate the maximum number of motion information candidates that can be included in the motion information table. Alternatively, the information can indicate the difference between the maximum number of motion information candidates that can be included in the motion information table and the maximum number of merge candidates that can be included in the merge candidate list.
[0186] Alternatively, the maximum number of motion information candidates that can be included in the motion information table may be determined according to a picture size, a slice size, or a coding tree unit size.
[0187] The motion information table can be initialized in units of pictures, slices, tiles, bricks, coding tree units, or coding tree unit lines (rows or columns). In this example, when a slice is initialized, the motion information table is also initialized, so the motion information table may not include any motion information candidates.
[0188] Optionally, information indicating whether the motion information table is to be initialized may be signaled in the bitstream. The information may be signaled at the slice level, tile level, tile level, or block level. A preconfigured motion information table may be used until the information indicates initialization of the motion information table.
[0189] Alternatively, information about the initial motion information candidate may be signaled in a picture parameter set or a slice header. Even when a slice is initialized, the motion information table may include the initial motion information candidate. Therefore, the initial motion information candidate may be used for the block that is the first encoding / decoding target in the slice.
[0190] Optionally, the motion information candidate included in the motion information table of the previous coding tree unit may be set as the initial motion information candidate. In an example, the motion information candidate with the smallest index or the largest index among the motion information candidates included in the motion information table of the previous coding tree unit may be set as the initial motion information candidate.
[0191] The blocks are encoded / decoded in an encoding / decoding order, and the blocks encoded / decoded based on inter prediction may be sequentially set as motion information candidates in the encoding / decoding order.
[0192] Figure 13 2 is a diagram for explaining the updating aspect of the motion information table.
[0193] For the current block, when inter prediction is performed S1301, a motion information candidate may be derived based on the current block S1302. The motion information of the motion information candidate may be set to be the same as the motion information of the current block.
[0194] When the motion information table is empty S1303 , the motion information candidate derived based on the current block may be added to the motion information table S1304 .
[0195] When the motion information table already includes motion information candidates (S1303), a redundancy check (S1305) may be performed on the motion information of the current block (or a motion information candidate derived based on the current block). The redundancy check is performed to determine whether the motion information of the pre-stored motion information candidates in the motion information table is the same as the motion information of the current block. The redundancy check may be performed on all pre-stored motion information candidates in the motion information table. Alternatively, the redundancy check may be performed on motion information candidates whose indexes exceed or fall below a threshold among the pre-stored motion information candidates in the motion information table. Alternatively, the redundancy check may be performed on a predefined number of motion information candidates. In an example, the two motion information candidates with the smallest index or the two with the largest index may be determined as targets for the redundancy check.
[0196] When a motion information candidate having the same motion information as the current block is not included, a motion information candidate derived based on the current block may be added to the motion information table S1308. Whether the motion information candidates are the same may be determined based on whether their motion information (e.g., motion vector / reference picture index, etc.) is the same.
[0197] In this regard, when the maximum number of motion information candidates is already stored in the motion information table ( S1306 ), the oldest motion information candidate may be deleted ( S1307 ), and a motion information candidate derived based on the current block may be added to the motion information table ( S1308 ). In this regard, the oldest motion information candidate may be a motion information candidate with a maximum index or a minimum index.
[0198] The motion information candidate may be identified by a corresponding index. When a motion information candidate derived from the current block is added to the motion information table, the minimum index (e.g., 0) may be assigned to the motion information candidate, and the index of the pre-stored motion information candidate may be increased by 1. In this regard, when the maximum number of motion information candidates is already stored in the motion information table, the motion information candidate with the largest index is removed.
[0199] Optionally, when adding a motion information candidate derived from the current block to the motion information table, the maximum index may be assigned to the motion information candidate. In an example, when the number of pre-stored motion information candidates in the motion information table is less than the maximum value, an index having the same value as the number of pre-stored motion information candidates may be assigned to the motion information candidate. Alternatively, when the number of pre-stored motion information candidates in the motion information table is equal to the maximum value, an index obtained by subtracting 1 from the maximum value may be assigned to the motion information candidate. Optionally, the motion information candidate with the smallest index is removed, and the indices of the remaining pre-stored motion information candidates are reduced by 1.
[0200] Figure 14 is a diagram illustrating an update aspect of a motion information table.
[0201] It is assumed that when a motion information candidate derived from the current block is added to the motion information table, the maximum index is assigned to the motion information candidate. In addition, it is assumed that the maximum number of motion information candidates has been stored in the motion information table.
[0202] When the motion information candidate HmvpCand[n+1] derived from the current block is added to the motion information table HmvpCandList, the motion information candidate HmvpCand[0] having the smallest index among the pre-stored motion information candidates may be deleted, and the indexes of the remaining motion information candidates may be reduced by 1. In addition, the index of the motion information candidate HmvpCand[n+1] derived from the current block may be set to the maximum value (for Figure 14 The example shown in , n).
[0203] When the same motion information candidate as the motion information candidate derived based on the current block is pre-stored S1305 , the motion information candidate derived based on the current block may not be added to the motion information table S1309 .
[0204] Alternatively, when adding a motion information candidate derived based on the current block to the motion information table, the pre-stored motion information candidate identical to the motion information candidate may be removed. In this case, the same effect as when the index of the pre-stored motion information candidate is re-updated is produced.
[0205] Figure 15 is a diagram illustrating an example in which indexes of pre-stored motion information candidates are updated.
[0206] When the index of the pre-stored motion information candidate that is the same as the motion information candidate mvCand derived from the current block is hIdx, the pre-stored motion information candidate may be removed, and the index of the motion information candidate with an index greater than hIdx may be reduced by 1. In an example, Figure 15 The example shown in shows that HmvpCand[2], which is the same as mvCand, is deleted in the motion information table HvmpCandList, and the indexes from HmvpCand[3] to HmvpCand[n] are decreased by 1.
[0207] Also, the motion information candidate mvCand derived based on the current block may be added to the end of the motion information table.
[0208] Alternatively, the index assigned to the same pre-stored motion information candidate as the motion information candidate derived based on the current block may be updated. For example, the index of the pre-stored motion information candidate may be changed to a minimum value or a maximum value.
[0209] The motion information of blocks included in a predetermined region may be set not to be added to the motion information table. In this example, motion information candidates derived based on the motion information of blocks included in the merge processing region may not be added to the motion information table. Since the encoding / decoding order for the multiple blocks included in the merge processing region is undefined, it is inappropriate to use the motion information of any one of the multiple blocks for inter-frame prediction of another block in the multiple blocks. Therefore, the motion information candidates derived based on the blocks included in the merge processing region may not be added to the motion information table.
[0210] Optionally, the motion information of a block smaller than a preset size may be set not to be added to the motion information table. In an example, motion information candidates derived based on the motion information of a coding block with a width or height smaller than 4 or 8 or the motion information of a coding block with a size of 4×4 may not be added to the motion information table.
[0211] When motion compensated prediction is performed on a per-subblock basis, a motion information candidate may be derived based on motion information of a representative subblock among a plurality of subblocks included in the current block. In an example, when a subblock merge candidate is used for the current block, a motion information candidate may be derived based on motion information of a representative subblock among the subblocks.
[0212] The motion vector of the sub-block can be derived in the following order. First, any one of the merge candidates included in the merge candidate list of the current block can be selected, and an initial shift vector (shVector) can be derived based on the motion vector of the selected merge candidate. Moreover, the shifted sub-block of the base sample at the position (xColSb, yColSb) can be derived by adding the initial shift vector to the position (xSb, ySb) of the base sample (e.g., the upper left sample or the center sample) of each sub-block in the coding block. The following equation 1 shows the formula for deriving the shifted sub-block.
[0213] [Equation 1]
[0214] (xColSb, yColSb) = (xSb+shVector[0]>>4, ySb+shVector[1]>>4)
[0215] Then, a motion vector of a co-located block corresponding to a center position of the sub-block including (xColSb, yColSb) may be set as a motion vector of the sub-block including (xSb, ySb).
[0216] The representative subblock may refer to a subblock including an upper left sample point, a center sample point, a lower right sample point, or a lower left sample point of the current block.
[0217] Figure 16 is a diagram showing the positions of representative sub-blocks.
[0218] Figure 16 (a) shows an example in which a sub-block located at the upper left of the current block is set as a representative sub-block, and Figure 16 (b) shows an example in which a subblock located at the center of the current block is set as a representative subblock. When motion compensation prediction is performed based on subblocks, motion information candidates for the current block can be derived based on the motion vector of the subblock including the upper left sample of the current block or the center sample of the current block.
[0219] Based on the inter prediction mode of the current block, it is determined whether the current block will be used as a motion information candidate. In this example, blocks encoded / decoded based on an affine motion model may be set to be unavailable as motion information candidates. Therefore, even though the current block is encoded / decoded using inter prediction, when the inter prediction mode of the current block is an affine prediction mode, the motion information table may not be updated based on the current block.
[0220] Alternatively, whether to use the current block as a motion information candidate may be determined based on at least one of a motion vector resolution of the current block, whether a merge offset encoding method is applied, whether combined prediction is applied, or whether triangle partitioning is applied. As an example, the current block may be set to be unusable as a motion information candidate in at least one of the following cases: a case where the motion information resolution of the current block is equal to or greater than 2 integer pixels, a case where combined prediction is applied to the current block, a case where triangle partitioning is applied to the current block, or a case where a merge offset encoding method is applied to the current block.
[0221] Alternatively, the motion information candidate may be derived based on at least one sub-block vector of a sub-block included in a block encoded / decoded based on an affine motion model. In one example, the motion information candidate may be derived using a sub-block located to the upper left, center, or upper right of the current block. Alternatively, the motion vector of the motion information candidate may be set as an average of the sub-block vectors of a plurality of sub-blocks.
[0222] Alternatively, the motion information candidate may be derived based on an average of affine seed vectors of blocks encoded / decoded according to an affine motion model. In an example, at least an average of the first affine seed vector, the second affine seed vector, or the third affine seed vector of the current block may be set as the motion vector of the motion information candidate.
[0223] Alternatively, a motion information table may be constructed for each inter prediction mode or for each prediction mode. For example, a motion information table may be constructed independently for blocks encoded / decoded using intra block copy mode and for blocks encoded / decoded using inter prediction mode. Alternatively, motion information tables may be constructed independently for blocks encoded / decoded based on a translational motion model and for blocks encoded / decoded based on an affine motion model. One of multiple motion information tables may be selected based on the prediction mode or inter prediction mode of the current block.
[0224] Figure 17 is a diagram illustrating an example of generating a motion information table for each prediction mode or each inter prediction mode.
[0225] When a block is encoded / decoded based on a non-affine motion model, the motion information candidate mvCand derived based on the block may be added to the non-affine motion information table HmvpCandList. On the other hand, when a block is encoded / decoded based on an affine motion model, the motion information candidate mvAfCand derived based on the above model may be added to the affine motion information table HmvpCandList.
[0226] The affine seed vector of the above block may be stored in a motion information candidate derived from a block encoded / decoded based on an affine motion model, and thus the motion information candidate may be used as a merge candidate for deriving the affine seed vector of the current block.
[0227] Although not shown, a motion information table for a block encoded / decoded using the intra block copy mode may be additionally defined. Figure 13 According to the embodiment shown in , the motion information table for the block encoded / decoded using the intra block copy mode may also be updated. The motion information table for the block encoded / decoded using the intra block copy mode will be described later.
[0228] Alternatively, a motion information table may be constructed for each motion vector resolution. As an example, at least one of a motion information table for storing motion information with a motion vector resolution of 1 / 16 pixels, a motion information table for storing motion information with a motion vector resolution of 1 / 4 pixels, a motion information table for storing motion information with a motion vector resolution of 1 / 2 pixels, a motion information table for storing motion information with a motion vector resolution of integer pixels, or a motion information table for storing motion information with a motion vector resolution of 4 integer pixels may be defined.
[0229] Figure 18 is a diagram illustrating an example of generating a motion information table for each motion vector resolution.
[0230] When the motion vector resolution of the block is 1 / 4 pixel, the motion information mvCand of the block may be stored in the quarter-pixel motion information table HmvpQPCandList. However, when the motion vector resolution of the block is integer pixel, the motion information mvCand of the block may be stored in the integer-pixel motion information table HmvpIPCandList. When the motion vector resolution of the block is 4 integer pixels, the motion information mvCand of the block may be stored in the 4 integer-pixel motion information table Hmvp4IPCandList.
[0231] Based on the motion vector resolution of the current block, a motion information table may be selected, and merge candidates for the current block may be derived. For example, when the motion vector resolution of the current block is 1 / 4 pixels, the quarter-pixel motion information table HmvpQPCandList is used to derive merge candidates for the current block. However, when the motion vector resolution of the current block is integer pixels, the integer-pixel motion information table HmvpIPCandList is used to derive merge candidates for the current block.
[0232] Alternatively, the motion information of a block to which the merge offset encoding method is applied may be stored in a separate motion information table.
[0233] Figure 19 is a diagram illustrating an example in which motion information of a block to which a merge offset encoding method is applied is stored in a separate motion information table.
[0234] When the merged offset vector encoding method is not applied to a block, the motion information mvCand of the block is stored in the motion information table HmvpCandList. Conversely, when the merged offset vector encoding method is applied to a block, the motion information mvCand of the block is not stored in the motion information table HmvpCandList, but is stored in the merged offset motion information table HmvpMMVDCandList.
[0235] Depending on whether the merge offset vector encoding method is applied to the current block, a motion information table may be selected. For example, when the merge offset encoding method is not applied to the current block, the motion information table HmvpCandList is used to derive merge candidates for the current block. Conversely, when the merge offset encoding method is applied to the current block, the merge offset motion information table HmvpMMVDCandList is used to derive merge candidates for the current block.
[0236] In addition to the motion information table described above, an additional motion information table may be defined. In addition to the above-described motion information table (hereinafter referred to as the first motion information table), a long-term motion information table (hereinafter referred to as the second motion information table) may be defined. In this regard, the long-term motion information table includes long-term motion information candidates.
[0237] When both the first and second motion information tables are empty, first, motion information candidates may be added to the second motion information table. After the number of motion information candidates available for the second motion information table reaches a maximum number, motion information candidates may be added to the first motion information table.
[0238] Alternatively, one motion information candidate may be added to both the second motion information table and the first motion information table.
[0239] In this regard, a filled second motion information table may not be updated any more. Alternatively, the second motion information table may be updated when the decoded area exceeds a predetermined ratio in a slice. Alternatively, the second motion information table may be updated every N coding tree unit lines.
[0240] On the other hand, whenever an encoding / decoding block is generated by inter prediction, the first motion information table may be updated. However, the motion information candidates added to the second motion information table may be set not to be used for updating the first motion information table.
[0241] Information for selecting either the first motion information table or the second motion information table may be signaled in the bitstream. When the number of merge candidates included in the merge candidate list is less than a threshold, the motion information candidate included in the motion information table indicated by the information may be added as a merge candidate to the merge candidate list.
[0242] Alternatively, a motion information table may be selected based on the size of the current block, the shape of the current block, the inter prediction mode of the current block, whether bidirectional prediction is applied to the current block, whether a motion vector is corrected, or whether triangle partitioning is applied to the current block.
[0243] Alternatively, when the number of merge candidates included in the merge candidate list is less than the maximum number even if the motion information candidates included in the first motion information table are added, the motion information candidates included in the second motion information table may be further added to the merge candidate list.
[0244] Figure 20 is a diagram illustrating an example of adding motion information candidates included in a long-term motion information table to a merge candidate list.
[0245] If the number of merge candidates included in the merge candidate list is less than the maximum number, the motion information candidates included in the first motion information table HmvpCandList may be added to the merge candidate list. If the number of merge candidates included in the merge candidate list is less than the maximum number even if the motion information candidates included in the first motion information table are added to the merge candidate list, the motion information candidates included in the long-term motion information table HmvpLTCandList may be added to the merge candidate list.
[0246] Table 1 shows a process of adding motion information candidates included in the long-term information table to a merge candidate list.
[0247]
Table 1
[0248]
[0249] Motion information candidates may be configured to include additional information in addition to motion information. In an example, at least one of the block size, shape, or partition information may be additionally stored in the motion information candidate. When configuring a merge candidate list for the current block, only motion information candidates with the same or similar size, shape, or partition information as the current block may be used among the motion information candidates, or motion information candidates with the same or similar size, shape, or partition information as the current block may be pre-added to the merge candidate list. Alternatively, a motion information table may be generated based on block size, shape, or partition information. The merge candidate list for the current block may be configured by using a motion information table from among multiple motion information tables that matches the shape, size, or partition information of the current block.
[0250] When the number of merge candidates included in the merge candidate list of the current block is less than a threshold, the motion information candidates included in the motion information table may be added to the merge candidate list as merge candidates. The additional processing is performed in an ascending or descending order reflecting the sorting of the motion information candidate indices. In this example, the motion information candidate with the largest index may be added to the merge candidate list of the current block first.
[0251] When a motion information candidate included in the motion information table is added to the merge candidate list, a redundancy check may be performed between the motion information candidate and pre-stored merge candidates in the merge candidate list. As a result of the redundancy check, a motion information candidate having the same motion information as the pre-stored merge candidate may not be added to the merge candidate list.
[0252] In an example, Table 2 shows a process of adding motion information candidates to the merge candidate list.
[0253]
Table 2
[0254]
[0255] A redundancy check may be performed only on a portion of the motion information candidates included in the motion information table. In an example, the redundancy check may be performed only on motion information candidates whose indexes exceed or fall below a threshold. Alternatively, the redundancy check may be performed only on the N motion information candidates with the largest index or the smallest index. Alternatively, the redundancy check may be performed only on a portion of the pre-stored merge candidates in the merge candidate list. In an example, the redundancy check may be performed only on merge candidates whose indexes exceed or fall below a threshold, or on merge candidates derived from a block at a specific position. In this regard, the specific position may include at least one of a left neighboring block, an upper neighboring block, an upper-right neighboring block, or a lower-left neighboring block of the current block.
[0256] Figure 21 is a diagram illustrating an example in which redundancy check is performed only on a part of merging candidates.
[0257] When a motion information candidate HmvpCand[j] is added to the merge candidate list, a redundancy check may be performed on the two merge candidates mergeCandList[NumMerge-2] and mergeCandList[NumMerge-1] with the largest index for the motion information candidate. In this regard, NumMerge may indicate the number of available spatial merge candidates and temporal merge candidates.
[0258] Unlike the example shown, when a motion information candidate HmvpCand[j] is added to a merge candidate list, a redundancy check may be performed on the two merge candidates with the smallest index for the motion information candidate. For example, it may be checked whether mergeCandList[0] and mergeCandList[1] are the same as HmvpCand[j].
[0259] Alternatively, redundancy checking may be performed only for merge candidates derived from a specific position. In an example, redundancy checking may be performed for at least one of the merge candidates derived from a neighboring block located to the left of the current block or above the current block. If no merge candidate derived from a specific position exists in the merge candidate list, the motion information candidate may be added to the merge candidate list without performing redundancy checking.
[0260] When a motion information candidate HmvpCand[j] is added to the merge candidate list, a redundancy check may be performed on the two merge candidates mergeCandList[NumMerge-2] and mergeCandList[NumMerge-1] with the largest index for the motion information candidate. In this regard, NumMerge may indicate the number of available spatial merge candidates and temporal merge candidates.
[0261] Redundancy checking for merge candidates may be performed only for a portion of the motion information candidates. In an example, redundancy checking may be performed only for N motion information candidates with large or minimum indexes among the motion information candidates included in the motion information table. In an example, redundancy checking may be performed only for motion information candidates with indices whose sum of numbers and differences from the motion information candidates included in the motion information table is less than a threshold. When the threshold is 2, redundancy checking may be performed only for the three motion information candidates with the largest index values among the motion information candidates included in the motion information table. Redundancy checking may be omitted for motion information candidates other than the three aforementioned motion information candidates. When redundancy checking is omitted, the motion information candidate may be added to the merge candidate list regardless of whether the same motion information as the merge candidate exists.
[0262] In contrast, the redundancy check is set to be performed only on motion information candidates having indexes whose sum of the numbers of motion information candidates included in the motion information table exceeds the threshold value.
[0263] The number of motion information candidates for which redundancy check is performed may be redefined in the encoder and the decoder. In an example, the threshold may be an integer such as 0, 1, or 2.
[0264] Alternatively, the threshold may be determined based on at least one of the number of merge candidates included in the merge candidate list or the number of motion information candidates included in the motion information table.
[0265] When the same merge candidate as the first motion information candidate is found, redundant checking for the same merge candidate as the first motion information candidate may be omitted in redundant checking for the second motion information candidate.
[0266] Figure 22 is a diagram illustrating an example of omitting redundant checking for a specific merge candidate.
[0267] When a motion information candidate HmvpCand[i] with an index of i is added to a merge candidate list, a redundancy check is performed between the motion information candidate and pre-stored merge candidates in the merge candidate list. In this regard, when a merge candidate mergeCandlist[j] identical to the motion information candidate HmvpCand[i] is found, a redundancy check may be performed between the motion information candidate HmvpCand[i-1] with an index of i-1 and the merge candidate without adding the motion information candidate HmvpCand[i] to the merge candidate list. In this regard, a redundancy check may be omitted between the motion information candidate HmvpCand[i-1] and the merge candidate mergeCandList[j].
[0268] In the example, Figure 22In the example shown in , HmvpCand[i] and mergeCandList[2] are determined to be the same. Therefore, a redundancy check for HmvpCand[i-1] can be performed without adding HmvpCand[i] to the merge candidate list. In this regard, a redundancy check between HmvpCand[i-1] and mergeCandList[2] can be omitted.
[0269] When the number of merge candidates included in the merge candidate list of the current block is less than a threshold value, at least one of a paired merge candidate or a zero merge candidate may be further included in addition to the motion information candidate. A paired merge candidate indicates a merge candidate having a value obtained by averaging motion vectors of more than two merge candidates as a motion vector, and a zero merge candidate indicates a merge candidate having a motion vector of 0.
[0270] For the merge candidate list of the current block, merge candidates can be added in the following order.
[0271] Spatial merging candidate - Temporal merging candidate - Motion information candidate - (Affine motion information candidate) - Pairwise merging candidate - Zero merging candidate
[0272] A spatial merge candidate refers to a merge candidate derived from at least one of a neighboring block or a non-neighboring block, and a temporal merge candidate refers to a merge candidate derived from a previous reference picture. An affine motion information candidate refers to a motion information candidate derived from a block encoded / decoded using an affine motion model.
[0273] A motion information table may be used in motion vector prediction mode. In this example, when the number of motion vector prediction candidates included in the motion vector prediction candidate list for the current block is less than a threshold, the motion information candidate included in the motion information table may be set as a motion vector prediction candidate for the current block. Specifically, the motion vector of the motion information candidate may be set as the motion vector prediction candidate.
[0274] If any one of the motion vector prediction candidates included in the motion vector prediction candidate list of the current block is selected, the selected candidate may be set as a motion vector predictor of the current block. Then, after decoding the motion vector residual value of the current block, the motion vector of the current block may be obtained by adding the motion vector predictor and the motion vector residual value.
[0275] The motion vector prediction candidate list of the current block may be configured in the following order.
[0276] Spatial motion vector prediction candidate - Temporal motion vector prediction candidate - Motion information candidate - (Affine motion information candidate) - Zero motion vector prediction candidate
[0277] A spatial motion vector prediction candidate represents a motion vector prediction candidate derived from at least one of a neighboring block or a non-neighboring block, and a temporal motion vector prediction candidate represents a motion vector prediction candidate derived from a previous reference picture. An affine motion information candidate represents a motion information candidate derived from a block encoded / decoded using an affine motion model. A zero motion vector prediction candidate represents a candidate whose motion vector value is 0.
[0278] A merge processing region larger than a coding block can be defined. The coding blocks included in the merge processing region can be processed in parallel, rather than being encoded / decoded sequentially. In this regard, not being encoded / decoded sequentially means that the order of encoding / decoding is undefined. Therefore, the encoding / decoding processes of the blocks included in the merge processing region can be processed independently. Optionally, the blocks included in the merge processing region can share merge candidates. In this regard, merge candidates can be derived based on the merge processing region.
[0279] According to the above features, the merged processing region may be referred to as a parallel processing region, a shared merge region (SMR), or a merged estimation region (MER).
[0280] Merge candidates for the current block may be derived based on the coding block. However, when the current block is included in a merge processing area larger than the current block, candidate blocks included in the same merge processing area as the current block may be set to be unavailable as merge candidates.
[0281] Figure 23 is a diagram illustrating an example in which a candidate block included in the same merge processing area as the current block is set to be unusable as a merge candidate.
[0282] exist Figure 23 In the example shown in (a), in the decoding / decoding of CU5, blocks including base samples adjacent to CU5 can be set as candidate blocks. In this regard, candidate blocks x3 and x4 included in the same merge processing region as CU5 can be set as unavailable as merge candidates for CU5. However, candidate blocks x0, x1, and x2 not included in the same merge processing region as CU5 can be set as available as merge candidates.
[0283] exist Figure 23 In the example shown in (b), in the decoding of CU8, blocks including base samples adjacent to CU8 can be set as candidate blocks. In this regard, candidate blocks x6, x7, and x8 included in the same merge processing area as CU8 can be set as unavailable as merge candidates. However, candidate blocks x5 and x9 not included in the same merge processing area as CU8 can be set as available as merge candidates.
[0284] Alternatively, when the current block is included in the merge processing region, neighboring blocks adjacent to the current block and the merge processing region may be set as candidate blocks.
[0285] Figure 24 is a diagram illustrating an example of deriving a merge candidate for a current block when the current block is included in a merge processing region.
[0286] As in Figure 24 In the example shown in (a), neighboring blocks adjacent to the current block may be set as candidate blocks for deriving a merge candidate for the current block. In this regard, candidate blocks included in the same merge processing region as the current block may be set to be unavailable as merge candidates. In this example, when deriving a merge candidate for coding block CU3, the upper neighboring block y3 and the upper right neighboring block y4 included in the same merge processing region as coding block CU3 may be set to be unavailable as merge candidates for coding block CU3.
[0287] Merge candidates may be derived by scanning neighboring blocks adjacent to the current block in a predefined order. In an example, the predefined order may be y1, y3, y4, y0, and y2.
[0288] When the number of merge candidates that can be derived from neighboring blocks adjacent to the current block is less than the value of the maximum number of merge candidates minus the offset or the maximum number, the Figure 24 The example shown in (b) derives a merge candidate for the current block by using neighboring blocks adjacent to the merge processing region. In this example, neighboring blocks adjacent to the merge processing region including the coding block CU3 may be set as candidate blocks for the coding block CU3. In this regard, the neighboring blocks adjacent to the merge processing region may include at least one of the left neighboring block x1, the upper neighboring block x3, the lower left neighboring block x0, the upper right neighboring block x4, or the upper left neighboring block x2.
[0289] Merge candidates may be derived by scanning neighboring blocks adjacent to the merge processing area in a predefined order. In an example, the predefined order may be x1, x3, x4, x0, and x2.
[0290] In summary, a merge candidate for the coding block CU3 included in the merge processing area can be derived by scanning the candidate blocks in the following scanning order.
[0291] (y1,y3,y4,y0,y2,x1,x3,x4,x0,x2)
[0292] However, the scanning order of the candidate blocks shown above is only an example of the present disclosure, and the candidate blocks may be scanned in an order different from the above example. Alternatively, the scanning order may be adaptively determined based on at least one of the size or shape of the current block or the merge processing area.
[0293] The merged processing region may be square or non-square. Information for determining the merged processing region may be signaled in a bitstream. The information may include at least one of information indicating the shape of the merged processing region or information indicating the size of the merged processing region. When the merged processing region is non-square, at least one of information indicating the size of the merged processing region, information indicating the width or height of the merged processing region, or information indicating the aspect ratio of the merged processing region may be signaled in the bitstream.
[0294] The size of the merge processing area may be determined based on at least one of information signaled in a bitstream, a picture resolution, a size of a slice, or a size of a tile.
[0295] If motion compensation prediction is performed on a block included in the merge processing region, motion information candidates derived based on motion information of the block on which motion compensation prediction is performed may be added to the motion information table.
[0296] However, if motion information candidates derived from a block included in the merge processing area are added to the motion information table, the motion information candidates derived from the block may be used in encoding / decoding of other blocks in the merge processing area whose encoding / decoding is actually slower than that of the block in the merge processing area. In other words, although dependencies between blocks should be eliminated in encoding / decoding of the block included in the merge processing area, motion prediction compensation may be performed using motion information of other blocks included in the merge processing area. To address this issue, although encoding / decoding of the block included in the merge processing area is completed, the motion information of the block for which encoding / decoding has been completed may not be added to the motion information table.
[0297] Alternatively, the motion information table may be updated using only blocks at predefined positions within the merge processing region. Examples of predefined positions may include at least one of a block located at the upper left of the merge processing region, a block located at the upper right of the merge processing region, a block located at the lower left of the merge processing region, a block located at the lower right of the merge processing region, a block located at the center of the merge processing region, a block adjacent to the right border of the merge processing region, and a block adjacent to the lower border of the merge processing region. As an example, the motion information table may be updated using only the motion information of the block adjacent to the lower right corner of the merge processing region, and the motion information of other blocks may not be used to update the motion information table.
[0298] Alternatively, after decoding of all blocks included in the merge processing area is completed, motion information candidates derived from the blocks may be added to the motion information table. That is, although the blocks included in the merge processing area are encoded / decoded, the motion information table may not be updated.
[0299] In an example, if motion compensated prediction is performed for a block included in a merge processing region, motion information candidates derived from the block may be added to a motion information table in a predefined order. In this regard, the predefined order may be determined according to a scanning order of coding blocks in the merge processing region or coding tree unit. The scanning order may be at least one of a raster scan, a horizontal scan, a vertical scan, or a zigzag scan. Alternatively, the predefined order may be determined based on the motion information of each block or the number of blocks having the same motion information.
[0300] Alternatively, a motion information candidate including unidirectional motion information may be added to the motion information table before a motion information candidate including bidirectional motion information. Conversely, a motion information candidate including bidirectional motion information may be added to the motion information table before a motion information candidate including unidirectional motion information.
[0301] Alternatively, the motion information candidates may be added to the motion information table in order of high usage frequency or low usage frequency in the merge processing region or the coding tree unit.
[0302] When the current block is included in the merge processing region and the number of merge candidates included in the merge candidate list of the current block is less than the maximum number, the motion information candidate included in the motion information table may be added to the merge candidate list. In this regard, the motion information candidate derived from the block included in the same merge processing region as the current block may be set not to be added to the merge candidate list of the current block.
[0303] Alternatively, when the current block is included in the merge processing region, the motion information candidates included in the motion information table may not be used. In other words, even if the number of merge candidates included in the merge candidate list of the current block is less than the maximum number, the motion information candidates included in the motion information table may not be added to the merge candidate list.
[0304] In another example, a motion information table for a merge processing region or coding tree unit may be configured. This motion information table temporarily stores motion information for blocks included in the merge processing region. To distinguish a general motion information table from a motion information table for a merge processing region or coding tree unit, the motion information table for the merge processing region or coding tree unit is referred to as a temporary motion information table. Furthermore, motion information candidates stored in the temporary motion information table are referred to as temporary motion information candidates.
[0305] Figure 25 is a diagram showing a temporary motion information table.
[0306] A temporary motion information table can be configured for a coding tree unit or merge processing region. When motion compensated prediction is performed on a current block included in the coding tree unit or merge processing region, the motion information of the block may not be added to the motion information table HmvpCandList. Instead, a temporary motion information candidate derived from the block may be added to the temporary motion information table HmvpMERCandList. In other words, the temporary motion information candidate added to the temporary motion information table may not be added to the motion information table. Therefore, the motion information table may not include motion information candidates derived based on the motion information of blocks included in the coding tree unit or merge processing region that includes the current block.
[0307] Alternatively, only the motion information of some of the blocks included in the merge processing area may be added to the temporary motion information table. As an example, only blocks at predefined positions within the merge processing area may be used to update the motion information table. The predefined positions may include at least one of a block located at the upper left of the merge processing area, a block located at the upper right of the merge processing area, a block located at the lower left of the merge processing area, a block located at the lower right of the merge processing area, a block located at the center of the merge processing area, a block adjacent to the right boundary of the merge processing area, and a block adjacent to the lower boundary of the merge processing area. As an example, only the motion information of the block adjacent to the lower right corner of the merge processing area may be added to the temporary motion information table, and the motion information of other blocks may not be added to the temporary motion information table.
[0308] The maximum number of temporary motion information candidates that the temporary motion information table can include may be set to be equal to the maximum number of motion information candidates that the motion information table can include. Alternatively, the maximum number of temporary motion information candidates that the temporary motion information table can include may be determined according to the size of the coding tree unit or the merge processing region. Alternatively, the maximum number of temporary motion information candidates that the temporary motion information table can include may be set to be smaller than the maximum number of motion information candidates that the motion information table can include.
[0309] The current block included in a coding tree unit or a merge processing region may be set not to use the temporary motion information table for the corresponding coding tree unit or merge processing region. In other words, when the number of merge candidates included in the merge candidate list of the current block is less than a threshold, the motion information candidates included in the motion information table may be added to the merge candidate list, and the temporary motion information candidates included in the temporary motion information table may not be added to the merge candidate list. Therefore, the motion information of other blocks included in the same coding tree unit or the same merge processing region as the current block may not be used for motion compensation prediction of the current block.
[0310] If encoding / decoding of all blocks included in the coding tree unit or the merge processing area is completed, the motion information table and the temporary motion information table may be made consistent.
[0311] Figure 26 is a diagram illustrating an example of making the motion information table and the temporary motion information table consistent.
[0312] If encoding / decoding of all blocks included in the coding tree unit or the merge processing area is completed, as in Figure 26 In the example shown in , the temporary motion information candidates included in the temporary motion information table may be updated in the motion information table.
[0313] In this regard, the temporary motion information candidates included in the temporary motion information table may be added to the motion information table in the order of insertion in the temporary motion information table (in other words, in ascending or descending order of index values).
[0314] In another example, the temporary motion information candidates included in the temporary motion information table may be added to the motion information table in a predefined order. In this regard, the predefined order may be determined based on the scanning order of coding blocks in a merge processing region or coding tree unit. The scanning order may be at least one of raster scanning, horizontal scanning, vertical scanning, or zigzag scanning. Alternatively, the predefined order may be determined based on the motion information of each block or the number of blocks having the same motion information.
[0315] Alternatively, a temporary motion information candidate including unidirectional motion information may be added to the motion information table before a temporary motion information candidate including bidirectional motion information. Conversely, a temporary motion information candidate including bidirectional motion information may be added to the motion information table before a temporary motion information candidate including unidirectional motion information.
[0316] Alternatively, the temporary motion information candidates may be added to the motion information table in order of high usage frequency or low usage frequency in the merge processing region or the coding tree unit.
[0317] When a temporary motion information candidate included in a temporary motion information table is added to the motion information table, a redundancy check may be performed on the temporary motion information candidate. In an example, if a motion information candidate identical to the temporary motion information candidate included in the temporary motion information table is pre-stored in the motion information table, the temporary motion information candidate may not be added to the motion information table. In this regard, a redundancy check may be performed on a portion of the motion information candidates included in the motion information table. In an example, a redundancy check may be performed on motion information candidates whose indexes exceed or fall below a threshold. In an example, if a temporary motion information candidate is equal to a motion information candidate whose index is higher than a predefined value, the temporary motion information candidate may not be added to the motion information table.
[0318] This can limit the use of motion information candidates derived from blocks included in the same coding tree unit or the same merge processing region as the current block as the merge candidate for the current block. To this end, block address information can be additionally stored for the motion information candidate. The block address information can include at least one of the position of the block, the address of the block, the index of the block, the position of the merge processing region including the block, the address of the merge processing region including the block, the index of the merge processing region including the block, the position of the coding tree region including the block, the address of the coding tree region including the block, or the index of the coding tree region including the block.
[0319] The intra block copy (IBC) mode is used to predict the current block from a region reconstructed before the current block in the current picture. Specifically, the prediction samples of the current block can be obtained using a reference block in a previously reconstructed region in the current picture.
[0320] Information indicating whether the intra block copy mode is used may be signaled through a bitstream. For example, a flag pred_ibc_flag indicating whether the intra block copy mode is applied to the current block may be signaled through a bitstream.
[0321] When the operation of signaling the flag pred_ibc_flag is omitted, whether the intra block copy mode is used is determined based on at least one of the size, shape or coding mode or slice type of the current block. For example, when the current block is 4×4 in size or when the coding mode of the current block is intra mode, whether the IBC mode is applied is determined based on whether the skip mode is applied to the current block. Specifically, when the current block is 4×4 in size or when the coding mode of the current block is intra mode, the current block is predicted by replacing the skip mode with the IBC mode. That is, when the current block is 4×4 in size or when the coding mode of the current block is intra mode, the reconstructed block for the current block is derived by using the current picture as a reference picture. The flag cu_skip_flag indicating whether the skip mode is applied may be signaled via the bitstream. When the skip mode is applied, the predicted samples of the current block are set to the reconstructed samples.
[0322] When the size of the current block is larger than a threshold, the IBC mode is set to be unavailable. The threshold can be 64×64 or 128×128. Alternatively, whether the intra block copy mode is used can be determined based on the size, time ID or color component of the current picture.
[0323] Figure 27 is a diagram illustrating aspects of prediction based on intra block copy mode.
[0324] The coordinate difference between the current block and the reference block can be defined as a motion vector. Specifically, the motion vector in the intra block mode can be referred to as a block vector (BV). For example, the difference dX between the x-coordinate of the upper left sample point of the current block and the x-coordinate of the upper left sample point of the reference block can be defined as a horizontal block vector (or x-axis block vector), and the difference between the y-coordinate of the upper left sample point of the current block and the y-coordinate of the upper left sample point of the reference block can be defined as a vertical block vector (or y-axis block vector).
[0325] Hereinafter, the intra block copy mode will be described in detail with reference to the accompanying drawings.
[0326] Figure 28 is a flowchart illustrating a process of predicting a current block based on an intra block copy mode according to an embodiment of the present disclosure.
[0327] First, a block vector of the current block may be derived (S2801). The block vector of the current block may be derived based on neighboring blocks adjacent to the current block. Specifically, the block vector of the current block may be derived by setting the block vector of the neighboring block to be the same as the block vector of the current block or by adding a difference vector to the block vector of the neighboring block.
[0328] The method for deriving motion vectors in inter-frame prediction mode can be applied to deriving block vectors in intra-frame block copy mode. For example, by applying merge mode to the current block, the block vector of the neighboring block can be set as the block vector of the current block. Alternatively, by applying a motion vector prediction mode to the current block, the difference vector is added to the block vector of the neighboring block to derive the block vector of the current block.
[0329] For ease of description, elements used to derive block vectors in intra block copy mode will be prefixed with "IBC". For example, the merge mode and motion vector prediction mode in intra block copy mode are referred to as IBC merge mode and IBC motion vector prediction mode, respectively. Unless otherwise described, the above embodiments for inter prediction mode can also be applied to intra block copy mode. For example, the method for deriving merge candidates and the method for updating the motion information table in inter prediction mode can be applied to deriving IBC merge candidates and updating the IBC motion information table.
[0330] Furthermore, when it is necessary to distinguish between inter prediction mode and intra block copy mode, elements used to derive motion vectors in inter prediction mode will be prefixed with "general".
[0331] Information indicating whether the IBC merge mode is applied to the current block may be signaled via the bitstream. For example, a flag, IBC_merge_flag, may be signaled via the bitstream. A flag, IBC_merge_flag, with a value of 1 indicates that the IBC merge mode is applied to the current block, and a flag, IBC_merge_flag, with a value of 0 indicates that the IBC merge mode is not applied to the current block. The flag, IBC_merge_flag, may be signaled when there are at least one or more available IBC merge candidates.
[0332] When the flag IBC_merge_flag has a value of 0, the IBC motion vector prediction mode is applied to the current block.
[0333] In the IBC merge mode, a block vector of the current block may be derived from at least one of the neighboring blocks adjacent to the current block. Here, the neighboring blocks may include at least one of an upper neighboring block adjacent to the upper side of the current block, a left neighboring block adjacent to the left side of the current block, a lower left neighboring block adjacent to the lower left corner of the current block, an upper right neighboring block adjacent to the upper right corner of the current block, and an upper left neighboring block adjacent to the upper left corner of the current block.
[0334] Specifically, the block vector of the current block may be derived from a neighboring block encoded using the intra block copy mode among neighboring blocks adjacent to the current block. The block vector of the first available neighboring block found among the neighboring blocks adjacent to the current block may be derived as the block vector of the current block.
[0335] Alternatively, IBC merge candidates may be derived from neighboring blocks coded using intra block copy mode adjacent to the current block, and the block vector of the current block may be derived from one of the IBC merge candidates. IBC merge candidates may also be derived using a co-located block of the current block. IBC merge candidates may also be derived using blocks that are not adjacent to the current block.
[0336] IBC merge candidates may be added to the IBC merge candidate list according to a predefined order.
[0337] Figure 29 is a diagram illustrating an example of an order in which IBC merge candidates are added to an IBC merge candidate list.
[0338] When the coordinates of the upper left sample point of the current block are (0, 0), block A1 refers to a block including a basic sample point at a position (-1, H-1), block B1 refers to a block including a basic sample point at a position (W-1, -1), block B0 refers to a block including a basic sample point at a position (W, -1), block A0 refers to a block including a basic sample point at a position (-1, H), and block B2 refers to a block including a basic sample point at a position (-1, -1). IBC merge candidates may be added to the IBC merge candidate list in the order of A1, B1, B0, A0, and B2.
[0339] Alternatively, the IBC merge candidate list may be constructed in a different order, for example, in the order of B1, B0, A1, A0, and B2, or in the order of B1, A1, B0, A0, and B2.
[0340] Alternatively, only one candidate block among the candidate blocks located above the current block and only one candidate block among the candidate blocks located to the left of the current block may be used to derive an IBC merge candidate. For example, only blocks A1 and B1 may be used to derive an IBC merge candidate.
[0341] Alternatively, the number or position of neighboring blocks used to derive IBC merge candidates may be set to different values depending on the size or shape of the current block. For example, the number of available neighboring blocks may be 0, 1, 2, 3, 4, or 5 depending on the size of the current block.
[0342] When the IBC merge candidate list includes multiple IBC merge candidates, index information for specifying any one of the multiple IBC merge candidates is signaled through the bitstream. For example, the block vector of the current block can be derived from the IBC merge candidate specified by the syntax element IBC_merge_idx.
[0343] The block vectors for the chrominance components can be derived by scaling the block vector for the luma component. Scaling can be performed by bit-shifting the block vector for the luma component to the right by a shift variable. The shift variable can be determined based on the color format.
[0344] The maximum number of IBC merging candidates that can be included in the IBC merging candidate list can be predefined in the encoder and decoder. For example, the maximum number of merging candidates that can be included in the IBC merging candidate list can be set to 4, 5, or 6.
[0345] Optionally, the maximum number of IBC merge candidates that can be included in the IBC merge candidate list can be set to be equal to the maximum number of merge candidates that can be included in the general merge candidate list. For example, the syntax element six_minus_max_num_merge_cand indicating the maximum number of merge candidates that can be included in the general merge candidate list can be signaled via the bitstream. The maximum number of merge candidates that can be included in the general merge candidate list and the maximum number of IBC merge candidates that can be included in the IBC merge candidate list can be derived by subtracting the value indicated by the syntax element six_minus_max_num_merge_cand from 6.
[0346] Optionally, a syntax element indicating the maximum number of IBC merge candidates that can be included in an IBC merge candidate list and a syntax element indicating the maximum number of merge candidates that can be included in a general merge candidate list may be defined separately. For example, the maximum number of IBC merge candidates that can be included in an IBC merge candidate list may be determined by the syntax element six_minus_max_IBC_num_merge_cand. The maximum number of merge candidates that can be included in a general merge candidate list may be determined by the syntax element six_minus_max_num_merge_cand.
[0347] Optionally, information indicating the difference between the maximum number of IBC merge candidates that can be included in the IBC merge candidate list and the maximum number of merge candidates that can be included in the general merge candidate list may be signaled via the bitstream. For example, a syntax element diff_num_IBC_merge_cand indicating the maximum number of merge candidates that can be included in the general merge candidate list and the maximum number of IBC merge candidates that can be included in the IBC merge candidate list may be signaled via the bitstream. The maximum number of IBC merge candidates that can be included in the IBC merge candidate list may be derived by subtracting the value indicated by the syntax element diff_num_IBC_merge_cand from the maximum number of merge candidates that can be included in the general merge candidate list.
[0348] Alternatively, the maximum number of IBC merge candidates that the IBC motion information table can include may have the same value as the maximum number of general motion information candidates that the general motion information table can include.
[0349] When the number of IBC merge candidates derived from at least one neighboring block is less than a threshold, the IBC motion information candidates included in the IBC motion information table are added as IBC merge candidates to the IBC merge candidate list. Here, the threshold can be the maximum number of IBC merge candidates that the IBC merge candidate list can include, or a value obtained by subtracting an offset from the maximum number of IBC merge candidates. The offset can be a natural number such as 1 or 2.
[0350] Figure 30 is a diagram illustrating an example of adding an IBC motion information candidate to an IBC merge candidate list.
[0351] In the example shown, the expression IBCMercgeCandList[i] denotes the IBC merge candidate with index i, and the expression HIbcCandList[j] denotes the IBC motion information candidate with index j.
[0352] When the number of IBC merge candidates included in the IBC merge candidate list is less than a threshold, the IBC motion information candidates included in the IBC motion information table are added to the IBC merge candidate list. For example, assuming that the threshold is 5, Figure 30 In (a), the number of IBC merge candidates included in the IBC merge candidate list is 2, so the number of IBC merge candidates is less than the threshold.
[0353] Therefore, the IBC motion information candidates included in the IBC motion information table may be added to the IBC merge candidate list as IBC merge candidates. Figure 30 (b) shows that three IBC motion information candidates are added to the IBC merge candidate list.
[0354] When an IBC merge candidate having the same block vector as the IBC motion information candidate exists, the IBC motion information candidate is not added to the IBC merge candidate list. The redundancy check target is the same as the example described in the method of checking redundancy between general motion information candidates and general merge candidates.
[0355] Even if an IBC motion information candidate is added to the IBC merge candidate list, when the number of IBC merge candidates included in the IBC merge candidate list is still less than the threshold, the IBC merge candidate is derived from the general merge candidate or the general motion information candidate. Specifically, after a block vector is derived based on the motion vector of the general merge candidate or the motion vector of the general motion information candidate, the IBC merge candidate having the derived block vector as motion information is added to the IBC merge candidate list. The block vector can be derived by scaling the motion vector. Scaling can be performed based on the difference in output order between the reference picture of the general merge candidate or the general motion information candidate and the current picture. When the general motion information has a bidirectional motion vector, either the L0 motion information or the L1 motion information is selected, or the one having a smaller difference in output order from the current picture is selected from the L0 motion information and the L1 motion information.
[0356] Optionally, even if the IBC motion information candidate is added to the IBC merge candidate list, when the number of IBC merge candidates included in the IBC merge candidate list is still less than the threshold, a zero block vector is added to the IBC merge candidate list. A zero block vector refers to a block vector whose horizontal and vertical components are zero.
[0357] In intra block copy mode, the operation of deriving IBC merge candidates from neighboring blocks adjacent to the current block can be omitted, and the IBC motion information table can be used to construct the IBC merge candidate list. Whether to derive IBC merge candidates from neighboring blocks can be determined based on the size or shape of the current block. For example, when the size of the current block is less than a threshold, the operation of deriving IBC merge candidates from neighboring blocks is omitted, and the IBC motion information table is used to construct the IBC merge candidate list. In this regard, the threshold may refer to at least one of the width, height, and number of samples included in the current block. For example, when the number of samples included in the current block is equal to or less than 16, the operation of deriving IBC merge candidates from neighboring blocks is omitted, and the IBC motion information table is used to construct the IBC merge candidate list. That is, when the size of the current block is equal to or less than the threshold, only the IBC motion information table is used to derive the block vector of the current block. As described above, the method of deriving block vectors by using only the IBC motion information table can be referred to as an intra block copy motion information encoding method.
[0358] The IBC motion information table may include IBC motion information candidates derived from blocks encoded / decoded using the intra block copy mode. For example, the motion information of the IBC motion information candidates included in the IBC motion information table may be set equal to the motion information of the blocks encoded / decoded based on the intra block copy mode. In this regard, the motion information may include at least one of a block vector, a motion vector resolution, and whether the IBC merge mode is applied (e.g., the value of the flag IBC_merge_flag).
[0359] Figure 31 is a diagram illustrating the updating aspect of the IBC motion information table.
[0360] IBC motion information candidates may be derived from blocks encoded / decoded using intra block copy mode or IBC merge mode, and the derived IBC motion information candidates may be added to the IBC motion information table HIbcCandList. For example, block vectors may be added to the IBC motion information table according to the encoding / decoding order of the blocks.
[0361] When the number of IBC motion information candidates included in the IBC motion information table is less than the maximum number, the block vector of the coded / decoded block is added to the IBC motion information table as a new IBC motion information candidate. However, when the number of IBC motion information candidates included in the IBC motion information table is the maximum number, one of the IBC motion information candidates included in the IBC motion information table is removed, and the block vector of the coded / decoded block is added to the IBC motion information table. For example, Figure 31 In the example shown in , when the block vector of block B4 is to be added to the IBC motion information table, the IBC motion information candidate with the lowest index is removed from the IBC motion information table.
[0362] The maximum number of IBC motion information candidates that can be included in the IBC motion information table can be predefined in the encoder and decoder. For example, the maximum number of IBC motion information candidates that can be included in the IBC motion information table can be set to 1, 2, 3, 4, 5, 6, etc.
[0363] Optionally, information indicating the maximum number of IBC motion information candidates that can be included in an IBC motion information table can be signaled via the bitstream. This information can indicate the maximum number of IBC motion information candidates that can be included in the IBC motion information table, or the difference between the maximum number of IBC motion information candidates that can be included in the IBC motion information table and the maximum number of general motion information candidates that can be included in a general motion information table. This information can be signaled at the picture level, slice level, or sequence level.
[0364] After the encoding / decoding of the current block is completed, the block vector of the current block is added to the IBC motion information table. Here, when the same IBC motion information candidate as the block vector of the current block already exists, the block vector of the current block is not added to the IBC motion information table.
[0365] Alternatively, when there is an IBC motion information candidate with the same block vector as the current block, the IBC motion information candidate with the same block vector as the current block is removed and the block vector of the current block is added to the IBC motion information table. This has the same effect as updating the index of the IBC motion information candidate with the same block vector as the current block.
[0366] When the residual of the current block is less than a threshold, the block vector of the current block is not added to the IBC motion information table. The threshold may refer to at least one of the width, height, and number of samples. For example, when the number of samples included in the current block is equal to or less than 16, the IBC motion information candidate derived from the current block is not added to the IBC motion information table.
[0367] Even when the intra block copy mode is applied to the current block, the embodiments related to the merge processing region can be applied. That is, when a neighboring block adjacent to the current block is included in the same merge processing region as the current block, the block vector of the neighboring block is set to be unavailable as an IBC merge candidate for the current block.
[0368] The size and shape of the merge processing area for the intra block copy mode may be set to be the same as those of the merge processing area for the inter prediction mode.
[0369] Optionally, information for determining the size and / or shape of the merge processing area for the intra block copy mode may be signaled via the bitstream. For example, information indicating the difference between the size of the merge processing area for the inter prediction mode and the size of the merge processing area for the intra block copy mode may be signaled via the bitstream.
[0370] When the current block is included in the merge processing region, encoding / decoding of all blocks included in the merge processing region is completed.
[0371] Even when encoding / decoding of a block included in the merge processing region is completed, a block vector of the encoded / decoded block is not added to the IBC motion information table.
[0372] Alternatively, the IBC motion information table may be updated using only blocks at predefined positions in the merge processing area. Examples of the predefined positions may include at least one of the following blocks in the merge processing area: a block located at the upper left, a block located at the upper right, a block located at the lower left, a block located at the lower right, a block located at the center, a block adjacent to the right boundary, and a block adjacent to the bottom boundary.
[0373] Information indicating whether the IBC motion information table is used in intra block copy mode may be signaled via the bitstream. For example, a flag isUsedHIbcCandList may be signaled via the bitstream. A flag isUsedHIbcCandList with a value of 0 indicates that the IBC motion information table is not available, and a flag isUsedHIbcCandList with a value of 1 indicates that the IBC motion information table is available.
[0374] When the IBC motion information table is not available, even if the number of IBC merge candidates included in the IBC merge candidate list is less than the threshold value, the IBC motion information candidate is not added to the IBC merge candidate list.
[0375] Alternatively, whether to use the IBC motion information table may be determined based on whether the current block is included in the merge processing area, the position of the current block in a picture or a slice, or the partition type of the current block.
[0376] The IBC motion information table can be initialized per preset unit. The preset unit can be a coding tree unit, multiple coding tree units, a tile, or a slice. For example, the IBC motion information table can be initialized every N coding tree units or a coding tree unit row. Here, N can be a natural number including 1.
[0377] Initializing the IBC motion information table per coding tree unit row may mean initializing the IBC motion information table whenever encoding / decoding of a coding tree unit adjacent to the left boundary of a picture starts.
[0378] When the IBC motion information table is empty or when the IBC motion information table is initialized, an initial IBC motion information candidate is added to the IBC motion information table. The initial IBC motion information candidate may have a block vector predefined in the encoder and decoder.
[0379] Alternatively, the initial IBC motion information candidate may be derived from a block encoded / decoded using the intra block copy mode in a coding tree unit adjacent to the current coding tree unit. For example, the initial IBC motion information candidate may be derived from a block included in a coding tree unit adjacent to the left or above the current coding tree unit.
[0380] Alternatively, after setting the block vector of the IBC merge candidate as the basic block vector, an offset may be added or subtracted from the basic block vector so that the block vector of the current block can be derived. For example, the block vector of the IBC merge candidate specified by the index information IBC_merge_idx is set as the basic block vector, and then the offset vector is added or subtracted from the basic block vector so that the block vector of the current block can be derived.
[0381] Information indicating whether to modify the block vector derived from the IBC merge candidate by using an offset vector may be signaled via the bitstream. For example, a flag (IBC_merge_offset_vector_flag) indicating whether to use an offset vector may be signaled via the bitstream. When the flag (IBC_merge_offset_vector_flag) has a value of 1, the offset vector is added to the block vector derived from the IBC merge candidate or subtracted from the block vector derived from the IBC merge candidate, so that the block vector of the current block is derived. When the flag (IBC_merge_offset_vector_flag) has a value of 0, the block vector derived from the IBC merge candidate is set as the block vector of the current block.
[0382] Alternatively, whether to use the offset vector may be determined based on the size, shape, or block vector accuracy of the current block.
[0383] The maximum number of IBC merge candidates that can be included in the IBC merge candidate list can be determined differently depending on whether an offset vector is used. For example, when it is determined that an offset vector is not used, the maximum number of IBC merge candidates that can be included in the IBC merge candidate list is set to M. Conversely, when it is determined that an offset vector is used, the maximum number of IBC merge candidates that can be included in the IBC merge candidate list is set to N. Here, N can be a natural number smaller than M.
[0384] For example, when it is determined to use an offset vector, only IBC merge candidates whose indexes are equal to or less than a threshold value among the merge candidates included in the IBC merge candidate list are set to be available. Specifically, among the merge candidates included in the IBC merge candidate list, only IBC merge candidate 0 and IBC merge candidate 1 whose indexes are less than 1 may be set to be available. When multiple IBC merge candidates are included in the IBC merge candidate list, index information (e.g., IBC_merge_idx) for specifying the IBC merge candidate set as a basic block vector is signaled.
[0385] Optionally, when it is determined to use the offset vector, the block vector of the first-found available neighboring block among neighboring blocks adjacent to the current block is set as the basic block vector.
[0386] When it is determined that an offset vector is used, information for determining the basic block vector and information for determining the offset vector are signaled via the bitstream. For example, index information IBC_merge_idx for specifying an IBC merge candidate included in the IBC merge candidate list to be used as the basic block vector may be signaled via the bitstream. When the IBC merge candidate list includes only one IBC merge candidate, the operation of signaling the index information is omitted.
[0387] The information used to determine the offset vector may include information for determining the size of the offset vector and information for determining the direction of the offset vector. The information indicating the size of the offset vector may be index information indicating any one of the vector size candidates. As an example, the index information distance_idx indicating any one of the vector size candidates may be signaled via a bitstream. Table 3 shows the binarization of the index information distance_idx and the value of the variable DistFromMergeMV used to determine the size of the offset vector based on distance_idx.
[0388]
Table 3
[0389] distance_idx[x][y] Binarization DistFromMergeMV[x0][y0] 0 0 4 1 10 8 2 110 16 3 1110 32 4 11110 64 5 111110 128 6 1111110 256 7 1111111 512
[0390] The size of the offset vector can be derived by dividing the variable DistFromMergeMV by a preset value. Equation 2 shows an example of determining the size of the offset vector.
[0391] Equation 2
[0392] abs(offsetMV)=DistFromMergeMV<<2
[0393] According to Equation 2, a value obtained by dividing the variable DistFromMergeMV by 4 or a value obtained by bit-shifting the variable DistFromMergeMV to the left by 2 may be set as the size of the offset vector.
[0394] A larger number of vector size candidates or a smaller number of vector size candidates than those in the example shown in Table 3 may be used, or the range of motion vector offset size candidates may be set to be different from the example shown in Table 3.
[0395] For example, the number or range of offset size candidates may be set differently depending on the resolution of the current picture. When the resolution of the current picture is equal to or greater than a predefined value, the size of the offset vector is derived using Table 3. Conversely, when the resolution of the current picture is less than the predefined value, the size of the horizontal component or vertical component of the offset vector is set to be no greater than a 2-sample distance. Table 4 shows the binarization of index information distance_idx when the resolution of the current picture is less than the predefined value and the value of the variable DistFromMergeMV used to determine the size of the offset vector based on distance_idx.
[0396]
Table 4
[0397] distance_idx[x][y] Binarization DistFromMergeMV[x0][y0] 0 0 4 1 10 8 2 110 16 3 1110 32 4 11110 64 5 11111 128
[0398] Alternatively, the range of motion vector offset size candidates may be set to different values based on block vector precision. For example, when the block vector precision for the current block is fractional pixels, the value of the variable DistFromMergeMV corresponding to the value of the index information distance_idx is set to 1, 2, 4, 8, 16, or the like. Fractional pixels may include at least one of 1 / 16 pixels, 1 / 8 pixels, 1 / 4 pixels, and 1 / 2 pixels. However, when the block vector precision for the current block is integer pixels, the value of the variable DistFromMergeMV corresponding to the value of the index information distance_idx is set to 4, 8, 16, 32, 64, or the like. In other words, the table referenced to determine the variable DistFromMergeMV may be set to different values depending on the block vector precision for the current block.
[0399] For example, when the block vector precision of the current block or the merge candidate is a quarter pixel, the variable DistFromMergeMV indicated by distance_idx is derived using Table 3. However, when the block vector precision of the current block or the merge candidate is an integer pixel, a value that is N times (e.g., 4 times) the value of the variable DistFromMergeMV indicated by distance_idx in Table 3 is derived as the value of the variable DistFromMergeMV.
[0400] The information indicating the direction of the offset vector may be index information indicating any one of the vector direction candidates. As an example, index information direction_idx indicating any one of the vector direction candidates may be signaled via a bitstream. Table 5 shows binarization of index information direction_idx and the direction of the offset vector according to direction_idx.
[0401]
Table 5
[0402]
[0403]
[0404] In Table 5, the expression sign[0] indicates the horizontal direction, and the expression sign[1] indicates the vertical direction. The expression +1 indicates that the value of the x-component or y-component of the offset vector is + (positive). The expression -1 indicates that the value of the x-component or y-component of the offset vector is - (negative). Equation 3 shows an example of determining the offset vector based on the magnitude and direction of the offset vector.
[0405] Equation 3
[0406] offsetMV[0]=abs(offsetMV)*sign[0]
[0407] offsetMV[1]=abs(offsetMV)*sign[1]
[0408] In Equation 3, the expression offsetMV[0] represents the vertical direction component of the offset vector, and the expression offsetMV[1] represents the horizontal direction component of the offset vector.
[0409] Figure 32 is a diagram illustrating an offset vector according to a value of distance_idx indicating a size of the offset vector and a value of direction_idx indicating a direction of the offset vector.
[0410] As in Figure 32 In the example shown in , the size and direction of the offset vector can be determined based on the value of distance_idx and the value of direction_idx. The maximum size of the offset vector can be set not to exceed a threshold. Here, the threshold can be a value predefined in the encoder and decoder. As an example, the threshold can be a 32-sample distance. Alternatively, the threshold can be determined based on the size of the initial motion vector. As an example, the threshold for the horizontal direction can be set based on the size of the horizontal component of the initial motion vector, and the threshold for the vertical direction can be set based on the size of the vertical component of the initial motion vector.
[0411] In IBC motion vector prediction mode, the block vector of the current block can be derived by adding the block vector predictor to the block vector difference. The block vector predictor can be derived from neighboring blocks adjacent to the current block. For example, the first block vector prediction candidate can be derived from a block located above the current block, and the second block vector prediction candidate can be derived from a block located to the left of the current block.
[0412] When multiple block vector prediction candidates are available, information specifying at least one of the multiple block vector prediction candidates is signaled via the bitstream. For example, a flag IBC_mvp_flag specifying either one of two block vector prediction candidates may be signaled via the bitstream.
[0413] The block vector difference value may be determined based on information signaled via the bitstream. The information may include information for determining the size of the block vector and information for determining the direction of the block vector.
[0414] A reference block may be specified by a block vector S2802 , and samples in the reference block specified by the block vector may be set as prediction samples of the current block S2803 .
[0415] The search for a reference block can be performed within a predetermined region. Therefore, the maximum value of the block vector of the current block can be determined as the difference between the boundary of the current block and the boundary of the predetermined region. For example, the maximum value of the block vector in the horizontal direction can be set to the difference between the left boundary of the current block and the left boundary of the predetermined region. The maximum value of the block vector in the vertical direction can be set to the difference between the upper boundary of the current block and the upper boundary of the predetermined region.
[0416] In IBC merge mode, when the maximum value of the block vector of the IBC merge candidate is greater than the maximum value of the block vector of the current block, the IBC merge candidate may be set to be unavailable. Alternatively, when the maximum value of the block vector of the IBC merge candidate is greater than the block vector of the current block, the block vector of the IBC merge candidate is changed to the maximum value of the block vector of the current block.
[0417] The predetermined area may include at least one of a current coding tree unit including the current block, a neighboring coding tree unit adjacent to the current coding tree unit, a current slice including the current block, and a current tile including the current block.
[0418] For example, a reference block may be searched from the current coding tree unit and the adjacent coding tree unit. That is, a block not included in the current coding tree unit or the adjacent coding tree unit may not be set as a reference block. Here, the adjacent coding tree unit may include at least one of a left coding tree unit adjacent to the left side of the current coding tree unit, an upper coding tree unit adjacent to the top, an upper left coding tree unit adjacent to the upper left corner, an upper right coding tree unit adjacent to the upper right corner, or a lower left coding tree unit adjacent to the lower left corner.
[0419] A partial area adjacent to a coding tree unit may be set as an unavailable area. A block included in the unavailable area may be set as a reference block that is not set as a current block. The unavailable area may be determined based on a position of the current block in the current coding tree unit. Specifically, at least one of a size of the unavailable area and a number of unavailable areas may be determined based on the position of the current block.
[0420] Figure 33 is a diagram illustrating an example of an unavailable area according to the location of a current block.
[0421] After the current coding tree unit and the neighboring coding trees are divided into a plurality of regions of the same size and shape, the unavailable region may be determined differently according to the region to which the current block belongs in the current coding tree unit. Figure 33 , it is shown that each of the current coding tree unit and the neighboring coding tree units is divided into four regions, but the coding tree unit may be divided into a smaller or greater number of regions than the shown number.
[0422] The region to which the current block belongs may be determined based on a position of a predetermined sample point in the current block. The predetermined sample point may include at least one of an upper left sample point, an upper right sample point, a lower left sample point, a lower right sample point, or a center sample point.
[0423] For example, when the current block belongs to the upper left area in the current coding tree unit, the upper left area of the left coding tree unit is set as an unavailable area.
[0424] When the current block belongs to the upper right area in the current coding tree unit, the upper left area and the upper right area of the left coding tree unit are set as unavailable areas.
[0425] When the current block belongs to the lower left area in the current coding tree unit, the upper left area, the upper right area, and the lower left area of the left coding tree unit are set as unavailable areas.
[0426] When the current block belongs to the lower right area in the current coding tree unit, the entire area of the left coding tree unit is set as an unavailable area.
[0427] Alternatively, after a block that has completed encoding / decoding and is included in a current picture is stored in a buffer having a predetermined size, a reference block may be searched from the buffer.
[0428] The size of the buffer may be predefined in the encoder and decoder. For example, a size of 128×128 or a size of 256×256 may be defined as the size of the buffer. Alternatively, the size of the buffer may be determined according to the size of the coding tree unit. For example, the buffer may be set to a size of 256*N, and N may be derived using a value obtained by dividing 128 or 64 by the size of the coding tree unit.
[0429] After the encoding / decoding of the current block is completed, the reconstructed samples of the current block are added to the buffer. Here, the reconstructed samples can be samples before or after the in-loop filter is applied.
[0430] The storage position of the current block in the buffer may be determined based on the position of the current block in the current picture. For example, the x-axis storage position of the current block in the current picture may be determined by a modulo operation of the x-axis position of the current block in the current picture and the width of the buffer. The y-axis storage position of the current block in the current picture may be determined by a modulo operation of the y-axis position of the current block in the current picture and the height of the buffer.
[0431] When the pre-stored reconstruction sample point exists at the storage location of the current reconstruction sample point, the pre-stored reconstruction sample point is replaced by the current reconstruction sample point.
[0432] When a buffer is used, a block vector represents the difference between the storage location of the current block in the buffer and the location of the reference block in the buffer. The maximum size of the block vector can be determined based on the storage location of the current block in the buffer. For example, the horizontal component of the block vector can be determined using the maximum value of the difference between the storage location of the current block in the buffer and the left edge of the buffer, and the difference between the storage location of the current block in the buffer and the right edge of the buffer. The vertical component of the block vector can be determined using the difference between the storage location of the current block in the buffer and the upper edge of the buffer.
[0433] The IBC motion information table can be initialized per preset unit. The preset unit can be a coding tree unit, multiple coding tree units, a tile, or a slice. For example, the buffer can be initialized every N coding tree units or one or more coding tree unit rows. Here, N can be a natural number including 1.
[0434] Intra prediction is a method for performing prediction on a current block by using reconstructed samples that have been encoded / decoded and are around the current block. In this regard, reconstructed samples before applying an in-loop filter may be used for intra prediction of the current block.
[0435] Intra-frame prediction methods include matrix-based intra-frame prediction and intra-frame prediction based on the direction of adjacent reconstructed samples. Information indicating the intra-frame prediction method of the current block can be signaled in the bitstream. The information can be a 1-bit flag. Optionally, the intra-frame prediction of the current block can be determined based on at least one of the position of the current block, the size of the current block, the shape of the current block, or the intra-frame prediction method of a neighboring block. In an example, when the current block appears to cross a picture boundary, it can be configured so that the matrix-based intra-frame prediction method is not applied to the current block.
[0436] Matrix-based intra prediction methods use a matrix product stored in the encoder and decoder with the matrix of reconstructed samples surrounding the current block to obtain a prediction block for the current block. Information specifying any one of multiple pre-stored matrices can be signaled in the bitstream. The decoder determines the matrix used to perform intra prediction on the current block based on this information and the size of the current block.
[0437] Generally, intra prediction is a method of obtaining a prediction block of a current block based on a non-directional intra prediction mode or a directional intra prediction mode.
[0438] The residual image can be derived by subtracting the predicted image from the original image. In this regard, when the residual image is converted to the frequency domain, the subjective image quality of the image does not significantly decrease even if the high-frequency components are removed from the frequency components. Therefore, when the value of the high-frequency component is converted to a small value, or when the value of the high-frequency component is set to 0, the compression efficiency can be improved without causing large visual distortion. Reflecting the above characteristics, a transformation can be performed on the current block so as to decompose the residual image into two-dimensional frequency components. The transformation can be performed by using a transformation method such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), etc.
[0439] The transformation method may be determined on a block basis. The transformation method may be determined based on at least one of a prediction coding mode for the current block, a size of the current block, or a size of the current block. In an example, when the current block is encoded using an intra prediction mode and the size of the current block is less than N×N, the transformation may be performed using a transformation method using DST. On the other hand, when the above conditions are not met, the transformation may be performed using a transformation method using DCT.
[0440] For some blocks of the residual image, two-dimensional image transformation may not be performed. Not performing two-dimensional image transformation may be referred to as transform skipping. When transform skipping is applied, quantization may be applied to the residual values for which the transformation is not performed.
[0441] After the current block is transformed using DCT or DST, the transformed current block may be transformed again. In this regard, the DCT or DST-based transformation may be defined as a primary transformation, and performing the transformation again on the block to which the primary transformation is applied may be defined as a secondary transformation.
[0442] The first transform may be performed by using any one of a plurality of transform kernel candidates. In an example, the first transform may be performed by using any one of DCT2, DCT8, or DCT7.
[0443] Different transform kernels may be used for the horizontal direction and the vertical direction. Information indicating a combination of the transform kernel for the horizontal direction and the transform kernel for the vertical direction may be signaled in a bitstream.
[0444] The processing unit of the first transform may be different from that of the second transform. In an example, the first transform may be performed on an 8×8 block, and the second transform may be performed on a 4×4 sub-block within the transformed 8×8 block. In this regard, the transform coefficients for the remaining areas where the second transform is not performed may be set to 0.
[0445] Alternatively, the primary transform may be performed on the 4×4 block, and the secondary transform may be performed on a region having a size of 8×8 including the transformed 4×4 block.
[0446] Information indicating whether to perform secondary transformation may be signaled in a bitstream.
[0447] Alternatively, whether to perform a secondary transform may be determined based on whether the horizontal transform kernel and the vertical transform kernel are identical. In one example, the secondary transform may be performed only when the horizontal transform kernel and the vertical transform kernel are identical. Alternatively, the secondary transform may be performed only when the horizontal transform kernel and the vertical transform kernel are different.
[0448] Alternatively, the secondary transform may be allowed only when a predefined transform kernel is used for the horizontal transform and the vertical transform. In one example, the secondary transform may be allowed when a DCT2 transform kernel is used for the horizontal transform and the vertical transform.
[0449] Alternatively, whether to perform a secondary transform may be determined based on the number of non-zero transform coefficients of the current block. In one example, when the number of non-zero transform coefficients of the current block is less than or equal to a threshold, the prediction method may be configured not to use a secondary transform. When the number of non-zero transform coefficients of the current block is greater than the threshold, the prediction method may be configured to use a secondary transform. As long as the current block is encoded using intra-frame prediction, the prediction method may be configured to use a secondary transform.
[0450] The decoder may perform an inverse transform (secondary inverse transform) relative to the secondary transform and may perform an inverse transform (first inverse transform) relative to the first transform as a result of the secondary inverse transform. As a result of performing the secondary inverse transform and the first inverse transform, a residual signal for the current block may be obtained.
[0451] When the encoder performs transformation and quantization, the decoder can obtain a residual block through inverse quantization and inverse transformation. The decoder can add the prediction block and the residual block to each other to obtain a reconstructed block for the current block.
[0452] When a reconstructed block of the current block is obtained, information loss during quantization and encoding can be reduced through in-loop filtering. The in-loop filter may include at least one of a deblocking filter, a sample adaptive offset filter (SAO), or an adaptive loop filter (ALF).
[0453] The application of the embodiments described with respect to the decoding process or encoding process to the operation of the encoding process or decoding process, respectively, may be included in the scope of the present disclosure. Within the scope of the present disclosure, the embodiment in which the operation occurs in a predetermined order may be modified to an embodiment in which the operation occurs in an order different from the predetermined order.
[0454] Although the above embodiments are described based on a series of operations or flow charts, the embodiments do not limit the temporal order of the operations of the method to this. In another example, the operations may be performed simultaneously or in a different order as needed. In addition, in the above embodiments, each component (e.g., unit, module, etc.) in the components constituting the block diagram may be implemented in the form of a hardware device or software. Multiple components may be combined with each other into a single component that can be implemented using a single hardware device or software. The above embodiments may be implemented using program instructions that can be executed via various computer components. The instructions may be recorded in a computer-readable storage medium. The computer-readable storage medium may include program instructions, data files, data structures, etc., either individually or in combination. Examples of computer-readable storage media include magnetic media (such as hard disks, floppy disks, and magnetic tapes), optical storage media (such as CD-ROMs, DVDs), and magneto-optical media (such as floppy disks), as well as hardware devices (such as ROM, RAM, flash memory, etc.) specifically configured to store and execute program instructions therein. The hardware device may be configured to operate as one or more software modules to perform the processing according to the present disclosure, or vice versa.
[0455] Industrial Applicability
[0456] The present disclosure may be applied to an electronic device that encodes / decodes a video.
Claims
1. An image decoding method, comprising: Generate an intra block copy (IBC) merge candidate list for the current block; selecting one of the IBC merge candidates included in the IBC merge candidate list; deriving a block vector for the current block based on the selected IBC merge candidate; and Obtain prediction samples of the current block based on the block vector, Generating the IBC merge candidate list includes: Based on the size of the current block, determine whether to derive IBC merge candidates from neighboring blocks, and When the size of the current block is smaller than the threshold, an IBC merge candidate is derived based on the IBC motion information table, while omitting the derivation of IBC merge candidates from neighboring blocks, and The IBC motion information table includes IBC motion information candidates derived from a block to which the IBC mode is applied before the current block.
2. The image decoding method according to claim 1, further comprising: After completing decoding of the current block, updating the IBC motion information table with the block vector of the current block, and When an IBC merge candidate identical to the block vector is included in the IBC motion information table, the IBC merge candidate is removed and the block vector is added to the IBC motion information table.
3. The image decoding method according to claim 1, wherein: When the size of the current block is smaller than a threshold, the IBC motion information table is not updated based on the block vector of the current block.
4. The image decoding method according to claim 1, wherein: The IBC merge candidate list includes IBC merge candidates derived from available neighboring blocks adjacent to the current block, and The number of available neighboring blocks is determined differently according to the size of the current block.
5. The image decoding method according to claim 1, wherein: The maximum number of IBC merge candidates that can be included in the IBC merge candidate list is equal to or smaller than the maximum number of merge candidates that can be included in the general merge candidate list.
6. An image encoding method, comprising: Generate an intra block copy (IBC) merge candidate list for the current block; selecting one of the IBC merge candidates included in the IBC merge candidate list; deriving a block vector for the current block based on the selected IBC merge candidate; and Obtain prediction samples of the current block based on the block vector, Generating the IBC merge candidate list includes: Based on the size of the current block, determine whether to derive IBC merge candidates from neighboring blocks, and When the size of the current block is smaller than the threshold, an IBC merge candidate is derived based on the IBC motion information table, while omitting the derivation of IBC merge candidates from neighboring blocks, and The IBC motion information table includes IBC motion information candidates derived from a block to which the IBC mode is applied before the current block.
7. The image encoding method according to claim 6, further comprising: After completing decoding of the current block, updating the IBC motion information table with the block vector of the current block, and When an IBC merge candidate identical to the block vector is included in the IBC motion information table, the IBC merge candidate is removed and the block vector is added to the IBC motion information table.
8. The image encoding method according to claim 6, wherein: When the size of the current block is smaller than a threshold, the IBC motion information table is not updated based on the block vector of the current block.
9. The image encoding method according to claim 6, wherein: The IBC merge candidate list includes IBC merge candidates derived from available neighboring blocks adjacent to the current block, and The number of available neighboring blocks is determined differently according to the size of the current block.
10. The image encoding method according to claim 6, wherein: The maximum number of IBC merge candidates that can be included in the IBC merge candidate list is equal to or smaller than the maximum number of merge candidates that can be included in the general merge candidate list.
11. An image decoding apparatus, comprising: a prediction unit, generating an intra block copy (IBC) merge candidate list for a current block, selecting an IBC merge candidate from among the IBC merge candidates in the IBC merge candidate list, deriving a block vector of the current block based on the selected IBC merge candidate, and obtaining a prediction sample of the current block based on the block vector, wherein generating the IBC merge candidate list includes determining whether to derive IBC merge candidates from neighboring blocks based on the size of the current block, and when the size of the current block is less than a threshold, deriving IBC merge candidates based on the IBC motion information table while omitting deriving IBC merge candidates from neighboring blocks, and The IBC motion information table includes IBC motion information candidates derived from a block to which the IBC mode is applied before the current block.
Citation Information
Patent Citations
Method of Intra Picture Block Copy for Screen Content and Video Coding
US20170280159A1