Video encoding / decoding method, apparatus, and recording medium using integrated geometric split prediction

By segmenting blocks using geometric boundaries and configuring diverse prediction modes, the method addresses limitations in conventional video encoding/decoding, enhancing efficiency in high-resolution video compression.

WO2025216542A1PCT designated stage Publication Date: 2025-10-16ELECTRONICS & TELECOMM RES INST
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2025/004770
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-10-24
Filing Date
2025-04-08
Publication Date
2025-10-16

AI Technical Summary

Technical Problem

Conventional image compression methods, particularly in high-resolution and high-quality video encoding/decoding, face limitations in applying geometric partitioning modes to intra-screen prediction and are restricted in the diversity of prediction methods, leading to inefficiencies in encoding efficiency.

Method used

The method involves configuring a prediction mode list for a current block, determining candidates, and segmenting the block using geometric segmentation boundaries defined by angles and offsets, allowing for diverse prediction methods through geometric segmentation.

Benefits of technology

This approach enhances encoding efficiency by enabling more diverse prediction combinations and improving compression efficiency in high-resolution video encoding/decoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2025004770_16102025_PF_FP_ABST
    Figure KR2025004770_16102025_PF_FP_ABST
Patent Text Reader

Abstract

In an image encoding / decoding method, apparatus, and recording medium of the present disclosure, the image encoding / decoding method may comprise the steps of: configuring a prediction mode list of the current block; determining at least one candidate from the prediction mode list of the current block; and obtaining a prediction block of the current block on the basis of the determined candidate.
Need to check novelty before this filing date? Find Prior Art

Description

Video encoding / decoding method, device, and recording medium using integrated geometric segmentation prediction

[0001] The present disclosure relates to a video encoding / decoding method, device, and recording medium, and more specifically, may relate to geometric segmentation prediction.

[0002] Recently, the demand for high-resolution, high-quality images, such as HD (High Definition) and UHD (Ultra High Definition) images, is increasing across various application fields. As image data becomes higher in resolution and quality, the relative amount of data increases compared to conventional image data. Therefore, transmitting image data using existing media such as wired or wireless broadband lines or storing it using existing storage media leads to increased transmission and storage costs. To address these issues arising as image data becomes higher in resolution and quality, high-efficiency image encoding / decoding technologies for images with higher resolution and quality may be required.

[0003] There are various technologies for image compression, such as inter-picture prediction technology that predicts pixel values ​​included in the current picture from pictures before or after the current picture, intra-picture prediction technology that predicts pixel values ​​included in the current picture using pixel information in the current picture, transformation and quantization technology for compressing the energy of the residual signal, and entropy coding technology that assigns short codes to values ​​with high appearance frequency and long codes to values ​​with low appearance frequency. Using these image compression technologies, image data can be effectively compressed and transmitted or stored.

[0004] In encoding / decoding of coding units within an image using the conventional geometric partitioning mode, a signal obtained by weighting the reference signals predicted between the unidirectional screens for each of the two linearly divided regions can be used as a new prediction signal as an inter-screen prediction mode. However, this has the problem that it cannot be applied to intra-screen prediction. In addition, the cases where the conventional geometric partitioning mode can be applied are as a sub-mode of the conventional prediction mode, and there is a disadvantage that various prediction methods can only be applied to a limited extent to the geometric partitioning mode.

[0005] The video encoding / decoding method, device, and recording medium of the present disclosure may include the steps of: configuring a prediction mode list of a current block; determining at least one candidate from the prediction mode list of the current block; and obtaining a prediction block of the current block based on the determined candidate.

[0006] In the video encoding / decoding method, device, and recording medium of the present disclosure, in response to the determined candidate being a geometric segmentation mode, the current block can be segmented by a geometric segmentation boundary.

[0007] In the video encoding / decoding method, device, and recording medium of the present disclosure, the geometric segmentation boundary can be determined by an angle formed by the geometric segmentation boundary with the x-axis and an offset distance from the lower left boundary of the current block.

[0008] In the video encoding / decoding method, device, and recording medium of the present disclosure, the geometric segmentation boundary is determined as one of a plurality of geometric segmentation boundaries available to the current block, and the intervals between the plurality of geometric segmentation boundaries may be equal.

[0009] In the video encoding / decoding method, device, and recording medium of the present disclosure, the geometric segmentation boundary is determined as one of a plurality of geometric segmentation boundaries available to the current block, and the number of the plurality of geometric segmentation boundaries can be determined based on the presence or absence of surrounding restoration pixels of the current block.

[0010] In the video encoding / decoding method, device, and recording medium of the present disclosure, the prediction mode list of the current block may include a plurality of geometric segmentation boundaries as candidates.

[0011] In the video encoding / decoding method, device, and recording medium of the present disclosure, the plurality of geometric segmentation boundaries may include geometric segmentation boundaries that are identical or similar to geometric segmentation boundaries of adjacent areas of the current block.

[0012] In the video encoding / decoding method, device, and recording medium of the present disclosure, the plurality of geometric segmentation boundaries may include geometric segmentation boundaries that are identical or similar to geometric segmentation boundaries of a template area matching the template area of ​​the current block.

[0013] In the video encoding / decoding method, device, and recording medium of the present disclosure, one candidate of the prediction mode list of the current block can be obtained based on a motion vector of a spatially adjacent block, a spatially non-adjacent block, or a temporally adjacent block.

[0014] The present disclosure provides a method, a device, and a recording medium storing a bitstream that can provide an improved geometric segmentation mode by geometrically segmenting a block within a picture and enabling a more diverse combination of prediction methods compared to conventional methods in order to improve encoding efficiency.

[0015] FIG. 1 is a block diagram showing a configuration according to one embodiment of an encoding device to which the present disclosure is applied.

[0016] FIG. 2 is a block diagram showing a configuration according to one embodiment of a decryption device to which the present disclosure is applied.

[0017] Figure 3 is a diagram schematically showing the division structure of an image when encoding and decoding an image.

[0018] Figure 4 is a diagram illustrating the form of a prediction unit that a coding unit can include.

[0019] Figure 5 is a diagram illustrating the form of a transformation unit that can be included in a coding unit.

[0020] Figure 6 illustrates the division of blocks according to an example.

[0021] Figure 7 is a diagram for explaining an embodiment of an intra prediction process.

[0022] Figure 8 is a diagram for explaining reference samples used in the intra prediction process.

[0023] Figure 9 is a diagram for explaining an embodiment of an inter prediction process.

[0024] Figure 10 shows spatial candidates according to an example.

[0025] Figure 11 shows the order of adding motion information of spatial candidates to the merge list according to an example.

[0026] Figure 12 illustrates the process of transformation and quantization according to an example.

[0027] Figure 13 illustrates diagonal scanning according to an example.

[0028] Figure 14 illustrates horizontal scanning according to an example.

[0029] Figure 15 illustrates vertical scanning according to an example.

[0030] Fig. 16 is a structural diagram of an encoding device according to one embodiment.

[0031] Fig. 17 is a structural diagram of a decryption device according to one embodiment.

[0032] Fig. 18 illustrates an example of an image encoding method and device for encoding an image based on a geometric segmentation mode.

[0033] Fig. 19 illustrates an example of an image decoding method and device for decoding an image based on a geometric segmentation mode.

[0034] Figure 20 shows an example of the upper left sample location of the prediction block of the current block.

[0035] Figure 21 illustrates examples of proposed candidates for the IBC merge list.

[0036] Figure 22 illustrates one embodiment of template matching.

[0037] Figures 23 to 28 each illustrate an example of a search method in template matching.

[0038] Figure 29 illustrates a first template configuration method in affine mode according to an example.

[0039] Figure 30 illustrates a second template configuration method in affine mode according to an example.

[0040] Figure 31 illustrates an example of a specific location around a target block for determining an average template.

[0041] Figure 32 illustrates a two-sided matching according to an example.

[0042] Figure 33 illustrates examples of non-adjacent blocks whose distance from at least one of the top and left boundaries of the target block is N.

[0043] Figure 34 illustrates an example of a template area of ​​a template-based on-screen prediction mode derivation method.

[0044] Figure 35 illustrates an example of an intra-screen prediction mode derivation process in a decoder-side intra-screen prediction mode derivation method.

[0045] Figure 36 illustrates an example of calculating gradients for restored samples around a chrominance block and restored samples around a luminance block corresponding to the chrominance block, and deriving prediction modes within a chrominance screen based on the calculated gradients.

[0046] Figure 37 illustrates a conceptual diagram of a template matching prediction method.

[0047] Figure 38 illustrates an embodiment in which a template matching block vector derived by a template matching prediction method can be referenced in a current block to which an in-screen block copy mode is applied.

[0048] Figure 39 shows an example of a predefined search area of ​​the current block.

[0049] Figure 40 illustrates the steps of a geometric segmentation-based prediction method in terms of encoding.

[0050] Figure 41 illustrates the steps of a geometric segmentation-based prediction method in terms of decryption.

[0051] Figure 42 shows an example of a geometric segmentation boundary.

[0052] Figure 43 shows an example of a geometric segmentation mode with equal angles.

[0053] Figure 44 shows an example of the distance between geometric segmentation modes.

[0054] Figure 45 shows an example of a geometric segmentation boundary determined by a sub-offset.

[0055] Figure 46 shows an example of a segmentation boundary in the geometric segmentation mode.

[0056] Figure 47 illustrates an example in which the segmentation boundary of the geometric segmentation method is limited.

[0057] Figure 48 illustrates an example of a geometric segmentation method with a restricted segmentation boundary.

[0058] Figure 49 illustrates an example of calculating an error cost based on the difference between pixel values ​​of template areas based on reference templates for each of two template areas.

[0059] Figure 50 illustrates a method for calculating error costs by applying an on-screen prediction mode to two geometrically divided areas.

[0060] Figure 51 illustrates a method for calculating error costs by applying an intra-screen prediction mode to one of two geometrically divided regions and an inter-screen prediction mode to the other.

[0061] Figures 52 and 53 illustrate examples of a method for calculating error costs by applying intra-screen prediction or inter-screen prediction to one of two geometrically divided regions.

[0062] Figure 54 illustrates an example of adjacent / non-adjacent blocks in which the split boundary mode is used.

[0063] Figure 55 illustrates examples of surrounding blocks that exist at a specific distance from the current block and whose geometric segmentation boundary information can be included in the list of geometric segmentation boundary candidates.

[0064] FIG. 56 is a diagram illustrating an example in which a segmentation boundary mode having an angle parallel to or similar to a directional prediction mode in the MPM list for in-screen prediction of the current block is included in the geometric segmentation boundary list.

[0065] FIG. 57 is a diagram illustrating an example in which a segmentation boundary mode having an angle parallel to or similar to a direction perpendicular to a directional prediction mode within an MPM list for in-screen prediction of the current block is included in the geometric segmentation boundary list.

[0066] FIG. 58 is a diagram illustrating an example in which a segmentation boundary mode having an angle parallel to or similar to the directional prediction mode induced through the DIMD of the current block is included in the geometric segmentation boundary list.

[0067] FIG. 59 is a diagram illustrating an example in which a segmentation boundary mode having an angle parallel to or similar to a direction perpendicular to the directional prediction mode induced through the DIMD of the current block is included in the geometric segmentation boundary list.

[0068] FIG. 60 is a diagram illustrating an example in which a segmentation boundary mode having an angle parallel to or similar to the directional prediction mode induced through the TIMD of the current block is included in the geometric segmentation boundary list.

[0069] FIG. 61 is a diagram illustrating an example in which a segmentation boundary mode having an angle parallel to or similar to a direction perpendicular to the directional prediction mode induced through the TIMD of the current block is included in the geometric segmentation boundary list.

[0070] Figure 62 illustrates an example of including a segmentation boundary mode in a geometric segmentation boundary list based on the intersection of the current block and an adjacent block decoded / encoded in geometric segmentation mode.

[0071] Figure 63 shows an example of calculating the error cost by applying my prediction to the two template areas that are divided.

[0072] Figure 64 illustrates an example of calculating error cost by applying inter-screen prediction to two template areas that are divided.

[0073] Figure 65 illustrates an example of calculating error cost by applying inter-screen prediction to two template areas that are divided.

[0074] Figure 66 illustrates an example of a list of geometric segmentation boundaries.

[0075] Figure 67 illustrates an example of a list of geometric segmentation boundaries.

[0076] Figure 68 illustrates an example of a list of geometric segmentation boundaries.

[0077] Figure 69 illustrates an example of a list of geometric segmentation boundaries.

[0078] Figure 70 illustrates an example of a list of geometric segmentation boundaries.

[0079] Figure 71 shows an example in which a blending matrix is ​​determined for a CU of size 16x16.

[0080] Figure 72 shows an example in which a blending matrix is ​​determined for a CU of size 16x16.

[0081] Figure 73 illustrates an example in which a pair of weight matrices determined by geometric segmentation boundary information and a prediction signal generated by the prediction mode of each segmentation area are weighted and combined.

[0082] Figure 74 illustrates an example of deriving the interval of an interval through the difference (first derivative) between neighboring pixels in the pixel line around the current block.

[0083] Figure 75 illustrates an example of deriving the interval of an interval through the difference (second derivative) of the difference values ​​between neighboring pixels in the pixel line around the current block.

[0084] Figure 76 illustrates an example of determining a threshold T using the amount of change in brightness in the vertical direction for a geometric segmentation boundary.

[0085] Figure 77 shows an example where deblocking filtering is not applied at the geometric segmentation boundary locations.

[0086] Figure 78 shows an example in which deblocking filtering is not applied to an area corresponding to a location that is a threshold value T away from the geometric segmentation boundary.

[0087] Figure 79 illustrates an example where sample adaptive offset is not applied at the geometric segmentation boundary locations.

[0088] Figure 80 illustrates an example in which the sample adaptive offset is not applied to an area corresponding to a location that is a threshold value T away from the geometric segmentation boundary.

[0089] Figure 81 illustrates an example in which a prediction mode buffer, a motion vector buffer, and an in-screen prediction mode buffer store multiple pieces of prediction information.

[0090] Figure 82 illustrates an example in which a prediction mode buffer, a motion vector buffer, and an in-screen prediction mode buffer store multiple pieces of prediction information.

[0091] Figure 83 illustrates an example in which a prediction mode buffer, a motion vector buffer, and an in-screen prediction mode buffer store multiple pieces of prediction information.

[0092] Figure 84 illustrates an example of constructing a template (current template) for the current block using surrounding pixels of the current block.

[0093] Figure 85 illustrates an example of constructing a template (current template) for the current block using surrounding pixels of the current block.

[0094] Figure 86 shows an example of a GPM merge list.

[0095] Figure 87 illustrates an example of syntax for a selected motion vector in the GPM motion vector candidate list.

[0096] Figure 88 shows an example of weights applied to GPM.

[0097] Figure 89 illustrates an embodiment of applying in-screen prediction to each of two geometrically segmented regions.

[0098] Figure 90 shows an example of a template reference area of ​​the current block.

[0099] Figure 91 illustrates an example of a method for improving a prediction signal by applying template matching to an area determined in inter-screen prediction mode.

[0100] Figure 92 illustrates an example of a method for improving a prediction signal by applying motion vector difference to an area determined in inter-screen prediction mode.

[0101] Figure 93 illustrates an example in which the reference area is divided based on the location where the extension of the segmentation boundary meets the reference pixel line.

[0102] Figure 94 shows an example of a geometrically segmented region.

[0103] Figures 95 and 96 illustrate examples of fixing the on-screen prediction mode for one of the two divided areas to one mode, such as Planar or DC.

[0104] Figure 97 is a diagram for explaining an example in which a prediction signal for one of two divided areas is determined by the difference between a prediction signal generated by a conventional on-screen prediction method and an original signal corresponding to an area to which the conventional on-screen prediction method is not applied.

[0105] Figure 98 shows an example of a band for determining a representative value for a prediction signal in the P1 region.

[0106] Figure 99 is a drawing for explaining an example of transmitting segmentation information and one integer value for a block to which a prediction mode is applied within one screen.

[0107] FIG. 100 is a drawing for explaining an example of transmitting an index of a location of a sample value of a surrounding reference area having a weighted similar value to the samples of the original image area.

[0108] FIG. 101 illustrates an example of an image encoding method and device for encoding an image based on the screen block copy mode of the present disclosure.

[0109] FIG. 102 illustrates an example of an image decoding method and device for decoding an image based on the screen block copy mode of the present disclosure.

[0110] The adjacent blocks (A1, B1, B0, A0, B2) around the current block of Fig. 103 are shown.

[0111] Figure 104 illustrates an embodiment of adding a pairwise average block vector to a block vector candidate list.

[0112] Figure 105 illustrates an embodiment of a block vector list in which template matching costs are calculated for each candidate in the block vector candidate list and the block vector list is sorted in ascending order according to the template matching costs.

[0113] FIG. 106 illustrates an embodiment in which a pairwise average candidate block vector derived through the embodiment of FIG. 105 is added to a block vector candidate list.

[0114] Figure 107 shows examples of adjacent blocks according to each tree division.

[0115] Figure 108 illustrates an example of sharing and using the block vector candidate list of an upper block with a lower block.

[0116] Figure 109 shows an example of flags and indices regarding the size of the AMVR rounding shift value.

[0117] Figure 110 illustrates part of the coding unit syntax related to amvr_flag and amvr_precision_idx.

[0118] Figure 111 illustrates part of the syntax related to amvr_precision_idx.

[0119] Figure 112 illustrates an example of the relationship between the resolution of a prediction block vector and the resolution at which template matching is performed.

[0120] Figure 113 shows an example of the relationship between the resolution of a prediction block vector and the resolution at which template matching is performed.

[0121] Figure 114 illustrates an example of the relationship between the resolution of a prediction block vector and the resolution at which template matching is performed.

[0122] Figure 115 shows examples of encoded / decoded pixel areas at the top, left, and upper left positions of the current block.

[0123] Figure 116 illustrates an example in which some areas of the encoding / decoding area around the current block are excluded from the template area.

[0124] Figure 117 shows examples of various templates determined using available pixels in the encoding / decoding areas around the current block.

[0125] Figure 118 illustrates an example in which the template matching search start position is determined based on the upper left position of the current block and the predicted block vector.

[0126] Figure 119 illustrates an example in which the template matching search start position is determined based on the upper left position of the current block and the predicted block vector.

[0127] Figure 120 illustrates an example in which the template matching search start position is determined based on the upper left position of the current block and the predicted block vector.

[0128] Figure 121 illustrates an example in which the template matching search start position is determined based on the upper left position of the current block and the predicted block vector.

[0129] Figure 122 illustrates an example of a template matching search start position.

[0130] Figure 123 shows an example of weights for calculating template costs between the template of the current block and the reference template.

[0131] Figure 124 illustrates an example of obtaining a temporal prediction vector of the current block.

[0132] Figure 125 shows an example of non-adjacent blocks around the current block.

[0133] Figure 126 shows examples of the distance between the current picture and colpic and the distance between the current picture and a reference picture.

[0134] Figure 127 is a drawing defining the scaling factor in Figure 126.

[0135] Figure 128 illustrates an example of a temporal prediction block reference region determined by a shift vector.

[0136] Figure 129 shows pixels at the center, top left, top right, bottom left, and bottom right positions within a temporal prediction block.

[0137] Figure 130 illustrates an example of the order in which a temporal prediction block reference region is scanned.

[0138] Figure 131 illustrates an embodiment where sub-block based block vector prediction is applied to the current block.

[0139] Figure 132 illustrates an embodiment where sub-block based block vector prediction is applied to the current block.

[0140] Figure 133 illustrates an embodiment of constructing a prediction block for a current block using a sub-block unit prediction block vector.

[0141] Figure 134 illustrates an example of obtaining a block vector differential value when the current block is not an intra-screen block copy based on a sub-block unit predicted block vector.

[0142] FIG. 135 illustrates an embodiment of a method for determining a reference block based on a block vector and configuring a sub-block unit prediction block when the current block is an in-screen block copy based on a sub-block unit prediction block vector.

[0143] FIG. 136 illustrates an embodiment of a method for determining a reference block based on a prediction block vector and configuring a sub-block unit prediction block when the current block is an in-screen block copy based on a sub-block unit prediction block vector.

[0144] Figure 137 illustrates an embodiment of configuring a final prediction block for the current CU when applying IBC-GPM.

[0145] FIG. 138 illustrates an embodiment in which at least one restored sample (or line, block, or region) adjacent to or around a current block is used as a template, and the gradient value for each sample within the template region is obtained for each of the horizontal (Gx) and vertical (Gy) directions.

[0146] Figure 139 illustrates an example of generating multiple templates using an area of ​​a predetermined size around the current block (or target block).

[0147] Figure 140 illustrates an embodiment in which at least one sample (or line, block, or region) within a prediction block of a current block is used as a template, and gradient values ​​for each sample within the template region are obtained for each of the horizontal (Gx) and vertical (Gy) directions.

[0148] FIG. 141 illustrates an embodiment in which at least one restored sample (or line, block, or region) within a restored block of a current block is used as a template, and gradient values ​​for each sample within the template region are obtained for each of the horizontal (Gx) and vertical (Gy) directions.

[0149] Figure 142 illustrates an example of deriving a gradient histogram (HoG) by constructing at least one reference line (or a group of pixels or samples, a group of pixels including at least one pixel) within a pre-specified template or restored reference area.

[0150] Figures 143 and 144 illustrate examples of constructing a prediction template using a reference template or samples within a reference template that are adjacent to the template of the current block or are composed of samples or lines adjacent to the current block.

[0151] Figure 145 illustrates an example of constructing a prediction template using a reference template consisting of samples or lines adjacent to the current block or samples within the reference template.

[0152] Figure 146 illustrates an example of a multiple reference line (MRL).

[0153] Figure 147 shows an example of a TIMD list.

[0154] Figure 148 shows an example of dividing the current block into sub-partitions using the ISP method.

[0155] Figures 149 and 150 illustrate examples in which intra-screen sub-partition (ISP) prediction is performed sequentially.

[0156] Figure 151 illustrates an example of configuring a template for each sub-partition.

[0157] Figure 152 illustrates an embodiment of a method for deriving and storing an intra-screen prediction mode of a block encoded in a prediction mode other than the intra-screen prediction mode.

[0158] Figure 153 is a conceptual diagram of a histogram buffer for each prediction mode within the above screen.

[0159] Figure 154 illustrates the concept of a screen template matching prediction method.

[0160] Figure 155 illustrates the concept of a screen template matching prediction method.

[0161] Figure 156 illustrates an embodiment of transforming / improving a unidirectional motion vector into a block vector candidate of the current block.

[0162] Figure 157 illustrates an embodiment of transforming / improving a unidirectional motion vector into a block vector candidate bv of the current block.

[0163] Figure 158 is a drawing for explaining the scaling process of the present disclosure.

[0164] FIG. 159 illustrates an embodiment of transforming / improving a motion vector into a block vector candidate when the motion vector is a bidirectional motion vector and one of the two reference pictures is a picture older than the current picture and the other is a picture future than the current picture.

[0165] Figure 160 illustrates an embodiment of transforming / improving a motion vector into a block vector candidate when the motion vector is a bidirectional motion vector and two reference pictures are pictures older than the current picture.

[0166] Figure 161 illustrates an embodiment of transforming / improving a motion vector into a block vector candidate when the motion vector is a bidirectional motion vector and two reference pictures are pictures in the future relative to the current picture.

[0167] Figure 162 illustrates an embodiment of transforming / improving a motion vector into a block vector candidate when the motion vector is a bidirectional motion vector and two reference pictures are identical.

[0168] Figure 163 illustrates an example of a list of candidate vectors for template matching blocks within a screen.

[0169] Figure 164 illustrates an example of a list of candidate vectors for template matching blocks within a screen.

[0170] FIG. 165 illustrates an example of excluding or including block vector candidates that point out an area outside the search area of ​​the on-screen template matching within the on-screen block copy block vector candidate list.

[0171] Figure 166 shows an example of a block vector in the luminance domain corresponding to the current chrominance block.

[0172] Figure 167 shows an example of a block vector adjacent to the luminance area corresponding to the current chrominance block.

[0173] Figure 168 shows an example of a block vector adjacent to the current chrominance block.

[0174] Figure 169 illustrates an example in which block vectors of various shapes of CUs within a luminance region corresponding to the current chrominance block are determined.

[0175] Figure 170 illustrates an example in which sbBVP and / or sbTBVP block vector prediction is applied to a corresponding luminance block corresponding to the current chrominance block.

[0176] Figure 171 illustrates examples of cases where some areas of a reference block determined by the location indicated by the block vector include areas outside the picture boundary and cases where they do not include areas outside the picture boundary.

[0177] Figure 172 illustrates an example in which the area outside the reference picture boundary is repeatedly padded with the same pixel values ​​as the adjacent pixel values ​​within the reference picture boundary.

[0178] Figure 173 illustrates an example in which one of the reference blocks extends outside the boundary of the reference picture and one is contained within the interior of the reference picture.

[0179] Figure 174 illustrates an embodiment of motion compensation based padding for the current block, which is an in-screen block copy block.

[0180] Figure 175 illustrates an embodiment of motion compensation based padding for the current block, which is an in-screen block copy block.

[0181] Figure 176 illustrates an embodiment of motion compensation based padding for the current block, which is an in-screen block copy block.

[0182] Figure 177 illustrates an embodiment of motion compensation based padding for the current block, which is an in-screen block copy block.

[0183] Figure 178 shows an example of the definition of boundary values ​​in a motion compensation-based padding method.

[0184] Figure 179 shows an example of prediction block derivation of a luminance component block when both xd and yd are negative integers.

[0185] Figure 180 illustrates an example in which the prediction encoding mode of the luminance component sub-block corresponding to the chrominance component block is the same.

[0186] Figure 181 illustrates an example in which the prediction encoding modes of the luminance component sub-blocks corresponding to the chrominance component blocks are different.

[0187] This disclosure may be subject to various modifications and various embodiments. Specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the disclosure to specific embodiments, but rather to encompass all modifications, equivalents, and alternatives falling within the spirit and technical scope of the disclosure.

[0188] The detailed description of the exemplary embodiments described below refers to the accompanying drawings, which illustrate specific embodiments by way of example. These embodiments are described in sufficient detail to enable those skilled in the art to practice the embodiments. It should be understood that the various embodiments, while different from each other, are not necessarily mutually exclusive. For example, specific shapes, structures, and characteristics described herein may be implemented in other embodiments without departing from the spirit and scope of the present disclosure. Furthermore, it should be understood that the positions or arrangements of individual components within each disclosed embodiment may be modified without departing from the spirit and scope of the embodiment. Accordingly, the following detailed description is not intended to be limiting, and the scope of the exemplary embodiments, if properly described, is defined only by the appended claims, along with the full scope of equivalents to which such claims are entitled.

[0189] Similar reference numerals in the drawings indicate identical or similar functions throughout. The shapes and sizes of elements in the drawings may be exaggerated for clarity.

[0190] Although terms such as "first" and "second" may be used to describe various components in this disclosure, these components should not be limited by these terms. These terms are used solely to distinguish one component from another. For example, without departing from the scope of the present disclosure, a first component could be referred to as a "second component," and similarly, a second component could also be referred to as a "first component." The term "and / or" may encompass any combination of multiple related items described herein or any one of multiple related items described herein.

[0191] When a component is referred to as being "connected" or "connected" to another component, it should be understood that the two components may be directly connected or connected to each other, but that there may be another component between the two components. Conversely, when a component is referred to as being "directly connected" or "directly connected" to another component, it should be understood that no other component exists between the two components.

[0192] The components shown in the embodiments are depicted independently to represent different characteristic functions, and do not imply that each component is composed of separate hardware or a single software configuration unit. That is, each component is listed and included as a separate component for convenience of explanation, and at least two components among each component may be combined to form a single component, or a single component may be divided into multiple components to perform a function, and integrated and separate embodiments of each of these components are also included in the scope of the present disclosure as long as they do not deviate from the essence of the present disclosure.

[0193] The terms used in the embodiments are used only to describe specific embodiments and are not intended to limit the present disclosure. The singular expression includes the plural expression unless the context clearly indicates otherwise. In the embodiments, it should be understood that the terms "comprises" or "has" indicate the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, but do not exclude in advance the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof. In other words, the description in the embodiments as "comprising" a specific configuration does not exclude configurations other than the specified configuration, and means that additional configurations may also be included in the scope of the implementation of the present disclosure or the technical idea of ​​the present disclosure.

[0194] In the embodiments, the term "at least one" may mean one of a number greater than or equal to 1, such as 1, 2, 3, and 4. In the embodiments, the term "a plurality of" may mean one of a number greater than or equal to 2, such as 2, 3, and 4.

[0195] Some components of the embodiments may not be essential components that perform essential functions of the present disclosure, but may be optional components merely for performance enhancement. The embodiments may be implemented by including only essential components necessary to realize the essence of the embodiments, excluding components solely used for performance enhancement. A structure that includes only essential components, excluding optional components solely used for performance enhancement, is also within the scope of the embodiments.

[0196] Hereinafter, embodiments are described in detail with reference to the attached drawings to enable those skilled in the art to easily implement the embodiments. In describing the embodiments, detailed descriptions of related known structures or functions will be omitted if they are judged to obscure the gist of the present specification. In addition, identical components in the drawings are designated by the same reference numerals, and redundant descriptions of identical components are omitted.

[0197]

[0198] Hereinafter, an image may mean a single picture constituting a video, or may represent the video itself. For example, "encoding and / or decoding of an image" may mean "encoding and / or decoding of a video," or may mean "encoding and / or decoding of one of the images constituting the video."

[0199] Hereinafter, the terms “video” and “motion picture(s)” may be used interchangeably and have the same meaning.

[0200] Hereinafter, the target image may be an encoding target image, which is a target of encoding, and / or a decoding target image, which is a target of decoding. In addition, the target image may be an input image input to an encoding device, or an input image input to a decoding device. In addition, the target image may be a current image, which is a target of current encoding and / or decoding. For example, the terms "target image" and "current image" may be used interchangeably and have the same meaning.

[0201] Hereinafter, the terms “image”, “picture”, “frame” and “screen” may be used interchangeably and have the same meaning.

[0202] Hereinafter, the target block may be an encoding target block that is a target of encoding and / or a decoding target block that is a target of decoding. In addition, the target block may be a current block that is a target of current encoding and / or decoding. For example, the terms "target block" and "current block" may be used with the same meaning and may be used interchangeably. The current block may mean an encoding target block that is a target of encoding during encoding and / or a decoding target block that is a target of decoding during decoding. In addition, the current block may be at least one of a coding block, a prediction block, a residual block, and a transform block.

[0203] Hereinafter, the terms "block" and "unit" may be used interchangeably and have the same meaning. Alternatively, "block" may refer to a specific unit.

[0204] Hereinafter, the terms “region” and “segment” may be used interchangeably.

[0205] In the embodiments, each of the specified information, data, flags, indices, elements, attributes, etc., can have a value. The value "0" of the information, data, flags, indices, elements, attributes, etc., can represent false, logical false, or a first predefined value. That is, the values ​​"0", false, logical false, and the first predefined value can be used interchangeably with each other. The value "1" of the information, data, flags, indices, elements, attributes, etc., can represent true, logical true, or a second predefined value. That is, the values ​​"1", true, logical true, and the second predefined value can be used interchangeably with each other.

[0206] When a variable such as i or j is used to represent a row, column, or index, the value of i can be an integer greater than or equal to 0, or an integer greater than or equal to 1. That is, in the embodiments, rows, columns, and indices can be counted from 0, or can be counted from 1.

[0207] In the embodiments, the term "one or more" or the term "at least one" may mean the term "plurality." "One or more" or "at least one" may be used interchangeably with "plurality."

[0208] Below, the terms used in the examples are explained.

[0209] Encoder: An encoder can refer to a device that performs encoding. In other words, an encoder can refer to an encoding device.

[0210] Decoder: A decoder can refer to a device that performs decoding. In other words, a decoder can refer to a decoding device.

[0211] Unit: A unit may represent a unit of image encoding and / or decoding. The terms "unit" and "block" may be used interchangeably and have the same meaning.

[0212] - A unit can be an MxN array of samples. M and N can each be positive integers. A unit can often mean an array of samples in a two-dimensional form.

[0213] - In video encoding and decoding, a unit may be a region created by segmenting an image. In other words, a unit may be a specific region within an image. An image may be segmented into multiple units. Alternatively, a unit may refer to a segmented portion of an image when segmenting the segmented portion into segments and encoding or decoding the segmented portion.

[0214] - In encoding and decoding of images, predefined processing can be performed on units depending on the type of unit.

[0215] - Depending on the function, the type of the unit can be classified into a macro unit, a coding unit (CU), a prediction unit (PU), a residual unit, and a transform unit (TU). Alternatively, depending on the function, the unit can mean a block, a macroblock, a coding tree unit, a coding tree block, a coding unit, a coding block, a prediction unit, a prediction block, a residual unit, a residual block, a transform unit, and a transform block. For example, the target unit can be at least one of a CU, a PU, a residual unit, and a TU that are targets of encoding and / or decoding.

[0216] - A unit may mean information including a luma component block and a corresponding chroma component block, and a syntax element for each block, in order to distinguish it from a block.

[0217] - Units may vary in size and shape. Furthermore, units may have various sizes and shapes. Specifically, the unit's shape may include geometric shapes that can be expressed in two dimensions, such as squares, rectangles, trapezoids, triangles, and pentagons.

[0218] - In addition, the unit information may include at least one of the unit type, the unit size, the unit depth, the unit encoding order, and the unit decoding order. For example, the unit type may indicate one of CU, PU, ​​residual unit, and TU.

[0219] - A unit can be further divided into sub-units of smaller size compared to the unit.

[0220] Depth: Depth can refer to the degree to which a unit is divided. Additionally, the depth of a unit can indicate the level at which a unit exists when represented as a tree structure.

[0221] - Unit split information may include depth information regarding the depth of the unit. The depth may indicate the number of times and / or degree to which the unit is split.

[0222] - In a tree structure, the root node can be considered as the shallowest node, and the leaf node can be considered as the deepest node. The root node can be the highest node. The leaf node can be the lowest node.

[0223] - A unit can be hierarchically divided into multiple sub-units with depth information based on a tree structure. In other words, a unit and a sub-unit generated by division of the unit can correspond to a node and a child node of the node, respectively. Each divided sub-unit can have a depth. Since the depth indicates the number of times and / or degree to which a unit has been divided, the division information of a sub-unit may also include information regarding the size of the sub-unit.

[0224] In a tree structure, the top node may correspond to the first undivided unit. This top node may be called the root node. Furthermore, the top node may have a minimum depth value. In this case, the top node may have a depth of level 0.

[0225] - A node with a depth of level 1 can represent a unit created when the initial unit is split once. A node with a depth of level 2 can represent a unit created when the initial unit is split twice.

[0226] - A node with a depth of level n can represent a unit generated as the initial unit is split n times.

[0227] A leaf node can be the lowest node and cannot be further divided. The depth of a leaf node can be the maximum level. For example, the predefined maximum level value can be 3.

[0228] - QT depth can represent the depth for quad partitioning. BT depth can represent the depth for binary partitioning. TT depth can represent the depth for ternary partitioning.

[0229] Sample: A sample can be the base unit that constitutes a block. A sample is numbered from 0 to 2 depending on the bit depth (Bd). Bd It can be expressed as values ​​up to -1.

[0230] - Samples can be pixels or pixel values.

[0231] - Hereinafter, the terms “pixel”, “pixels” and “samples” may be used interchangeably and have the same meaning.

[0232] Coding Tree Unit (CTU): A CTU may consist of one luma component (Y) coding tree block and two chroma component (Cb, Cr) coding tree blocks related to the luma component coding tree block. A CTU may also mean a block including the above blocks and syntax elements for each block of the above blocks.

[0233] - Each coding tree unit can be partitioned using one or more partitioning methods, such as a quad tree (QT), a binary tree (BT), and a ternary tree (TT), to form subunits such as a coding unit, a prediction unit, and a transformation unit. A quad tree may mean a quarternary tree. In addition, each coding tree unit can be partitioned using a multi-type tree (MTT) that uses one or more partitioning methods.

[0234] - CTU can be used as a term to refer to a pixel block, which is a processing unit in the process of decoding and encoding an image, as in the segmentation of an input image.

[0235] Coding Tree Block (CTB): Coding Tree Block may be used as a term to refer to any one of a Y coding tree block, a Cb coding tree block, and a Cr coding tree block.

[0236] Neighbor block: A neighbor block can refer to a block adjacent to the target block. A neighbor block can also refer to a rebuilt neighbor block.

[0237] - Hereinafter, the terms “neighboring block” and “adjacent block” may be used interchangeably and have the same meaning.

[0238] - A neighbor block may also mean a reconstructed neighbor block.

[0239] Spatial neighbor block: A spatial neighbor block may be a block spatially adjacent to the target block. A neighboring block may include a spatial neighbor block.

[0240] - The target block and spatial neighboring blocks can be included within the target picture.

[0241] - A spatial neighboring block may mean a block whose boundary is adjacent to the target block or a block located within a certain distance from the target block.

[0242] - A spatial neighboring block may refer to a block adjacent to a vertex of a target block. Here, a block adjacent to a vertex of a target block may be a block vertically adjacent to a neighboring block horizontally adjacent to the target block, or a block horizontally adjacent to a neighboring block vertically adjacent to the target block.

[0243] Temporal neighbor block: A temporal neighbor block may be a block temporally adjacent to the target block. A neighboring block may include a temporal neighboring block.

[0244] - Temporal neighboring blocks may contain co-located blocks (col blocks).

[0245] - A call block may be a block within a co-located picture (col picture) that has already been reconstructed. The location of the call block within the co-located picture may correspond to the location of the target block within the target picture. Alternatively, the location of the call block within the co-located picture may be identical to the location of the target block within the target picture. The call picture may be a picture included in a reference picture list.

[0246] - A temporal neighboring block may be a block that is temporally adjacent to a spatial neighboring block of the target block.

[0247] Prediction mode: The prediction mode can be information indicating the mode used for intra prediction or the mode used for inter prediction.

[0248] Prediction unit: A prediction unit can refer to a basic unit for prediction, such as inter prediction, intra prediction, inter compensation, intra compensation, and motion compensation.

[0249] - A prediction unit may be divided into multiple partitions or sub-prediction units of smaller sizes. Multiple partitions may also serve as the basis for performing prediction or compensation. Partitions generated by dividing a prediction unit may also be prediction units.

[0250] Prediction unit partition: Prediction unit partition can mean the form in which a prediction unit is divided.

[0251] Reconstructed neighboring unit: A reconstructed neighboring unit may be a unit that has already been decrypted and reconstructed as a neighbor of the target unit.

[0252] - The reconstructed neighboring unit can be a spatial neighboring unit or a temporal neighboring unit to the target unit.

[0253] - The reconstructed spatial neighboring unit may be a unit within the target picture that has already been reconstructed through encoding and / or decoding.

[0254] - The reconstructed temporal neighboring unit may be a unit within a reference image that has already been reconstructed through encoding and / or decoding. The position of the reconstructed temporal neighboring unit within the reference image may be the same as the position of the target unit within the target picture, or may correspond to the position of the target unit within the target picture. Alternatively, the reconstructed temporal neighboring unit may be a neighboring block of a corresponding block within the reference image. Here, the position of the corresponding block within the reference image may correspond to the position of the target block within the target image. Here, the correspondence of the positions of the blocks may mean that the positions of the blocks are the same, may mean that one block is included in another block, or may mean that one block occupies a specific position of another block.

[0255] Sub-picture: A picture can be divided into one or more sub-pictures. A sub-picture can consist of one or more rows of tiles and one or more columns of tiles.

[0256] - A sub-picture may be a region within a picture that has a square shape or a rectangular (i.e., non-square) shape. In addition, a sub-picture may include one or more CTUs.

[0257] - A sub-picture can be a rectangular area of ​​one or more slices within a picture.

[0258] - A sub-picture may contain one or more tiles, one or more bricks, and / or one or more slices.

[0259] Tile: A tile can be a square or rectangular (i.e. non-square) area within a picture.

[0260] - A tile may contain one or more CTUs.

[0261] - A tile can be split into one or more bricks.

[0262] Brick: A brick can represent one or more rows of CTUs within a tile.

[0263] - A tile can be divided into one or more bricks. Each brick can contain one or more CTU rows.

[0264] - A tile that cannot be divided into two or more pieces can also mean a brick.

[0265] Slice: A slice may contain one or more tiles within a picture. Alternatively, a slice may contain one or more bricks within a tile.

[0266] - A sub-picture may include one or more slices that collectively cover a rectangular area within the picture. Accordingly, each sub-picture boundary may always be a slice boundary. Additionally, each vertical sub-picture boundary may always be a vertical tile boundary.

[0267] Parameter set: A parameter set may correspond to header information among the structures within a bitstream.

[0268] - The parameter set may include at least one of a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), an adaptation parameter set (APS), and a decoding parameter set (DPS).

[0269] Information signaled through a parameter set can be applied to pictures referencing the parameter set. For example, information within a VPS can be applied to pictures referencing the VPS. Information within an SPS can be applied to pictures referencing the SPS. Information within a PPS can be applied to pictures referencing the PPS.

[0270] A parameter set can reference a higher-level parameter set. For example, a PPS can reference an SPS, which can reference a VPS.

[0271] - In addition, the parameter set may include a tile group, slice header information, and tile header information. A tile group may mean a group including multiple tiles. In addition, the meaning of a tile group may be identical to the meaning of a slice.

[0272] Rate-distortion optimization: An encoder can use rate-distortion optimization to provide high encoding efficiency by using a combination of coding unit size, prediction mode, prediction unit size, motion information, and transform unit size.

[0273] - The rate-distortion optimization method can calculate the rate-distortion cost of each combination to select the optimal combination among the above combinations. The rate-distortion cost can be calculated using the formula "D+λ*R". In general, the combination that minimizes the rate-distortion cost according to the formula "D+λ*R" can be selected as the optimal combination in the rate-distortion optimization method.

[0274] - D can represent distortion. D can be the mean square error of the squares of the differences between the original transform coefficients and the reconstructed transform coefficients within the transform unit.

[0275] - R can represent the rate. R can represent the bit rate using related context information.

[0276] - λ can represent a Lagrangian multiplier. R can include bits generated by encoding transform coefficients as well as coding parameter information such as prediction mode, motion information, and coded block flag.

[0277] - The encoding device may perform processes such as inter prediction, intra prediction, transformation, quantization, entropy encoding, inverse quantization, and / or inverse transformation to calculate accurate D and R. These processes may significantly increase the complexity in the encoding device.

[0278] Bitstream: A bitstream can mean a string of bits containing encoded image information.

[0279] Parsing: Parsing can mean entropy decoding a bitstream to determine the values ​​of syntax elements. Alternatively, parsing can mean entropy decoding itself.

[0280] Symbol: may mean at least one of a syntax element, a coding parameter, and a transform coefficient of a unit to be encoded and / or a unit to be decoded. In addition, a symbol may mean a target of entropy encoding or a result of entropy decoding.

[0281] Reference picture: A reference picture may refer to an image referenced by a unit for inter prediction or motion compensation. Alternatively, the reference picture may be an image including a reference unit referenced by a target unit for inter prediction or motion compensation.

[0282] Hereinafter, the terms “reference picture” and “reference image” may be used interchangeably and have the same meaning.

[0283] Reference picture list: A reference picture list may be a list containing one or more reference pictures used for inter prediction or motion compensation.

[0284] - The types of reference picture lists can include List Combined (LC), List 0 (L0), List 1 (L1), List 2 (L2), and List 3 (L3).

[0285] - One or more reference picture lists can be used for inter prediction.

[0286] Inter-prediction indicator: The inter-prediction indicator can indicate the direction of inter-prediction for the target unit. Inter-prediction can be either unidirectional prediction or bidirectional prediction. Alternatively, the inter-prediction indicator can indicate the number of reference pictures used when generating the prediction unit of the target unit. Alternatively, the inter-prediction indicator can indicate the number of prediction blocks used for inter-prediction or motion compensation for the target unit.

[0287] Prediction list utilization flag: The prediction list utilization flag can indicate whether to generate a prediction unit using at least one reference picture within a specific reference picture list.

[0288] - An inter prediction indicator can be derived using the prediction list utilization flag. Conversely, a prediction list utilization flag can be derived using the inter prediction indicator. For example, when the prediction list utilization flag indicates a first value of 0, it can indicate that, for the target unit, a prediction block is not generated using a reference picture in the reference picture list. When the prediction list utilization flag indicates a second value of 1, it can indicate that, for the target unit, a prediction unit is generated using the reference picture list.

[0289] Reference picture index: A reference picture index may be an index indicating a specific reference picture in a reference picture list.

[0290] Picture Order Count (POC): The POC of a picture can indicate the display order of the picture.

[0291] Motion Vector (MV): A motion vector can be a two-dimensional vector used in inter prediction or motion compensation. A motion vector can indicate the offset between a target image and a reference image.

[0292] - For example, MV is (mv x , mv y ) can be expressed in the form of mv x can represent the horizontal component, and mv y can represent vertical components.

[0293] Search range: The search range can be a two-dimensional region where MVs are searched during inter prediction. For example, the size of the search range can be MxN, where M and N can each be positive integers.

[0294] Motion vector candidate: A motion vector candidate can mean a block that is a prediction candidate or a motion vector of a block that is a prediction candidate when predicting a motion vector.

[0295] - Motion vector candidates can be included in the motion vector candidate list.

[0296] Motion vector candidate list: A motion vector candidate list may mean a list constructed using one or more motion vector candidates.

[0297] Motion vector candidate index: The motion vector candidate index may refer to an indicator pointing to a motion vector candidate within a motion vector candidate list. Alternatively, the motion vector candidate index may be an index of a motion vector predictor.

[0298] Motion information: Motion information may mean information including at least one of a motion vector, a reference picture index, and an inter prediction indicator, as well as reference picture list information, a reference image, a motion vector candidate, a motion vector candidate index, a merge candidate, and a merge index.

[0299] Merge candidate list: A merge candidate list may refer to a list constructed using one or more merge candidates.

[0300] Merge candidate: A merge candidate may refer to a spatial merge candidate, a temporal merge candidate, a combined merge candidate, a combined bi-prediction merge candidate, a history-based candidate, a candidate based on the average of two candidates, and a zero-merge candidate. A merge candidate may include an inter-prediction indicator, and may include motion information such as a reference picture index, a motion vector, a prediction list utilization flag, and an inter-prediction indicator for each list.

[0301] Merge index: A merge index can be an indicator pointing to a merge candidate within the merge candidate list.

[0302] - The merge index can indicate a reconstructed unit that is spatially adjacent to the target unit and a reconstructed unit that is temporally adjacent to the target unit, which is a merge candidate.

[0303] - The merge index can indicate at least one of the movement information of the merge candidate.

[0304] Transform unit: A transform unit may be a basic unit in residual signal encoding and / or residual signal decoding, such as transform, inverse transform, quantization, inverse quantization, transform coefficient encoding, and transform coefficient decoding. One transform unit may be divided into a plurality of sub-transform units having smaller sizes. Here, the transform may include one or more of a primary transform and a secondary transform, and the inverse transform may include one or more of a primary inverse transform and a secondary inverse transform.

[0305] Scaling: Scaling can mean the process of multiplying the transform coefficient levels by a factor.

[0306] - As a result of scaling on the transform coefficient level, transform coefficients can be generated. Scaling may also be referred to as dequantization.

[0307] Quantization Parameter (QP): The quantization parameter may refer to a value used to generate transform coefficient levels for transform coefficients in quantization. Alternatively, the quantization parameter may refer to a value used to generate transform coefficients by scaling transform coefficient levels in dequantization. Alternatively, the quantization parameter may be a value mapped to a quantization step size.

[0308] Delta quantization parameter: The delta quantization parameter may mean the difference value between the predicted quantization parameter and the quantization parameter of the target unit.

[0309] Scan: Scan can refer to a method for arranging the order of coefficients within a unit, block, or matrix. For example, arranging a two-dimensional array into a one-dimensional array can be called a scan. Alternatively, arranging a one-dimensional array into a two-dimensional array can also be called a scan or inverse scan.

[0310] Transform coefficient: The transform coefficient may be a coefficient value generated by performing a transform in an encoding device. Alternatively, the transform coefficient may be a coefficient value generated by performing at least one of entropy decoding and dequantization in a decoding device.

[0311] - The quantized level or quantized transform coefficient level generated by applying quantization to the transform coefficient or residual signal can also be included in the meaning of the transform coefficient.

[0312] Quantized Level: A quantized level may refer to a value generated by performing quantization on a transform coefficient or residual signal in an encoding device. Alternatively, a quantized level may refer to a value that is the target of dequantization when performing dequantization in a decoding device.

[0313] - The quantized transform coefficient level, which is the result of transformation and quantization, can also be included in the meaning of the quantized level.

[0314] Non-zero transform coefficient: A non-zero transform coefficient can mean a transform coefficient with a non-zero value or a transform coefficient level with a non-zero value. Alternatively, a non-zero transform coefficient can mean a transform coefficient whose magnitude is not zero or a transform coefficient level whose magnitude is not zero.

[0315] Quantization matrix: A quantization matrix can refer to a matrix used in the quantization or dequantization process to improve the subjective or objective image quality. A quantization matrix can also be referred to as a scaling list.

[0316] Quantization matrix coefficient: Quantization matrix coefficient can mean each element in the quantization matrix. Quantization matrix coefficient can also be called matrix coefficient.

[0317] Default matrix: The default matrix may be a quantization matrix predefined in the encoder and decoder.

[0318] Non-default matrix: A non-default matrix may be a quantization matrix that is not predefined in the encoder or decoder. A non-default matrix may refer to a quantization matrix that is signaled by the user from the encoder to the decoder.

[0319] Most Probable Mode (MPM): MPM can indicate the intra prediction mode that is likely to be used for intra prediction of the target block.

[0320] - The encoding device and the decoding device can determine one or more MPMs based on coding parameters related to the target block and properties of objects related to the target block.

[0321] - The encoding device and the decoding device can determine one or more MPMs based on the intra prediction mode of the reference block. There may be multiple reference blocks. The multiple reference blocks may include a spatial neighboring block adjacent to the left of the target block and a spatial neighboring block adjacent to the top of the target block. In other words, one or more different MPMs may be determined depending on which intra prediction modes are used for the reference blocks.

[0322] - One or more MPMs can be determined in the same manner in the encoding device and the decoding device. In other words, the encoding device and the decoding device can share an MPM list containing the same one or more MPMs.

[0323] MPM List: An MPM list may contain one or more MPMs. The number of MPMs in an MPM list may be predefined.

[0324] MPM Indicator: The MPM indicator can indicate which MPM among one or more MPMs in the MPM list is used for intra prediction of the target block. For example, the MPM indicator can be an index into the MPM list.

[0325] - Since the MPM list is determined in the same way in the encoding device and the decoding device, the MPM list itself may not need to be transmitted from the encoding device to the decoding device.

[0326] - The MPM indicator can be signaled from the encoding device to the decoding device. As the MPM indicator is signaled, the decoding device can determine which MPM among the MPMs in the MPM list will be used for intra prediction for the target block.

[0327] MPM Usage Indicator: The MPM usage indicator can indicate whether the MPM usage mode will be used for prediction of the target block. The MPM usage mode can be a mode that uses an MPM list to determine the MPM to be used for intra prediction of the target block.

[0328] - MPM usage indicators can be signaled from the encoding device to the decoding device.

[0329] Signaling: Signaling may refer to the transmission of information from an encoding device to a decoding device. Alternatively, signaling may refer to an encoding device including information within a bitstream or recording medium. Information signaled by an encoding device may be used by a decoding device.

[0330] - The encoding device can perform encoding on the signaled information to generate encoded information. The encoded information can be transmitted from the encoding device to a decoding device. The decoding device can obtain information by decoding the transmitted encoded information. Here, the encoding can be entropy encoding, and the decoding can be entropy decoding.

[0331] Selective signaling: Information can be selectively signaled. Selective signaling of information can mean that an encoding device selectively includes information (under certain conditions) in a bitstream or recording medium. Selective signaling of information can mean that a decoding device selectively extracts information (under certain conditions) from a bitstream.

[0332] Omission of signaling: Signaling for information may be omitted. Omission of signaling for information may mean that the encoding device (under certain conditions) does not include the information in the bitstream or recording medium. Omission of signaling for information may mean that the decoding device (under certain conditions) does not extract the information from the bitstream.

[0333] Statistical value: Variables, coding parameters, and constants can have values ​​that can be operated on. A statistical value can be a value generated by an operation on the values ​​of these specific objects. For example, a statistical value can be one or more of the following values: an average, a weighted average, a weighted sum, a minimum, a maximum, a mode, a median, and an interpolation value for the values ​​of a specific variable, a specific coding parameter, and a specific constant.

[0334]

[0335] FIG. 1 is a block diagram showing a configuration according to one embodiment of an encoding device to which the present disclosure is applied.

[0336] The encoding device (100) may be an encoder, a video encoding device, or an image encoding device. The video may include one or more images. The encoding device (100) may sequentially encode one or more images of the video.

[0337] Referring to FIG. 1, the encoding device (100) may include an inter prediction unit (110), an intra prediction unit (120), a switch (115), a subtractor (125), a transform unit (130), a quantization unit (140), an entropy encoding unit (150), an inverse quantization unit (160), an inverse transform unit (170), an adder (175), a filter unit (180), and a reference picture buffer (190).

[0338] The encoding device (100) can perform encoding on a target image using an intra mode and / or an inter mode. In other words, the prediction mode for the target block can be one of the intra mode and the inter mode.

[0339] Hereinafter, the terms “intra mode”, “intra prediction mode”, “intra-screen mode” and “intra-screen prediction mode” may be used interchangeably and have the same meaning.

[0340] Hereinafter, the terms “inter mode”, “inter prediction mode”, “inter-screen mode” and “inter-screen prediction mode” may be used interchangeably and have the same meaning.

[0341] Hereinafter, the term "image" may refer to only a portion of an image, or may refer to a block. Furthermore, processing an "image" may refer to sequential processing of multiple blocks.

[0342] Additionally, the encoding device (100) can generate a bitstream including encoded information through encoding of a target image, and can output and store the generated bitstream. The generated bitstream can be stored in a computer-readable recording medium and can be streamed via wired and / or wireless transmission media.

[0343] As a prediction mode, when the intra mode is used, the switch (115) can be switched to intra. As a prediction mode, when the inter mode is used, the switch (115) can be switched to inter.

[0344] The encoding device (100) can generate a prediction block for a target block. In addition, after the prediction block is generated, the encoding device (100) can encode a residual block for the target block using the residual of the target block and the prediction block.

[0345] When the prediction mode is intra mode, the intra prediction unit (120) can use pixels of blocks adjacent to the target block that have already been encoded and / or decoded as reference samples. The intra prediction unit (120) can perform spatial prediction on the target block using the reference samples, and can generate prediction samples for the target block through spatial prediction. The prediction samples can refer to samples within the prediction block.

[0346] The inter prediction unit (110) may include a motion prediction unit and a motion compensation unit.

[0347] When the prediction mode is inter mode, the motion prediction unit can search for an area from the reference image that best matches the target block during the motion prediction process, and can use the searched area to derive a motion vector for the target block and the searched area. In this case, the motion prediction unit can use a search area as the area to be searched.

[0348] The reference image may be stored in a reference picture buffer (190), and when encoding and / or decoding for the reference image is processed, the encoded and / or decoded reference image may be stored in the reference picture buffer (190).

[0349] As the decoded picture is stored, the reference picture buffer (190) may be a decoded picture buffer (DPB).

[0350] The motion compensation unit can generate a prediction block for a target block by performing motion compensation using a motion vector. Here, the motion vector may be a two-dimensional vector used for inter prediction. The motion vector may also indicate an offset between the target image and the reference image.

[0351] The motion prediction unit and the motion compensation unit can generate a prediction block by applying an interpolation filter to some areas within a reference image when a motion vector has a non-integer value. In order to perform inter prediction or motion compensation, it can be determined based on the CU whether the method of motion prediction and motion compensation of a PU included in the CU is skip mode, merge mode, Advanced Motion Vector Prediction (AMVP) mode, and current picture reference mode, and inter prediction or motion compensation can be performed according to each mode.

[0352] The subtractor (125) can generate a residual block, which is the difference between the target block and the predicted block. The residual block may also be referred to as a residual signal.

[0353] A residual signal may represent the difference between the original signal and the predicted signal. Alternatively, the residual signal may be a signal generated by transforming, quantizing, or transforming and quantizing the difference between the original signal and the predicted signal. A residual block may be a residual signal for a block unit.

[0354] The transformation unit (130) can generate a transformation coefficient by performing a transformation on the residual block and output the generated transformation coefficient. Here, the transformation coefficient may be a coefficient value generated by performing a transformation on the residual block.

[0355] The conversion unit (130) can use one of a plurality of predefined conversion methods to perform the conversion.

[0356] The predefined multiple transform methods may include transforms based on the Discrete Cosine Transform (DCT), the Discrete Sine Transform (DST), and the Karhunen-Loeve Transform (KLT).

[0357] The transformation method used for transforming the residual block may be determined based on at least one of the coding parameters for the target block and / or neighboring blocks. For example, the transformation method may be determined based on at least one of the inter-prediction mode for the PU, the intra-prediction mode for the PU, the size of the TU, and the shape of the TU. Alternatively, transformation information indicating the transformation method may be signaled from the encoding device (100) to the decoding device (200).

[0358] When the transform skip mode is applied, the transform unit (130) may omit the transformation for the residual block.

[0359] By applying quantization to a transform coefficient, a quantized transform coefficient level or a quantized level can be generated. In the following embodiments, a quantized transform coefficient level and a quantized level may also be referred to as a transform coefficient.

[0360] The quantization unit (140) can generate a quantized transform coefficient level (i.e., a quantized level or quantized coefficient) by quantizing the transform coefficient according to a quantization parameter. The quantization unit (140) can output the generated quantized transform coefficient level. At this time, the quantization unit (140) can quantize the transform coefficient using a quantization matrix.

[0361] The entropy encoding unit (150) can generate a bitstream by performing entropy encoding according to a probability distribution based on values ​​produced by the quantization unit (140) and / or coding parameter values ​​produced during the encoding process. The entropy encoding unit (150) can output the generated bitstream.

[0362] The entropy encoding unit (150) can perform entropy encoding on information about pixels of an image and information for decoding the image. For example, the information for decoding the image may include syntax elements, etc.

[0363] When entropy coding is applied, a small number of bits can be allocated to symbols with a high probability of occurrence, while a large number of bits can be allocated to symbols with a low probability of occurrence. As symbols are represented through this allocation, the size of the bitstring for the symbols being encoded can be reduced. Therefore, entropy coding can improve the compression performance of image coding.

[0364] In addition, the entropy encoding unit (150) can use encoding methods such as exponential golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC) for entropy encoding. For example, the entropy encoding unit (150) can perform entropy encoding using a variable length coding (Variable Length Coding / Code; VLC) table. For example, the entropy encoding unit (150) can derive a binarization method for a target symbol. In addition, the entropy encoding unit (150) can derive a probability model of a target symbol / bin. The entropy encoding unit (150) may also perform arithmetic encoding using the derived binarization method, probability model, and context model.

[0365] The entropy encoding unit (150) can change the coefficients of a two-dimensional block form into a one-dimensional vector form through a transform coefficient scanning method to encode a quantized transform coefficient level.

[0366] Coding parameters may be information required for encoding and / or decoding. Coding parameters may include information encoded by the encoding device (100) and transmitted from the encoding device (100) to the decoding device, and may include information that may be derived during the encoding or decoding process. For example, syntax elements may be included as information transmitted to the decoding device.

[0367] Coding parameters may include information (or flags and indices, etc.) encoded in an encoding device and signaled from the encoding device to the decoding device, such as syntax elements, as well as information derived during the encoding or decoding process. In addition, coding parameters may include information required for encoding or decoding an image. For example, the size of the unit / block, the shape of the unit / block, the depth of the unit / block, the partition information of the unit / block, the partition structure of the unit / block, information indicating whether the unit / block is partitioned in the form of a quad tree, information indicating whether the unit / block is partitioned in the form of a binary tree, the partition direction (horizontal direction or vertical direction) of the binary tree, the partition type (symmetric partition or asymmetric partition) of the binary tree, information indicating whether the unit / block is partitioned in the form of a ternary tree, the partition direction (horizontal direction or vertical direction) of the ternary tree, the partition type (symmetric partition or asymmetric partition, etc.) of the ternary tree, information indicating whether the unit / block is partitioned in the form of a multi-type tree, the combination and direction (horizontal direction or vertical direction, etc.) of the partition of the multi-type tree, the partition type (symmetric partition or asymmetric partition), the partition tree of the multi-type tree (binary tree or ternary tree), the type of the prediction mode (intra prediction or inter prediction), the intra prediction mode / direction, the intra luma prediction mode / direction, the intra chroma prediction mode / direction, the intra Segmentation information, inter-segmentation information, coding block segmentation flag, prediction block segmentation flag, transform block segmentation flag, reference sample filtering method, reference sample filter tap, reference sample filter coefficient, prediction block filtering method, prediction block filter tap, prediction block filter coefficient, prediction block boundary filtering method, prediction block boundary filter tap, prediction block boundary filter coefficient, inter-prediction mode, motion information, motion vector, motion vector difference, reference picture index,Inter prediction direction, inter prediction indicator, prediction list utilization flag, reference picture list, reference video, POC, motion vector predictor, motion vector prediction index, motion vector prediction candidate, motion vector candidate list, information indicating whether to use merge mode, merge index, merge candidate, merge candidate list, information indicating whether to use skip mode, type of interpolation filter, filter tap of interpolation filter, filter coefficient of interpolation filter, motion vector magnitude, motion vector representation accuracy, transform type, transform magnitude, information indicating whether to use primary transform, information indicating whether to use additional (secondary) transform, primary transform selection information (or primary transform index), secondary transform selection information (or secondary transform index), information indicating whether to use residual signal, coded block pattern, coded block flag, quantization parameter, residual quantization parameter, quantization matrix, information about intra-loop filter, information indicating whether to apply intra-loop filter, intra-loop Coefficients of the filter, filter taps of the intra-loop filter, shape / form of the intra-loop filter, information indicating whether a deblocking filter is applied, coefficients of the deblocking filter, filter taps of the deblocking filter, strength of the deblocking filter, shape / form of the deblocking filter, information indicating whether an adaptive sample offset is applied, adaptive sample offset value, adaptive sample offset category, adaptive sample offset type, information indicating whether an adaptive in-loop filter is applied, coefficients of the adaptive in-loop filter, filter taps of the adaptive in-loop filter, shape / form of the adaptive in-loop filter, binarization / debinarization method, context model, context model determination method, context model update method, information indicating whether a regular mode is performed, information indicating whether a bypass mode is performed,Significant coefficient flag, last significant coefficient flag, coefficient group unit coding flag, last significant coefficient position, flag indicating whether the coefficient value is greater than 1, flag indicating whether the coefficient value is greater than 2, flag indicating whether the coefficient value is greater than 3, remaining coefficient value information, sign information, reconstructed luma sample, reconstructed chroma sample, context bin, bypass bin, residual luma sample, residual chroma sample, transform coefficient, luma transform coefficient, chroma transform coefficient, quantized level, luma quantized level, chroma quantized level, transform coefficient level, luma transform coefficient level, chroma transform coefficient level, transform coefficient level scanning method, size of motion vector search region on the side of decoding device, shape of motion vector search region on the side of decoding device, number of motion vector searches on the side of decoding device, CTU size, minimum block size, maximum block size, maximum block depth, minimum block depth, display / output order of image, slice identification information, slice type, slice partitioning information, tile group identification information, tile group The coding parameters may include a type, tile group partition information, tile identification information, tile type, tile partition information, picture type, bit depth, input sample bit depth, reconstructed sample bit depth, residual sample bit depth, transform coefficient bit depth, quantized level bit depth, information about a luma signal, information about a chroma signal, a value of at least one of a color space of a target block and a color space of a residual block, a combined shape, or statistics. In addition, information related to the above-described coding parameters may also be included in the coding parameters. Information used to calculate and / or derive the above-described coding parameters may also be included in the coding parameters. Information calculated or derived using the above-described coding parameters may also be included in the coding parameters.

[0368] The primary transformation selection information can indicate the primary transformation applied to the target block.

[0369] Secondary transformation selection information can indicate a secondary transformation to be applied to the target block.

[0370] A residual signal may represent the difference between the original signal and the predicted signal. Alternatively, the residual signal may be a signal generated by transforming the difference between the original signal and the predicted signal. Alternatively, the residual signal may be a signal generated by transforming and quantizing the difference between the original signal and the predicted signal. A residual block may be a residual signal for a block.

[0371] Here, signaling information may mean including entropy-encoded information generated by performing entropy encoding on a flag or index in an encoding device (100) into a bitstream, and may mean obtaining information by performing entropy decoding on entropy-encoded information extracted from a bitstream in a decoding device (200). Here, the information may include flags, indices, etc.

[0372] A signal may refer to information being signaled. Hereinafter, information about an image and a block may be referred to as a signal. Furthermore, the terms "information" and "signal" may be used interchangeably and have the same meaning herein. For example, a specific signal may be a signal representing a specific block. An original signal may be a signal representing a target block. A prediction signal may be a signal representing a prediction block. A residual signal may be a signal representing a residual block.

[0373] A bitstream may contain information according to a specific syntax. An encoding device (100) may generate a bitstream containing information according to a specific syntax. An encoding device (200) may obtain information from a bitstream according to a specific syntax.

[0374] Since encoding is performed through inter prediction by the encoding device (100), the encoded target image can be used as a reference image for other image(s) to be processed later. Accordingly, the encoding device (100) can reconstruct or decode the encoded target image again and store the reconstructed or decoded image as a reference image in the reference picture buffer (190). Inverse quantization and inverse transformation can be processed for the encoded target image for decoding.

[0375] The quantized level can be inversely quantized in the inverse quantization unit (160) and inversely transformed in the inverse transformation unit (170). The inverse quantization unit (160) can generate inversely quantized coefficients by performing inverse quantization on the quantized level. The inverse transformation unit (170) can generate inversely quantized and inversely transformed coefficients by performing inverse transformation on the inverse quantized coefficients.

[0376] The dequantized and inversely transformed coefficients can be combined with the prediction block through an adder (175), and a reconstructed block can be generated by combining the dequantized and inversely transformed coefficients with the prediction block. Here, the dequantized and / or inversely transformed coefficients may mean coefficients on which at least one of dequantization and inverse transformation has been performed, and may mean a reconstructed residual block. Here, the reconstructed block may mean a recovered block or a decoded block.

[0377] The reconstructed block may pass through a filter unit (180). The filter unit (180) may apply at least one of a deblocking filter, a sample adaptive offset (SAO), an adaptive loop filter (ALF), and a non-local filter (NLF) to the reconstructed sample, the reconstructed block, or the reconstructed picture. The filter unit (180) may also be referred to as an in-loop filter.

[0378] A deblocking filter can remove block distortion that occurs at the boundaries between blocks within a reconstructed picture. To determine whether to apply a deblocking filter to a target block, the decision can be made based on the pixel(s) contained in a number of columns or rows within the block.

[0379] When applying a deblocking filter to a target block, the applied filter may vary depending on the strength of the required deblocking filtering. In other words, among different filters, a filter determined based on the strength of the deblocking filtering may be applied to the target block. When applying a deblocking filter to a target block, one or more of a long-tap filter, a strong filter, a weak filter, and a Gaussian filter may be applied to the target block, depending on the strength of the required deblocking filtering.

[0380] Additionally, when vertical filtering and horizontal filtering are performed on the target block, the horizontal filtering and vertical filtering can be processed in parallel.

[0381] SAO can add an appropriate offset to the pixel value of a pixel to compensate for coding errors. SAO can perform compensation using an offset for the difference between the original image and the deblocked image on a pixel-by-pixel basis for an image to which deblocking has been applied. To perform offset compensation on an image, a method can be used in which the pixels included in the image are divided into a certain number of regions, and then the regions to which the offset is to be performed are determined among the divided regions, and the offset is applied to the determined regions. Alternatively, a method can be used in which the offset is applied by considering the edge information of each pixel of the image.

[0382] ALF can perform filtering based on the values ​​compared between the reconstructed image and the original image. After dividing the pixels contained in the image into predetermined groups, the filter to be applied to each divided group can be determined, and filtering can be performed differentially for each group. Information regarding whether to apply an adaptive loop filter can be signaled for each CU. This information can be signaled in the luma signal. The shape and filter coefficients of the ALF to be applied to each block can vary for each block. Alternatively, a fixed form of ALF can be applied to a block regardless of the characteristics of the block.

[0383] A non-local filter can perform filtering based on reconstructed blocks similar to the target block. Regions similar to the target block can be selected from the reconstructed image, and filtering of the target block can be performed using statistical properties of the selected similar regions. Information regarding whether to apply a non-local filter can be signaled to the CU. Furthermore, the shapes and filter coefficients of the non-local filter applied to the blocks can vary depending on the block.

[0384] A reconstructed block or reconstructed image that has passed through the filter unit (180) may be stored as a reference picture in the reference picture buffer (190). The reconstructed block that has passed through the filter unit (180) may be a part of the reference picture. In other words, the reference picture may be a reconstructed picture composed of reconstructed blocks that have passed through the filter unit (180). The stored reference picture may be used for subsequent inter prediction or motion compensation.

[0385]

[0386] FIG. 2 is a block diagram showing a configuration according to one embodiment of a decryption device to which the present disclosure is applied.

[0387] The decoding device (200) may be a decoder, a video decoding device, or an image decoding device.

[0388] Referring to FIG. 2, the decoding device (200) may include an entropy decoding unit (210), an inverse quantization unit (220), an inverse transformation unit (230), an intra prediction unit (240), an inter prediction unit (250), a switch (245), an adder (255), a filter unit (260), and a reference picture buffer (270).

[0389] The decoding device (200) can receive a bitstream output from the encoding device (100). The decoding device (200) can receive a bitstream stored in a computer-readable recording medium, and can receive a bitstream streamed through a wired / wireless transmission medium.

[0390] The decoding device (200) can perform intra-mode and / or inter-mode decoding on the bitstream. In addition, the decoding device (200) can generate a reconstructed image or a decoded image through decoding, and output the generated reconstructed image or the decoded image.

[0391] For example, switching between intra mode and inter mode depending on the prediction mode used for decoding can be performed by a switch (245). If the prediction mode used for decoding is intra mode, the switch (245) can be switched to intra. If the prediction mode used for decoding is inter mode, the switch (245) can be switched to inter.

[0392] The decoding device (200) can obtain a reconstructed residual block by decoding the input bitstream and can generate a prediction block. Once the reconstructed residual block and prediction block are obtained, the decoding device (200) can generate a reconstructed block to be decoded by combining the reconstructed residual block and prediction block.

[0393] The entropy decoding unit (210) can generate symbols by performing entropy decoding on the bitstream based on a probability distribution for the bitstream. The generated symbols can include symbols in the form of quantized transform coefficient levels (i.e., quantized levels or quantized coefficients). Here, the entropy decoding method can be similar to the entropy encoding method described above. For example, the entropy decoding method can be a reverse process of the entropy encoding method described above.

[0394] The entropy decoding unit (210) can change a coefficient in the form of a one-dimensional vector into the form of a two-dimensional block through a transform coefficient scanning method in order to decode a quantized transform coefficient level.

[0395] For example, coefficients can be converted into a two-dimensional block shape by scanning the coefficients of a block using the upper right diagonal scan. Alternatively, depending on the block size and / or intra prediction mode, which scan among the upper right diagonal scan, vertical scan, and horizontal scan is used can be determined.

[0396] The quantized coefficients can be dequantized in the dequantization unit (220). The dequantization unit (220) can generate dequantized coefficients by performing dequantization on the quantized coefficients. In addition, the dequantized coefficients can be inversely transformed in the inverse transformation unit (230). The inverse transformation unit (230) can generate a reconstructed residual block by performing inverse transformation on the dequantized coefficients. As a result of performing inverse quantization and inverse transformation on the quantized coefficients, a reconstructed residual block can be generated. At this time, the inverse quantization unit (220) can apply a quantization matrix to the quantized coefficients when generating the reconstructed residual block.

[0397] When the intra mode is used, the intra prediction unit (240) can generate a prediction block by performing spatial prediction on the target block using pixel values ​​of already decoded blocks neighboring the target block.

[0398] The inter prediction unit (250) may include a motion compensation unit. Alternatively, the inter prediction unit (250) may be referred to as a motion compensation unit.

[0399] When the inter mode is used, the motion compensation unit can generate a prediction block by performing motion compensation on the target block using a motion vector and a reference image stored in the reference picture buffer (270).

[0400] The motion compensation unit may apply an interpolation filter to a portion of a reference image when a motion vector has a non-integer value, and may generate a prediction block using the reference image to which the interpolation filter has been applied. In order to perform motion compensation, the motion compensation unit may determine which mode among skip mode, merge mode, AMVP mode, and current picture reference mode is the motion compensation method used for the PU included in the CU based on the CU, and may perform motion compensation according to the determined mode.

[0401] The reconstructed residual block and prediction block can be added through an adder (255). The adder (255) can generate a reconstructed block by adding the reconstructed residual block and prediction block.

[0402] The reconstructed block may pass through a filter unit (260). The filter unit (260) may apply at least one of a deblocking filter, SAO, ALF, and a non-local filter to the reconstructed block or the reconstructed image. The reconstructed image may be a picture including the reconstructed block.

[0403] The filter unit (260) can output a reconstructed image.

[0404] The reconstructed block and / or reconstructed image that has passed through the filter unit (260) may be stored as a reference picture in the reference picture buffer (270). The reconstructed block that has passed through the filter unit (260) may be a part of a reference picture. In other words, the reference picture may be a reconstructed image composed of the reconstructed blocks that have passed through the filter unit (260). The stored reference picture may be used for subsequent inter prediction and / or motion compensation.

[0405]

[0406] Figure 3 is a diagram schematically showing the division structure of an image when encoding and decoding an image.

[0407] Figure 3 can schematically represent an example in which one unit is divided into multiple sub-units.

[0408] To efficiently segment images, coding units (CUs) may be used during encoding and decoding. A unit may be a term referring to 1) a block containing image samples and 2) a syntax element. For example, "segmentation of a unit" may mean "segmentation of a block corresponding to a unit."

[0409] A CU can be used as a basic unit for image encoding and / or decoding. Furthermore, a CU can be used as a unit to which a selected mode, either intra-mode or inter-mode, is applied during image encoding and / or decoding. In other words, during image encoding and / or decoding, it can be determined which mode, either intra-mode or inter-mode, will be applied to each CU.

[0410] Additionally, a CU can be a basis unit for prediction, transformation, quantization, inverse transformation, inverse quantization, and encoding and / or decoding of transform coefficients.

[0411] Referring to FIG. 3, an image (300) can be sequentially divided into units of Largest Coding Units (LCUs). For each LCU, a division structure can be determined. Here, LCU can be used in the same sense as Coding Tree Units (CTUs).

[0412] Partitioning a unit may refer to the division of a block corresponding to the unit. Block partitioning information may include depth information regarding the depth of the unit. Depth information may indicate the number of times and / or degree to which the unit is partitioned. A single unit may be hierarchically divided into multiple subunits based on depth information based on a tree structure.

[0413] Each partitioned sub-unit can have depth information. The depth information can be information indicating the size of the CU. Depth information can be stored for each CU.

[0414] Each CU can have depth information. When a CU is split, the CUs generated by the split can have a depth that is 1 more than the depth of the split CU.

[0415] The partition structure may refer to the distribution of CUs within an LCU (310) for efficiently encoding an image. This distribution may be determined based on whether a single CU is partitioned into multiple CUs. The number of partitioned CUs may be a positive integer greater than or equal to 2, including 2, 4, 8, and 16.

[0416] The horizontal and vertical dimensions of a CU generated by a partition may be smaller than the horizontal and vertical dimensions of the CU before the partition, depending on the number of CUs generated by the partition. For example, the horizontal and vertical dimensions of a CU generated by a partition may be half the horizontal and half the vertical dimensions of the CU before the partition.

[0417] The partitioned CU can be recursively partitioned into multiple CUs in the same manner. By recursively partitioning, at least one of the horizontal size and the vertical size of the partitioned CU can be reduced compared to at least one of the horizontal size and the vertical size of the CU before partitioning.

[0418] The partitioning of a CU can be done recursively up to a predefined depth or a predefined size.

[0419] For example, the depth of a CU can have a value from 0 to 3. The size of a CU can range from 64x64 to 8x8 depending on the depth of the CU.

[0420] For example, the depth of the LCU (310) may be 0, and the depth of the smallest coding unit (SCU) may be a predefined maximum depth. Here, the LCU may be a CU having the largest coding unit size as described above, and the SCU may be a CU having the smallest coding unit size.

[0421] Splitting can start from LCU (310), and each time the horizontal size and / or vertical size of the CU is reduced by the splitting, the depth of the CU can increase by 1.

[0422] For example, for each depth, a CU that is not split may have a size of 2Nx2N. Furthermore, for a CU that is split, a CU of size 2Nx2N may be split into four CUs of size NxN. The size of N may be halved for each increase in depth by 1.

[0423] Referring to FIG. 3, an LCU with depth 0 can be 64x64 pixels or a 64x64 block. 0 can be the minimum depth. An SCU with depth 3 can be 8x8 pixels or an 8x8 block. 3 can be the maximum depth. In this case, a CU of a 64x64 block, which is an LCU, can be represented by depth 0. A CU of a 32x32 block can be represented by depth 1. A CU of a 16x16 block can be represented by depth 2. A CU of an 8x8 block, which is an SCU, can be represented by depth 3.

[0424] Information about whether a CU is split can be expressed through the CU's split information. The split information can be 1-bit information. All CUs except SCUs can include split information. For example, the value of the split information of a CU that is not split can be a first value, and the value of the split information of a CU that is split can be a second value. If the split information indicates whether the CU is split, the first value can be 0, and the second value can be 1.

[0425] For example, when one CU is partitioned into four CUs, the width and height of each CU of the four CUs generated by the partitioning may be half the width and half the height of the CU before the partitioning, respectively. When a CU of size 32x32 is partitioned into four CUs, the sizes of the four partitioned CUs may be 16x16. When one CU is partitioned into four CUs, it can be said that the CU is partitioned in a quad-tree form. In other words, it can be seen that a quad-tree partition is applied to the CU.

[0426] For example, when one CU is split into two CUs, the width or height of each CU of the two CUs created by the split may be half the width or half the height of the CU before the split, respectively. When a CU of size 32x32 is split vertically into two CUs, the sizes of the two split CUs may be 16x32. When a CU of size 32x32 is split horizontally into two CUs, the sizes of the two split CUs may be 32x16. When one CU is split into two CUs, it can be said that the CU is split in the form of a binary tree. In other words, it can be seen that a binary tree partition is applied to the CU.

[0427] For example, when one CU is split into three CUs, three split CUs can be created by splitting the width or height of the CU before splitting in a ratio of 1:2:1. For example, when a CU of size 16x32 is split into three CUs horizontally, the three split CUs can have sizes of 16x8, 16x16, and 16x8 from the top, respectively. For example, when a CU of size 32x32 is split into three CUs vertically, the three split CUs can have sizes of 8x32, 16x32, and 8x32 from the left, respectively. When one CU is split into three CUs, it can be said that the CU is split in a ternary-tree form. In other words, it can be seen that a ternary-tree partition is applied to the CU.

[0428] In the LCU (310) of Fig. 3, both quad-tree type division and binary-tree type division were applied.

[0429] In the encoding device (100), a coding tree unit (CTU) of 64x64 size can be divided into a plurality of smaller CUs by a recursive quad-tree structure. One CU can be divided into four CUs of the same size. The CU can be divided recursively, and each CU can have a quad-tree structure.

[0430] Through recursive partitioning of CU, the optimal partitioning method that produces the minimum rate-distortion ratio can be selected.

[0431] CTU (320) of Fig. 3 is an example of a CTU to which quad tree partitioning, binary tree partitioning, and ternary tree partitioning are all applied.

[0432] As described above, to partition a CTU, at least one of a quad tree partition, a binary tree partition, and a ternary tree partition may be applied to the CTU. The partitions may be applied based on a specified priority.

[0433] For example, a quad-tree partitioning may be preferentially applied to a CTU. A CU that cannot be further partitioned into a quad-tree may correspond to a leaf node of the quad-tree. A CU corresponding to a leaf node of the quad-tree may become a root node of a binary tree and / or a ternary tree. That is, a CU corresponding to a leaf node of the quad-tree may be partitioned into a binary tree or a ternary tree, or may not be partitioned any further. In this case, by preventing quad-tree partitioning from being applied again to a CU generated by applying binary tree partitioning or ternary tree partitioning to a CU corresponding to a leaf node of the quad-tree, partitioning of the block and / or signaling of block partitioning information may be effectively performed.

[0434] The partitioning of a CU corresponding to each node of a quad tree can be signaled using quad partitioning information. Quad partitioning information having a first value (e.g., "1") can indicate that the CU is partitioned into a quad tree shape. Quad partitioning information having a second value (e.g., "0") can indicate that the CU is not partitioned into a quad tree shape. The quad partitioning information can be a flag having a specified length (e.g., 1 bit).

[0435] There may be no priority between binary tree partitioning and ternary tree partitioning. That is, a CU corresponding to a leaf node of a quadtree may be partitioned into either a binary tree or a ternary tree. Furthermore, a CU generated by binary tree partitioning or ternary tree partitioning may be partitioned again into a binary tree or a ternary tree, or may not be partitioned any further.

[0436] A partition in which there is no priority between a binary tree partition and a ternary tree partition may be referred to as a multi-type tree partition. That is, a CU corresponding to a leaf node of a quad tree may become a root node of a multi-type tree. For the partition of a CU corresponding to each node of a multi-type tree, at least one of information indicating whether the multi-type tree is partitioned, information on the direction of the partition, and information on the partition tree may be signaled. For the partition of a CU corresponding to each node of a multi-type tree, information indicating whether the multi-type tree is partitioned, information on the direction of the partition, and information on the partition tree may be sequentially signaled.

[0437] For example, information indicating whether a multi-type tree having a first value (e.g., "1") is split may indicate that the corresponding CU is split into a multi-type tree form. Information indicating whether a multi-type tree having a second value (e.g., "0") is split may indicate that the corresponding CU is not split into a multi-type tree form.

[0438] When a CU corresponding to each node of a multi-type tree is split into a multi-type tree, the CU may further include split direction information.

[0439] Split direction information can indicate the split direction of a multi-type tree split. Split direction information having a first value (e.g., "1") can indicate that the corresponding CU is split in the vertical direction. Split direction information having a second value (e.g., "0") can indicate that the corresponding CU is split in the horizontal direction.

[0440] When a CU corresponding to each node of a multi-type tree is split into a multi-type tree, the CU may further include split tree information. The split tree information may indicate a tree used for splitting the multi-type tree.

[0441] For example, partition tree information having a first value (e.g., "1") may indicate that the corresponding CU is partitioned into a binary tree. Partition tree information having a second value (e.g., "0") may indicate that the corresponding CU is partitioned into a ternary tree.

[0442] Here, each of the information indicating whether to split, split tree information, and split direction information described above may be a flag having a specific length (e.g., 1 bit).

[0443] At least one of the quad partition information described above, information indicating whether a multi-type tree is partitioned, partition direction information, and partition tree information may be entropy encoded and / or entropy decoded. For entropy encoding / decoding of such information, information of neighboring CUs adjacent to the target CU may be utilized.

[0444] For example, it can be considered that the partitioning shapes (i.e., whether to partition, partitioning tree, and / or partitioning direction) of the left CU and / or the upper CU and the partitioning shape of the target CU are likely to be similar to each other. Therefore, based on the information of the neighboring CU, context information for entropy encoding and / or entropy decoding of the information of the target CU can be derived. At this time, the information of the neighboring CU can include at least one of 1) quad partitioning information of the neighboring CU, 2) information indicating whether to partition a multi-type tree, 3) partitioning direction information, and 4) partitioning tree information.

[0445] In another embodiment, among binary tree partitioning and ternary tree partitioning, binary tree partitioning may be performed preferentially. That is, binary tree partitioning may be applied first, and a CU corresponding to a leaf node of the binary tree may be set as the root node of the ternary tree. In this case, quad tree partitioning and binary tree partitioning may not be performed on a CU corresponding to a node of the ternary tree.

[0446] A CU that cannot be further split by quad-tree splitting, binary tree splitting, and / or ternary tree splitting can become a unit of encoding, prediction, and / or transformation. That is, a CU may not be further split for prediction and / or transformation. Accordingly, a split structure and split information for splitting a CU into prediction units and / or transformation units may not exist in the bitstream.

[0447] However, if the size of the CU that is the unit of division is larger than the size of the largest transform block, the CU can be recursively divided until the size of the CU becomes smaller than or equal to the size of the largest transform block. For example, if the size of the CU is 64x64 and the size of the largest transform block is 32x32, the CU can be divided into four 32x32 blocks for transformation. For example, if the size of the CU is 32x64 and the size of the largest transform block is 32x32, the CU can be divided into two 32x32 blocks for transformation.

[0448] In such cases, information about whether a CU is split for transformation may not be separately signaled. Without signaling, whether a CU is split may be determined by comparing the horizontal size (and / or vertical size) of the CU with the horizontal size (and / or vertical size) of the largest transform block. For example, if the horizontal size of the CU is greater than the horizontal size of the largest transform block, the CU may be split into two vertically. Additionally, if the vertical size of the CU is greater than the vertical size of the largest transform block, the CU may be split into two horizontally.

[0449] Information about the maximum size and / or minimum size of a CU, and information about the maximum size and / or minimum size of a transform block can be signaled or determined at a higher level for the CU. For example, the higher level can be a sequence level, a picture level, a tile level, a tile group level, a slice level, etc. For example, the minimum size of a CU can be determined as 4x4. For example, the maximum size of a transform block can be determined as 64x64. For example, the minimum size of a transform block can be determined as 4x4.

[0450] Information about the minimum size of a CU corresponding to a leaf node of a quad tree (i.e., quad tree minimum size) and / or information about the maximum depth of a path from a root node to a leaf node of a multi-type tree (i.e., multi-type tree maximum depth) can be signaled or determined at a higher level for the CU. For example, the higher level can be a sequence level, a picture level, a slice level, a tile group level, a tile level, etc. Information about the quad tree minimum size and / or information about the multi-type tree maximum depth can be signaled or determined separately for each of an intra slice and an inter slice.

[0451] The differential information about the size of a CTU and the maximum size of a transform block can be signaled or determined at a higher level for the CU. For example, the higher level can be a sequence level, a picture level, a slice level, a tile group level, and a tile level. Information about the maximum size of a CU corresponding to each node of a binary tree (i.e., the maximum size of a binary tree) can be determined based on the size and differential information of the CTU. The maximum size of a CU corresponding to each node of a ternary tree (i.e., the maximum size of a ternary tree) can have different values ​​depending on the type of the slice. For example, within an intra slice, the maximum size of a ternary tree can be 32x32. Also, for example, within an inter slice, the maximum size of a ternary tree can be 128x128. For example, the minimum size of a CU corresponding to each node of a binary tree (i.e., the minimum size of a binary tree) and / or the minimum size of a CU corresponding to each node of a ternary tree (i.e., the minimum size of a ternary tree) can be set to the minimum size of the CU.

[0452] As another example, the binary tree maximum size and / or the ternary tree maximum size may be signaled or determined at the slice level. Additionally, the binary tree minimum size and / or the ternary tree minimum size may be signaled or determined at the slice level.

[0453] Based on the various block sizes and depths described above, quad partitioning information, information indicating whether a multi-type tree is partitioned, partitioning tree information, and / or partitioning direction information may or may not be present in the bitstream.

[0454] For example, if the size of the CU is not larger than the quad tree minimum size, the CU may not contain quad partition information, and the quad partition information for the CU may be inferred as the second value.

[0455] For example, if the size (width and height) of a CU corresponding to a node of a multi-type tree is greater than the maximum size (width and height) of a binary tree and / or the maximum size (width and height) of a ternary tree, the CU may not be split into a binary tree and / or a ternary tree. Depending on this decision method, information indicating whether a multi-type tree is split may not be signaled and may be inferred as a second value.

[0456] Alternatively, if the size (width and height) of the CU corresponding to the node of the multi-type tree is equal to the minimum size (width and height) of the binary tree, or the size (width and height) of the CU is equal to twice the minimum size (width and height) of the ternary tree, the CU may not be split into a binary tree form and / or a ternary tree form. Depending on this decision method, the information indicating whether the multi-type tree is split may not be signaled and may be inferred as a second value. This is because splitting the CU into a binary tree form and / or a ternary tree form generates a CU smaller than the minimum size of the binary tree and / or the minimum size of the ternary tree.

[0457] Alternatively, the binary tree split or ternary tree split may be limited based on the size of the virtual pipeline data unit (i.e., the pipeline buffer size). For example, if the binary tree split or ternary tree split would split the CU into sub-CUs that do not fit within the pipeline buffer size, the binary tree split or ternary tree split may be limited. The pipeline buffer size may be equal to the size of the largest transform block (e.g., 64X64).

[0458] For example, when the pipeline buffer size is 64X64, the following partitions may be limited.

[0459] - Ternary tree partitioning for NxM (N and / or M are 128) CUs

[0460] - Horizontal binary tree partitioning for 128xN (N <= 64) CUs

[0461] - Vertical binary tree partitioning for Nx128 (N <= 64) CUs

[0462] Alternatively, if the depth of the multi-type tree of the CU corresponding to the node of the multi-type tree is equal to the maximum depth of the multi-type tree, the CU may not be split into a binary tree and / or a ternary tree. Depending on this decision method, information indicating whether the multi-type tree is split may not be signaled and may be inferred as a second value.

[0463] Alternatively, for a CU corresponding to a node of a multi-type tree, information indicating whether the multi-type tree is split may be signaled only if at least one of a vertical binary tree split, a horizontal binary tree split, a vertical ternary tree split, and a horizontal ternary tree split is possible. Otherwise, the CU may not be split into a binary tree form and / or a ternary tree form. Depending on this decision method, information indicating whether the multi-type tree is split may not be signaled and may be inferred as a second value.

[0464] Alternatively, the split direction information may be signaled only if both vertical binary tree splitting and horizontal binary tree splitting are possible for the CU corresponding to the node of the multi-type tree, or if both vertical ternary tree splitting and horizontal ternary tree splitting are possible. Otherwise, the split direction information may not be signaled and may be inferred as a value indicating the direction in which the CU can be split.

[0465] Alternatively, the split tree information may be signaled only if both vertical binary tree splitting and vertical ternary tree splitting are possible for the CU corresponding to a node of the multi-type tree, or if both horizontal binary tree splitting and horizontal ternary tree splitting are possible. Otherwise, the split tree information may not be signaled and may be inferred as a value indicating a tree applicable to the split of the CU.

[0466]

[0467] Figure 4 is a diagram illustrating the form of a prediction unit that a coding unit can include.

[0468] Among the CUs split from the LCU, a CU that is no longer split can be split into one or more prediction units (PUs).

[0469] A PU can be the basic unit for prediction. A PU can be encoded and decoded in any of skip mode, inter mode, and intra mode. A PU can be divided into various forms depending on each mode. For example, the target block described above with reference to FIG. 1 and the target block described above with reference to FIG. 2 can be PUs.

[0470] A CU may not be partitioned into PUs. If a CU is not partitioned into PUs, the size of the CU and the size of the PUs may be the same.

[0471] In skip mode, there may be no partitioning within a CU. In skip mode, a 2Nx2N mode (410) in which the sizes of PUs and CUs are the same without partitioning may be supported.

[0472] In inter mode, eight types of partitioned shapes can be supported within the CU. For example, in inter mode, 2Nx2N mode (410), 2NxN mode (415), Nx2N mode (420), NxN mode (425), 2NxnU mode (430), 2NxnD mode (435), nLx2N mode (440), and nRx2N mode (445) can be supported.

[0473] In intra mode, 2Nx2N mode (410) and NxN mode (425) can be supported.

[0474] In the 2Nx2N mode (410), a PU of size 2Nx2N can be encoded. A PU of size 2Nx2N can mean a PU of the same size as the size of a CU. For example, a PU of size 2Nx2N can have a size of 64x64, 32x32, 16x16, or 8x8.

[0475] In NxN mode (425), a PU of size NxN can be encoded.

[0476] For example, in intra prediction, when the size of the PU is 8x8, four split PUs can be encoded. The size of the split PUs can be 4x4.

[0477] When a PU is encoded by an intra mode, the PU may be encoded using one intra prediction mode among a plurality of intra prediction modes. For example, High Efficiency Video Coding (HEVC) technology may provide 35 intra prediction modes, and the PU may be encoded using one intra prediction mode among the 35 intra prediction modes.

[0478] Whether a PU will be encoded in 2Nx2N mode (410) or NxN mode (425) can be determined by the rate-distortion cost.

[0479] The encoding device (100) can perform an encoding operation on a PU having a size of 2Nx2N. Here, the encoding operation may be encoding the PU in each of a plurality of intra prediction modes that the encoding device (100) can use. Through the encoding operation, an optimal intra prediction mode for the PU having a size of 2Nx2N can be derived. The optimal intra prediction mode may be an intra prediction mode that generates the minimum rate-distortion cost for encoding a PU having a size of 2Nx2N among a plurality of intra prediction modes that the encoding device (100) can use.

[0480] In addition, the encoding device (100) can sequentially perform an encoding operation on each PU of the PUs divided into NxN. Here, the encoding operation may be encoding the PU in each of a plurality of intra prediction modes that the encoding device (100) can use. Through the encoding operation, an optimal intra prediction mode for a PU of size NxN can be derived. The optimal intra prediction mode may be an intra prediction mode that generates the minimum rate-distortion cost for encoding a PU of size NxN among a plurality of intra prediction modes that the encoding device (100) can use.

[0481] The encoding device (100) can determine which of the PUs of size 2Nx2N and the PUs of size NxN to encode based on a comparison of the rate-distortion cost of the PUs of size 2Nx2N and the rate-distortion costs of the PUs of size NxN.

[0482] A CU can be divided into one or more PUs, and a PU can also be divided into multiple PUs.

[0483] For example, when one PU is split into four PUs, the width and height of each PU of the four PUs generated by the split may be half the width and half the height of the PU before the split, respectively. When a PU of size 32x32 is split into four PUs, the sizes of the four split PUs may be 16x16. When one PU is split into four PUs, it can be said that the PU is split into a quad-tree shape.

[0484] For example, when one PU is split into two PUs, the horizontal size or vertical size of each PU of the two PUs created by the split may be half the horizontal size or half the vertical size of the PU before the split, respectively. When a PU of size 32x32 is split vertically into two PUs, the sizes of the two split PUs may be 16x32. When a PU of size 32x32 is split horizontally into two PUs, the sizes of the two split PUs may be 32x16. When one PU is split into two PUs, it can be said that the PU is split in a binary-tree form.

[0485]

[0486] Figure 5 is a diagram illustrating the form of a transformation unit that can be included in a coding unit.

[0487] A transform unit (TU) may be a basic unit used for the processes of transformation, quantization, inverse transformation, inverse quantization, entropy encoding, and entropy decoding within a CU.

[0488] A TU may have a square or rectangular shape. The shape of a TU may be determined based on the size and / or shape of a CU.

[0489] Among the CUs split from an LCU, a CU that is no longer split into CUs may be split into one or more TUs. In this case, the TU split structure may be a quad-tree structure. For example, as illustrated in FIG. 5, a single CU (510) may be split one or more times according to a quad-tree structure. Through splitting, a single CU (510) may be composed of TUs of various sizes.

[0490] When a CU is split more than once, the CU can be considered to be split recursively. Through splitting, a CU can be composed of TUs of various sizes.

[0491] Alternatively, a CU may be divided into one or more TUs based on the number of vertical and / or horizontal lines that divide the CU.

[0492] A CU can be divided into symmetric TUs or asymmetric TUs. For division into asymmetric TUs, information about the size and / or shape of the TU can be signaled from the encoding device (100) to the decoding device (200). Alternatively, the size and / or shape of the TU can be derived from information about the size and / or shape of the CU.

[0493] A CU may not be split into TUs. If a CU is not split into TUs, the size of the CU and the size of the TU may be the same.

[0494] A CU can be divided into one or more TUs, and a TU can also be divided into multiple TUs.

[0495] For example, when a TU is split into four TUs, the width and height of each TU of the four TUs generated by the split may be half the width and half the height of the TU before the split, respectively. When a TU of size 32x32 is split into four TUs, the sizes of the four split TUs may be 16x16. When a TU is split into four TUs, it can be said that the TU is split into a quad-tree shape.

[0496] For example, when a TU is split into two TUs, the width or height of each TU of the two TUs generated by the split may be half the width or half the height of the TU before the split, respectively. When a TU of size 32x32 is split vertically into two TUs, the sizes of the two split TUs may be 16x32. When a TU of size 32x32 is split horizontally into two TUs, the sizes of the two split TUs may be 32x16. When a TU is split into two TUs, it can be said that the TU is split in a binary-tree form.

[0497] The CU may be partitioned in other ways than those shown in Figure 5.

[0498] For example, one CU can be split into three CUs. The horizontal or vertical sizes of the three split CUs can be 1 / 4, 1 / 2, and 1 / 4 of the horizontal or vertical size of the CU before splitting, respectively.

[0499] For example, if a CU of size 32x32 is vertically divided into three CUs, the sizes of the three divided CUs may be 8x32, 16x32, and 8x32, respectively. In this way, if one CU is divided into three CUs, the CU can be viewed as being divided in the form of a ternary tree.

[0500] Any of the partitioning methods in the form of a quad tree, a binary tree, or a ternary tree can be applied to partition a CU, and multiple partitioning methods can also be combined and used to partition a CU. In this case, when multiple partitioning methods are combined and used, it can be referred to as partitioning in the form of a composite tree.

[0501]

[0502] Figure 6 illustrates the division of blocks according to an example.

[0503] During the process of encoding and / or decoding an image, a target block may be divided as shown in Fig. 6. For example, the target block may be a CU.

[0504] For segmentation of a target block, an indicator indicating segmentation information may be signaled from an encoding device (100) to a decoding device (200). The segmentation information may be information indicating how the target block is segmented.

[0505] The split information may be one or more of a split flag (hereinafter referred to as “split_flag”), a quad-binary flag (hereinafter referred to as “QB_flag”), a quad tree flag (hereinafter referred to as “quadtree_flag”), a binary tree flag (hereinafter referred to as “binarytree_flag”), and a binary type flag (hereinafter referred to as “Btype_flag”).

[0506] split_flag can be a flag indicating whether a block is split. For example, a split_flag value of 1 can indicate that the block is split. A split_flag value of 0 can indicate that the block is not split.

[0507] QB_flag may be a flag indicating whether the block is partitioned into a quad tree or a binary tree. For example, a value of 0 for QB_flag may indicate that the block is partitioned into a quad tree. A value of 1 for QB_flag may indicate that the block is partitioned into a binary tree. Alternatively, a value of 0 for QB_flag may indicate that the block is partitioned into a binary tree. A value of 1 for QB_flag may indicate that the block is partitioned into a quad tree.

[0508] quadtree_flag can be a flag indicating whether the block is partitioned into a quadtree shape. For example, a value of 1 for quadtree_flag can indicate that the block is partitioned into a quadtree shape. A value of 0 for quadtree_flag can indicate that the block is not partitioned into a quadtree shape.

[0509] binarytree_flag can be a flag indicating whether the block is partitioned into a binary tree. For example, a value of 1 for binarytree_flag can indicate that the block is partitioned into a binary tree. A value of 0 for binarytree_flag can indicate that the block is not partitioned into a binary tree.

[0510] Btype_flag can be a flag indicating whether the block is partitioned vertically or horizontally when partitioned in the form of a binary tree. For example, a value of 0 for Btype_flag can indicate that the block is partitioned horizontally. A value of 1 for Btype_flag can indicate that the block is partitioned vertically. Alternatively, a value of 0 for Btype_flag can indicate that the block is partitioned vertically. A value of 1 for Btype_flag can indicate that the block is partitioned horizontally.

[0511] For example, the partitioning information for the block in FIG. 6 can be derived by signaling at least one of quadtree_flag, binarytree_flag, and Btype_flag as shown in Table 1 below.

[0512] quadtree_flagbinarytree_flagBtype_flag1011001010000000000101100000

[0513] For example, the split information for the block in FIG. 6 can be derived by signaling at least one of split_flag, QB_flag, and Btype_flag as shown in Table 2 below.

[0514] split_flagQB_flagBtype_flag10111001011000000110110000

[0515] The splitting method may be limited to only a quad tree, or only a binary tree, depending on the size and / or shape of the block. When such a restriction is applied, split_flag may be a flag indicating whether to split in a quad tree shape or a flag indicating whether to split in a binary tree shape. The size and shape of the block may be derived according to depth information of the block, and the depth information may be signaled from the encoding device (100) to the decoding device (200). When the size of the block falls within a specific range, only a quad tree-type splitting may be possible. For example, the specific range may be defined by at least one of a maximum block size and a minimum block size for which only a quad tree-type splitting is possible. Information indicating the maximum block size and / or the minimum block size for which only a quad tree-type splitting is possible may be signaled from the encoding device (100) to the decoding device (200) via a bitstream. In addition, such information may be signaled for at least one unit of a video, a sequence, a picture, a parameter, a tile group, and a slice (or a segment).

[0516] Alternatively, the maximum block size and / or minimum block size may be fixed sizes predefined in the encoding device (100) and the decoding device (200). For example, if the block size is greater than or equal to 64x64 and less than or equal to 256x256, only quad-tree-type splitting may be possible. In this case, split_flag may be a flag indicating whether to split in quad-tree form.

[0517] If the block size is larger than the maximum transform block size, only a quad-tree-type split may be possible. In this case, the split block may be at least one of a CU and a TU.

[0518] In this case, split_flag can be a flag indicating whether to split into a quad tree form.

[0519] If the block size falls within a specified range, only binary tree-type or ternary tree-type partitioning may be possible. Here, for example, the specified range may be defined by at least one of a maximum block size and a minimum block size within which only binary tree-type or ternary tree-type partitioning is possible.

[0520] Information indicating the maximum block size and / or minimum block size that can only be divided into binary tree-type or ternary tree-type divisions can be signaled from the encoding device (100) to the decoding device (200) via a bitstream. In addition, such information can be signaled for at least one unit among a sequence, a picture, and a slice (or a segment).

[0521] Alternatively, the maximum block size and / or minimum block size may be fixed sizes predefined in the encoding device (100) and the decoding device (200). For example, if the block size is greater than or equal to 8x8 and less than or equal to 16x16, only binary tree-type splitting may be possible. In this case, split_flag may be a flag indicating whether to split in binary tree form or ternary tree form.

[0522] The description of partitioning in the quad tree form described above can be equally applied to partitioning in the binary tree form and / or ternary tree form.

[0523] The division of a block may be restricted by previous divisions. For example, if a block is divided into a specific binary tree shape, generating multiple divided blocks, each divided block can only be further divided into a specific tree shape. Here, the specific tree shape may be at least one of a binary tree shape, a ternary tree shape, and a quad tree shape.

[0524] The above-mentioned indicator may not be signaled if the width or height of the split block is such that it cannot be split any further.

[0525]

[0526] Figure 7 is a diagram for explaining an embodiment of an intra prediction process.

[0527] The arrows extending from the center to the periphery of the graph in Fig. 7 may represent the prediction directions of directional intra prediction modes. Additionally, the numbers displayed close to the arrows may represent examples of mode values ​​assigned to intra prediction modes or prediction directions of intra prediction modes.

[0528] In Fig. 7, the number 0 may represent the Planar mode, which is a non-directional intra prediction mode. The number 1 may represent the DC mode, which is a non-directional intra prediction mode.

[0529] Intra encoding and / or decoding may be performed using reference samples of neighboring blocks of the target block. The neighboring blocks may be reconstructed neighboring blocks. The reference samples may refer to neighboring samples.

[0530] For example, intra encoding and / or decoding can be performed using values ​​or coding parameters of reference samples contained in reconstructed neighboring blocks.

[0531] The encoding device (100) and / or the decoding device (200) can generate a prediction block by performing intra prediction on a target block based on information of a sample in a target image. When performing intra prediction, the encoding device (100) and / or the decoding device (200) can generate a prediction block for the target block by performing intra prediction based on information of a sample in the target image. When performing intra prediction, the encoding device (100) and / or the decoding device (200) can perform directional prediction and / or non-directional prediction based on at least one reconstructed reference sample.

[0532] A prediction block may refer to a block generated as a result of performing intra prediction. A prediction block may correspond to at least one of a CU, PU, ​​and TU.

[0533] A unit of a prediction block can be at least one of the sizes of CU, PU, ​​and TU. A prediction block can have a square shape with a size of 2Nx2N or a size of NxN. The size of NxN can include 4x4, 8x8, 16x16, 32x32, and 64x64, etc.

[0534] Alternatively, the prediction block may be a square block having a size such as 2x2, 4x4, 8x8, 16x16, 32x32 or 64x64, or a rectangular block having a size such as 2x8, 4x8, 2x16, 4x16 and 8x16.

[0535] Intra prediction can be performed based on the intra prediction mode for the target block. The number of intra prediction modes that the target block can have can be a predefined fixed value, or can be determined differently depending on the properties of the prediction block. For example, the properties of the prediction block can include the size of the prediction block and the type of the prediction block. Additionally, the properties of the prediction block can indicate coding parameters for the prediction block.

[0536] For example, the number of intra prediction modes can be fixed to N regardless of the size of the prediction block. Alternatively, for example, the number of intra prediction modes can be 3, 5, 9, 17, 34, 35, 36, 65, 67, or 95.

[0537] The intra prediction mode can be non-directional or directional.

[0538] For example, the intra prediction mode may include two non-directional modes and 65 directional modes, corresponding to numbers 0 to 66 shown in FIG. 7.

[0539] For example, when a specific intra prediction method is used, the intra prediction mode may include two non-directional modes and 93 directional modes, corresponding to numbers -14 to 80 shown in FIG. 7.

[0540] The two non-directional modes may include DC mode and Planar mode.

[0541] A directional mode can be a prediction mode with a specific direction or a specific angle. A directional mode may also be referred to as an argular mode.

[0542] An intra prediction mode can be expressed by at least one of a mode number, a mode value, a mode angle, and a mode direction. That is, the terms "(mode) number of an intra prediction mode," "(mode) value of an intra prediction mode," "(mode) angle of an intra prediction mode," and "(mode) direction of an intra prediction mode" can be used with the same meaning and can be used interchangeably.

[0543] The number of intra prediction modes can be M. M can be greater than or equal to 1. That is, the intra prediction modes can be M, including the number of non-directional modes and the number of directional modes.

[0544] The number of intra prediction modes can be fixed to M regardless of the block size and / or color components. For example, the number of intra prediction modes can be fixed to either 35 or 67, regardless of the block size.

[0545] Alternatively, the number of intra prediction modes may vary depending on the shape, size and / or type of color components of the block.

[0546] For example, in Fig. 7, the directional prediction modes shown by the dotted lines can only be applied to predictions for non-square blocks.

[0547] For example, as the block size increases, the number of intra prediction modes may increase. Alternatively, as the block size increases, the number of intra prediction modes may decrease. When the block size is 4x4 or 8x8, the number of intra prediction modes may be 67. When the block size is 16x16, the number of intra prediction modes may be 35. When the block size is 32x32, the number of intra prediction modes may be 19. When the block size is 64x64, the number of intra prediction modes may be 7.

[0548] For example, the number of intra prediction modes may differ depending on whether the color component is a luma signal or a chroma signal. Alternatively, the number of intra prediction modes of a luma component block may be greater than the number of intra prediction modes of a chroma component block.

[0549] For example, in the vertical mode with a mode value of 50, prediction can be performed in the vertical direction based on the pixel values ​​of the reference sample. For example, in the horizontal mode with a mode value of 18, prediction can be performed in the horizontal direction based on the pixel values ​​of the reference sample.

[0550] Even in a directional mode other than the aforementioned mode, the encoding device (100) and the decoding device (200) can perform intra prediction for the target unit using a reference sample according to an angle corresponding to the directional mode.

[0551] An intra prediction mode located to the right of a vertical mode may be named a vertical-right mode. An intra prediction mode located below a horizontal mode may be named a horizontal-below mode. For example, in FIG. 7, intra prediction modes whose mode values ​​are one of 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, and 66 may be vertical-right modes. Intra prediction modes whose mode values ​​are one of 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, and 17 may be horizontal-below modes.

[0552] Non-directional modes may include direct current (DC) mode and planar mode. For example, the mode value of direct current (DC) mode may be 1. The mode value of planar mode may be 0.

[0553] The directional mode may include an angular mode. Among the multiple intra prediction modes, any mode other than the DC mode and the planar mode may be a directional mode.

[0554] When the intra prediction mode is DC mode, a prediction block may be generated based on an average of pixel values ​​of multiple reference samples. For example, a pixel value of a prediction block may be determined based on an average of pixel values ​​of multiple reference samples.

[0555] The number of intra prediction modes and the mode values ​​of each intra prediction mode described above may be merely exemplary. The number of intra prediction modes and the mode values ​​of each intra prediction mode described above may be defined differently depending on the embodiment, implementation, and / or needs.

[0556] A step of checking whether samples included in a reconstructed neighboring block can be used as reference samples of the target block to perform intra prediction on the target block may be performed. If there is a sample among the samples of the neighboring block that cannot be used as a reference sample of the target block, a value generated by copying and / or interpolating using a sample value of at least one of the samples included in the reconstructed neighboring block may be replaced with the sample value of the sample that cannot be used as a reference sample. If the value generated by copying and / or interpolating is replaced with the sample value of the sample, the sample can be used as a reference sample of the target block.

[0557] When intra prediction is used, a filter may be applied to at least one of the reference sample or the prediction sample based on at least one of the intra prediction mode and the size of the target block.

[0558] The type of filter applied to at least one of the reference sample or the predicted sample may vary depending on at least one of the intra prediction mode of the target block, the size of the target block, and the shape of the target block. The type of filter may be classified according to one or more of the length of the filter tap, the value of the filter coefficient, and the filter strength. The length of the filter tap may refer to the number of filter taps. In addition, the number of filter taps may refer to the length of the filter.

[0559] When the intra prediction mode is the planar mode, when generating a prediction block of a target block, a sample value of a prediction target sample can be generated using a weighted sum of an upper reference sample of the target sample, a left reference sample of the target sample, an upper-right reference sample of the target block, and a lower-left reference sample of the target block, depending on the position of the prediction target sample within the prediction block.

[0560] When the intra prediction mode is DC mode, the average value of the upper reference samples and the left reference samples of the target block may be used to generate a prediction block of the target block. In addition, filtering using the values ​​of the reference samples may be performed for specific rows or specific columns within the target block. The specific rows may be one or more upper rows adjacent to the reference sample. The specific columns may be one or more left columns adjacent to the reference sample.

[0561] When the intra prediction mode is a directional mode, a prediction block can be generated using the top reference sample, the left reference sample, the top-right reference sample, and / or the bottom-left reference sample of the target block.

[0562] Real-valued interpolation may also be performed to generate the aforementioned prediction samples.

[0563] The intra prediction mode of the target block can be predicted from the intra prediction mode of the neighboring block of the target block, and the information used for prediction can be entropy encoded / decoded.

[0564] For example, if the intra prediction modes of the target block and the neighboring blocks are the same, a predefined flag can be used to signal that the intra prediction modes of the target block and the neighboring blocks are the same.

[0565] For example, an indicator may be signaled that indicates an intra prediction mode that is the same as the intra prediction mode of the target block among the intra prediction modes of multiple neighboring blocks.

[0566] If the intra prediction modes of the target block and the neighboring blocks are different, information of the intra prediction mode of the target block can be encoded and / or decoded using entropy encoding and / or decoding.

[0567]

[0568] Figure 8 is a diagram for explaining reference samples used in the intra prediction process.

[0569] The reconstructed reference samples used for intra prediction of the target block may include below-left reference samples, left reference samples, above-left corner reference samples, above reference samples, and above-right reference samples.

[0570] For example, left reference samples may refer to reconstructed reference pixels adjacent to the left side of the target block. Top reference samples may refer to reconstructed reference pixels adjacent to the top side of the target block. Top left corner reference samples may refer to reconstructed reference pixels located at the top left corner of the target block. In addition, bottom left reference samples may refer to reference samples located at the bottom of the left sample line among samples located on the same line as the left sample line composed of the left reference samples. Top right reference samples may refer to reference samples located at the right side of the top pixel line among samples located on the same line as the top sample line composed of the top reference samples.

[0571] When the size of the target block is NxN, the number of lower left reference samples, left reference samples, upper reference samples, and upper right reference samples can each be N.

[0572] A prediction block can be generated through intra prediction for a target block. Generating the prediction block may include determining the values ​​of pixels in the prediction block. The target block and the prediction block may be of the same size.

[0573] Reference samples used for intra prediction of a target block may vary depending on the intra prediction mode of the target block. The direction of the intra prediction mode may indicate a dependency relationship between reference samples and pixels of the prediction block. For example, the value of a specified reference sample may be used as the value of one or more specified pixels of the prediction block. In this case, the specified reference sample and the one or more specified pixels of the prediction block may be samples and pixels specified in a straight line in the direction of the intra prediction mode. In other words, the value of the specified reference sample may be copied as the value of a pixel located in the reverse direction of the direction of the intra prediction mode. Alternatively, the value of a pixel of the prediction block may be the value of a reference sample located in the direction of the intra prediction mode based on the position of the pixel.

[0574] For example, if the intra prediction mode of the target block is vertical mode, the upper reference samples can be used for intra prediction. If the intra prediction mode is vertical mode, the value of a pixel of the prediction block may be the value of a reference sample located vertically above the position of the pixel. Therefore, the upper reference samples adjacent to the upper part of the target block can be used for intra prediction. In addition, the values ​​of pixels in one row of the prediction block may be identical to the values ​​of the upper reference samples.

[0575] For example, if the intra prediction mode of the target block is horizontal mode, the left reference samples can be used for intra prediction. If the intra prediction mode is horizontal mode, the value of a pixel of the prediction block may be the value of a reference sample located horizontally to the left of the pixel. Therefore, the left reference samples adjacent to the left of the target block can be used for intra prediction. In addition, the values ​​of pixels in one column of the prediction block may be identical to the values ​​of the left reference samples.

[0576] For example, if the mode value of the intra prediction mode of the target block is 34, at least a portion of the left reference samples, the upper left corner reference samples, and at least a portion of the upper reference samples may be used for intra prediction. If the mode value of the intra prediction mode is 34, the value of a pixel of the prediction block may be the value of a reference sample located diagonally to the upper left with respect to the pixel.

[0577] Additionally, when an intra prediction mode is used where the mode value is one of 52 to 66, at least some of the upper right reference samples may be used for intra prediction.

[0578] Additionally, when an intra prediction mode is used where the mode value is one of 2 to 17, at least some of the lower left reference samples may be used for intra prediction.

[0579] Additionally, when an intra prediction mode is used where the mode value is one of 19 to 49, the upper left corner reference sample can be used for intra prediction.

[0580] The number of reference samples used to determine the pixel value of one pixel of a prediction block may be one or more.

[0581] As described above, the pixel value of a pixel of a prediction block can be determined based on the position of the reference sample indicated by the position of the pixel and the direction of the intra prediction mode. If the position of the reference sample indicated by the position of the pixel and the direction of the intra prediction mode is an integer position, the value of one reference sample indicated by the integer position can be used to determine the pixel value of the pixel of the prediction block.

[0582] When the position of the reference sample pointed to by the position of the pixel and the direction of the intra prediction mode is not an integer position, an interpolated reference sample can be generated based on two reference samples closest to the position of the reference sample. The value of the interpolated reference sample can be used to determine the pixel value of the pixel of the prediction block. That is to say, when the position of the reference sample pointed to by the position of the pixel of the prediction block and the direction of the intra prediction mode represents a space between two reference samples, an interpolated value can be generated based on the values ​​of the two samples.

[0583] The predicted block generated by prediction may not be identical to the original target block. In other words, there may be a prediction error, which is the difference between the target block and the predicted block, and there may also be a prediction error between the pixels of the target block and the pixels of the predicted block.

[0584] Hereinafter, the terms "difference", "error" and "residual" may be used interchangeably and with the same meaning.

[0585] For example, in directional intra prediction, a greater distance between pixels in a predicted block and reference samples can result in a larger prediction error. This prediction error can lead to discontinuities between the predicted block and neighboring blocks.

[0586] Filtering can be used on predicted blocks to reduce prediction errors. Filtering can adaptively apply filters to regions within a predicted block that are considered to have high prediction errors. For example, the regions considered to have high prediction errors may be the boundaries of the predicted blocks. Furthermore, depending on the intra-prediction mode, the regions considered to have high prediction errors within a predicted block may vary, and the characteristics of the filters may vary.

[0587] As illustrated in FIG. 8, for intra prediction of a target block, at least one of reference lines 0 to 3 may be used.

[0588] Each reference line in FIG. 8 may represent a reference sample line including one or more reference samples. A smaller reference line number may indicate a line of reference samples closer to the target block.

[0589] Instead of being obtained from reconstructed neighboring blocks, samples of segment A and segment F can be obtained through padding using the nearest samples of segment B and segment E, respectively.

[0590] Index information indicating a reference sample line to be used for intra prediction of a target block may be signaled. The index information may indicate a reference sample line among a plurality of reference sample lines used for intra prediction of the target block. For example, the index information may have a value of one of 0 to 3.

[0591] If the upper boundary of the target block is the boundary of the CTU, only reference sample line 0 may be available. Therefore, in this case, index information may not be signaled. If a reference sample line other than reference sample line 0 is used, filtering for the prediction block described below may not be performed.

[0592] In the case of inter-color intra prediction, a prediction block for a target block of a second color component can be generated based on a corresponding reconstructed block of a first color component.

[0593] For example, the first color component may be a luma component, and the second color component may be a chroma component.

[0594] For intra prediction between color components, parameters of a linear model between the first color component and the second color component can be derived based on a template.

[0595] The template may include a top reference sample and / or a left reference sample of the target block, and may include a top reference sample and / or a left reference sample of the reconstructed block of the first color component corresponding to these reference samples.

[0596] For example, the parameters of the linear model can be derived using 1) the value of the sample of the first color component having the maximum value among the samples in the template, 2) the value of the sample of the second color component corresponding to the sample of the first color component, 3) the value of the sample of the first color component having the minimum value among the samples in the template, and 4) the value of the sample of the second color component corresponding to the sample of the first color component.

[0597] Once the parameters of the linear model are derived, a prediction block for the target block can be generated by applying the corresponding reconstructed block to the linear model.

[0598] Depending on the image format, subsampling may be performed on the surrounding samples of the reconstructed block of the first color component and the corresponding reconstructed block. For example, if one sample of the second color component corresponds to four samples of the first color component, one corresponding sample may be calculated by subsampling the four samples of the first color component. When subsampling is performed, derivation of the parameters of the linear model and intra prediction between the color components may be performed based on the subsampled corresponding samples.

[0599] Whether intra prediction is performed between color components and / or the range of templates can be signaled as an intra prediction mode.

[0600] The target block can be divided into two or four sub-blocks in the horizontal and / or vertical directions.

[0601] The split sub-blocks can be sequentially reconstructed. That is, as intra prediction is performed on a sub-block, a sub-prediction block for the sub-block can be generated. Furthermore, as inverse quantization and / or inverse transformation are performed on the sub-block, a sub-residual block for the sub-block can be generated. A reconstructed sub-block can be generated by adding the sub-prediction block to the sub-residual block. The reconstructed sub-block can be used as a reference sample for intra prediction of a subsequent sub-block.

[0602] A sub-block may be a block containing more than a specified number of samples (e.g., 16). Therefore, for example, if the target block is an 8x4 block or a 4x8 block, the target block may be divided into two sub-blocks. Furthermore, if the target block is a 4x4 block, the target block cannot be divided into sub-blocks. If the target block has any other size, the target block may be divided into four sub-blocks.

[0603] Information regarding whether intra prediction is performed based on these sub-blocks and / or the segmentation direction (horizontal or vertical) may be signaled.

[0604] Such sub-block-based intra prediction may be restricted to be performed only when using reference sample line 0. When sub-block-based intra prediction is performed, filtering on the prediction block described below may not be performed.

[0605] A final prediction block can be generated by performing filtering on the prediction block generated by intra prediction.

[0606] Filtering can be performed by applying specific weights to the filtering target sample, the left reference sample, the top reference sample, and / or the top left reference sample.

[0607] The weights and / or reference samples (or the range of the reference samples or the location of the reference samples, etc.) used for filtering may be determined based on at least one of the block size, the intra prediction mode, and the location of the filtering target sample within the prediction block.

[0608] For example, filtering may be performed only for specific intra prediction modes (e.g., DC mode, planar mode, vertical mode, horizontal mode, diagonal mode, and / or adjacent diagonal mode).

[0609] An adjacent diagonal mode can be a mode whose number is the number of the diagonal mode plus k, or a mode whose number is the number of the diagonal mode minus k. In other words, the number of the adjacent diagonal mode can be the sum of the number of the diagonal mode plus k, or the difference between the number of the diagonal mode plus k. For example, k can be a positive integer less than or equal to 8.

[0610] The intra prediction mode of the target block can be derived using the intra prediction modes of neighboring blocks existing around the target block, and the derived intra prediction mode can be entropy encoded and / or entropy decoded.

[0611] For example, if the intra prediction mode of the target block and the intra prediction mode of the neighboring block are the same, information that the intra prediction mode of the target block and the intra prediction mode of the neighboring block are the same can be signaled using specified flag information.

[0612] Additionally, for example, indicator information for a neighboring block having an intra prediction mode identical to the intra prediction mode of the target block among intra prediction modes of a plurality of neighboring blocks can be signaled.

[0613] For example, if the intra prediction mode of the target block and the intra prediction mode of the neighboring block are different from each other, entropy encoding and / or entropy decoding of information about the intra prediction mode of the target block can be performed by performing entropy encoding and / or entropy decoding based on the intra prediction mode of the neighboring block.

[0614]

[0615] Figure 9 is a diagram for explaining an embodiment of an inter prediction process.

[0616] The rectangles illustrated in FIG. 9 may represent images (or pictures). Furthermore, arrows in FIG. 9 may represent prediction directions. An arrow from a first picture to a second picture may indicate that the second picture references the first picture. That is, images may be encoded and / or decoded according to the prediction direction.

[0617] Each picture can be classified into an I picture (Intra Picture), a P picture (Uni-prediction Picture), and a B picture (Bi-prediction Picture) according to its encoding type. Each picture can be encoded and / or decoded according to its encoding type.

[0618] When the target image to be encoded is an I-picture, the target image can be encoded using data within the image itself without inter-prediction that refers to other images. For example, an I-picture can be encoded only with intra-prediction.

[0619] If the target image is a P picture, the target image can be encoded through inter prediction using only reference pictures existing in one direction. Here, the one direction can be forward or backward.

[0620] When the target image is a B picture, the target image can be encoded through inter prediction using reference pictures existing in both directions or inter prediction using reference pictures existing in one of the forward and backward directions. Here, the bidirectional directions can be forward and backward.

[0621] P pictures and B pictures that are encoded and / or decoded using reference pictures can be considered as images in which inter prediction is used.

[0622] Below, inter prediction in inter mode according to an embodiment is specifically described.

[0623] Inter prediction or motion compensation can be performed using reference images and motion information.

[0624] In inter mode, the encoding device (100) can perform inter prediction and / or motion compensation on the target block. The decoding device (200) can perform inter prediction and / or motion compensation corresponding to the inter prediction and / or motion compensation in the encoding device (100) on the target block.

[0625] Motion information for a target block can be derived during inter prediction by each of the encoding device (100) and the decoding device (200). The motion information can be derived using motion information of a reconstructed neighboring block, motion information of a call block, and / or motion information of a block adjacent to a call block.

[0626] For example, the encoding device (100) or the decoding device (200) can perform prediction and / or motion compensation by using motion information of a spatial candidate and / or a temporal candidate as motion information of a target block. The target block may mean a PU and / or a PU partition.

[0627] A spatial candidate may be a reconstructed block that is spatially adjacent to the target block.

[0628] A temporal candidate may be a reconstructed block corresponding to a target block within an already reconstructed collocated picture (col picture).

[0629] In inter prediction, the encoding device (100) and the decoding device (200) can improve encoding efficiency and decoding efficiency by utilizing motion information of spatial candidates and / or temporal candidates. Motion information of spatial candidates may be referred to as spatial motion information. Motion information of temporal candidates may be referred to as temporal motion information.

[0630] Hereinafter, the motion information of a spatial candidate may be motion information of a PU including the spatial candidate. The motion information of a temporal candidate may be motion information of a PU including the temporal candidate. The motion information of a candidate block may be motion information of a PU including the candidate block.

[0631] Inter prediction can be performed using reference pictures.

[0632] A reference picture may be at least one of a previous picture of the target picture or a subsequent picture of the target picture. A reference picture may refer to an image used for predicting the target block.

[0633] In inter prediction, an area within a reference picture can be specified by using a reference picture index (or refIdx) indicating the reference picture and a motion vector (to be described later). Here, the specified area within the reference picture can indicate a reference block.

[0634] Inter prediction can select a reference picture and select a reference block corresponding to the target block within the reference picture. Additionally, inter prediction can generate a prediction block for the target block using the selected reference block.

[0635] Motion information can be derived during inter prediction by each of the encoding device (100) and the decoding device (200).

[0636] A spatial candidate may be a block that 1) exists within the target picture, 2) has already been reconstructed through encoding and / or decoding, and 3) is adjacent to the target block or is located at a corner of the target block. Here, a block located at a corner of the target block may be a block that is vertically adjacent to a neighboring block that is horizontally adjacent to the target block, or a block that is horizontally adjacent to a neighboring block that is vertically adjacent to the target block. "A block located at a corner of the target block" may have the same meaning as "a block adjacent to a corner of the target block." "A block located at a corner of the target block" may be included in "a block adjacent to the target block."

[0637] For example, a spatial candidate may be a reconstructed block located to the left of the target block, a reconstructed block located above the target block, a reconstructed block located at the lower left corner of the target block, a reconstructed block located at the upper right corner of the target block, or a reconstructed block located at the upper left corner of the target block.

[0638] Each of the encoding device (100) and the decoding device (200) can identify a block existing at a location spatially corresponding to a target block within a call picture. The location of the target block within the target picture and the location of the identified block within the call picture may correspond to each other.

[0639] Each of the encoding device (100) and the decoding device (200) can determine a call block existing at a predetermined relative position with respect to the identified block as a temporal candidate. The predetermined relative position may be a position inside and / or outside the identified block.

[0640] For example, a call block may include a first call block and a second call block. When the coordinates of the identified block are (xP, yP) and the size of the identified block is (nPSW, nPSH), the first call block may be a block located at coordinates (xP + nPSW, yP + nPSH). The second call block may be a block located at coordinates (xP + (nPSW >> 1), yP + (nPSH >> 1)). The second call block may be optionally used when the first call block is unavailable.

[0641] The motion vector of the target block can be determined based on the motion vector of the call block. Each of the encoding device (100) and the decoding device (200) can scale the motion vector of the call block. The scaled motion vector of the call block can be used as the motion vector of the target block. In addition, the motion vector of the motion information of the temporal candidates stored in the list can be a scaled motion vector.

[0642] The ratio of the motion vector of the target block to the motion vector of the called block may be equal to the ratio of the first temporal distance and the second temporal distance. The first temporal distance may be the distance between the reference picture of the target block and the target picture. The second temporal distance may be the distance between the reference picture of the called block and the called picture.

[0643] The method of deriving motion information may vary depending on the inter prediction mode of the target block. For example, inter prediction modes applied for inter prediction may include Advanced Motion Vector Predictor (AMVP) mode, merge mode, skip mode, merge mode with motion vector difference, sub-block merge mode, triangulation mode, inter-intra joint prediction mode, affine inter mode, and current picture reference mode. The merge mode may also be referred to as motion merge mode. Below, each of the modes is described in detail.

[0644] 1) AMVP mode

[0645] When AMVP mode is used, the encoding device (100) can search for similar blocks in the neighborhood of the target block. The encoding device (100) can obtain a predicted block by performing prediction on the target block using motion information of the searched similar blocks. The encoding device (100) can encode a residual block, which is the difference between the target block and the predicted block.

[0646] 1-1) Creating a list of predicted motion vector candidates

[0647] When the AMVP mode is used as the prediction mode, each of the encoding device (100) and the decoding device (200) can generate a prediction motion vector candidate list using the motion vector of the spatial candidate, the motion vector of the temporal candidate, and the zero vector. The prediction motion vector candidate list can include one or more prediction motion vector candidates. At least one of the motion vector of the spatial candidate, the motion vector of the temporal candidate, and the zero vector can be determined and used as the prediction motion vector candidate.

[0648] Hereinafter, the terms "predicted motion vector (candidate)" and "motion vector (candidate)" may be used interchangeably and have the same meaning.

[0649] Hereinafter, the terms “predicted motion vector candidate” and “AMVP candidate” may be used interchangeably and have the same meaning.

[0650] Hereinafter, the terms “predicted motion vector candidate list” and “AMVP candidate list” may be used interchangeably and have the same meaning.

[0651] A spatial candidate may include a reconstructed spatial neighboring block. In other words, the motion vector of the reconstructed neighboring block may be referred to as a spatial prediction motion vector candidate.

[0652] A temporal candidate may include a call block and blocks adjacent to the call block. In other words, the motion vector of a call block or the motion vector of a block adjacent to the call block may be referred to as a temporal prediction motion vector candidate.

[0653] The zero vector can be a (0, 0) motion vector.

[0654] The predicted motion vector candidate may be a motion vector predictor for predicting a motion vector. Additionally, in the encoding device (100), the predicted motion vector candidate may be an initial search position for a motion vector.

[0655] 1-2) Motion vector search using the predicted motion vector candidate list

[0656] The encoding device (100) can use the predicted motion vector candidate list to determine a motion vector to be used for encoding a target block within a search range. In addition, the encoding device (100) can determine a predicted motion vector candidate to be used as a predicted motion vector of the target block among the predicted motion vector candidates in the predicted motion vector candidate list.

[0657] The motion vector to be used for encoding the target block may be a motion vector that can be encoded at the minimum cost.

[0658] Additionally, the encoding device (100) can determine whether to use the AMVP mode in encoding the target block.

[0659] 1-3) Transmission of inter prediction information

[0660] The encoding device (100) can generate a bitstream including inter prediction information required for inter prediction. The decoding device (200) can perform inter prediction on a target block using the inter prediction information of the bitstream.

[0661] Inter prediction information may include 1) mode information indicating whether AMVP mode is used, 2) predicted motion vector index, 3) motion vector difference (MVD), 4) reference direction, and 5) reference picture index.

[0662] Hereinafter, the terms “predicted motion vector index” and “AMVP index” may be used interchangeably and have the same meaning.

[0663] Additionally, the inter prediction information may include residual signals.

[0664] The decoding device (200) can obtain a predicted motion vector index, a motion vector difference, a reference direction, and a reference picture index from the bitstream through entropy decoding when the mode information indicates that the AMVP mode is used.

[0665] The predicted motion vector index may point to a predicted motion vector candidate used for prediction of a target block among predicted motion vector candidates included in the predicted motion vector candidate list.

[0666] 1-4) Inter prediction in AMVP mode using inter prediction information

[0667] The decoding device (200) can derive a predicted motion vector candidate using a predicted motion vector candidate list, and can determine motion information of a target block based on the derived predicted motion vector candidate.

[0668] The decoding device (200) can determine a motion vector candidate for the target block from among the predicted motion vector candidates included in the predicted motion vector candidate list using the predicted motion vector index. The decoding device (200) can select a predicted motion vector candidate indicated by the predicted motion vector index from among the predicted motion vector candidates included in the predicted motion vector candidate list as the predicted motion vector of the target block.

[0669] The encoding device (100) can generate an entropy-encoded predicted motion vector index by applying entropy encoding to the predicted motion vector index, and can generate a bitstream including the entropy-encoded predicted motion vector index. The entropy-encoded predicted motion vector index can be signaled from the encoding device (100) to the decoding device (200) through the bitstream. The decoding device (200) can extract the entropy-encoded predicted motion vector index from the bitstream, and can obtain the predicted motion vector index by applying entropy decoding to the entropy-encoded predicted motion vector index.

[0670] The motion vector actually used for inter prediction of the target block may not match the predicted motion vector. An MVD may be used to represent the difference between the motion vector actually used for inter prediction of the target block and the predicted motion vector. The encoding device (100) may derive a predicted motion vector similar to the motion vector actually used for inter prediction of the target block in order to use an MVD with a size as small as possible.

[0671] The MVD may be the difference between the motion vector of the target block and the predicted motion vector. The encoding device (100) may calculate the MVD and generate an entropy-encoded MVD by applying entropy encoding to the MVD. The encoding device (100) may generate a bitstream including the entropy-encoded MDV.

[0672] The MVD can be transmitted from the encoding device (100) to the decoding device (200) via a bitstream. The decoding device (200) can extract an entropy-encoded MVD from the bitstream and obtain the MVD by applying entropy decoding to the entropy-encoded MVD.

[0673] The decoding device (200) can derive the motion vector of the target block by combining the MVD and the predicted motion vector. In other words, the motion vector of the target block derived from the decoding device (200) can be the sum of the MVD and the motion vector candidate.

[0674] In addition, the encoding device (100) can generate entropy-encoded MVD resolution information by applying entropy encoding to the calculated MVD resolution information, and can generate a bitstream including the entropy-encoded MVD resolution information. The decoding device (200) can extract entropy-encoded MVD resolution information from the bitstream, and can obtain MVD resolution information by applying entropy decoding to the entropy-encoded MVD resolution information. The decoding device (200) can adjust the resolution of the MVD using the MVD resolution information.

[0675] Meanwhile, the encoding device (100) can calculate the MVD based on the affine model. The decoding device (200) can derive the affine control motion vector of the target block through the sum of the MVD and the affine control motion vector candidates, and can derive the motion vector for the sub-block using the affine control motion vector.

[0676] The reference direction may point to a reference picture list used for prediction of the target block. For example, the reference direction may point to one of the reference picture list L0 and the reference picture list L1.

[0677] The reference direction may not indicate that the directions of the reference pictures are limited to the forward direction or the backward direction, but only indicates the reference picture list used for prediction of the target block. In other words, each of the reference picture list L0 and the reference picture list L1 may include pictures in the forward direction and / or the backward direction.

[0678] A unidirectional reference direction may mean that a single reference picture list is used. A bidirectional reference direction may mean that two reference picture lists are used. In other words, the reference direction may indicate that only the reference picture list L0 is used, that only the reference picture list L1 is used, or that one of the two reference picture lists is used.

[0679] A reference picture index may indicate a reference picture used for prediction of a target block among reference pictures in a reference picture list. The encoding device (100) may generate an entropy-encoded reference picture index by applying entropy encoding to the reference picture index, and may generate a bitstream including the entropy-encoded reference picture index. The entropy-encoded reference picture index may be signaled from the encoding device (100) to the decoding device (200) through a bitstream. The decoding device (200) may extract an entropy-encoded reference picture index from the bitstream, and may obtain a reference picture index by applying entropy decoding to the entropy-encoded reference picture index.

[0680] When two reference picture lists are used to predict a target block, one reference picture index and one motion vector can be used for each reference picture list. Furthermore, when two reference picture lists are used to predict a target block, two prediction blocks can be specified for the target block. For example, the (final) prediction block of the target block can be generated through the average or weighted sum of the two prediction blocks for the target block.

[0681] The motion vector of the target block can be derived by the predicted motion vector index, MVD, reference direction, and reference picture index.

[0682] The decoding device (200) can generate a prediction block for the target block based on the derived motion vector and the reference picture index. For example, the prediction block may be a reference block pointed to by the derived motion vector within the reference picture pointed to by the reference picture index.

[0683] By encoding the predicted motion vector index and MVD without encoding the motion vector itself of the target block, the amount of bits transmitted from the encoding device (100) to the decoding device (200) can be reduced, and encoding efficiency can be improved.

[0684] Motion information of reconstructed neighboring blocks may be used for the target block. In a specific inter prediction mode, the encoding device (100) may not separately encode the motion information for the target block itself. Instead of encoding the motion information of the target block, other information that can derive the motion information of the target block through the motion information of the reconstructed neighboring blocks may be encoded instead. As other information is encoded instead, the amount of bits transmitted to the decoding device (200) may be reduced, and encoding efficiency may be improved.

[0685] For example, as an inter prediction mode in which the motion information of the target block is not directly encoded, there may be a skip mode and / or a merge mode, etc. In this case, the encoding device (100) and the decoding device (200) may use an identifier and / or an index that indicates which unit's motion information among the reconstructed neighboring units is used as the motion information of the target unit.

[0686] 2) Merge mode

[0687] One method for deriving motion information for a target block is merge. Merge can refer to the merging of motions across multiple blocks. Merge can also refer to applying motion information from one block to another. In other words, merge mode can refer to a mode in which the motion information for a target block is derived from the motion information of neighboring blocks.

[0688] When the merge mode is used, the encoding device (100) can perform prediction of motion information of the target block using motion information of the spatial candidate and / or motion information of the temporal candidate. The spatial candidate may include a reconstructed spatial neighboring block that is spatially adjacent to the target block. The spatial neighboring block may include a left neighboring block and an upper neighboring block. The temporal candidate may include a call block. The terms "spatial candidate" and "spatial merge candidate" may be used interchangeably and have the same meaning. The terms "temporal candidate" and "temporal merge candidate" may be used interchangeably and have the same meaning.

[0689] The encoding device (100) can obtain a prediction block through prediction. The encoding device (100) can encode a residual block, which is the difference between the target block and the prediction block.

[0690] 2-1) Creating a merge candidate list

[0691] When merge mode is used, each of the encoding device (100) and the decoding device (200) can generate a merge candidate list using motion information of spatial candidates and / or motion information of temporal candidates. The motion information can include 1) a motion vector, 2) a reference picture index, and 3) a reference direction. The reference direction can be unidirectional or bidirectional. The reference direction can mean an inter prediction indicator.

[0692] The merge candidate list may contain merge candidates. The merge candidates may be motion information. In other words, the merge candidate list may be a list containing motion information.

[0693] Merge candidates may be motion information such as temporal candidates and / or spatial candidates. In other words, the merge candidate list may include motion information such as temporal candidates and / or spatial candidates.

[0694] Additionally, the merge candidate list may include new merge candidates generated by combining merge candidates already present in the merge candidate list. In other words, the merge candidate list may include new motion information generated by combining motion information already present in the merge candidate list.

[0695] Additionally, the merge candidate list may include a history-based merge candidate. The history-based merge candidate may be motion information of a block encoded and / or decoded before the target block.

[0696] Additionally, the merge candidate list may include a merge candidate based on the average of two merge candidates.

[0697] Merge candidates may be specific modes that derive inter-prediction information. The merge candidate may be information indicating a specific mode that derives inter-prediction information. Inter-prediction information of the target block may be derived according to the specific mode indicated by the merge candidate. In this case, the specific mode may include a process for deriving a series of inter-prediction information. This specific mode may be an inter-prediction information derivation mode or a motion information derivation mode.

[0698] Inter prediction information of a target block can be derived according to the mode indicated by a merge candidate selected by a merge index among the merge candidates in the merge candidate list.

[0699] For example, the motion information derivation modes in the merge candidate list may be at least one of 1) a sub-block unit motion information derivation mode and 2) an affine motion information derivation mode.

[0700] Additionally, the merge candidate list may include motion information of the zero vector. The zero vector may also be referred to as a zero merge candidate.

[0701] In other words, the motion information in the merge candidate list can be at least one of: 1) motion information of a spatial candidate, 2) motion information of a temporal candidate, 3) motion information generated by a combination of motion information already existing in the merge candidate list, and 4) a zero vector.

[0702] Motion information may include 1) a motion vector, 2) a reference picture index, and 3) a reference direction. The reference direction may also be referred to as an inter prediction indicator. The reference direction may be unidirectional or bidirectional. A unidirectional reference direction may indicate L0 prediction or L1 prediction.

[0703] The merge candidate list can be generated before prediction by merge mode is performed.

[0704] The number of merge candidates in the merge candidate list can be predefined. The encoding device (100) and the decoding device (200) can add merge candidates to the merge candidate list according to a predefined method and a predefined order so that the merge candidate list has a predefined number of merge candidates. Through the predefined method and the predefined order, the merge candidate list of the encoding device (100) and the merge candidate list of the decoding device (200) can be identical.

[0705] Merge can be applied on a CU or PU basis. When merging is performed on a CU or PU basis, the encoding device (100) can transmit a bitstream including predefined information to the decoding device (200). For example, the predefined information can include 1) information indicating whether merging is to be performed for each block partition, and 2) information regarding which block among the blocks that are spatial candidates and / or temporal candidates for the target block will be merged.

[0706] 2-2) Searching for motion vectors using the merge candidate list

[0707] The encoding device (100) can determine a merge candidate to be used for encoding a target block. For example, the encoding device (100) can perform predictions for the target block using merge candidates in a merge candidate list and generate residual blocks for the merge candidates. The encoding device (100) can use a merge candidate that requires the least cost for prediction and encoding of the residual block for encoding the target block.

[0708] Additionally, the encoding device (100) can determine whether to use merge mode in encoding the target block.

[0709] 2-3) Transmission of inter prediction information

[0710] The encoding device (100) can generate a bitstream including inter prediction information required for inter prediction. The encoding device (100) can perform entropy encoding on the inter prediction information to generate entropy-encoded inter prediction information, and can transmit the bitstream including the entropy-encoded inter prediction information to the decoding device (200). Through the bitstream, the entropy-encoded inter prediction information can be signaled from the encoding device (100) to the decoding device (200). The decoding device (200) can extract the entropy-encoded inter prediction information from the bitstream, and can obtain the inter prediction information by performing entropy decoding on the entropy-encoded inter prediction information.

[0711] The decoding device (200) can perform inter prediction on a target block using inter prediction information of a bitstream.

[0712] Inter prediction information may include 1) mode information indicating whether merge mode is used, 2) merge index, and 3) correction information.

[0713] Additionally, the inter prediction information may include residual signals.

[0714] The decryption device (200) can obtain the merge index from the bitstream only when the mode information indicates that the merge mode is used.

[0715] Mode information can be a merge flag. The unit of mode information can be a block. Information about a block can include mode information, and the mode information can indicate whether merge mode is applied to the block.

[0716] A merge index may indicate a merge candidate among the merge candidates included in the merge candidate list, which is used to predict the target block. Alternatively, the merge index may indicate which block among the neighboring blocks spatially or temporally adjacent to the target block is being merged.

[0717] The encoding device (100) can select a merge candidate with the highest encoding performance among the merge candidates included in the merge candidate list, and can set the value of the merge index to point to the selected merge candidate.

[0718] The correction information may be information used to correct a motion vector. The encoding device (100) may generate the correction information. The decoding device (200) may correct the motion vector of a merge candidate selected by a merge index based on the correction information.

[0719] The correction information may include at least one of information indicating whether correction has been performed, correction direction information, and correction size information. A prediction mode that corrects a motion vector based on the signaled correction information may be referred to as a merge mode with motion vector difference.

[0720] 2-4) Inter prediction in merge mode using inter prediction information

[0721] The decryption device (200) can perform prediction on a target block using a merge candidate indicated by a merge index among the merge candidates included in the merge candidate list.

[0722] The motion vector of the target block can be specified by the motion vector of the merge candidate pointed to by the merge index, the reference picture index, and the reference direction.

[0723] 3) Skip mode

[0724] Skip mode can be a mode that directly applies the motion information of spatial or temporal candidates to the target block. Furthermore, skip mode can be a mode that does not use residual signals. In other words, when skip mode is used, the reconstructed block can be identical to the predicted block.

[0725] The difference between merge mode and skip mode may lie in the transmission or use of residual signals. In other words, skip mode may be similar to merge mode, except that residual signals are not transmitted or used.

[0726] When skip mode is used, the encoding device (100) can transmit information indicating which block's motion information among the blocks that are spatial candidates or temporal candidates is used as the motion information of the target block to the decoding device (200) through a bitstream. The encoding device (100) can perform entropy encoding on this information to generate entropy-encoded information, and signal the entropy-encoded information to the decoding device (200) through a bitstream. The decoding device (200) can extract the entropy-encoded information from the bitstream, and obtain the information by performing entropy decoding on the entropy-encoded information.

[0727] Additionally, when skip mode is used, the encoding device (100) may not transmit other syntax element information, such as MVD, to the decoding device (200). For example, when skip mode is used, the encoding device (100) may not signal syntax elements regarding at least one of MVD, coded block flag, and transform coefficient level to the decoding device (200).

[0728] 3-1) Creating a list of merge candidates

[0729] Skip mode can also use a merge candidate list. In other words, a merge candidate list can be used in both merge and skip modes. In this regard, the merge candidate list may also be referred to as a "skip candidate list" or a "merge / skip candidate list."

[0730] Alternatively, skip mode may use a separate candidate list from merge mode. In such cases, the merge candidate list and merge candidates in the description below may be replaced with skip candidate list and skip candidates, respectively.

[0731] The merge candidate list can be generated before prediction is performed in skip mode.

[0732] 3-2) Searching for motion vectors using the merge candidate list

[0733] The encoding device (100) can determine a merge candidate to be used for encoding a target block. For example, the encoding device (100) can perform predictions for the target block using merge candidates in a merge candidate list. The encoding device (100) can use a merge candidate that requires the least cost for prediction to encode the target block.

[0734] Additionally, the encoding device (100) can determine whether to use skip mode in encoding the target block.

[0735] 3-3) Transmission of inter prediction information

[0736] The encoding device (100) can generate a bitstream including inter prediction information required for inter prediction. The decoding device (200) can perform inter prediction on a target block using the inter prediction information of the bitstream.

[0737] Inter prediction information may include 1) mode information indicating whether skip mode is used and 2) a skip index.

[0738] The skip index may be identical to the merge index described above.

[0739] When skip mode is used, the target block can be encoded without residual signals. The inter-prediction information may not include residual signals. Alternatively, the bitstream may not include residual signals.

[0740] The decoding device (200) can obtain a skip index from the bitstream only if the mode information indicates that the skip mode is used. As described above, the merge index and the skip index may be the same. The decoding device (200) can obtain a skip index from the bitstream only if the mode information indicates that the merge mode or the skip mode is used.

[0741] A skip index may point to a merge candidate among the merge candidates included in the merge candidate list that is used to predict the target block.

[0742] 3-4) Inter prediction in skip mode using inter prediction information

[0743] The decryption device (200) can perform prediction on a target block using a merge candidate indicated by a skip index among the merge candidates included in the merge candidate list.

[0744] The motion vector of the target block can be specified by the motion vector of the merge candidate pointed to by the skip index, the reference picture index, and the reference direction.

[0745] 4) Current picture reference mode

[0746] The current picture reference mode may mean a prediction mode that uses a pre-reconstructed region within the target picture to which the target block belongs.

[0747] Motion vectors can be used to specify the reconstructed region. Whether the target block is encoded in the current picture reference mode can be determined using the reference picture index of the target block.

[0748] A flag or index indicating whether the target block is a block encoded in the current picture reference mode may be signaled from the encoding device (100) to the decoding device (200). Alternatively, whether the target block is a block encoded in the current picture reference mode may be inferred through the reference picture index of the target block.

[0749] If the target block is encoded in the current picture reference mode, the target picture may be present at a fixed or arbitrary position within the reference picture list for the target block.

[0750] For example, the fixed position can be the position where the reference picture index value is 0 or the last position.

[0751] If the target picture exists at any location within the reference picture list, a separate reference picture index indicating this arbitrary location may be signaled from the encoding device (100) to the decoding device (200).

[0752] 5) Subblock merge mode

[0753] Sub-block merge mode may refer to a mode that derives motion information for a sub-block of a CU.

[0754] When the sub-block merge mode is applied, a sub-block merge candidate list can be generated using motion information of a call sub-block of a target sub-block in a reference image (i.e., a sub-block based temporal merge candidate) and / or an affine control point motion vector merge candidate.

[0755] 6) Triangle partition mode

[0756] In triangulation mode, target blocks can be generated by diagonally dividing a target block. For each divided target block, motion information of each divided target block can be derived, and prediction samples for each divided target block can be derived using the derived motion information. The prediction sample of the target block can be derived through a weighted sum of the prediction samples of the divided target blocks.

[0757] 7) Inter-intra joint prediction mode

[0758] The inter-intra combined prediction mode may be a mode that derives a prediction sample of a target block using a weighted sum of prediction samples generated by inter prediction and prediction samples generated by intra prediction.

[0759] In the aforementioned modes, the decoding device (200) can perform its own correction on the derived motion information. For example, the decoding device (200) can search for motion information having the minimum sum of absolute differences (SAD) by searching a specified area based on a reference block indicated by the derived motion information, and can derive the searched motion information as corrected motion information.

[0760] In the aforementioned modes, the decoding device (200) can perform compensation for prediction samples derived through inter prediction using optical flow.

[0761] In the aforementioned AMVP mode, merge mode, and skip mode, motion information to be used for prediction of a target block among motion information within the list can be specified through an index to the list.

[0762] To improve encoding efficiency, the encoding device (100) may signal only the index of the element that causes the least cost in inter prediction of the target block among the elements of the list. The encoding device (100) may encode the index and signal the encoded index.

[0763] Therefore, the aforementioned lists (i.e., the predicted motion vector candidate list and the merge candidate list) may need to be derived in the same manner based on the same data in the encoding device (100) and the decoding device (200). Here, the same data may include a reconstructed picture and a reconstructed block. Furthermore, in order to specify an element by index, the order of the elements within the list may need to be constant.

[0764]

[0765] Figure 10 shows spatial candidates according to an example.

[0766] In Fig. 10, the locations of spatial candidates are shown.

[0767] The large block in the middle can represent the target block. The five smaller blocks can represent spatial candidates.

[0768] The coordinates of the target block can be (xP, yP), and the size of the target block can be (nPSW, nPSH).

[0769] A spatial candidate A0 may be a block adjacent to the lower left corner of the target block. A0 may be a block occupying pixels at coordinates (xP - 1, yP + nPSH).

[0770] A spatial candidate A1 may be a block adjacent to the left of the target block. A1 may be the bottommost block among the blocks adjacent to the left of the target block. Alternatively, A1 may be a block adjacent to the top of A0. A1 may be a block occupying a pixel at coordinates (xP - 1, yP + nPSH - 1).

[0771] A spatial candidate B0 may be a block adjacent to the upper right corner of the target block. B0 may be a block occupying pixels at coordinates (xP + nPSW, yP - 1).

[0772] A spatial candidate B1 may be a block adjacent to the top of the target block. B1 may be the rightmost block among the blocks adjacent to the top of the target block. Alternatively, B1 may be a block adjacent to the left of B0. B1 may be a block occupying a pixel at coordinates (xP + nPSW - 1, yP - 1).

[0773] A spatial candidate B2 may be a block adjacent to the upper left corner of the target block. B2 may be a block occupying a pixel at coordinates (xP - 1, yP - 1).

[0774]

[0775] Determination of availability of spatial and temporal candidates

[0776] In order to include motion information of a spatial candidate or motion information of a temporal candidate in the list, it must be determined whether motion information of a spatial candidate or motion information of a temporal candidate is available.

[0777] Hereinafter, the candidate block may include spatial candidates and temporal candidates.

[0778] For example, the above judgment can be made by sequentially applying steps 1) to 4) below.

[0779] Step 1) If the PU containing the candidate block is outside the bounds of the picture, the availability of the candidate block may be set to false. "Availability is set to false" may mean the same thing as "is set to unavailable."

[0780] Step 2) If the PU containing the candidate block is outside the boundary of the slice, the availability of the candidate block may be set to false. If the target block and the candidate block are located in different slices, the availability of the candidate block may be set to false.

[0781] Step 3) If the PU containing the candidate block is outside the tile boundary, the availability of the candidate block may be set to false. If the target block and the candidate block are located within different tiles, the availability of the candidate block may be set to false.

[0782] Step 4) If the prediction mode of the PU containing the candidate block is intra prediction mode, the availability of the candidate block may be set to false. If the PU containing the candidate block does not use inter prediction, the availability of the candidate block may be set to false.

[0783]

[0784] Figure 11 shows the order of adding motion information of spatial candidates to the merge list according to an example.

[0785] As illustrated in Fig. 11, when adding motion information of spatial candidates to a merge list, the order of A1, B1, B0, A0, and B2 can be used. That is, motion information of available spatial candidates can be added to the merge list in the order of A1, B1, B0, A0, and B2.

[0786]

[0787] How to derive a merge list in merge mode and skip mode

[0788] As described above, the maximum number of merge candidates in the merge list can be set. The set maximum number is represented as N. The set number can be transmitted from the encoding device (100) to the decoding device (200). The slice header of the slice can include N. In other words, the maximum number of merge candidates in the merge list for the target block of the slice can be set by the slice header. For example, the value of N can be 5 by default.

[0789] Motion information (i.e., merge candidates) can be added to the merge list in the order of steps 1) to 4) below.

[0790] Step 1) Available spatial candidates among the spatial candidates can be added to the merge list. The motion information of the available spatial candidates can be added to the merge list in the order shown in Fig. 10. At this time, if the motion information of an available spatial candidate overlaps with other motion information already existing in the merge list, the motion information may not be added to the merge list. Checking whether it overlaps with other motion information existing in the list can be abbreviated as a "duplication check."

[0791] The number of additional movement information can be up to N.

[0792] Step 2) If the number of motion information items in the merge list is less than N and a temporal candidate is available, the motion information of the temporal candidate may be added to the merge list. At this time, if the motion information of the available temporal candidate overlaps with other motion information already existing in the merge list, the motion information may not be added to the merge list.

[0793] Step 3) If the number of motion information in the merge list is less than N and the type of the target slice is "B", combined motion information generated by combined bi-prediction can be added to the merge list.

[0794] The target slice may be a slice that contains the target block.

[0795] The combined motion information may be a combination of L0 motion information and L1 motion information. The L0 motion information may be motion information that only refers to the reference picture list L0. The L1 motion information may be motion information that only refers to the reference picture list L1.

[0796] Within a merge list, there may be one or more pieces of L0 motion information. Additionally, within a merge list, there may be one or more pieces of L1 motion information.

[0797] There may be one or more pieces of combined motion information. When generating the combined motion information, it may be predetermined which L0 motion information and which L1 motion information will be used among one or more pieces of L0 motion information and one or more pieces of L1 motion information. The one or more pieces of combined motion information may be generated in a predetermined order by combined bidirectional prediction using pairs of different motion information in the merge list. One of the pairs of different motion information may be L0 motion information and the other may be L1 motion information.

[0798] For example, the combined motion information that is added with the highest priority may be a combination of L0 motion information with a merge index of 0 and L1 motion information with a merge index of 1. If the motion information with a merge index of 0 is not L0 motion information or if the motion information with a merge index of 1 is not L1 motion information, the combined motion information may not be generated and added. The motion information that is added next may be a combination of L0 motion information with a merge index of 1 and L1 motion information with a merge index of 0. The specific combinations below may follow other combinations in the field of video encoding / decoding.

[0799] At this time, if the combined motion information overlaps with other motion information already existing in the merge list, the combined motion information may not be added to the merge list.

[0800] Step 4) If the number of motion information in the merge list is less than N, zero vector motion information can be added to the merge list.

[0801] Zero vector motion information may be motion information whose motion vector is a zero vector.

[0802] There may be more than one zero vector motion information. The reference picture indices of one or more zero vector motion information may be different from each other. For example, the reference picture index value of the first zero vector motion information may be 0. The reference picture index value of the second zero vector motion information may be 1.

[0803] The number of zero vector motion information may be equal to the number of reference pictures in the reference picture list.

[0804] The reference direction of the zero vector motion information can be bidirectional. Both motion vectors can be zero vectors. The number of zero vector motion information can be the smaller of the number of reference pictures in the reference picture list L0 and the number of reference pictures in the reference picture list L1. Alternatively, when the number of reference pictures in the reference picture list L0 and the number of reference pictures in the reference picture list L1 are different from each other, a unidirectional reference direction can be used for a reference picture index that can be applied to only one reference picture list.

[0805] The encoding device (100) and / or the decoding device (200) can sequentially add zero vector motion information to the merge list while changing the reference picture index.

[0806] If the zero vector motion information overlaps with other motion information already existing in the merge list, the above zero vector motion information may not be added to the merge list.

[0807] The order of steps 1) through 4) described above is merely exemplary, and the order of the steps may be changed. Furthermore, some of the steps may be omitted depending on predefined conditions.

[0808]

[0809] A method for deriving a list of predicted motion vector candidates in AMVP mode

[0810] The maximum number of predicted motion vector candidates in the predicted motion vector candidate list can be predefined. The predefined maximum number is denoted as N. For example, the predefined maximum number can be 2.

[0811] Motion information (i.e., predicted motion vector candidates) can be added to the predicted motion vector candidate list in the order of steps 1) to 3) below.

[0812] Step 1) Available spatial candidates can be added to the list of predicted motion vector candidates. The spatial candidates may include a first spatial candidate and a second spatial candidate.

[0813] The first spatial candidate may be one of A0, A1, scaled A0, and scaled A1. The second spatial candidate may be one of B0, B1, B2, scaled B0, scaled B1, and scaled B2.

[0814] The motion information of the available spatial candidates can be added to the predicted motion vector candidate list in the order of the first spatial candidate and the second spatial candidate. At this time, if the motion information of the available spatial candidate overlaps with other motion information already existing in the predicted motion vector candidate list, the motion information may not be added to the predicted motion vector candidate list. In other words, if the value of N is 2, and the motion information of the second spatial candidate is identical to the motion information of the first spatial candidate, the motion information of the second spatial candidate may not be added to the predicted motion vector candidate list.

[0815] The number of additional movement information can be up to N.

[0816] Step 2) If the number of motion information items in the predicted motion vector candidate list is less than N and a temporal candidate is available, the motion information of the temporal candidate may be added to the predicted motion vector candidate list. In this case, if the motion information of the available temporal candidate overlaps with other motion information already existing in the predicted motion vector candidate list, the motion information may not be added to the predicted motion vector candidate list.

[0817] Step 3) If the number of motion information in the predicted motion vector candidate list is less than N, zero vector motion information can be added to the predicted motion vector candidate list.

[0818] There may be more than one zero vector motion information. The reference picture indices of one or more zero vector motion information may be different from each other.

[0819] The encoding device (100) and / or the decoding device (200) can sequentially add zero vector motion information to the predicted motion vector candidate list while changing the reference picture index.

[0820] If the zero vector motion information overlaps with other motion information already existing in the predicted motion vector candidate list, the zero vector motion information may not be added to the predicted motion vector candidate list.

[0821] The description of zero vector motion information described above for merge lists can also be applied to zero vector motion information. Duplicate descriptions are omitted.

[0822] The order of steps 1) through 3) described above is merely exemplary, and the order of the steps may be changed. Furthermore, some of the steps may be omitted depending on predefined conditions.

[0823]

[0824] Figure 12 illustrates the process of transformation and quantization according to an example.

[0825] As illustrated in Fig. 12, a quantized level can be generated by performing a transformation and / or quantization process on the residual signal.

[0826] The residual signal can be generated as the difference between the original block and the predicted block. Here, the predicted block can be a block generated by intra-prediction or inter-prediction.

[0827] The residual signal can be converted to the frequency domain through a transform process that is part of the quantization process.

[0828] The transform kernel used for the transformation may include various DCT kernels such as Discrete Cosine Transform (DCT) type 2 (DCT-II) and Discrete Sine Transform (DST) kernels.

[0829] These transform kernels can perform a separable transform or a 2-dimensional (2D) non-separable transform on the residual signal. A separable transform can be a transform that performs a 1-dimensional (1D) transform on the residual signal in each of the horizontal and vertical directions.

[0830] The DCT types and DST types adaptively used for 1D transformation may include DCT-V, DCT-VIII, DST-I, and DST-VII in addition to DCT-II, as shown in Tables 3 and 4 below, respectively.

[0831] Transformation set Transformation candidates 0 DST-VII, DCT-VIII 1 DST-VII, DST-I 2 DST-VII, DCT-V

[0832] Transformation set Transformation candidates 0 DST-VII, DCT-VIII, DST-I 1 DST-VII, DST-I, DCT-VIII 2 DST-VII, DCT-V, DST-I

[0833] As shown in Tables 3 and 4, a transform set can be used to derive a DCT type or DST type to be used for transformation. Each transform set can include multiple transform candidates. Each transform candidate can be a DCT type or a DST type, etc. Table 5 below shows an example of a transform set applied in the horizontal direction and a transform set applied in the vertical direction according to the intra prediction mode.

[0834] Intra prediction mode 0123456789Vertical direction transformation set 2101010101Horizontal direction transformation set 2101010101Intra prediction mode 10111213141516171819Vertical direction transformation set 0101000000Horizontal direction transformation set 0101222222Intra prediction mode 20212223242526272829Vertical direction transformation set 0001010101Horizontal direction transformation set 2221010101Intra prediction mode 30313233343536373839Vertical direction transformation set 0101010101Horizontal direction transformation set 0101010101Intra prediction mode 40414243444546474849Vertical direction transformation Set 0101012222Horizontal transformation Set 0101010000Intra prediction mode 50515253545556575859Vertical transformation Set 2222210101Horizontal transformation Set 0000010101Intra prediction mode 60616263646566Vertical transformation Set 0101010Horizontal transformation Set 0101010

[0835] In Table 5, the number of vertical direction transformation sets and the number of horizontal direction transformation sets applied to the horizontal direction of the residual signal according to the intra prediction mode of the target block are indicated. As illustrated in Table 5, transformation sets applied to the horizontal direction and the vertical direction can be predefined according to the intra prediction mode of the target block. The encoding device (100) can perform transformation and inverse transformation on the residual signal using the transformation included in the transformation set corresponding to the intra prediction mode of the target block. In addition, the decoding device (200) can perform inverse transformation on the residual signal using the transformation included in the transformation set corresponding to the intra prediction mode of the target block. In such transformation and inverse transformation, the transformation set applied to the residual signal can be determined as illustrated in Tables 3, 4, and 5, and may not be signaled. Transformation indication information can be signaled from the encoding device (100) to the decoding device (200). The transformation instruction information may be information indicating which transformation candidate among a plurality of transformation candidates included in a transformation set applied to a residual signal is used.

[0836] For example, if the target block size is 64x64 or less, a total of three transform sets can be configured depending on the intra prediction mode. An optimal transform method can be selected from a total of nine multi-transform methods resulting from a combination of three transforms in the horizontal direction and three transforms in the vertical direction. Encoding efficiency can be improved by encoding and / or decoding the residual signal using this optimal transform method.

[0837] At this time, for at least one of the vertical and horizontal transformations, information regarding which transformation among the transformations belonging to the transformation set was used can be entropy encoded and / or decoded. Truncated unary binarization can be used to encode and / or decode this information.

[0838] The method using various transformations as described above can be applied to the residual signal generated by intra prediction or inter prediction.

[0839] The transform may include at least one of a first transform and a second transform. Transform coefficients may be generated by performing a first transform on the residual signal, and second transform coefficients may be generated by performing a second transform on the transform coefficients.

[0840] The primary transformation may be referred to as the primary transformation. Furthermore, the primary transformation may be referred to as the Adaptive Multiple Transform (AMT). As previously mentioned, AMT may imply that different transformations are applied to each of the 1D directions (i.e., the vertical and horizontal directions).

[0841] A secondary transform may be a transform intended to improve the energy concentration of the transform coefficients generated by the primary transform. Like the primary transform, the secondary transform may be a separable or non-separable transform. A non-separable transform may be a non-separable secondary transform (NSST).

[0842] The primary transformation may be performed using at least one of a plurality of predefined transformation methods. For example, the plurality of predefined transformation methods may include a Discrete Cosine Transform (DCT), a Discrete Sine Transform (DST), and a Karhunen-Loeve Transform (KLT)-based transformation.

[0843] Additionally, the primary transform can be a transform with various transform types depending on the kernel function defining the DCT or DST.

[0844] For example, the transformation type may be determined based on at least one of 1) a prediction mode of the target block (e.g., one of intra prediction and inter prediction), 2) a size of the target block, 3) a shape of the target block, 4) an intra prediction mode of the target block, 5) a component of the target block (e.g., one of a luma component and a chroma component), and 6) a partitioning type applied to the target block (e.g., one of a quad tree (QT), a binary tree (BT), and a ternary tree (TT)).

[0845] For example, the first transform may include transforms such as DCT-2, DCT-5, DCT-7, DST-7, DST-1, DST-8, and DCT-8 according to the transform kernels presented in Table 6 below. Table 6 illustrates various transform types and transform kernel functions for Multiple Transform Selection (MTS).

[0846] MTS may mean that a combination of one or more DCT and / or DST transform kernels is selected for transforming the residual signal in the horizontal and / or vertical directions.

[0847] Conversion type conversion kernel function DCT-2 DST-7 DCT-5 DCT-8 DST-1

[0848] In Table 6, i and j can be integer values ​​greater than or equal to 0 and less than or equal to N-1. A secondary transform can be performed on the transform coefficients generated by performing the primary transform. As in the primary transform, a transform set can also be defined in the secondary transform. Methods for deriving and / or determining a transform set as described above can be applied to the secondary transform as well as the primary transform.

[0849] Primary and secondary transformations can be determined for a given target.

[0850] For example, the first transform and the second transform may be applied to one or more signal components of the luma component and the chroma component. Whether the first transform and / or the second transform are applied may be determined based on at least one of the coding parameters for the target block and / or the neighboring blocks. For example, whether the first transform and / or the second transform are applied may be determined based on the size and / or shape of the target block.

[0851] In the encoding device (100) and the decoding device (200), the transformation information indicating the transformation method used for the target can be derived by using specific information.

[0852] For example, the transformation information may include an index of a transformation to be used for the primary transformation and / or the secondary transformation. Alternatively, the transformation information may indicate that the primary transformation and / or the secondary transformation are not used.

[0853] For example, when the target of the first transformation and the second transformation is a target block, the transformation method(s) applied to the first transformation and / or the second transformation indicated by the transformation information may be determined according to at least one of the coding parameters for the target block and / or the neighboring block.

[0854] Alternatively, conversion information indicating a conversion method for a specific target may be signaled from the encoding device (100) to the decoding device (200).

[0855] For example, for one CU, whether a primary transformation is used, an index indicating the primary transformation, whether a secondary transformation is used, and an index indicating the secondary transformation, etc. may be derived as transformation information in the decoding device (200). Alternatively, for one CU, transformation information indicating whether a primary transformation is used, an index indicating the primary transformation, whether a secondary transformation is used, and an index indicating the secondary transformation, etc. may be signaled.

[0856] Quantized transform coefficients (i.e., quantized levels) can be generated by performing quantization on the result or residual signal generated by performing the first transform and / or the second transform.

[0857]

[0858] Figure 13 illustrates diagonal scanning according to an example.

[0859] Figure 14 illustrates horizontal scanning according to an example.

[0860] Figure 15 illustrates vertical scanning according to an example.

[0861] The quantized transform coefficients may be scanned according to at least one of an intra prediction mode, a block size, and a block shape, and according to at least one of diagonal scanning (upper-right), vertical scanning, and horizontal scanning. A block may be a transform unit.

[0862] Each scan can start at a specific starting point and end at a specific ending point.

[0863] For example, the quantized transform coefficients can be converted into a one-dimensional vector form by scanning the coefficients of a block using the diagonal scanning of FIG. 13. Alternatively, depending on the block size and / or intra prediction mode, the horizontal scanning of FIG. 14 or the vertical scanning of FIG. 15 can be used instead of the diagonal scanning.

[0864] Vertical scanning may be scanning a two-dimensional block-shaped coefficient in the column direction. Horizontal scanning may be scanning a two-dimensional block-shaped coefficient in the row direction.

[0865] In other words, depending on the block size and / or inter prediction mode, it can be determined which scanning among diagonal scanning, vertical scanning and horizontal scanning will be used.

[0866] As illustrated in FIGS. 13, 14 and 15, the quantized transform coefficients can be scanned along the diagonal, horizontal or vertical directions.

[0867] Quantized transform coefficients can be expressed in block form. A block can include multiple sub-blocks. Each sub-block can be defined according to a minimum block size or minimum block shape.

[0868] In scanning, a scanning order based on the type or direction of scanning may be applied to sub-blocks first. Additionally, a scanning order based on the direction of scanning may be applied to quantized transform coefficients within a sub-block.

[0869] For example, as illustrated in FIGS. 13, 14, and 15, when the size of the target block is 8x8, quantized transform coefficients can be generated by a first transform, a second transform, and quantization for the residual signal of the target block. Thereafter, one of three scanning orders can be applied to four 4x4 sub-blocks, and quantized transform coefficients can be scanned according to the scanning order for each 4x4 sub-block.

[0870] The encoding device (100) can generate entropy-encoded quantized transform coefficients by performing entropy encoding on scanned quantized transform coefficients, and can generate a bitstream including the entropy-encoded quantized transform coefficients.

[0871] The decoding device (200) can extract entropy-encoded quantized transform coefficients from a bitstream, and can generate quantized transform coefficients by performing entropy decoding on the entropy-encoded quantized transform coefficients. The quantized transform coefficients can be aligned into a two-dimensional block shape through inverse scanning. At this time, as a method of inverse scanning, at least one of a diagonal scan (upper right), a vertical scan, and a horizontal scan can be performed.

[0872] In the decoding device (200), inverse quantization can be performed on quantized transform coefficients. Depending on whether a second inverse transform is performed, a second inverse transform can be performed on the result generated by performing inverse quantization. In addition, depending on whether a first inverse transform is performed, a first inverse transform can be performed on the result generated by performing the second inverse transform. By performing a first inverse transform on the result generated by performing the second inverse transform, a reconstructed residual signal can be generated.

[0873] For the luma component reconstructed via intra prediction or inter prediction, inverse mapping of the dynamic range can be performed before in-loop filtering.

[0874] The dynamic range can be divided into 16 equal pieces, and a mapping function can be signaled for each piece. The mapping function can be signaled at the slice level or the tile group level.

[0875] A reverse mapping function for performing reverse mapping can be derived based on the mapping function.

[0876] In-loop filtering, storage of reference pictures and motion compensation can be performed in the reverse mapped area.

[0877] A prediction block generated through inter prediction can be converted into a mapped region by mapping using a mapping function, and the converted prediction block can be used to generate a reconstructed block. However, since intra prediction is performed in a mapped region, a prediction block generated through intra prediction can be used to generate a reconstructed block without mapping and / or demapping.

[0878] For example, if the target block is a residual block of a chroma component, the residual block can be converted into a reverse mapped region by performing scaling on the chroma component of the mapped region.

[0879] Whether scaling is available can be signaled at the slice level or the tile group level.

[0880] For example, scaling can only be applied if a mapping for the luma component is available and if the partitioning of the luma component and the partitioning of the chroma components follow the same tree structure.

[0881] Scaling may be performed based on the average of the values ​​of the samples of the luma prediction block corresponding to the chroma prediction block. In this case, if the target block uses inter prediction, the luma prediction block may refer to the mapped luma prediction block.

[0882] The values ​​required for scaling can be derived by referencing a look-up table using the index of the piece to which the average of the values ​​of the samples of the luma prediction block belongs.

[0883] Finally, by performing scaling on the residual block using the derived values, the residual block can be converted into a demapped region. Subsequently, reconstruction, intra-prediction, inter-prediction, in-loop filtering, and storage of reference pictures for the chroma component blocks can be performed in the demapped region.

[0884] For example, information indicating whether mapping and / or demapping of these luma and chroma components is available can be signaled via a set of sequence parameters.

[0885] A prediction block of a target block can be generated based on a block vector. The block vector can indicate displacement between the target block and a reference block. The reference block can be a block within the target image.

[0886] In this way, a prediction mode that generates a prediction block by referring to a target image can be called an intra block copy (IBC) mode.

[0887] IBC mode can be applied to CUs of a specific size. For example, IBC mode can be applied to an MxN CU, where M and N can be 64 or less.

[0888] IBC mode may include skip mode, merge mode, and AMVP mode. In skip mode or merge mode, a merge candidate list may be constructed, and a merge index may be signaled to specify one merge candidate among the merge candidates in the merge candidate list. The block vector of the specified merge candidate may be used as the block vector of the target block.

[0889] In AMVP mode, a differential block vector can be signaled. Furthermore, the predicted block vector can be derived from the left and top neighboring blocks of the target block. Additionally, an index indicating which neighboring block will be used can be signaled.

[0890] The prediction block of the IBC mode can be included in the target CTU or the left CTU, and can be limited to blocks within the reconstructed region. For example, the value of the block vector can be limited so that the prediction block of the target block is located within a specified region. The specified region can be an region of three 64x64 blocks that are encoded and / or decoded before the 64x64 block that includes the target block. By limiting the value of the block vector in this way, the memory consumption and device complexity associated with the implementation of the IBC mode can be reduced.

[0891]

[0892] Fig. 16 is a structural diagram of an encoding device according to one embodiment.

[0893] The encoding device (1600) may correspond to the encoding device (100) described above.

[0894] The encoding device (1600) may include a processing unit (1610), a memory (1630), a user interface (UI) input device (1650), a UI output device (1660), and storage (1640) that communicate with each other via a bus (1690). In addition, the encoding device (1600) may further include a communication unit (1620) connected to a network (1699).

[0895] The processing unit (1610) may be a semiconductor device that executes processing instructions stored in a central processing unit (CPU), memory (1630), or storage (1640). The processing unit (1610) may be at least one hardware processor.

[0896] The processing unit (1610) can perform generation and processing of signals, data, or information input to the encoding device (1600), output from the encoding device (1600), or used within the encoding device (1600), and can perform inspection, comparison, and judgment related to the signals, data, or information. That is, in the embodiment, generation and processing of data or information, and inspection, comparison, and judgment related to data or information can be performed by the processing unit (1610).

[0897] The processing unit (1610) may include an inter prediction unit (110), an intra prediction unit (120), a switch (115), a subtractor (125), a transformation unit (130), a quantization unit (140), an entropy encoding unit (150), an inverse quantization unit (160), an inverse transformation unit (170), an adder (175), a filter unit (180), and a reference picture buffer (190).

[0898] At least some of the inter prediction unit (110), intra prediction unit (120), switch (115), subtractor (125), transform unit (130), quantization unit (140), entropy encoding unit (150), inverse quantization unit (160), inverse transformation unit (170), adder (175), filter unit (180), and reference picture buffer (190) may be program modules and may communicate with an external device or system. The program modules may be included in the encoding device (1600) in the form of an operating system, application program modules, and other program modules.

[0899] The program modules may be physically stored on various known memory devices. Additionally, at least some of these program modules may be stored on a remote memory device that is capable of communicating with the encoding device (1600).

[0900] Program modules may include, but are not limited to, routines, subroutines, programs, objects, components, and data structures that perform functions or operations according to one embodiment, or implement abstract data types according to one embodiment.

[0901] The program modules may be composed of instructions or codes that are executed by at least one processor of the encoding device (1600).

[0902] The processing unit (1610) can execute commands or codes of the inter prediction unit (110), intra prediction unit (120), switch (115), subtractor (125), transform unit (130), quantization unit (140), entropy encoding unit (150), inverse quantization unit (160), inverse transformation unit (170), adder (175), filter unit (180), and reference picture buffer (190).

[0903] The storage unit may represent memory (1630) and / or storage (1640). The memory (1630) and storage (1640) may be various types of volatile or non-volatile storage media. For example, the memory (1630) may include at least one of read-only memory (ROM) (1631) and random access memory (RAM) (1632).

[0904] The storage unit may store data or information used for the operation of the encoding device (1600). In an embodiment, data or information possessed by the encoding device (1600) may be stored in the storage unit.

[0905] For example, the storage unit can store pictures, blocks, lists, motion information, inter prediction information, and bitstreams.

[0906] The encoding device (1600) can be implemented in a computer system including a recording medium that can be read by a computer.

[0907] The recording medium can store at least one module required for the encoding device (1600) to operate. The memory (1630) can store at least one module, and at least one module can be configured to be executed by the processing unit (1610).

[0908] Functions related to communication of data or information of the encoding device (1600) can be performed through the communication unit (1620).

[0909] For example, the communication unit (1620) can transmit the bitstream to a decryption device (1700) to be described later.

[0910]

[0911] Fig. 17 is a structural diagram of a decryption device according to one embodiment.

[0912] The decryption device (1700) can correspond to the decryption device (200) described above.

[0913] The decryption device (1700) may include a processing unit (1710), a memory (1730), a user interface (UI) input device (1750), a UI output device (1760), and storage (1740) that communicate with each other via a bus (1790). In addition, the decryption device (1700) may further include a communication unit (1720) connected to a network (1799).

[0914] The processing unit (1710) may be a semiconductor device that executes processing instructions stored in a central processing unit (CPU), memory (1730), or storage (1740). The processing unit (1710) may be at least one hardware processor.

[0915] The processing unit (1710) can perform generation and processing of signals, data, or information input to the decryption device (1700), output from the decryption device (1700), or used within the decryption device (1700), and can perform inspection, comparison, and judgment related to the signals, data, or information. That is, in the embodiment, generation and processing of data or information, and inspection, comparison, and judgment related to data or information can be performed by the processing unit (1710).

[0916] The processing unit (1710) may include an entropy decoding unit (210), an inverse quantization unit (220), an inverse transformation unit (230), an intra prediction unit (240), an inter prediction unit (250), a switch (245), an adder (255), a filter unit (260), and a reference picture buffer (270).

[0917] At least some of the entropy decoding unit (210), inverse quantization unit (220), inverse transformation unit (230), intra prediction unit (240), inter prediction unit (250), switch (245), adder (255), filter unit (260), and reference picture buffer (270) may be program modules and may communicate with external devices or systems. The program modules may be included in the decoding device (1700) in the form of an operating system, application program modules, and other program modules.

[0918] The program modules may be physically stored on various known memory devices. Additionally, at least some of these program modules may be stored on a remote memory device that can communicate with the decryption device (1700).

[0919] Program modules may include, but are not limited to, routines, subroutines, programs, objects, components, and data structures that perform functions or operations according to one embodiment, or implement abstract data types according to one embodiment.

[0920] The program modules may be composed of instructions or codes that are executed by at least one processor of the decryption device (1700).

[0921] The processing unit (1710) can execute commands or codes of the entropy decoding unit (210), the inverse quantization unit (220), the inverse transformation unit (230), the intra prediction unit (240), the inter prediction unit (250), the switch (245), the adder (255), the filter unit (260), and the reference picture buffer (270).

[0922] The storage unit may represent memory (1730) and / or storage (1740). The memory (1730) and storage (1740) may be various types of volatile or non-volatile storage media. For example, the memory (1730) may include at least one of read-only memory (ROM) (1731) and random access memory (RAM) (1732).

[0923] The storage unit may store data or information used for the operation of the decryption device (1700). In an embodiment, data or information possessed by the decryption device (1700) may be stored in the storage unit.

[0924] For example, the storage unit can store pictures, blocks, lists, motion information, inter prediction information, and bitstreams.

[0925] The decryption device (1700) can be implemented in a computer system including a recording medium that can be read by a computer.

[0926] The recording medium can store at least one module required for the decryption device (1700) to operate. The memory (1730) can store at least one module, and at least one module can be configured to be executed by the processing unit (1710).

[0927] Functions related to communication of data or information of the decryption device (1700) can be performed through the communication unit (1720).

[0928] For example, the communication unit (1720) can receive a bitstream from the encoding device (1600).

[0929] Hereinafter, the processing unit may represent the processing unit (1610) of the encoding device (1600) and / or the processing unit (1710) of the decoding device (1700). For example, in the function related to prediction, the processing unit may represent the switch (115) and / or the switch (245). In the function related to inter prediction, the processing unit may represent the inter prediction unit (110), the subtractor (125), and the adder (175), and may represent the inter prediction unit (250) and the adder (255). In the function related to intra prediction, the processing unit may represent the intra prediction unit (120), the subtractor (125), and the adder (175), and may represent the intra prediction unit (240) and the adder (255). In the function related to transformation, the processing unit may represent a transformation unit (130) and an inverse transformation unit (170), and may represent an inverse transformation unit (230). In the function related to quantization, the processing unit may represent a quantization unit (140) and an inverse quantization unit (160), and may represent an inverse quantization unit (220). In the function related to entropy encoding and / or decoding, the processing unit may represent an entropy encoding unit (150) and / or an entropy decoding unit (210). In the function related to filtering, the processing unit may represent a filter unit (180) and / or a filter unit (260). In the function related to a reference picture, the processing unit may represent a reference picture buffer (190) and / or a reference picture buffer (270).

[0930]

[0931] The above embodiments can be performed in the same and / or corresponding manner in the encoding device (1600) and the decoding device (1700). In addition, a combination of one or more of the above embodiments can be used in encoding and / or decoding an image.

[0932] The order in which the above embodiments are applied may be different in the encoding device (1600) and the decoding device (1700). Alternatively, the order in which the above embodiments are applied may be (at least partially) the same in the encoding device (1600) and the decoding device (1700).

[0933] The above embodiments can be performed for each of the luma signal and the chroma signal. The above embodiments can be performed equally for the luma signal and the chroma signal.

[0934] The shape of the block to which the above embodiments are applied may have a square shape or a non-square shape.

[0935] The above embodiments may be applied depending on the size of at least one of a target block, a coding block, a prediction block, a transform block, a block, a current block, a coding unit, a prediction unit, a transform unit, a unit, and a current unit. Here, the size may be defined as a minimum size and / or a maximum size for applying the above embodiments, or may be defined as a fixed size for which the above embodiments are applied. In addition, in the above embodiments, the first embodiment may be applied to the first size, and the second embodiment may be applied to the second size. In other words, the above embodiments may be applied in a complex manner depending on the size. In addition, the above embodiments may be applied only when the size is greater than or equal to the minimum size and less than or equal to the maximum size. In other words, the above embodiments may be applied only when the block size is within a certain range.

[0936] Whether or not at least one of the above embodiments is applied and / or performed may be determined based on a condition regarding the block size. In other words, at least one of the above embodiments may be applied and / or performed when a condition regarding the block size is satisfied. The condition may include a minimum block size and a maximum block size. The block may be one of the blocks described above in the embodiments and one of the units described above in the embodiments. The block to which the minimum block size is applied and the block to which the maximum block size is applied may be different from each other.

[0937] For example, the above-described embodiments may be applied and / or performed when the block size is greater than or equal to the minimum size and / or when the block size is less than or equal to the maximum size. The above-described embodiments may be applied and / or performed when the block size is greater than the minimum size and / or when the block size is less than or equal to the maximum size.

[0938] For example, the above-described embodiment can be applied only when the block size is a predefined block size. The predefined block size can be 2x2, 4x4, 8x8, 16x16, 32x32, 64x64 or 128x128. The predefined block size is (2*SIZE X )x(2*SIZE Y ) may be. SIZE X can be one of the integers greater than or equal to 1. SIZE Y can be one of the integers greater than or equal to 1.

[0939] For example, the above-described embodiment can be applied only when the size of the block is greater than or equal to the block minimum size. The above-described embodiment can be applied only when the size of the block is greater than the block minimum size. The block minimum size can be 2x2, 4x4, 8x8, 16x16, 32x32, 64x64 or 128x128. Alternatively, the block minimum size can be (2*SIZE MIN_X )x(2*SIZE MIN_Y) may be. SIZE MIN_X can be one of the integers greater than or equal to 1. SIZE MIN_Y can be one of the integers greater than or equal to 1.

[0940] For example, the above-described embodiment can be applied only when the block size is less than or equal to the maximum block size. The above-described embodiment can be applied only when the block size is smaller than the maximum block size. The maximum block size can be 2x2, 4x4, 8x8, 16x16, 32x32, 64x64 or 128x128. Alternatively, the block maximum size can be (2*SIZE MAX_X )x(2*SIZE MAX_Y ) may be. SIZE MAX_X can be one of the integers greater than or equal to 1. SIZE MAX_Y can be one of the integers greater than or equal to 1.

[0941] For example, the above-described embodiment may be applied only when the block size is greater than or equal to the minimum block size and less than or equal to the maximum block size. The above-described embodiment may be applied only when the block size is greater than or equal to the minimum block size and less than or equal to the maximum block size. The above-described embodiment may be applied only when the block size is greater than or equal to the minimum block size and less than or equal to the maximum block size. The above-described embodiment may be applied only when the block size is greater than or equal to the minimum block size and less than or equal to the maximum block size.

[0942] In the embodiments described above, the size of a block may refer to the horizontal size of the block or the vertical size of the block. The size of a block may refer to both the horizontal size of the block and the vertical size of the block. In addition, the size of a block may refer to the area of ​​the block. Each of the area, the minimum block size, and the maximum block size may be one of integers greater than or equal to 1. In addition, the size of a block may refer to the result (or value) of a known formula using the horizontal size and the vertical size of the block or the result (or value) of a formula of the embodiment.

[0943] Additionally, in the above embodiments, the first embodiment may be applied to the first size, and the second embodiment may be applied to the second size.

[0944] The above embodiments can be applied according to temporal layers. A separate identifier can be signaled to identify the temporal layer to which the above embodiments are applicable, and the above embodiments can be applied to the temporal layer specified by the identifier. The identifier here can be defined as the lowest layer and / or the highest layer to which the above embodiments are applicable, or can be defined to indicate a specific layer to which the above embodiments are applicable. In addition, a fixed temporal layer to which the above embodiments are applicable can be defined.

[0945] For example, the above embodiments may be applied only when the temporal layer of the target image is the lowest layer. For example, the above embodiments may be applied only when the temporal layer identifier of the target image is 1 or greater. For example, the above embodiments may be applied only when the temporal layer of the target image is the highest layer.

[0946] A slice type or tile group type to which the above embodiments are applied can be defined, and the above embodiments can be applied according to the slice type or tile group type.

[0947]

[0948] Fig. 18 illustrates an example of an image encoding method and device for encoding an image based on a geometric segmentation mode.

[0949] Fig. 19 illustrates an example of an image decoding method and device for decoding an image based on a geometric segmentation mode.

[0950]

[0951] The geometric segmentation mode used in the present disclosure may be one of the prediction modes of the current block.

[0952] For example, the prediction mode of the current block may be geometric segmentation mode.

[0953] For example, flag information indicating the geometric partitioning mode may be transmitted within a coding tree unit (CTU).

[0954] At this time, if the value of the flag is the first value, 0, a prediction mode other than the geometric division mode can be applied to the current CTU.

[0955] At this time, if the value of the flag is the second value, 1, the current CTU can apply the geometric division mode.

[0956] For example, flag information indicating the geometric division mode may be transmitted within a coding unit (CU).

[0957] At this time, if the value of the flag is the first value, 0, a prediction mode other than the geometric division mode can be applied to the current CU.

[0958] At this time, if the value of the flag is the second value, 1, the geometric partition mode can be applied to the current CU.

[0959] When the current CTU or the current CU is encoded / decoded in the geometric partitioning mode according to the flag information indicating the geometric partitioning mode, the geometric partitioning boundary information for applying the geometric partitioning mode and the prediction mode for predicting each divided partition area can be entropy encoded / decoded.

[0960] At this time, the geometric segmentation boundary information may be at least one of the predefined segmentation boundaries, and the segmentation boundary for segmenting the current CTU and / or CU may be entropy encoded / decoded.

[0961] At this time, in order to determine the geometric segmentation boundary information, a list of segmentation boundary information applicable to the current block is configured, and an index indicating the segmentation boundary information within the list can be entropy encoded / decoded.

[0962] At this time, intra-screen prediction mode information indicating at least one of intra-screen prediction modes that can be applied to at least one of the respective partition areas divided by the geometric partition mode can be entropy encoded / decoded.

[0963] Among the above prediction modes within the screen, information on the prediction mode applicable to the current block can be entropy encoded / decoded.

[0964] Among the above prediction modes within the screen, information on a predetermined prediction mode within the screen applicable to the current block can be configured as a list, and an index indicating at least one of the information on the prediction mode within the screen within the list can be entropy encoded / decoded.

[0965] At this time, inter-screen prediction mode information indicating at least one of inter-screen prediction modes that can be applied to at least one of the respective partition areas divided by the geometric partition mode can be entropy encoded / decoded.

[0966] Among the above inter-screen prediction modes, information on the inter-screen prediction mode applicable to the current block can be entropy encoded / decoded.

[0967] Among the above inter-screen prediction modes, information on a predetermined inter-screen prediction mode applicable to the current block can be configured as a list, and an index indicating at least one of the inter-screen prediction mode information in the list can be entropy encoded / decoded.

[0968] A geometric segmentation mode information list can be configured, which is composed of at least one of the above geometric segmentation boundary information and / or the intra-screen prediction mode and / or the inter-screen prediction mode, and an index indicating one piece of geometric segmentation mode information in the geometric segmentation mode information list can be entropy encoded / decoded.

[0969]

[0970] In the following embodiments, at least one of the determination of a reference block and / or the construction of a candidate list may be performed using at least one of a block vector and / or a motion vector and / or a template matching block vector.

[0971] In the following embodiments, the vectors referred to as block vectors and / or block vector candidates and / or candidate block vectors may be at least one of block vectors by intra-screen block copying and / or motion vectors by inter-screen prediction and / or template matching block vectors.

[0972] In the following embodiments, the vectors referred to as motion vectors and / or motion vector candidates and / or candidate motion vectors may be at least one of block vectors by intra-screen block copying and / or motion vectors by inter-screen prediction and / or template matching block vectors.

[0973] In the following embodiments, when the vector referred to as the block vector and / or block vector candidate and / or candidate block vector is a motion vector by inter-screen prediction, the motion vector by inter-screen prediction may be a unidirectional prediction or bidirectional prediction motion vector.

[0974] In the following embodiments, when the vector referred to as the motion vector and / or the motion vector candidate and / or the candidate motion vector is a block vector by intra-screen block copy, the block vector by intra-screen block copy may be a unidirectional prediction or bidirectional prediction motion vector.

[0975] In the following embodiments, the vectors referred to as the motion vector and / or the block vector and / or the motion vector candidate and / or the block vector candidate and / or the candidate motion vector and / or the candidate block vector may be composed of three or more vectors for multiple hypothesis reference.

[0976] In the following embodiments, the block vector and / or the motion vector may be calculated / processed / transformed / improved based on the maximum bit depth of the block vector and / or the motion vector. For example, the block vector and / or the motion vector may have a bit depth of 8 or 16 or 32 or 64 bits.

[0977] In the following embodiments, the geometric segmentation boundary information may be a segmentation boundary that can be derived by the geometric segmentation direction and offset among the information related to the geometric segmentation mode.

[0978] In subsequent embodiments, the geometric segmentation boundary information may be a segmentation boundary and / or a segmentation boundary mode.

[0979]

[0980] The intra block copy prediction mode may be a method of deriving a prediction block from a previously encoded / decoded region within the same picture (i.e., within the screen) using a derived block vector (BV). In this case, the same picture may refer to the current picture. In this case, the block vector may refer to an intra block vector. In this case, the previously encoded / decoded region may be a region within a restored image or a decoded image for the current picture. Here, the region within the restored image may refer to a restored region, and the region within the decoded image may refer to a decoded region.

[0981] Here, the previously encoded / decoded region within the current picture may be a reconstructed region within the current picture on which at least one of in-loop filtering, chroma scaling and luminance mapping, deblocking filtering, adaptive sample offset, or adaptive in-loop filtering, has not been performed. Furthermore, the previously encoded / decoded region within the current picture may be a reconstructed / decoded region within the current picture on which at least one of in-loop filtering, chroma scaling and luminance mapping, deblocking filtering, adaptive sample offset, or adaptive in-loop filtering, has been performed.

[0982] If the current encoding / decoding target block (current block) is encoded / decoded in the block copy mode within the picture, and the derived block vector is (x, y), a reference block (a block corresponding to a previously encoded / decoded region) of the same size as the current block, which is located horizontally by x samples (specifically, if x is a positive integer, x samples in the right horizontal direction, if x is a negative integer, -x samples in the left horizontal direction) and vertically by y samples (i.e., if y is a positive integer, y samples in the downward vertical direction, if y is a negative integer, -y samples in the upward vertical direction) from the current block, can be used as a prediction block of the current block.

[0983] Here, the sample movement positions according to the above symbols may be opposite to each other. For example, if x is a positive integer, the block vector may indicate an area that is x samples away in the left horizontal direction, and if x is a negative integer, the block vector may indicate an area that is -x samples away in the right horizontal direction. Also, for example, if y is a positive integer, the block vector may indicate an area that is y samples away in the upper horizontal direction, and if y is a negative integer, the block vector may indicate an area that is -y samples away in the lower horizontal direction.

[0984] The sizes of the current block and the reference block may be different. For example, downsampling or subsampling may be performed on the current block to reduce the size of the current block, then a reference block may be determined, and upsampling or interpolation may be performed on the determined reference block to use it as a prediction block of the current block.

[0985] At least one of the size of the current block or the size of the reference block may be determined according to at least one of the encoding parameters of the current block / CTB / CTU.

[0986] Figure 20 shows an example of the upper left sample location of the prediction block of the current block.

[0987] As in the example of Fig. 20, it shows a case where both x and y are negative integers, the upper left sample position of the current block is (x0, y0), and the upper left sample position of the prediction block of the current block is (x0+x, y0+y). Here, the prediction block of the current block may mean a reference block for the current block.

[0988]

[0989] If the current luminance component block uses prediction using the within-screen block copy mode, the block can be encoded / decoded in one of the following ways.

[0990] - Similar to the skip mode in the inter-screen prediction mode, the block vector of the current block is derived from the block vector of the block encoded / decoded before the current block, and the intra-screen block copy skip mode does not entropy encode / decode the remaining blocks.

[0991] - Similar to the merge mode in the inter-screen prediction mode, the block vector of the current block is derived from the block vector of the block encoded / decoded before the current block, and the remaining block is entropy encoded / decoded in the intra-screen block copy merge mode.

[0992] - Intra-screen block copy AMVP mode that encodes / decodes block vectors similar to AMVP (advanced motion vector prediction) mode in inter-screen prediction mode.

[0993] - Intra-screen block copy AMVR mode that encodes / decodes the resolution of block vectors in at least one of the resolutions, similar to the adaptive motion vector resolution (AMVR) mode in inter-screen prediction mode.

[0994] - Multi-hypothesis screen block copy mode that uses at least one block vector or reference block and weights the sample values ​​in at least one reference block to use it as a prediction block for the current block.

[0995] At this time, statistical values ​​can be used instead of the above weighted sum.

[0996] The above block vector can be corrected / improved using template matching.

[0997] Information indicating whether to use at least one of the above-described intra-screen block copy skip mode, intra-screen block copy merge mode, intra-screen block copy AMVP mode, or multi-hypothesis intra-screen block copy mode can be entropy encoded / decoded according to at least one of the encoding parameters of the current block / CTB / CTU and the surrounding blocks / CTB / CTU adjacent to the current block / CTB / CTU.

[0998]

[0999] Deblocking filtering may be performed at block boundaries depending on whether block copy mode is performed within the screen.

[1000] For example, if at least one of the surrounding blocks adjacent to a block boundary is in the screen block copy mode, deblocking filtering can perform deblocking filtering on the block boundary by setting the block boundary as the target block boundary for performing deblocking filtering.

[1001] As another example, if none of the surrounding blocks adjacent to a block boundary use the in-screen block copy mode, deblocking filtering may not set the block boundary as a target block boundary for deblocking filtering and may not perform deblocking filtering on the block boundary.

[1002] As another example, if at least one of the surrounding blocks adjacent to the block boundary is in intra-screen block copy mode, deblocking filtering may regard the block using the intra-screen block copy mode as an inter-screen prediction block and set the block boundary as a target block boundary for performing deblocking filtering, thereby performing deblocking filtering on the block boundary.

[1003] As another example, if at least one of the surrounding blocks adjacent to the block boundary is in the intra-screen block copy mode, deblocking filtering may regard the block using the intra-screen block copy mode as an intra-screen prediction block and set the block boundary as a target block boundary for performing deblocking filtering, thereby performing deblocking filtering on the block boundary.

[1004] If it is decided to perform deblocking filtering on the above block boundary, deblocking filtering can be performed on the block boundary of 8x8 units among the areas within the block using the above screen block copy mode.

[1005] Whether to perform deblocking filtering on the above block boundary, filter strength, etc. may be determined based on at least one of the encoding parameters for the block copy mode within the screen.

[1006]

[1007] The coding mode of the current luminance component block in the encoder / decoder can be derived as follows.

[1008] At least one of the following encoding information can be used to determine the mode of the current luminance component block, and at least one of the following encoding information can be entropy encoded / decoded.

[1009]

[1010] Information indicating that the luminance component block is in skip mode (e.g., skip mode identifier or flag or index or skip_flag or cu_skip_flag, etc.)

[1011] Skip mode can be indicated when information indicating skip mode has a specific value. For example, skip mode can be indicated when the identifier, flag, or index has a first value of 1, and non-skip mode can be indicated when the identifier, flag, or index has a second value of 0.

[1012]

[1013] Prediction mode information of the luminance component block (e.g., index, flag, identifier, etc.)

[1014] The above prediction mode information may indicate at least one of an intra-screen prediction mode, an inter-screen prediction mode, or an intra-screen block copy mode.

[1015] For example, a syntax element representing prediction mode information may represent an intra-screen prediction mode when it has a first value of 0, an inter-screen prediction mode when it has a second value of 1, and an intra-screen block copy mode when it has a third value of 2.

[1016] As another example, the first prediction mode information (e.g., an index or a flag or an identifier or pred_mode_flag, etc.) may indicate whether it is an intra-screen prediction mode. If the first prediction mode information has a first value of 1, it may indicate an intra-screen prediction mode, and if it has a second value of 0, it may indicate a non-intra-screen prediction mode. If it indicates a non-intra-screen prediction mode, the second prediction mode information (e.g., an index or a flag or an identifier or pred_mode_ibc_flag, etc.) may be entropy encoded / decoded to indicate whether it is an inter-screen prediction mode or an intra-screen block copy mode. If the second prediction mode information has a first value of 1, it may indicate an intra-screen block copy mode, and if it has a second value of 0, it may indicate an inter-screen prediction mode.

[1017] As another example, the first prediction mode information (e.g., an index or a flag or an identifier or pred_mode_flag, etc.) can indicate whether it is an intra-screen prediction mode or an inter-screen prediction mode. If the first prediction mode information has a first value of 1, it can indicate an intra-screen prediction mode, and if it has a second value of 0, it can indicate an inter-screen prediction mode. In addition, the second prediction mode information (e.g., an index or a flag or an identifier or pred_mode_ibc_flag, etc.) can be entropy encoded / decoded or derived, and if the second prediction mode information has a first value of 1, it can be determined as an intra-screen block copy mode, and if it has a second value of 0, the prediction mode of the corresponding luminance component block can be determined as the intra-screen prediction mode or the inter-screen prediction mode determined from the first prediction mode information.

[1018]

[1019] Information indicating the merge mode of the luminance component block (e.g., merge mode identifier, flag, index, or merge_flag, etc.)

[1020] If the current luminance component block is not in skip mode but in screen block copy mode, the merge mode can be indicated when the merge mode has a specific value. For example, if the identifier, flag, or index, which is information indicating the merge mode, has a first value of 1, the merge mode can be indicated, and if the identifier, flag, or index has a second value of 0, the non-merge mode can be indicated.

[1021] When the luminance component block is in the merge mode, the prediction mode information may include a syntax element indicating whether the block vector used by the block is subject to a correction / improvement method using template matching.

[1022] A syntax element indicating whether to apply the correction / improvement method using the above template matching may be a flag.

[1023] If the above flag has a first value of 0, the block vector used by the block may not be subject to a correction / improvement method using template matching.

[1024] If the above flag has a second value of 1, the block vector used by the block can be subject to a correction / improvement method using template matching.

[1025] When the luminance component block is in the block copy mode within the screen, the prediction mode information may include a syntax element indicating the number of block vectors used by the block.

[1026] If the number of block vectors used by the above block has a first value of 0, the block vector referenced by the current block may be one. In this case, the reference block indicated by the block vector may be used as a prediction block.

[1027] If the number of block vectors used by the above block has the second value of 1, the number of block vectors referenced by the current block may be two. In this case, a block obtained by weighting the reference blocks indicated by the two block vectors may be used as a prediction block.

[1028] The encoding mode of the current luminance component block may be derived based on at least one of the encoding parameters of the current block / CTB / CTU and the surrounding blocks / CTB / CTU adjacent to the current block / CTB / CTU.

[1029] In the above embodiments and / or other embodiments of the present disclosure, the first value and the second value may have different values. For example, the first value may be 0 and the second value may be 1.

[1030] In the above embodiment and / or other embodiments of the present disclosure, a chrominance component block may be used instead of a luminance component block. For example, the current luminance component block may be replaced with a current chrominance component block and applied to the above embodiment and / or other embodiments of the present disclosure.

[1031]

[1032] The encoding mode of the current luminance component block can be determined as follows using the encoding information mentioned above. Here, the encoding mode may mean a prediction mode. Additionally, the encoding information may mean prediction mode information.

[1033] If the luminance component block is in skip mode and the corresponding subpicture or brick or tile group or slice or tile is of type I, the block can be determined to be in intra-screen block copy skip mode without entropy encoding / decoding the prediction mode information.

[1034] At this time, the prediction modes that can be used in the case of type I are the intra-screen prediction mode and the intra-screen block copy mode, and the skip mode may be because type I is not used.

[1035] If the luminance component block is in skip mode and the corresponding subpicture or brick or tile group or slice or tile is not of type I, the prediction mode information can be entropy encoded / decoded.

[1036] At this time, if the corresponding luminance component block is determined to be in the screen block copy mode from the prediction mode information, the corresponding luminance component block can be determined to be in the screen block copy skip mode.

[1037] If the luminance component block is not in skip mode and the luminance component block is determined to be in block copy mode within the screen from the prediction mode information, information indicating the merge mode can be entropy encoded / decoded.

[1038] At this time, if the information indicating the merge mode indicates that the corresponding luminance component block indicates the merge mode, the corresponding luminance component block can be determined as the block copy merge mode within the screen.

[1039] When the luminance component block is in the merge mode, the prediction mode information may be entropy encoded / decoded by a syntax element that indicates whether the block vector used by the block is subject to a correction / improvement method using template matching.

[1040] A syntax element indicating whether to apply the correction / improvement method using the above template matching may be a flag.

[1041] If the above flag has a first value of 0, the block vector used by the block may not be subject to a correction / improvement method using template matching.

[1042] If the above flag has a second value of 1, the block vector used by the block can be subject to a correction / improvement method using template matching.

[1043] When the luminance component block is in the block copy mode within the screen, the prediction mode information can entropy encode / decode a syntax element indicating the number of block vectors used by the block.

[1044] If the number of block vectors used by the above block has a first value of 0, the block vector referenced by the current block may be one. In this case, the reference block indicated by the block vector may be used as a prediction block.

[1045] If the number of block vectors used by the above block has the second value of 1, the number of block vectors referenced by the current block may be two. In this case, a block obtained by weighting the reference blocks indicated by the two block vectors may be used as a prediction block.

[1046] In addition, when the luminance component block is not in skip mode, the residual blocks of the luminance component block and the chrominance component block are encoded / decoded, and the luminance component block is determined to be in block copy mode within the screen from the prediction mode information, information indicating the merge mode can be entropy encoded / decoded.

[1047] At this time, if the information indicating the merge mode indicates that the corresponding luminance component block indicates the merge mode, the corresponding luminance component block can be determined as the block copy merge mode within the screen.

[1048] If the luminance component block is neither in skip mode nor merge mode, and is in the block copy mode within the screen, the luminance component block can be determined to be in the block copy AMVP mode within the screen.

[1049] The encoding mode of the luminance component block can be derived based on at least one of the encoding information mentioned above and at least one of the encoding parameters of the current block / CTB / CTU and the surrounding blocks / CTB / CTU adjacent to the current block / CTB / CTU.

[1050]

[1051] Building an IBC Merge / AMVP List

[1052] If an IBC Merge / AMVP candidate is valid, the IBC Merge / AMVP candidate can be inserted into the IBC Merge / AMVP candidate list.

[1053] The upper-right, lower-left, and upper-left spatial candidates (belonging to the adjacent spatial candidate category) and one pair-wise average candidate can be added to the IBC merge / AMVP candidate list.

[1054] Template-based adaptive reordering (ARMC-TM) can be applied to IBC merge lists.

[1055] Candidates for non-adjacent spatial neighboring blocks (so-called non-adjacent candidates) can be added to the candidate lists of IBC merge modes and IBC AMVP. These non-adjacent candidates can be inserted between adjacent spatial candidates and HBVP candidates for both IBC merge and IBC AMVP. The same reference region of a non-adjacent merge in a regular inter mode can be reused for IBC.

[1056] The size of the History-based Motion Vector Predictor (HMVP) table for IBC can be a certain positive integer N. In this case, N can be 25.

[1057] M candidates, each of which is a predetermined positive integer within the above HMVP, can be added to the IBC merge list and reordered in ascending order based on template matching costs. After the reordering, L candidates with the lowest template matching costs can be selected as the final candidates within the IBC merge list. Here, L can be a positive integer and can be 6.

[1058] The block vector added to the above list may be a block vector determined by within-screen template matching prediction, or a motion vector determined by between-screen prediction.

[1059] The above block vectors and / or motion vectors may have fractional pixel resolution, half pixel resolution, or quarter pixel resolution.

[1060] Candidate zero vectors that pad the IBC merge / AMVP list may be replaced by a set of BVP candidates located within the IBC reference region. A zero vector may be invalid as a block vector within the IBC merge mode, and consequently, the zero vector may be discarded as a BVP within the IBC candidate list.

[1061] Figure 21 illustrates examples of proposed candidates for the IBC merge list.

[1062] The three candidates can be located on the nearest corners of the reference area, and three additional candidates can be determined within the middle of the three sub-areas (A, B, and C). As depicted in Fig. 21, the coordinates of the three sub-areas (A, B, and C) can be determined by the width and height of the current block, and the △X and △Y parameters.

[1063]

[1064] Template Matching

[1065] Figure 22 illustrates one embodiment of template matching.

[1066] In template matching, the motion information of the target block can be determined and / or changed based on the calculation result of the cost function between the target template and the reference template.

[1067] The reference block may include at least one of 1) a block indicated by initial motion information, 2) a block indicated by motion information derived during the search process of template matching, 3) a block indicated by motion information finally improved through template matching, 4) a block having a sample (or location) belonging to the search range of template matching as one of the upper left, lower left, upper right, lower right, and center, or 5) a block finally determined through template matching.

[1068] The size of the reference block can be the same as the size of the target block.

[1069] The motion information improved through template matching may be the motion information with the lowest matching cost derived from the template matching search process. However, the method for deriving the motion information is not limited to the aforementioned criteria.

[1070] The template matching cost may mean the result of a calculation using a cost function for the template of the target block used in template matching and the template of the reference block.

[1071] Each of the reference block, the reference template, and the reference region may include at least one of a prediction sample, a reconstruction sample, a residual sample, or a decoded sample of the reference image. Alternatively, each of the reference block, the reference template, and the reference region may include at least one of a prediction sample, a reconstruction sample, a residual sample, or a decoded sample of the target image.

[1072] Template configuration for template matching

[1073] Target Template

[1074] The target template may include surrounding samples of the target block.

[1075] The reference region of the target block may include surrounding samples of the target block.

[1076] For example, the reference region of the target block may include at least one of the samples located in the lower left, left, upper left, upper and upper right regions around the target block.

[1077] For example, in template matching, the target template may be identical to the reference region of the target block.

[1078] For example, samples of a target template based on a target block may be samples corresponding to samples of a reference template based on a reference block.

[1079] For example, in template matching, when constructing a target template, some of the samples within the reference area of ​​the target block may be selected. The target template may be constructed using the selected samples.

[1080] For example, the samples selected for configuring the target template based on the target block may be samples corresponding to the samples selected for configuring the template of the reference block based on the reference block.

[1081] For example, the reference area of ​​the target block based on the target block may be an area corresponding to the reference area of ​​the reference block based on the reference block.

[1082] Reference template

[1083] A reference template may contain surrounding samples of the reference block.

[1084] The reference region of a reference block may include surrounding samples of the reference block.

[1085] For example, the reference area of ​​a reference block may include at least one of the samples located in the lower left, left, upper left, upper and upper right areas around the reference block.

[1086] For example, in template matching, the reference template may be identical to the reference region of the reference block.

[1087] For example, samples of a reference template based on a reference block may be samples corresponding to samples of a target template based on a target block.

[1088] For example, when constructing a reference template in template matching, some of the samples within the reference region of the reference block may be selected. The reference template may be constructed using the selected samples.

[1089] For example, the samples selected for configuring the reference template based on the reference block may be samples corresponding to the samples selected for configuring the template of the target block based on the target block.

[1090] For example, the reference area of ​​the reference block based on the reference block may be an area corresponding to the reference area of ​​the target block based on the target block.

[1091] The template matching method may include at least one of an intra-screen template matching mode or an inter-screen template matching mode.

[1092] The in-screen template matching mode may mean a template matching method in which each of a reference block, a reference template, and a reference region includes at least one of a prediction sample, a restoration sample, a residual sample, or a decoded sample of a target image.

[1093] The inter-screen template matching mode may mean a template matching method in which each of a reference block, a reference template, and a reference region includes at least one of a prediction sample, a reconstructed sample, a residual sample, or a decoded sample of a reference image.

[1094] The target / reference template of a template matching may include at least one of: 1) at least one of the samples within TMSIZE_LEFT lines adjacent to the left of the target / reference block; or 2) at least one of the samples within TMSIZE_ABOVE lines adjacent to the top of the target / reference block.

[1095] However, the positional relationship between each sample and the target / reference block within the template and / or the method of configuring the template are not limited to the aforementioned relationship or method.

[1096] TMSIZE_LEFT and TMSIZE_ABOVE can each be 0, 1, 2, 3, 4, or a positive integer greater than or equal to 4.

[1097] TMSIZE_LEFT and TMSIZE_ABOVE can be equal, or TMSIZE_LEFT and TMSIZE_ABOVE can be different.

[1098] TMSIZE_LEFT and TMSIZE_ABOVE can each be a predefined value or a value determined based on signaling / encoding / decoding information.

[1099] Each of TMSIZE_LEFT and TMSIZE_ABOVE can be determined based on at least one of motion information, coding parameters, size, or prediction mode of the target block.

[1100]

[1101] How to search for template matching

[1102] Definition of navigation

[1103] The search can be performed using the computation of a cost function to determine the similarity between NUM_TEMPLATE_COMPARE templates.

[1104] The search may include a process of determining at least one piece of motion information that satisfies a specific condition within a specific search range. The motion information of the target block may be determined and / or modified based on the at least one piece of motion information determined through the search.

[1105] Motion information that satisfies a specific condition may mean, but is not limited to, motion information with the lowest matching cost among motion information within the search range.

[1106] Alternatively, the search may involve determining at least one block that satisfies a specific condition within a specific search range. Motion information indicating the block determined through the search may be used as motion information for the target block. Here, the block that satisfies the specific condition may be at least one of the reference blocks within the search range.

[1107] cost function

[1108] The cost function may mean a function that determines the similarity between at least one sample in a target template and at least one sample in a reference template.

[1109] The similarity between the first value and the second value can be determined using at least one of: 1) a difference between the two values, 2) a ratio between the two values, or 3) an operation that compares the difference between the two values ​​to a specific value.

[1110] It may be a function that determines the similarity between at least one sample in the target template and a corresponding sample in the reference template.

[1111] The cost function may be one or more of the Sum of Absolute Differences (SAD), the Sum of Absolute Transformed Differences (SATD), the Mean-Removed Sum of Absolute Differences (MR-SAD), the Mean Squared Error (MSE), and the Sum of Squared Error (SSE). However, the cost functions are not limited to the items listed above.

[1112] The cost function used in template matching can be predefined or determined based on signaling / encoding / decoding information.

[1113] For example, MR-SAD can be used as a cost function in template matching when the target block satisfies the activation conditions of bilateral matching and / or part of the activation conditions of bilateral matching, or when bilateral matching is performed in the target block.

[1114] For example, SAD can be used as a cost function in template matching when the target block does not satisfy the activation conditions of two-sided matching and / or part of the activation conditions of two-sided matching, or when two-sided matching is not performed in the target block.

[1115] For example, the type of cost function in two-sided matching may be determined based on whether a specific condition is satisfied. In this case, the type of cost function in template matching may be determined based on whether the activation condition for two-sided matching and the above-mentioned specific conditions for determining the type of cost function in two-sided matching are satisfied.

[1116] For example, if the target block satisfies the activation condition of the two-sided matching and the above-mentioned specific condition, MR-SAD can be used as a cost function in the two-sided matching, and if it does not satisfy the condition, SAD can be used as a cost function in the two-sided matching.

[1117] For example, if the target block satisfies the activation condition of bilateral matching; if inter-weighted bilateral prediction is performed or the number of samples in the target block is greater than a certain value; MR-SAD can be used as the cost function in template matching; otherwise, SAD can be used as the cost function in template matching.

[1118] Search scope

[1119] The search range can be a specific range centered around the location indicated by the initial motion information. In other words, the center of the search range can be the location indicated by the initial motion information.

[1120] Alternatively, the search range may be a specific range with the upper left corner being the location indicated by the initial motion information. In other words, the upper left corner of the search range may be the location indicated by the initial motion information.

[1121] Alternatively, the search range may be comprised of a previously restored region surrounding the target block. For example, the search range may include at least one of samples (or locations of samples) located in the lower left, left, upper left, upper, and upper right regions surrounding the target block.

[1122] At least one of the size or shape of the search range for the target block may be predefined in the encoder and decoder.

[1123] Alternatively, at least one of the size or shape of the search range in the target block may be determined based on at least one of the target block size, the coding parameters of the target block, the motion information of the target block, or the prediction mode of the target block.

[1124] Alternatively, information indicating one of the size and shape of the search range for the target block may be encoded and signaled.

[1125] The search range may have the shape of a rectangle with a width of SR_X and a height of SR_Y. Alternatively, the search range may have the shape of a diamond with a width of SR_X and a height of SR_Y. However, the shape and size of the search range are not limited to the embodiments described above.

[1126] Each of SR_X and SR_Y can be a positive integer. Each of SR_X and SR_Y can be a predefined value or a value determined based on signaling / encoding / decoding information.

[1127] The initial motion information may be determined based on at least one of motion information of the target block, a coding parameter of the target block, a motion vector of the target block, a reference image of the target block, a block vector of the target block, a motion vector predictor of the target block, a block vector predictor of the target block, motion information of at least one surrounding block of the target block, a merge candidate of the target block, a motion vector differential of the target block, or a block vector differential of the target block.

[1128] How to navigate

[1129] Search methods can be categorized based on search patterns, search resolution, search range, initial motion information, and units from which motion information is derived.

[1130] The search method may be determined based on at least one of motion information of the target block, coding parameters of the target block, a size of the target block, a prediction mode of the target block, a reference image of the target block, at least one sample value within the target block, a target template, at least one sample value within the target template, or an area of ​​the target template.

[1131] Navigation patterns

[1132] The search pattern can be one of the diamond, cross, or full-search patterns. However, the search pattern is not limited to the patterns listed above.

[1133] A search using a diamond pattern may mean searching one or more of the positions (0, 2×RR), (RR, RR), (2×RR, 0), (RR, -RR), (0, -RR), (-RR, -RR), (-RR, 0), (-RR, RR) and (0, 0), when (0, 0) represents the position pointed to by the initial motion information.

[1134] A search using a cross pattern may mean searching one or more of the positions (0, RR), (RR, 0), (0, -RR), (-RR, 0) and (0, 0), when (0, 0) represents the position pointed to by the initial motion information.

[1135] RR can be a value determined based on the search resolution or a search resolution, and can be a predefined positive integer.

[1136] A search using the full-search pattern may mean searching all locations within a pre-defined search range.

[1137] For example, when FS_i has values ​​from -FS_X to FS_X, and FS_j has values ​​from -FS_Y to FS_Y, a search using a full-search pattern may mean searching the positions of (FS_i×RR, FX_j×RR). Here, (0, 0) may be the position indicated by the initial motion information. However, the search range is not limited to the aforementioned positions. Each of FS_X and FS_Y may be a predefined positive integer.

[1138] Search resolution

[1139] The search resolution can be one of 4-pel, full-pel, half-pel, or quarter-pel. However, the search resolution is not limited to the aforementioned pels.

[1140] The search resolution may be determined based on at least one of the information about the predefined or adaptive motion vector resolution, or based on signaled / encoded / decoded values.

[1141] The unit from which motion information is derived may include a full block unit and a sub-block unit.

[1142]

[1143] Figures 23 to 28 each illustrate an example of a search method in template matching.

[1144] Based on the motion information, coding parameters, prediction mode, and adaptive motion vector resolution of the target block, specific columns in the tables illustrated in FIGS. 23 to 28 can be determined. A search can be performed using a search pattern and search resolution corresponding to rows marked with “v” in order from the top to the bottom of the determined columns.

[1145] For example, if the target block is in AMVP mode and the resolution determined through the adaptive motion vector resolution is 4-pel, a search for a diamond pattern using the 4-pel search resolution may be performed, and then a search for a cross pattern using the 4-pel search resolution may be performed.

[1146] ALT_IF may represent the index of an adaptive interpolation filter. An interpolation filter may be applied to calculate a pixel value at a sample location of a specific resolution. The adaptive interpolation filter may be an interpolation filter selected by an index from among multiple interpolation filters. In other words, when an adaptive interpolation filter is applied, different interpolation filters may be used depending on the index to calculate a pixel value at a sample location of a specific resolution.

[1147] For example, a particular resolution may be half-pel. However, a particular resolution is not limited to half-pel.

[1148] For example, the interpolation filter determined by the index may be one of a 6-tap interpolation filter and an 8-tap interpolation filter. However, the method for determining the interpolation filter is not limited to the above-described method.

[1149] Figure 29 illustrates a first template configuration method in affine mode according to an example.

[1150] Figure 30 illustrates a second template configuration method in affine mode according to an example.

[1151] CPMV can stand for affine control point motion vector (CPMV). Using CPMV, the MV of each subblock within the target block can be derived.

[1152] When the target block is in affine mode, the target block can be divided into sub-blocks of width N and height M. Motion information for each sub-block can be determined based on at least one of motion information, coding parameters, or size of the target block. The template matching cost for the target block can be determined based on at least one of the template matching costs for the divided sub-blocks. For example, the template matching cost for the target block can be the sum of the template matching costs for the divided sub-blocks or the average of the template matching costs for each sub-block.

[1153] N and M can be 2, 4, 8 or any positive integer, respectively.

[1154] N and M can be predefined values, or values ​​determined based on signaling / encoding / decoding information.

[1155]

[1156] Template matching in bidirectional prediction blocks

[1157] For example, the motion information of a target block can be determined based on the motion information of surrounding blocks. This can be expressed as "the target block inherits motion information from surrounding blocks."

[1158] For example, if the target block is in merge mode, one merge candidate can be specified based on the merge index from the merge candidate list, and the motion information of the specified merge candidate can be used as the motion information of the target block.

[1159] For example, if the target block is in AMVP mode, one MV candidate can be specified based on the MV candidate index from the MV candidate list, and the motion information of the specified MV candidate can be used as the motion information of the target block.

[1160] An embodiment in which template matching is performed in a target block when the motion information inherited by the target block from the surrounding blocks indicates bidirectional prediction may be as follows.

[1161] Step 1. Perform template matching for each of the L0 and L1 directions. Ca...

Claims

1. Step of constructing a prediction mode list of the current block; A step of determining at least one candidate from the list of prediction modes of the current block; An image decoding method, characterized in that it includes a step of obtaining a prediction block for the current block based on the above-determined candidate.

2. In paragraph 1, A method for decoding an image, characterized in that, in response to the above-determined candidate being a geometric segmentation mode, the current block is segmented by a geometric segmentation boundary.

3. In paragraph 2, An image decoding method, characterized in that the geometric segmentation boundary is determined by an angle formed by the geometric segmentation boundary with the x-axis and an offset distance from the lower left boundary of the current block.

4. In paragraph 2, The above geometric division boundary is determined as one of a plurality of geometric division boundaries available to the current block, An image decoding method, characterized in that the intervals between the plurality of geometric segmentation boundaries are equal.

5. In paragraph 2, The above geometric division boundary is determined as one of a plurality of geometric division boundaries available to the current block, An image decoding method, characterized in that the number of the plurality of geometric segmentation boundaries is determined based on the presence or absence of surrounding restored pixels of the current block.

6. In paragraph 1, An image decoding method, characterized in that the prediction mode list of the current block includes a plurality of geometric segmentation boundaries as candidates.

7. In paragraph 6, An image decoding method, characterized in that the plurality of geometric segmentation boundaries include geometric segmentation boundaries that are identical or similar to geometric segmentation boundaries of adjacent areas of the current block.

8. In paragraph 6, An image decoding method, characterized in that the plurality of geometric segmentation boundaries include geometric segmentation boundaries that are identical or similar to geometric segmentation boundaries of a template area matching the template area of ​​the current block.

9. In paragraph 1, A video decoding method, characterized in that one candidate of the prediction mode list of the current block is obtained based on a motion vector of a spatial adjacent block, a spatial non-adjacent block, or a temporal adjacent block.

10. Step of constructing a prediction mode list of the current block; A step of determining at least one candidate from the list of prediction modes of the current block; A video encoding method, characterized in that it comprises a step of obtaining a prediction block for the current block based on the above-determined candidate.

11. In paragraph 10, A method for encoding an image, characterized in that, in response to the above-determined candidate being a geometric segmentation mode, the current block is segmented by a geometric segmentation boundary.

12. In paragraph 11, An image encoding method, characterized in that the geometric segmentation boundary is determined by an angle formed by the geometric segmentation boundary with the x-axis and an offset distance from the lower left boundary of the current block.

13. In paragraph 11, The above geometric division boundary is determined as one of a plurality of geometric division boundaries available to the current block, An image encoding method, characterized in that the intervals between the plurality of geometric segmentation boundaries are equal.

14. In paragraph 11, The above geometric division boundary is determined as one of a plurality of geometric division boundaries available to the current block, An image encoding method, characterized in that the number of the plurality of geometric segmentation boundaries is determined based on the presence or absence of surrounding restored pixels of the current block.

15. In paragraph 10, A method for encoding an image, characterized in that the prediction mode list of the current block includes a plurality of geometric segmentation boundaries as candidates.

16. In paragraph 15, A method for encoding an image, wherein the plurality of geometric segmentation boundaries include geometric segmentation boundaries that are identical or similar to geometric segmentation boundaries of adjacent areas of the current block.

17. In paragraph 15, A video encoding method, characterized in that the plurality of geometric segmentation boundaries include geometric segmentation boundaries that are identical or similar to geometric segmentation boundaries of a template area matching the template area of ​​the current block.

18. In paragraph 10, A video encoding method, characterized in that one candidate of the prediction mode list of the current block is obtained based on a motion vector of a spatially adjacent block, a spatially non-adjacent block, or a temporally adjacent block.

19. Step of constructing a prediction mode list of the current block; A step of determining at least one candidate from the list of prediction modes of the current block; A step of obtaining a prediction block for the current block based on the above-determined candidate; and A method for transmitting a bitstream, characterized in that it comprises a step of transmitting a bitstream obtained based on the above prediction block.

20. In paragraph 19, A method for transmitting a bitstream, characterized in that, in response to the above-determined candidate being a geometric segmentation mode, the current block is segmented by a geometric segmentation boundary.

Citation Information

Patent Citations

  • Image decoding device, image decoding method, and program

    JP2023047920A

  • Electronic apparatus capable of performing remote multi-object detection based on deep learning and the operating method thereof

    KR1020240101305A

  • How marketing performance can be analyzed and delivered, and the devices and systems that will execute it

    KR1020240153176A

  • Pharmaceutical composition for preventing or treating cardiovascular diseases comprising compound with ITGB4 inhibitory activity as an active ingredient

    KR1020250027005A

  • Entrance order device for flood prevention

    KR1020250071407A