Method, device, and recording medium for image encoding / decoding

Filtering techniques with derived shapes and coefficients for IBC prediction signals enhance video encoding/decoding efficiency and image quality, addressing challenges in compressing high-resolution videos.

WO2025151003A1PCT designated stage expired Publication Date: 2025-07-17ELECTRONICS & TELECOMM RES INST +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2025/000673
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-01-10
Filing Date
2025-01-10
Publication Date
2025-07-17

AI Technical Summary

Technical Problem

Existing video encoding/decoding technologies face challenges in efficiently compressing and reconstructing high-resolution videos while maintaining image quality, particularly in handling Intra Block Copy (IBC) prediction signals.

Method used

The implementation of filtering techniques using filter templates with derived shapes and multiple sets of filter coefficients for Intra Block Copy (IBC) prediction signals during encoding and decoding processes, enhancing the quality of reconstructed images.

Benefits of technology

Improves the compression efficiency and image quality of high-resolution videos by effectively processing IBC prediction signals, leading to better video encoding/decoding performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2025000673_17072025_PF_FP_ABST
    Figure KR2025000673_17072025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed are a method, device, and recording medium for image encoding / decoding. The method for image encoding / decoding may comprise the steps of: acquiring prediction signal filtering information; generating a prediction signal; and filtering the prediction signal on the basis of the prediction signal filtering information. The step of filtering the prediction signal may include the steps of: identifying a filter model; acquiring filtering coefficients according to the filter model; and filtering the prediction signal on the basis of the filtering coefficients. The prediction signal may be an intra block copy prediction signal generated by intra block copying.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device and recording medium for video encoding / decoding

[0001] The present invention relates to a method, device, and recording medium for image encoding / decoding. Specifically, the present invention discloses a method, device, and recording medium for image encoding / decoding using filtering.

[0002] This invention claims the benefit of the filing dates of Korean Patent Application No. 10-2024-0004445, filed January 10, 2024, Korean Patent Application No. 10-2024-0006993, filed January 16, 2024, Korean Patent Application No. 10-2024-0008229, filed January 18, 2024, and Korean Patent Application No. 10-2025-0004268, filed January 10, 2025, the entire contents of which are incorporated herein by reference.

[0003] With the continuous development of the information and communication industry, services providing video through broadcasting and the Internet have spread worldwide.

[0004] Users demand higher resolution and higher quality video. To meet these demands, video encoding / decoding technologies tailored to these needs are required. Video encoding technology can create compressed video by compressing the video representing the images into a smaller amount of data. Video decoding technology can use the compressed video to create reconstructed images.

[0005] When it comes to video encoding / decoding, various technologies exist, including segmentation, prediction, transformation, quantization, filtering, and entropy encoding / decoding. By introducing, modifying, improving, and combining these diverse technologies, video and images can be compressed, transmitted, and stored more effectively.

[0006] One embodiment may provide a device, method and recording medium using filtering.

[0007] On one side, a decoding method is provided, including a step of obtaining prediction signal filtering information; a step of generating a prediction signal; and a step of performing filtering on the prediction signal based on the prediction signal filtering information.

[0008] The above prediction signal may be an intra block copy (IBC) prediction signal generated by IBC.

[0009] The step of performing the filtering on the prediction signal based on the prediction signal filtering information may include the step of specifying a filter model; the step of obtaining a filtering coefficient according to the filter model; and the step of performing the filtering on the prediction signal based on the filtering coefficient.

[0010] The above filtering can be performed using a filter template.

[0011] The filter template can be selected from among a plurality of filter templates having different shapes.

[0012] The shape of the filter template can be derived based on the above prediction signal.

[0013] Multiple sets of filter coefficients can be used for the above filtering.

[0014] In another aspect, an encoding method is provided, comprising: a step of obtaining prediction signal filtering information; a step of generating a prediction signal; and a step of performing filtering on the prediction signal based on the prediction signal filtering information.

[0015] The above prediction signal may be an intra block copy (IBC) prediction signal generated by IBC.

[0016] The step of performing the filtering on the prediction signal based on the prediction signal filtering information may include the step of specifying a filter model; the step of obtaining a filtering coefficient according to the filter model; and the step of performing the filtering on the prediction signal based on the filtering coefficient.

[0017] The above filtering can be performed using a filter template.

[0018] The filter template can be selected from among a plurality of filter templates having different shapes.

[0019] The shape of the filter template can be derived based on the above prediction signal.

[0020] In another aspect, a computer-readable recording medium is provided for storing a bitstream generated by the above encoding method.

[0021] In another aspect, a computer-readable recording medium for storing a bitstream for image decoding is provided, wherein the bitstream includes prediction signal filtering information, a prediction signal is generated, and filtering is performed on the prediction signal based on the prediction signal filtering information.

[0022] The above prediction signal may be an intra block copy (IBC) prediction signal generated by IBC.

[0023] The filtering of the prediction signal performed based on the prediction signal filtering information may include specifying a filter model, obtaining a filtering coefficient according to the filter model, and performing the filtering of the prediction signal based on the filtering coefficient.

[0024] The above filtering can be performed using a filter template.

[0025] The filter template can be selected from among a plurality of filter templates having different shapes.

[0026] The shape of the filter template can be derived based on the above prediction signal.

[0027] Devices, methods and recording media using filtering are provided.

[0028] Figure 1 illustrates a system for video coding according to one embodiment.

[0029] Figure 2 shows a segmentation structure of an image according to one embodiment.

[0030] Figure 3 illustrates the structure of intra prediction according to one embodiment.

[0031] Figure 4 shows the structure of inter prediction to explain the inter prediction process according to one embodiment.

[0032] Figure 5 shows the order in which spatial candidates are added to the candidate list according to one embodiment.

[0033] Figure 6 illustrates multiple in-loop filters according to an example.

[0034] Figure 7 shows the structure of entropy encoding and entropy decoding according to an example.

[0035] FIG. 8 is a flowchart of a method for predicting a target block and a method for generating a bitstream according to one embodiment.

[0036] FIG. 9 is a flowchart of a method for predicting a target block using a bitstream according to one embodiment.

[0037] Fig. 10 is a flowchart of a coding method according to an example. The coding method may include an encoding method and / or a decoding method.

[0038] Figures 11, 12 and 13 illustrate forms of filter templates according to an example.

[0039] Figure 11 illustrates an L-shaped template according to an example.

[0040] Figure 12 illustrates an upper template according to an example.

[0041] Figure 13 illustrates a left template according to an example.

[0042] Figure 14 shows the shape of a FIBC filter according to an example.

[0043] Figure 15 illustrates the use of a 1x1 rectangular filter according to an example.

[0044] Figure 16 illustrates the use of a 3x3 cross filter according to an example.

[0045] Figure 17 illustrates the use of a 3x3 rectangular filter according to an example.

[0046] Figure 18 illustrates the use of a 3x3 cross filter according to an example.

[0047] Figure 19 shows binarization of ibc_lic_efibc_index according to an example.

[0048] Figure 20 shows binarization of ibc_lic_efibc_index according to another example.

[0049] Figure 21 shows binarization of ibc_lic_efibc_index according to another example.

[0050] Figure 22 illustrates flag signaling according to an example.

[0051] FIG. 23 is a first block diagram illustrating signaling of information for an IBC filter mode according to an example.

[0052] FIG. 24 is a second block diagram illustrating signaling of information for an IBC filter mode according to an example.

[0053] Figure 25 illustrates a case where the values ​​of the entire block are used to calculate the difference according to an example.

[0054] Figure 26 illustrates a first case where only a region of a specific size is used for calculating the difference according to an example.

[0055] Figure 27 illustrates a second case where only a region of a specific size is used for calculating the difference according to an example.

[0056] Figure 28 illustrates an intra block copy according to an example.

[0057] Figure 29 illustrates a 1x1 rectangular filter according to an example.

[0058] Figure 30 shows a 3x3 rectangular filter according to an example.

[0059] Figure 31 shows a 3x3 cross-shaped filter according to an example.

[0060] Figure 32 shows an empty string for signaling modes related to IBC-LIC and FIBC according to an example.

[0061] Figure 33 shows a reference region used to derive filter coefficients according to an example.

[0062] The present invention is capable of various modifications. Furthermore, the present invention may have various embodiments. Specific embodiments are described in the accompanying drawings and detailed description.

[0063] It should be understood that the specific examples are not intended to limit the invention to specific embodiments, and that all modifications, equivalents, and substitutes falling within the spirit and scope of the invention are intended to be encompassed within the scope of the invention as embodiments.

[0064] The embodiments are described in sufficient detail to enable those skilled in the art to practice them. It should be understood that the various embodiments, while different from each other, are not necessarily mutually exclusive. For example, it should be understood that the shapes, structures, and characteristics described in connection with one embodiment may be applied to or implemented in other embodiments without departing from the spirit and scope of the present invention. Furthermore, it should be understood that the positions or arrangements of components within one embodiment may be modified without departing from the spirit and scope of the present invention. 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 and all equivalents to those claimed by such claims.

[0065] A detailed description of the embodiments described below may refer to the drawings for the embodiments. Any description described in the drawings or the descriptions shown in the drawings may be considered part of the detailed description. In the drawings, similar reference numerals may designate the same or similar functions throughout various aspects. The dependencies between components may not be limited to those depicted in the drawings.

[0066] In the embodiments, a singular expression may include, and may be limited to, and / or restricted by, a plural expression, unless the context clearly excludes a plural expression. That is, expressions such as “at least one” and “one or more” in the embodiments may be replaced with “plural.” Terms such as “ / ,” “and / or,” “at least one of,” and “one or more of” described for a plurality of items may mean 1) one item of the plurality of items, 2) some of the plurality of items, 3) a combination of some of the plurality of items, or 4) a combination of the plurality of items. Furthermore, a plural expression may be replaced with a singular expression. The plural may mean an integer greater than or equal to 1, 2, 3, 4, or 5.

[0067] In the embodiments, terms related to numbers, such as "first" and "second," may be used to describe various components. These terms are used only to distinguish one component from another and do not limit the components. For example, without departing from the scope of the present invention, the first component could be referred to as the second component, and similarly, the second component could also be referred to as the first component.

[0068] When a first component transmits (or provides) information to a second component, it can mean that the first component directly transmits information to the second component, or it can mean that the first component transmits information to the second component via another third component. Here, the information that the second component receives (or obtains) can be information transmitted by the first component, or information generated by applying a specific process to information transmitted by the first component.

[0069] The components of the embodiments may be depicted independently to represent different characteristic functions, and this does not imply that each component corresponds to a separate hardware or software configuration unit. That is, the components of the embodiments may be distinguished and listed for convenience of description. Two or more components described in the embodiments may be regarded as a single component. Furthermore, a single component described in the embodiments may be separated into multiple components that perform the functions of the aforementioned component. Embodiments in which such components are integrated and embodiments in which such components are separated are also included in the scope of the present invention, as long as they do not depart from the essence of the present invention.

[0070] The terms used in the embodiments are used only to describe specific embodiments and are not intended to limit the present invention. In the embodiments, terms such as "comprise" or "have" indicate the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the embodiments. These terms do not preclude the presence or addition of other features, numbers, steps, operations, components, parts, or combinations thereof that are not explicitly described in the embodiments. In other words, the description of "comprising" a specific component of an embodiment does not exclude other components other than the specific component, and means that additional components may also be included in the scope of the embodiments of the present invention or the technical idea of ​​the present invention.

[0071] Some of the components of the embodiments may be optional, not essential components for performing the essential functions of the present invention. These optional components may be used to improve performance. The embodiments may be implemented as a structure that includes only the essential components required to implement the essence of the embodiments, excluding the optional components. Such a structure is also within the scope of the embodiments.

[0072] 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, if a detailed description of a related known configuration or function is judged to obscure the gist of the present specification, such detailed description will be omitted. Furthermore, identical reference numerals are used for identical components in the drawings, and redundant descriptions of identical components will be omitted.

[0073]

[0074] Interchange between terms in the examples

[0075] Below, terms listed on a single line may be used with the same meaning in the embodiments and may be used interchangeably in the embodiments.

[0076] - 'one or more', 'at least one'

[0077] - 'two or more', 'a plurality of', 'multiple', 'multiple'. (In embodiments, 'one or more' or 'at least one' may be further limited to 'two or more', 'plural', or 'multiple'.)

[0078] - 'Information', 'Signal'

[0079] - 'value', 'predefined value', 'specific value', 'threshold', 'threshold value', 'baseline value', 'reference value'

[0080] - 'statistical value', 'statistics value'

[0081] - 'indicator', 'index', 'index', 'flag', 'information'

[0082] - 'encoder', 'encoding apparatus'

[0083] - 'decoder', 'decoding apparatus'

[0084] - 'Entropy encoding', 'encoding', 'encoding'

[0085] - 'Entropy decryption', 'decoding', 'decoding'

[0086] - 'coding', 'encoding and / or decoding'

[0087] - 'video', 'moving picture', 'image', 'picture', 'frame', 'screen'

[0088] - 'Reference picture', 'Reference video'

[0089] - 'Reference Picture List (RPL),' 'Reference Image List'

[0090] - 'original', 'input', 'source'

[0091] - 'Block', 'Unit', 'Signal'

[0092] - 'square', 'square shape'

[0093] - 'pixel', 'pixels', 'samples', 'pels'

[0094] - 'region', 'area', 'part', 'segment'

[0095] - 'partition', 'split', 'divide'

[0096] - 'quad', 'quarternary'

[0097] - 'luma component', 'luma', 'luminance component', 'luminance', 'Y'

[0098] - 'chroma component', 'chroma', 'chrominance', 'chrominance component', 'Cb and Cr', 'Cb or Cr', 'Cb', 'Cr', 'U and V', 'U or V', 'U', 'V'

[0099] - 'target', 'current' (e.g. target block and current block, or target image and current image)

[0100] - 'neighbor', 'neighboring', 'adjacent', 'neighbor / neighboring' (e.g., neighboring block, adjacent block, and surrounding block)

[0101] - 'collocated', 'collected'

[0102] - 'reconstruction', 'reconstruction', 'decoding'

[0103] - 'reconstructed', 'reconstructed', 'decoded'

[0104] - 'difference', 'difference', 'difference', 'error', 'residual', 'residual'

[0105] - Largest Coding Unit (LCU), Coding Tree Unit (CTU)

[0106] - 'inter', 'inter-screen'

[0107] - 'Inter prediction', 'inter prediction', 'motion compensation'

[0108] - 'Inter mode', 'Inter prediction mode', 'Inter-screen mode', 'Inter-screen prediction mode'

[0109] - 'Motion vector', 'Predicted motion vector', 'Advanced Motion Vector Prediction (AMVP)'

[0110] - 'list', 'candidate list'

[0111] - 'Spatial candidate', 'Spatial merge candidate'

[0112] - 'Temporal candidate', 'Temporal merge candidate'

[0113] - 'Prediction motion vector candidate', 'motion vector predictor'

[0114] - 'Prediction method', 'Prediction mode'

[0115] - 'Intra', 'Intra'

[0116] - 'Intra prediction', 'Intra prediction'

[0117] - 'Intra mode', 'Intra prediction mode'

[0118] - 'Dequantization', 'scaling'

[0119] - 'Quantization matrix', 'Scaling list'

[0120] - 'Quantization matrix coefficients', 'matrix coefficients'

[0121] - 'Transform coefficient level', 'quantized level', 'quantized coefficient', 'quantized transform coefficient', 'quantized transform coefficient level'

[0122] - 'Dequantized coefficient', 'dequantized transform coefficient'

[0123] - 'Scanning type', 'Scanning direction'

[0124] - 'Directional mode', 'Angle mode', 'Angular mode', 'Intra prediction mode'

[0125] - '(mode) number of intra prediction mode', '(mode) index of intra prediction mode', '(mode) value of intra prediction mode', '(mode) angle of intra prediction mode', '(mode) direction of intra prediction mode', '(mode) number of intra prediction direction', '(mode) index of intra prediction direction', '(mode) value of intra prediction direction', '(mode) angle of intra prediction direction'

[0126] - 'Merge Mode', 'Movement Merge Mode'

[0127] - 'Geometric Partitioning Mode (GPM)', 'Triangle Partitioning Mode'

[0128] In addition to the terms exemplified above, terms having the same meaning according to common knowledge in the technical field may be used interchangeably in the embodiments.

[0129]

[0130] The range of information and values ​​of information described in the examples

[0131] In embodiments, information may include constants, flags, indices, variables, coding parameters, elements, syntax elements, motion information, attributes, entities, objects, and data. That is, the term 'information' may be replaced with 'data', 'flag', 'index', 'variable', 'element', 'syntax element', 'motion information', 'attribute', or 'object'.

[0132] Information can have one of multiple values. The 'nth value' can mean the nth value among the multiple values.

[0133] For example, the first value could represent '0' or (logical) false. The second value could represent '1' or (logical) true. Alternatively, the first value could represent '1' or (logical) true. The second value could represent '0' or (logical) false.

[0134] A flag may be information having a value of either '0' or '1'. In embodiments, the flag values ​​'0' and '1' may be replaced with '1' and '0', respectively. For example, information indicating whether a specific process is performed or whether a specific process is applied may be considered a flag.

[0135] When a variable such as i or j is used to represent a row, column, or index, the variable can be an integer greater than or equal to 0 and less than or equal to n - 1. Alternatively, the variable can be an integer greater than or equal to 1 and less than or equal to n. Here, n can be the number of rows, the number of columns, or the number of entities pointed to by the index.

[0136]

[0137] Coding related concepts

[0138] Below, concepts related to coding are described. The descriptions disclosed below can be applied to embodiments.

[0139] Predefined value: A predefined value may refer to a value commonly used in an encoding device and a decoding device. For example, a predefined value may be interpreted as a fixed value. Alternatively, the predefined value may be a value shared by an encoding device and a decoding device through signaling. Alternatively, the predefined value may be a value derived through the same procedure in an encoding device and a decoding device so that the encoding device and the decoding device have a common value. Alternatively, the predefined value may be a common value in an encoding device and a decoding device. The above description of a predefined value may also be applied to predefined information. In the above descriptions, 'value' may be replaced with 'information'.

[0140] Availability: The availability of certain modes for a specific target may mean that a selected mode among the specific modes is used for the specific target. Other modes within the specific mode category may be unavailable. Unavailable modes may not be used for the specific target. The description of a specific mode above may also apply to other specific information. In the descriptions above, "mode" may be replaced with "information."

[0141] Adjacency: The 'direction' of the 'second entity' with respect to the 'first entity' may refer to the 'second entity' that is adjacent to the 'direction' corner / face of the first entity. For example, the 'top left block' with respect to the 'target block' may be a block adjacent to the top left of the target block. Here, the 'first entity' may be a target unit, a target block, or a target sample. The 'direction' may be one of left-above, above, right-above, left, right, left-below, below, and right-below. The 'second entity' may be a unit, a block, or a sample. For the directions of left-top, right-top, left-bottom, and right-bottom, the corners of the first entity and the corners of the second entity may be diagonally adjacent. For the directions of top, left, right and bottom, one side of the first object and one side of the second object can be in contact with each other.

[0142] - For example, the block adjacent to the upper left of the target block may be the block adjacent to the upper left of the block adjacent to the target block. The block adjacent to the upper right of the target block may be the block adjacent to the right of the block adjacent to the upper right of the target block. The block adjacent to the lower left of the target block may be the block adjacent to the lower left of the block adjacent to the target block.

[0143] Coding: Coding can mean encoding and / or decoding of images.

[0144] Signal: A signal can represent information about an image, unit, or block. A specific signal can represent a specific image, a specific unit, or a specific block.

[0145] Video: A video can refer to a single picture that constitutes a video, or it can refer to the video itself. For example, "encoding and / or decoding a video" can mean "encoding and / or decoding a video," or it can mean "encoding and / or decoding one of the pictures that constitute the video."

[0146] - A picture can mean the entire picture, or it can mean a part of a picture, such as a block.

[0147] Target Image: The target image may be an encoding target image, which is the target of encoding, and / or a decoding target image, which is the target of decoding. Furthermore, the target image may be an input image processed by an encoding device, or a restored image processed by a decoding device. The target image may be an image including a target block.

[0148] Subpicture: A picture can be divided into one or more subpictures.

[0149] - A subpicture may be a square or rectangular area within a picture. A subpicture may contain one or more CTUs.

[0150] - A subpicture may include one or more slices and / or one or more tiles. For example, a subpicture may consist of one or more slice rows and one or more slice columns. Alternatively, each subpicture may consist of one or more tile rows and one or more tile columns.

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

[0152] Slice: A slice may contain one or more tiles within a picture. A slice may consist of one or more rows of tiles and one or more columns of tiles.

[0153] Tile: A tile can be a square or rectangular area within a picture. A tile can contain one or more CTUs. A picture can be divided into one or more tile rows and one or more tile columns.

[0154] CTU: An image can be divided into multiple coding tree units (CTUs).

[0155] - A CTU may include one Y coding tree block (CTB) and at least one of a Cb CTB and a Cr CTB related to the Y CTB, and may include information about each CTB. The information may include syntax elements.

[0156] - Each CTU can be partitioned using one or more partitioning methods to form sub-units such as coding units (CUs), prediction units (PUs), and transform units (TUs). The one or more partitioning methods can include quad tree (QT) partitioning, binary tree (BT) partitioning, and ternary tree (TT) partitioning. Additionally, each CTU can be partitioned using multi-type tree (MTT) partitioning that uses a combination of multiple partitioning methods.

[0157] CTB: CTB can refer to one of Y CTB, Cb CTB, and Cr CTB.

[0158] Unit: A unit can be determined for specific processing in coding. A unit can contain information about a specific region within an image. For specific coding processing, an image can be recursively divided into multiple parts. A unit can represent the region to which a specific processing is applied and information about the region.

[0159] - The type of a unit may indicate a specific processing to be applied to the unit. Depending on the type of the unit, a specific processing may be applied to the unit. A 'specific' unit may be a unit for processing designated as 'specific' in coding. For example, the unit may be at least one of an original unit, a CTU, a coding unit, a prediction unit, a residual unit, a reconstructed residual unit, a transformation unit, and a reconstructed unit.

[0160] - A unit may include samples having a two-dimensional shape or arrangement. In this respect, a 'unit' may also mean a 'block'. For example, a block may be at least one of an original block, a CTB, a coding block (CB), a prediction block (PB), a residual block, a reconstructed residual block, a transform block (TB), and a reconstructed block. For example, a division of a unit may mean a division of a block corresponding to the unit.

[0161] - A unit can contain syntax elements. In other words, a block and its syntax elements can be combined to form a unit.

[0162] - A block is an MxN array of samples. Here, M and N can represent positive integer values, and a block can commonly represent a two-dimensional sample array. The current block can represent an encoding target block that is the target of encoding during encoding, and a decoding target block that is the target of decoding during decoding. In addition, the current block can be at least one of a coding block, a prediction block, a residual block, a transform block, and a restoration block. The block can have various sizes and shapes. For example, the shape of the block can be one or more of a tetragon, a rectangular block, a square block, a rectangle whose width is different from its height (that is, an oblong block), a trapezoid, a triangle, a right-angled triangle, and a pentagon. Here, the width and height of the rectangle can be different from each other. In addition, the shape of the block can include other geometric shapes that can be expressed in two dimensions. For example, the shape of a block may be a quadrilateral or a pentagon, which is defined by excluding the area of ​​a right triangle from the area of ​​a rectangle. Here, the right vertex of the right triangle may be one of the vertices of the rectangle. Furthermore, the shape of a block may be a combination of two or more of the aforementioned shapes. Furthermore, the shape of a block may be the remainder of one of the aforementioned shapes after excluding another shape.

[0163] - In embodiments, a rectangle may be limited to a non-square rectangle. When the shape of a particular object is described as a rectangle in an embodiment, such description may additionally imply that the width and height of the particular object are different from each other.

[0164] - In embodiments, a block may be limited to at least one of a vertically oriented block and a horizontally oriented block. A vertically oriented block may mean a block whose vertical length is greater than its horizontal length. A horizontally oriented block may mean a block whose horizontal length is greater than its vertical length.

[0165] - A unit may include a luma component block (i.e., a Y block) and two chroma component blocks (i.e., at least one of a Cb block and a Cr block), and may include information about each block. The information may include syntax elements.

[0166] - Unit information may include unit type, unit size, unit depth, unit encoding order, and unit decoding order.

[0167] Target Unit: A target unit may be a block, an encoding target unit, which is a target of encoding, and / or a decoding target unit, which is a target of decoding. A target unit may be a specific area within a target picture to which one or more specific coding processes are applied. A unit of a specific type may be generated by applying a specific process to a target unit. Alternatively, a target unit may represent a unit having a specific type for a specific coding process.

[0168] Depth: A block can be hierarchically divided into multiple sub-blocks, each with its own depth, according to a tree structure. The multiple sub-blocks created by block division can be called partitions.

[0169] - The depth of a block can indicate the level of the node corresponding to the block when the blocks that make up the image are expressed in a tree structure. Alternatively, the depth of a block can indicate the number of partitions applied until the block is determined. The depth of a block can increase by 1 as the block is further partitioned.

[0170] - In a tree structure, the root node can be considered to have the smallest level, and the leaf node can be considered to have the largest level. The root node can be the topmost node in the tree structure and corresponds to the first undivided block. The level of the root node can be 0 or 1. When the level of the root node is 0, a node with a level of 1 can represent a block determined by dividing the first block once. A node with a level of n can represent a block determined by dividing the first block n times. A leaf node can be the lowest node in the tree structure. A leaf node can be a node that cannot be further divided. The depth of a leaf node can be a predefined maximum depth. For example, the maximum depth can be a positive integer such as 3. The root node can mean a CTU. A leaf node can mean at least one of a CU, a PU, and a TU.

[0171] - Depth can have a type depending on the type of partition. QT depth can represent the depth for quadtree partitioning. BT depth can represent the depth for binary partitioning. TT depth can represent the depth for ternary partitioning.

[0172] Sample: A sample can be a base unit that constitutes a block. A sample can be composed of one or more bits. The bit depth can be the number of bits that constitute a sample. A sample can be numbered from 0 to 2 depending on the bit depth. Bd It can be expressed as values ​​up to -1.

[0173] PU: PU may denote a basic unit for prediction-related processing. For example, prediction-related processing may include inter-prediction, intra-prediction, intra-block copy (IBC) prediction, intra-compensation, and motion compensation.

[0174] - A PU can be divided into multiple sub-PUs, each of which has a smaller size than the PU itself. These multiple sub-PUs can also serve as the basis for prediction-related processing. In other words, a prediction unit partition generated by splitting a prediction unit can also be a prediction unit.

[0175] TU: A TU may be a basic unit for processing related to a residual block. The processing related to the residual block may include at least one of a transform, an inverse transform, quantization, inverse quantization, transform coefficient encoding, transform coefficient decoding, entropy encoding, and entropy decoding. - One TU may be split into a plurality of sub-transform units having a size smaller than the size of the TU. The plurality of sub-TUs may also be basic units for processing related to the residual block. In other words, a transform unit partition generated by splitting a transform unit may also be a transform unit.

[0176] - The transformation may include one or more of a primary transformation and a secondary transformation, and the inverse transformation may include one or more of a primary inverse transformation and a secondary inverse transformation.

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

[0178] - 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).

[0179] - 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. A parameter set can refer to a higher-order parameter set. For example, a PPS can refer to an SPS. An SPS can refer to a VPS.

[0180] - Additionally, the parameter set may include tile group information, slice header information, and tile header information. A tile group may mean a group or slice including multiple tiles.

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

[0182] - One or more different MPMs can be determined based on coding parameters related to the target block and properties of objects related to the target block.

[0183] - One or more MPMs may be determined based on the intra prediction mode of a reference block. There may be multiple reference blocks. Depending on which intra prediction modes are used for one or more reference blocks, one or more different MPMs may be determined. The reference blocks may include spatial neighboring blocks.

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

[0185] MPM Index: The MPM index can indicate an MPM among one or more MPMs in the MPM list to be used for intra prediction for the target block.

[0186] MPM Usage Directive: The MPM usage directive can indicate whether the MPM list is used for prediction on the target block.

[0187] Prediction mode: The prediction mode may be information indicating a prediction method for a target block, such as a mode used for intra prediction or a mode used for inter prediction. The prediction mode may refer to one of the prediction-related modes described in the embodiments. In addition, the prediction mode may include at least one of an intra mode, an inter mode, and an intra block copy mode.

[0188] Reference image list: The reference image list may be a list containing one or more reference images used for prediction for the target block.

[0189] - There may be multiple reference image lists. Multiple reference image lists may include List 0 (L0), List 1 (L1), etc.

[0190] - One or more reference image lists may be used for inter prediction for a target block. Parts such as 'L0' and 'L1' in the names of information related to inter prediction may refer to reference image lists related to the information.

[0191] Reference picture: A reference picture may be an image referenced for prediction of a target block. Alternatively, the reference picture may be an image containing a reference block. The reference picture may include a previous image of the target image, a target image, and a subsequent image of the target image.

[0192] Reference image index: The reference image index may be an index indicating one reference image among one or more reference images in the reference image list that is used for prediction of the target block.

[0193] Reference Block: A reference block may be a block referenced for encoding / decoding a target block, such as prediction or filtering. For example, a reference block may include reference samples used to derive prediction samples, and may also refer to a block that provides information used for decoding the target block.

[0194] Reference sample: A reference sample may be a sample that is referenced for encoding / decoding of a target block, such as prediction and filtering.

[0195] Inter prediction indicator: The inter prediction indicator can indicate the direction of inter prediction for the target block. The inter prediction can be one of uni-directional prediction and bi-directional prediction. Alternatively, the inter prediction indicator can indicate the number of reference pictures used when generating a prediction block of the target block. Alternatively, the inter prediction indicator can indicate the number of prediction blocks used for inter prediction for the target block. The reference direction can mean the inter prediction indicator. For example, the inter prediction indicator can indicate one of uni-directional and bi-directional. Alternatively, the inter prediction indicator can have a first value of '0' for an inter mode that uses only reference pictures in the L0 reference picture list, a second value of '1' for an inter mode that uses only reference pictures in the L1 reference picture list, and a third value of '2' for an inter mode that uses at least two of the reference pictures in the L0 reference picture list and the reference pictures in the L1 reference picture list.

[0196] Prediction List Utilization Flag: The prediction list utilization flag for a specific reference image list may indicate whether at least one reference image within the specific reference image list is used to generate a prediction block of the target block. For example, a value of the prediction list utilization flag for a specific reference image list of '0' may indicate that a prediction block is not generated using a reference image within the specific reference image list. A value of the prediction list utilization flag for a specific reference image list of '1' may indicate that a prediction block is generated using a reference image within the specific reference image list.

[0197] - An inter prediction indicator can be derived using a prediction list utilization flag. Conversely, a prediction list utilization flag can be derived using an inter prediction indicator. For example, an inter prediction indicator can be derived using prediction list utilization flags for a plurality of reference image lists. If an inter prediction indicator indicates that specific reference lists among a plurality of reference image lists are used, the prediction list utilization flags of the specific reference lists indicated by the inter prediction indicator among the prediction list utilization flags of the plurality of reference image lists can be set to '1', and the prediction list utilization flags of the remaining reference image lists not indicated by the inter prediction indicator can be set to '0'.

[0198] Reference Direction: The reference direction may point to a list of reference images used for prediction of the target block. For example, the reference direction may point to one or more of the reference image list L0 and the reference image list L1.

[0199] - The reference direction may not indicate that the directions of the reference images in the reference image list are limited to the forward direction or the backward direction, but only indicates the reference image list used for prediction of the target block. That is, each of the reference image list L0 and the reference image list L1 may include forward images and backward images. Here, the forward direction may indicate the direction from the target image to the previous image of the target image. Forward inter prediction may be inter prediction that uses the previous image of the target image as a reference image. Backward direction may indicate the direction from the target image to the subsequent image of the target image. Backward inter prediction may be inter prediction that uses the subsequent image of the target image as a reference image.

[0200] - A unidirectional reference direction may mean that one reference image list is used. A bidirectional reference direction may mean that two reference image lists are used. For example, the reference direction may indicate that only the reference image list L0 is used, that only the reference image list L1 is used, or that two reference image lists are used. Additionally, the reference direction may be indicated by an inter prediction indicator.

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

[0202] Motion information: Motion information may be information used to specify a reference block. Motion information may include information used for inter prediction, such as a motion vector (MV), a reference picture index, a reference picture, an inter prediction indicator, and a prediction list utilization flag. Additionally, motion information may include information used in a specific inter prediction mode, such as an MV candidate, an MV candidate index, a merge candidate, and a merge index.

[0203] - For inter prediction of a target block, multiple motion information for multiple reference image lists can be used, respectively. Motion information for a specific reference image list can be used for prediction using the specific reference image list. Multiple (intermediate) prediction blocks can be derived from the multiple motion information. A (final) prediction block for the target block can be generated using statistical values ​​for the multiple (intermediate) prediction blocks.

[0204] MV: MV can be a two-dimensional vector used in inter prediction. It can represent the offset between a target block and a reference block. Alternatively, it can represent the difference between the locations of a target block and a reference block.

[0205] - 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.

[0206] -The zero vector can be (0, 0) MV.

[0207] Block Vector (BV): A BV can be a two-dimensional vector used in intra-block copy prediction. A BV can represent the offset between a target block within a target image and a reference block within the target image. In other words, a BV can represent the displacement between the target block and the reference block within the target image.

[0208] - For example, BV is similar to MV (bv x , bv y ) can be expressed in the form of bv x can represent the horizontal component, bv y can represent vertical components.

[0209] -The zero vector can be (0, 0) BV.

[0210] Motion Information Candidate: In a specific prediction, the motion information of the target block can be selected from among motion information candidates determined by a specific method. The motion information candidate may refer to the motion information of a reference block, or it may refer to the reference block itself containing the motion information. Here, the reference block may be a block determined by a specific method for selecting a motion information candidate.

[0211] Candidate List: A candidate list may be a list containing one or more candidates. For example, the candidate list may include a motion information candidate list, a merge candidate list, an MV candidate list, an MPM list, etc. The candidate list may be generated in the same manner by the encoding device and the decoding device. In other words, the candidate list used by the encoding device and the candidate list used by the decoding device may be the same, and the same candidate list may be shared by the encoding device and the decoding device. The encoding device may select a candidate to be used for processing the target block from among the candidates in the candidate list. An indicator indicating the selected candidate may be signaled from the encoding device to the decoding device. The decoding device may use the indicator to specify a candidate to be used for processing the target block from among the candidates in the candidate list. Alternatively, the encoding device and the decoding device may specify a candidate to be used for processing the target block from among the candidates in the candidate list according to the same rule.

[0212] Motion information candidate list: The motion information candidate list may mean a list constructed using one or more motion information candidates.

[0213] Motion information candidate index: The motion information candidate index may be an identifier or indicator that indicates a motion information candidate used for prediction of a target block among the motion information candidates in the motion information candidate list.

[0214] - In a specific inter prediction mode, motion information of other reconstructed blocks may be used to derive motion information of the target block. The other blocks may include neighboring blocks. In this specific inter prediction mode, the motion information for the target block itself is not individually signaled, but other information used to derive motion information of the target block based on the motion information of other reconstructed blocks may be signaled. In this case, the other information may include information indicating which of the other reconstructed blocks' motion information is used to derive motion information of the target block, such as a motion information candidate index.

[0215] - For example, these inter prediction modes may include AMVP mode, merge mode, and skip mode. The motion information candidate index may be a merge index or an MV candidate index.

[0216] - In embodiments, MV may be part of motion information. In embodiments, information about motion information, such as motion information candidates, motion information candidate lists, and motion information candidate indices, may be replaced with information about MVs, such as MV candidates, MV candidate lists, and MV candidate indices, and the description of motion information may also be applied to MVs.

[0217] Merge: Merge can refer to the merging of motion information across multiple blocks, or it can refer to applying motion information from another block to the target block. In other words, merge mode can refer to a mode in which the motion information of the target block is derived from the motion information of neighboring blocks.

[0218] Merge Candidate: A merge candidate may refer to a specific (restored) block used for merging the target block, or may refer to motion information for the specific block. Alternatively, the merge candidate may include motion information for the specific block.

[0219] - Merge candidates for the target block may include spatial merge candidates, temporal merge candidates, history-based candidates, average candidates based on the average of two merge candidates, and zero merge candidates.

[0220] Merge Candidate List: A merge candidate list may be a list constructed using one or more merge candidates.

[0221] Merge Index: A merge index may be an indicator that points to a merge candidate among the merge candidates in the merge candidate list, which is used for prediction of the target block. The motion information of the merge candidate indicated by the merge index among the merge candidates in the merge candidate list may be used as motion information of the target block.

[0222] Neighboring block: A neighboring block can refer to a block adjacent to the target block. Neighboring blocks can include spatial and temporal neighboring blocks. A neighboring block can also refer to a reconstructed neighboring block within a reference image.

[0223] Spatial neighboring blocks: Spatial neighboring blocks can be blocks that are spatially adjacent to the target block.

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

[0225] - A spatial neighboring block may include a block whose boundary is at least partially adjacent to a boundary of the target block. Alternatively, a spatial neighboring block may include a block whose distance from the target block is less than or equal to a specific value.

[0226] - A spatial neighboring block may include a block diagonally adjacent to a vertex of the target block.

[0227] - Spatial neighboring blocks may include an upper left block adjacent to the upper left of the target block, an upper block adjacent to the upper right of the target block, an upper right block entered at the upper right of the target block, a left block adjacent to the left of the target block, a right block adjacent to the right of the target block, a lower left block adjacent to the lower left of the target block, a lower block adjacent to the lower bottom of the target block, and a lower right block adjacent to the lower right of the target block.

[0228] Temporal neighboring blocks: Temporal neighboring blocks can be blocks that are temporally adjacent to the target block.

[0229] - A temporal neighboring block may include a collocated block (COL block). A collocated block may be a block within a reconstructed image within a reference image buffer. A collocated picture (col picture) may refer to an image that includes a collocated block. A collocated picture may be an image included in a reference image list.

[0230] - Call blocks can be determined based on the location of the target block within the target image. Two blocks being "temporally adjacent" can mean that the locations of the two blocks satisfy certain conditions.

[0231] - The position of a call block within a call image may be the same as the position of a target block within a target image. Alternatively, the position of a call block within a call image may correspond to the position of a target block within a target image. Here, the correspondence of the positions of blocks may mean that the areas of the blocks are identical, that an area of ​​one block is included in an area of ​​another block, or that one block occupies a specific position of another block.

[0232] - For example, the location of a call block within a call image may be identical to the location of a target block within the target image. Alternatively, a call block may be a block containing a call sample within a call image. A call sample may be a sample having coordinates identical to the coordinates of a specific sample in the target block.

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

[0234] Search range: The search range can refer to a two-dimensional region where MVs are searched during inter prediction. For example, when the optimal MV must be derived for processing a target block, the optimal MV can be selected from among the MVs pointing within the search range.

[0235] Transform coefficient: The transform coefficient may be a coefficient generated by performing a transformation on the residual block. Alternatively, the transform coefficient may be a coefficient value generated by performing dequantization on a quantized level.

[0236] Quantized level: A quantized level can be an integer quantity used as input to dequantization.

[0237] Quantization: Quantization can be the process of generating quantized levels for transform coefficients. Quantized levels can be generated by applying quantization to transform coefficients. The transform can also be considered part of quantization.

[0238] Dequantization: Dequantization can be the process of multiplying a quantized level by a factor. By applying dequantization to a quantized level, (restored) transform coefficients can be generated.

[0239] Quantization Parameter (QP): QP can refer to an argument used to generate quantized levels for transform coefficients in quantization. QP can also refer to an argument used to generate (restored) transform coefficients for quantized levels in dequantization. Alternatively, QP can be a value mapped to the quantization step size.

[0240] Delta QP: Delta QP can be the difference between the QP predicted by a specific process and the QP of the target block. In other words, the QP of the target block can be the sum of the predicted QP and the delta QP.

[0241] Quantization matrix: A quantization matrix can be a matrix used in quantization or inverse quantization to improve the subjective or objective quality of an image.

[0242] Quantization matrix coefficients: Quantization matrix coefficients can be each element within a quantization matrix.

[0243] Scan: A scan can refer to the arrangement of values ​​within a block or matrix. The values ​​can be coefficients. For example, a scan can refer to arranging values ​​arranged in a two-dimensional form into a one-dimensional form, or it can refer to rearranging values ​​arranged in a one-dimensional form into a two-dimensional form. An inverse scan can be the opposite arrangement (or rearrangement) of the arrangement performed in a scan.

[0244] Non-zero transform coefficient: A non-zero transform coefficient can mean a transform coefficient with a non-zero value or a quantized level with a non-zero value.

[0245] Bitstream: A bitstream may refer to a sequence of bits containing encoded information generated by encoding an image. A bitstream may contain information according to specific syntax elements. For example, information may contain syntax elements. An encoding device may generate a bitstream containing information according to specific syntax elements. A decoding device may obtain information from the bitstream according to specific syntax elements.

[0246] Signaling: Signaling information may indicate that information is transmitted from an encoding device to a decoding device via a bitstream. For example, the information may include a syntax element. Alternatively, signaling may mean that the encoding device includes information in a bitstream. Information signaled by the encoding device may be used by the decoding device. In signaling, the bitstream may be transmitted via a network and may be included in a recording medium. In embodiments, description of information being signaled may include: 1) for signaling information, the encoding device determines and generates information; 2) the encoding device encodes the information to generate encoded information; 3) (encoded) information is transmitted from the encoding device to the decoding device via a bitstream; 4) the decoding device decodes the encoded information to obtain information; and 5) for signaling information, the decoding device determines and generates information via signaling.

[0247] - An encoding device can perform encoding on information to generate encoded information. The encoded information can be signaled via a bitstream. A decoding device can obtain information by decoding the encoded information.

[0248] - When information is signaled for a specific target, it can mean that the information is used for each specific target, and the processing indicated by the information is applied to each specific target. For example, when information is signaled at a specific unit level, it can mean that the information is used / processed for each specific unit.

[0249] - The information being signaled may include one or more sub-information. Signaling a specific piece of information may mean that each piece of information within one or more sub-information pieces contained within the specific information is signaled.

[0250] Selective Signaling: Signaling of information may be performed selectively. Selective signaling of information may mean that the encoding device selectively includes information in the bitstream (under certain conditions). Selective signaling of information may mean that the decoding device selectively obtains information from the bitstream (under certain conditions).

[0251] 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. Omission of signaling for information may mean that the decoding device (under certain conditions) does not obtain the information from the bitstream. The decoding device may derive the information for which signaling is omitted using other information of the embodiments.

[0252] Symbol: may mean at least one piece of information of a target unit, such as a syntax element of a target unit or target block, a coding parameter, a quantized level, and a transform coefficient. In addition, a symbol may mean a target of entropy encoding or a result of entropy decoding.

[0253] Entropy encoding: Entropy encoding can allocate fewer bits to symbols with a high probability of occurrence, and more bits to symbols with a low probability of occurrence. This allocation reduces the size of the bitstream representing the symbols as they are represented.

[0254] - Entropy coding can use methods such as Variable Length Coding (VLC) and Context-Adaptive Binary Arithmetic Coding (CABAC). For example, in variable length coding, entropy coding can be performed using a variable length table. For example, in CABAC, a binarization method for symbols and a probability model of symbols / bins can be derived for entropy coding, and arithmetic coding using context can be performed.

[0255] Entropy decoding: Entropy decoding can reverse the processes performed in entropy encoding. Symbols can be generated by entropy decoding a bitstream.

[0256] Parsing: Parsing can mean determining the values ​​of syntactic elements by performing entropy decoding on the encoded information in the bitstream. Alternatively, parsing can mean entropy decoding itself.

[0257] Statistical Value: The values ​​of information related to specific entities described in the embodiments may be used as inputs to specific operations. The statistical value may be a value derived by a specific operation on the values ​​related to these specific entities. For example, the statistical value for specific information may be one or more of an average value, a weighted average value, a weighted sum value, a minimum value, a maximum value, a mode, a median value, an interpolated value, a sum of products, and a product of sums of values ​​of the specific information. Additionally, information of the embodiments having specific values ​​determined by operations, such as constants, variables, and coding parameters, may have specific statistical values ​​according to the embodiments.

[0258]

[0259] Coding parameters

[0260] In embodiments, coding parameters may be information required for coding. The coding parameters may include information signaled from an encoding device to a decoding device, information calculated / derived during the coding process described in the embodiments, and information used for the coding process described in the embodiments.

[0261] In embodiments, the coding parameters include a size of a CTU, a size of a unit, a form of a unit, a shape of a unit, a depth of a unit, a minimum unit size, a maximum unit size, a maximum unit depth, a minimum unit depth, a partition information of a unit, QT partition information, BT partition information, a partition direction of a BT partition, a partition shape of a BT partition, TT partition information, a partition direction of a TT partition, a partition shape of a TT partition, MTT partition information, a combination of MTT partitions, a partition direction of an MTT partition, a partition shape of an MTT partition, a prediction mode, an intra prediction mode, a luma intra prediction mode, a chroma intra prediction mode, an intra partition information, an inter partition information, a coding block partition information, a prediction block partition information, a transform block partition information, a reference sample line index, a reference sample filtering method, a reference sample filter tap, a reference sample filter coefficient, a prediction block filter method, a prediction block filter tap, a prediction block filter coefficient, a prediction block boundary filtering method, a prediction block boundary filter tap, a prediction block boundary filter coefficient, an inter prediction mode, motion information, MV, a motion vector difference (MV). Difference (MVD), MVD resolution, MV size, MV representation accuracy, reference picture list, reference picture, reference picture index, inter prediction direction, inter prediction indicator, prediction list utilization flag, POC, MV candidate, MV candidate index, MV candidate list, AMVP mode usage information, merge candidate, merge index, merge candidate list, merge mode usage information, motion information compensation information, skip mode usage information, intra block copy mode usage information, BV (Block Vector), Block Vector Difference (BVD), BVD resolution, BV size, BV representation accuracy, BV candidate, BV candidate index, BV candidate list, filter tap of interpolation filter, filter coefficient of interpolation filter, transformation type, transformation size, transformation selection information, primary transformation usage information,Secondary transform usage information, primary transform selection information, secondary transform selection information, residual block presence information, coded block pattern, coded block flag, QP, delta QP, quantization matrix, deblocking filter usage information, coefficients of the deblocking filter, filter taps of the deblocking filter, strength of the deblocking filter, shape / shape of the deblocking filter, adaptive sample offset usage information, adaptive sample offset value, adaptive sample offset category, adaptive sample offset type, adaptive loop filter usage information, coefficients of the adaptive loop filter, filter taps of the adaptive loop filter, shape / shape of the adaptive loop filter, binarization / debinarization method, context model, context model determination method, context model update method, regular mode usage information, bypass mode usage information, 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, whether the coefficient value is greater than 2 A flag indicating whether the coefficient value is greater than 3, a flag indicating whether the coefficient value is greater than 3, remaining coefficient value information, sign information, context bin, bypass bin, reconstructed sample, reconstructed luma sample, reconstructed chroma sample, residual sample, residual luma sample, residual chroma sample, transform coefficient, luma transform coefficient, chroma transform coefficient, transform coefficient level, luma transform coefficient level, chroma transform coefficient level, transform coefficient level scanning method, quantized level, luma quantized level, chroma quantized level, size of MV search region on the side of the decoding device, shape of MV search region on the side of the decoding device, number of MV search on the side of the decoding device, picture type, slice identification information, slice type, slice partitioning information, tile group identification information, tile group type, tile group partitioning information, tile identification information, tile type, tile partitioning information, bit depth,It may include one or more of input sample bit depth, reconstructed sample bit depth, residual sample bit depth, transform coefficient bit depth, quantized level bit depth, mapping availability information, information about luma signal, information about chroma signal, color space of target block, color space of residual block, and temporal layer information.

[0262] In addition, the coding parameter may further include 1) a value of information that may be included in the coding parameter, 2) a combination of multiple pieces of information that may be included in the coding parameter, 3) a statistical value for information that may be included in the coding parameter, 4) information related to the coding parameter, 5) information used to calculate / derive the coding parameter, and 6) information calculated / derived using the coding parameter.

[0263] In embodiments, "X usage information" may be "information indicating whether X is used / applied / performed." Alternatively, "X usage information" may be "information indicating whether X is available." For example, "specific mode usage information" may be information indicating whether a specific mode is used. The mode information may indicate a mode used for a target block among the modes described in the embodiments. In embodiments, the specific mode usage information may be replaced with mode information, and the description of the specific mode usage information may also be applied to the mode information. "X usage information" and "X indicator" may be used interchangeably.

[0264] In embodiments, coding parameters and syntax elements may correspond to each other. For example, syntax elements of an embodiment may be used as coding parameters, and coding parameters may be signaled as syntax elements.

[0265] In embodiments, “X presence information” may be considered as “information indicating whether X exists” or “information indicating whether information indicating X exists in the bitstream.”

[0266] In embodiments, the “X selection information” may be information indicating one of the candidates or methods for X. The “X selection information” may be considered an “X index.”

[0267] In embodiments, the splitting form of a particular tree may represent one of symmetric splitting and asymmetric splitting, and may represent one of QT, BT, TT, and non-split. The splitting direction of a particular tree may represent one of horizontal and vertical directions.

[0268] In embodiments, when a coding parameter has one of multiple values, "coding parameter" may be replaced with "whether the coding parameter has a specific value among the multiple values ​​available to the coding parameter."

[0269] In embodiments, when a coding parameter points to one of a plurality of objects, “coding parameter” may be replaced with “whether the coding parameter points to a specific object among the plurality of objects.”

[0270]

[0271] System for video coding

[0272] Figure 1 illustrates a system for video coding according to one embodiment.

[0273] The system (100) may include at least one of an encoding device (110) and a decoding device (150).

[0274] Each of the encoding device (110) and the decoding device (150) may be a computer or an electronic apparatus.

[0275]

[0276] Structure of the encoding device

[0277] The encoding device (110) may include a processor (120), storage (140), and a communicator (149).

[0278] The processor (120), storage (140), and communication device (149) can be connected via a bus.

[0279] The processor (120) may be a semiconductor device that executes instructions or computer-executable codes, such as a central processing unit (CPU). The processor (120) may be at least one hardware processor.

[0280] The processor (120) can perform generation and processing of information input to the encoding device (110), output from the encoding device (110), or used within the encoding device (110) in the embodiments, and can perform comparisons and judgments related to such information.

[0281] The processor (120) may include a plurality of components. The plurality of components may include a partitioner (122), a subtractor (124), a transformer (125), a quantizer (126), an inverse quantizer (127), an inverse transformer (128), an adder (129), a filter (130), and an entropy encoder (139).

[0282] At least some of the aforementioned components may be program modules. The program modules may be included in the encoding device (110) in the form of an operating system, applications, and other program modules. The program modules may be instructions or computer-executable codes stored in the storage (140) and executed by the processor (120).

[0283] The storage (140) may include various types of volatile storage media and non-volatile storage media. For example, the storage (140) may include memory such as ROM and RAM.

[0284] The storage (140) can store instructions and computer-executable codes used for the operation of the encoding device (110), and can store information and bitstreams described in the embodiments. The storage (140) can include a reference picture buffer (141).

[0285] The communication device (149) can perform functions related to the communication of information in the encoding device (110). For example, the communication device (149) can transmit a bitstream to the decoding device (150).

[0286] Among the names of components of the encoding device (110), “-er” or “-or” may be replaced with “-unit”. The storage (140) may also be named a storage unit.

[0287]

[0288] Operation of the encoding device

[0289] The encoding device (110) can sequentially encode one or more images of a video.

[0290] The storage (140) can store the original image. The original image can be used as a target image in the encoding device (110).

[0291] The processor (120) can generate a bitstream including encoded information by performing encoding on the target image, and can store the generated bitstream in the storage (140). The generated bitstream can be stored in a computer-readable recording medium, and can be transmitted to the communication device (189) of the decoding device (150) via a wired and / or wireless transmission medium by the communication device (149).

[0292] The segmenter (122) can determine a target block by performing segmentation on the target image.

[0293] The predictor (123) can determine the prediction mode of the target block. The predictor (123) can generate a prediction block of the target block by performing prediction according to the prediction mode.

[0294] The prediction mode of the target block may be one of the available prediction modes. For example, the available prediction modes may include intra prediction, inter prediction, and IBC prediction.

[0295] For example, if the prediction mode is intra prediction, the predictor (123) can perform intra prediction on the target block to generate a prediction block of the target block.

[0296] For example, if the prediction mode is inter prediction, the predictor (123) can perform inter prediction on the target block to generate a prediction block of the target block.

[0297] For example, when the prediction mode is IBC, the predictor (123) can perform IBC prediction on the target block to generate a prediction block of the target block.

[0298] The subtractor (124) can generate a residual block of the target block. The residual block may be the difference between the original block and the predicted block. The original block may be the area pointed to by the target block in the original image. Alternatively, the residual block may refer to a block generated by applying one or more of transformation and quantization to the difference between the original block and the predicted block.

[0299] The transformer (125) can perform a transformation on the residual block to generate transformation coefficients.

[0300] The converter (125) can perform the conversion using one of a plurality of conversion methods.

[0301] For example, the multiple transform methods may include a Discrete Cosine Transform (DCT), a Discrete Sine Transform (DST), a Karhunen-Loeve Transform (KLT), and transforms based on each transform.

[0302] Transform skip mode may be a mode for generating a reconstructed block using a reconstructed residual block and a prediction block for which transformation and inverse transformation have not been performed. When transform skip mode is applied to a target block, transformation and inverse transformation for the target block may be omitted, and only quantization and inverse quantization for the target block may be performed.

[0303] A quantizer (126) can generate quantized levels by applying quantization using quantization parameters to transform coefficients. In embodiments, the quantized levels may also be referred to as transform coefficients.

[0304] An entropy encoder (139) can generate encoded information by performing entropy encoding based on a probability distribution on information for decoding an image. The bitstream can include encoded information.

[0305] Information for decoding an image may include quantized levels and syntax elements produced by a quantizer (126).

[0306] The probability distribution can be determined based on the quantized levels and coding parameters.

[0307] The entropy encoder (139) can use scanning to change the quantized levels in the form of two-dimensional blocks into the form of one-dimensional vectors in order to perform encoding on the quantized levels. In scanning, which scan among the upper right diagonal scan, vertical scan, and horizontal scan will be used can be determined based on coding parameters such as the block size and the block intra prediction mode.

[0308] When encoding is performed on a target image / block, the predictor (123) uses a reference image / block for prediction. The encoded target image / block can be used as a reference image / block for other images / blocks to be processed later. Accordingly, the processor (120) can perform restoration on the encoded target block, and store a restored image including the restored target block generated by the restoration as a reference image in the reference picture buffer (141). Inverse quantization and inverse transformation can be performed on the encoded target block for restoration.

[0309] The dequantizer (127) can generate dequantized transform coefficients by performing dequantization on the quantized level.

[0310] The inverse transformer (128) can generate inverse quantized and inversely transformed coefficients by performing inverse transformation on the inverse quantized transform coefficients. In embodiments, the inverse quantized and / or inversely transformed coefficients may refer to coefficients to which at least one of inverse quantization and inverse transformation has been applied. The inverse quantized and inversely transformed coefficients may be a restored residual block.

[0311] The adder (129) can generate a restored block by combining a predicted block and a restored residual block.

[0312] The restoration block may pass through a filter (130). The filter (130) may apply one or more of a plurality of filters to the target. Each filter of the plurality of filters may be an in-loop filter. The target may be a restoration sample, a restoration block, or a restoration image.

[0313] The reference picture buffer (141) can store a restored block / image provided from the filter (130). The restored image may be an image including a restored block. Alternatively, the restored image may be an image composed of restored blocks.

[0314] The reference picture buffer (141) can provide the stored restored image as a reference image to the predictor (123). In terms of storing the decoded (i.e., restored) picture, the reference picture buffer (141) may also be referred to as a decoded picture buffer (DPB).

[0315]

[0316] Structure of the decryption device

[0317] The decryption device (150) may include a processor (160), a storage (180), and a communication device (189).

[0318] The description of the processor (120), storage (140), and communication device (149) related to the encoding device (110) can also be applied to the processor (160), storage (180), and communication device (189) related to the decoding device (150). Duplicate descriptions are omitted.

[0319] The processor (160) may include a plurality of components. The plurality of components may include an entropy decoder (161), a divider (162), a predictor (163), an inverse quantizer (167), an inverse transformer (168), an adder (169), and a filter (170).

[0320] The storage (180) may include a reference picture buffer (181).

[0321] The communication device (189) can perform functions related to communication of information in the decryption device (150). For example, the communication device (189) can receive a bitstream from the encoding device (110).

[0322] Among the names of components of the decryption device (150), “-er” or “-or” may be replaced with “-unit”. The storage (180) may also be named a storage unit.

[0323]

[0324] Operation of the decryption device

[0325] The communication device (149) of the encoding device (110) can transmit the bitstream generated by the encoding device (100) to the decoding device (150). Alternatively, a computer-readable recording medium storing the bitstream can transmit the bitstream generated by the encoding device (100) to the decoding device (150).

[0326] The communication device (189) can receive a bitstream from the encoding device (110) via a wired and / or wireless transmission medium. The received bitstream can be stored in the storage (180).

[0327] The processor (160) can obtain a bitstream from a storage (180) or a computer-readable recording medium.

[0328] A bitstream may contain encoded information.

[0329] An entropy decoder (161) can generate information for decoding an image by performing entropy decoding based on a probability distribution on the encoded information of a bitstream.

[0330] Information for decoding an image may include quantized levels and syntax elements.

[0331] The entropy decoder (161) can use scanning to change the quantized levels in the form of a one-dimensional vector into the form of a two-dimensional block to perform decoding on the quantized levels. In scanning, which scan among the upper right diagonal scan, vertical scan, and horizontal scan will be used can be determined based on coding parameters such as the block size and the block intra prediction mode.

[0332] The entropy decoder (161) can provide syntax elements to other components of the processor (160), such as the segmenter (162).

[0333]

[0334] A common description of the relationship between the components of the encoding device and the components of the decoding device.

[0335] The decoding device (150) performs decoding using the bitstream generated by the encoding device (110). The encoding device (110) can perform encoding on the target block using a restored image derived within the decoding device (150), rather than an original image that is not provided to the decoding device (150). Therefore, the encoding device (110) and the decoding device (150) may need to generate restored blocks / images in the same manner. In this respect, the descriptions of the divider (122), predictor (123), inverse quantizer (127), inverse transformer (128), adder (129), filter (130), and reference picture buffer (141) of the encoding device (110) disclosed in the embodiments can also be applied to the divider (162), predictor (163), inverse quantizer (167), inverse transformer (168), adder (169), filter (170), and reference picture buffer (181) of the decoding device (150). Duplicate descriptions are omitted.

[0336] Additionally, each of the divider (122), predictor (123), inverse quantizer (127), inverse transformer (128), adder (129), and filter (130) of the encoding device (110) can generate syntax element information that specifies processing for the target. Each of the divider (162), predictor (163), inverse quantizer (167), inverse transformer (168), adder (169), and filter (170) of the decoding device (150) can perform processing for the target (same as that performed in the encoding device (110)) using the syntax element information.

[0337] As described above, corresponding components of the encoding device (110) and the decoding device (150) may perform the same or corresponding functions. In embodiments, the processor may represent the processor (120) of the encoding device (110) and / or the processor (160) of the decoding device (150). For example, in the function related to prediction, the processor may represent a predictor (123), a subtractor (124), and an adder (129), and may represent a predictor (163) and an adder (169). In the function related to transformation, the processing unit may represent a transformer (125) and an inverse transformer (128), and may represent an inverse transformer (168). In the function related to quantization, the processor may represent a quantizer (126) and an inverse quantizer (127), and may represent an inverse quantizer (167). In the function related to entropy encoding / decoding, the processing unit may represent an entropy encoder (139) and / or an entropy decoder (161). In the function related to filtering, the processing unit may represent a filter (130) and / or a filter (170). The storage may represent a storage (140) of an encoding device (110) and / or a storage (180) of a decoding device (150). The reference picture buffer may represent a reference picture buffer (141) of an encoding device (110) and / or a reference picture buffer (181) of a decoding device (150). The communication unit may represent a communication unit (149) of an encoding device (110) and / or a communication unit (189) of a decoding device (150).

[0338]

[0339] Division of the units that make up the image

[0340] Figure 2 shows a segmentation structure of an image according to one embodiment.

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

[0342] A CU can be used as a basic unit for encoding and decoding images. In addition, a CU can be a basic unit for prediction, transformation, quantization, inverse quantization, inverse transform entropy encoding, and entropy decoding.

[0343] A CU can be used as a unit to which a prediction mode is applied. In other words, during coding, it can be determined which prediction mode among the available prediction modes will be applied to each CU. For example, available prediction modes may include intra prediction, inter prediction, and intra-block copy prediction (IBC).

[0344] The target image (200) can be sequentially divided into units of CTUs. A division structure can be determined for each CTU. The CTU can be divided into CUs according to the division structure. Alternatively, a single CTU can be used as a CU. The size of the CTU can be the maximum CU size.

[0345] Each CU can have depth information. The depth information can indicate the depth of the CU and the size of the CU. The depth of a CTU can be 0. The depth of a CU generated by splitting a CTU can be 1. When a parent CU is split into child CUs, the depth of the child CU can be 1 greater than the depth of the parent CU. The number of split CUs can be a positive integer greater than or equal to 2, including 2, 4, 8, and 16. At least one of the horizontal size and the vertical size of the child CU generated by splitting the parent CU can be smaller than at least one of the horizontal size and the vertical size of the parent CU, depending on the number of child CUs.

[0346] A partitioned CU can be recursively partitioned in the same manner up to a predefined maximum depth or a predefined minimum size. The depth of the smallest coding unit (SCU) can be the predefined maximum depth, and the size of the SCU can be the predefined minimum size. The size of the SCU can be the size of the minimum CU.

[0347] For example, the depth of a CU can range from 0 to 3. Depending on the depth of the CU, the CU can have a size from 64x64 to 8x8. A CTU with a depth of 0 can be a 64x64 block. 0 can be the minimum depth. An SCU with a depth of 3 can be an 8x8 block. 3 can be the maximum depth. A depth of 0 can represent a CTU that is a 64x64 block. A depth of 1 can represent a CU that is a 32x32 block. A depth of 2 can represent a CU that is a 16x16 block. A depth of 3 can represent an SCU that is an 8x8 block.

[0348] The partition information of a CU can indicate whether the CU is partitioned. The partition information can be a 1-bit flag. All CUs except SCUs can include partition information. For example, the partition information of a CU that is not further partitioned can be the first value, '0', and the partition information of a CU that is being partitioned can be the second value, '1'.

[0349] Quad Tree (QT) partitioning may mean that one CU is partitioned into four CUs. When a parent CU is partitioned into four child CUs, the width and height of each child CU may be half the width and half the height of the parent CU, respectively.

[0350] A binary tree (BT) split may mean that one CU is split into two CUs. For example, if a parent CU is split into two child CUs, the width or height of each child CU may be half the width or half the height of the parent CU.

[0351] A Ternary Tree (TT) partition may mean that a single CU is partitioned into three CUs. For example, if a parent CU is partitioned into three child CUs, the three child CUs can be created by partitioning the width or height of the parent CU in a ratio of 1:2:1. The width or height of the child CUs may be 1 / 4, 1 / 2, and 1 / 4 of the width or height of the parent CU, respectively.

[0352] In Fig. 2, QT type segmentation was applied to the first CTU. QT segmentation, BT segmentation, and TT segmentation were applied to the second CTU.

[0353] To partition a CTU, at least one of different types of partitions, such as QT partitioning, BT partitioning, and TT partitioning, may be applied to the CTU. Different types of partitions may be applied based on specific priorities.

[0354] For example, QT partitioning may be preferentially applied to a CTU. A CU to which QT partitioning can no longer be applied may correspond to a leaf node of QT. A CU that is a leaf node of QT may be a root node of BT and / or TT. A CU that is a leaf node of QT may be partitioned into a BT or TT form, or may not be partitioned any further. In this case, QT partitioning may not be applied again to a CU that is created by applying a BT or TT partition to a CU that is a leaf node of QT.

[0355] The partitioning of a CU corresponding to each node of QT can be signaled using QT partitioning information. The QT partitioning information can be a flag. The QT partitioning information of a unit can be information indicating whether the unit is partitioned in a QT form. A first value of the QT partitioning information, '0', can indicate that the CU is not partitioned in a QT form. The QT partitioning information having a first value can indicate a multi-type tree (MTT) partitioning. The MTT partitioning can include a BT partitioning and a TT partitioning. A second value of the QT partitioning information, '1', can indicate that the CU is partitioned in a QT form.

[0356] There may be no priority between BT and TT splits. That is, a CU corresponding to a leaf node of QT may be split into either BT or TT forms. Furthermore, a CU generated by BT or TT splits may be split again into BT or TT forms, or may not be split any further.

[0357] A CU corresponding to a leaf node of QT can become the root node of MTT. For each CU corresponding to an MTT node, the CU may further include MTT-type split direction information and split type information.

[0358] Split direction information can indicate the split direction of MTT splitting. The first value of the split direction information, '0', can indicate that the CU is split horizontally. The second value of the split direction information, '1', can indicate that the CU is split vertically.

[0359] The partition type information can indicate the partition type used for multi-type tree partitioning. The first value of the partition type information, '0', can indicate that the CU is partitioned in the TT form. The second value of the partition type information, '1', can indicate that the CU is partitioned in the BT form.

[0360] Here, each of the aforementioned split direction information and split type information may be a flag having a specific length (e.g., 1 bit).

[0361] The CU's partition information may also include QT partition information, partition direction information, and partition shape information.

[0362] CUs that are no longer split by QT splitting, BT splitting, and TT splitting can be used as units for specific processing, such as prediction, transformation, quantization, inverse quantization, inverse transform, entropy encoding, and entropy decoding. That is, for specific processing, CUs may no longer be split. Therefore, splitting information for splitting such CUs into PUs and / or TUs, etc., may not exist in the bitstream.

[0363] On the other hand, if the size of a CU is larger than the maximum TU size, the CU can be recursively split until the size of the CU becomes smaller than or equal to the maximum TU size. For example, if the size of a CU is 64x64 and the maximum TU size is 32x32, the CU can be split into four 32x32 TUs for transformation. For example, if the size of a CU is 32x64 and the maximum TU size is 32x32, the CU can be split into two 32x32 TUs for transformation.

[0364] In such cases, information regarding whether a CU is split for transformation may not be separately signaled. Whether a CU is split may be determined by comparing the size of the CU (width / height) with the maximum TU size (width / height), without signaling. For example, if the width of the CU is greater than the width of the maximum TU size, the CU may be split into two vertically. Additionally, if the height of the CU is greater than the height of the maximum TU size, the CU may be split into two horizontally.

[0365] For example, the minimum size of a CU may be 4x4. For example, the maximum size of a transform block may be 64x64. For example, the minimum size of a transform block may be 4x4. The QT minimum size may be the minimum size of a CU corresponding to a leaf node of the QT. The MTT maximum depth may be the maximum depth of the path from the root node to the leaf node of the MTT.

[0366] The BT maximum size may represent the maximum size of the CU corresponding to each node of the BT, and the TT maximum size may represent the maximum size of the CU corresponding to each node of the TT. The BT minimum size and / or the TT minimum size may be set to the minimum size of the CU.

[0367] If the depth within the MTT of a CU corresponding to a node of the MTT is equal to the maximum depth of the MTT, the CU may not be split into BT shape and / or TT shape.

[0368] Based on the various sizes and depths of the CUs described above, each piece of information described in the embodiments may or may not be present in the bitstream.

[0369] Information about the maximum or minimum size described in the embodiments may be signaled at a higher level of the CU. In the embodiments, the higher level of the CU may include a video level, a sequence level, a picture level, a subpicture level, a tile group level, a tile level, and a slice level.

[0370] The information described in the embodiments may be signaled separately for different types of slices. The different types of slices may include intra-slices and inter-slices.

[0371]

[0372] Processing blocks according to their properties

[0373] Whether a specific process described in the embodiments is applied / performed may be determined based on the properties of a block related to the specific process. Whether a specific process described in the embodiments is applied / performed may be determined based on whether the properties of a block related to the specific process satisfy a specific condition. For example, a block may include a target block, a neighboring block, and a reference block. A block may include other blocks described in the embodiments. A block may be one of the blocks and units described in the embodiments.

[0374] The blocks to which the specific processing described in the examples is applied may have a square shape or a non-square shape.

[0375] In one embodiment, the block's attributes may include the block's size. Certain processing described in the embodiments may be applied / performed when certain conditions regarding the block's size are met.

[0376] In one embodiment, the specific conditions may include a minimum block size condition and a maximum block size condition. The blocks to which the minimum block size condition applies and the blocks to which the maximum block size condition applies may be different.

[0377] In one embodiment, a minimum block size and / or a maximum block size for a particular process may be predefined.

[0378] In one embodiment, the processing of the embodiment may be applied / performed when the size of the block is greater than or equal to the minimum block size and / or when the size of the block is less than or equal to the maximum block size. Alternatively, in one embodiment, the processing of the embodiment may be applied / performed when the size of the block is greater than the minimum block size and / or when the size of the block is less than the maximum block size.

[0379] In one embodiment, the processing of the embodiment may be applied / performed 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. Alternatively, the processing of the embodiment may be applied / performed 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. Alternatively, the processing of the embodiment may be applied / performed 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 processing of the embodiment may be applied / performed 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.

[0380] In one embodiment, the processing of the embodiment may be applied / performed only when the block size is a predefined block size.

[0381] In embodiments, the size of a block may be determined in various ways. For example, the size of a block may refer to the width or height of the block. The size of a block may refer to both the width and height of the block. The size of a block may refer to the area of ​​the block. The size of a block may refer to 1) a result value of a known formula using the width and height of the block, 2) a result value of a formula of the embodiment, or 3) a statistical value.

[0382] Additionally, for the first size, the processing of the first embodiment among the embodiments may be applied / performed, and for the second size, the processing of the second embodiment among the embodiments may be applied / performed.

[0383] In embodiments, the block size may be 2x2, 4x4, 8x8, 16x16, 32x32, 64x64 or 128x128, etc. Alternatively, in embodiments, the block size may be (2*SIZE X )x(2*SIZE Y ) etc. 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.

[0384]

[0385] Predictive information for prediction

[0386] Prediction information can be used to generate a prediction block for the target block.

[0387] The encoding device (110) can generate prediction information required for prediction and can generate a bitstream including the prediction information. The prediction information can be signaled from the encoding device (110) to the decoding device (150) via the bitstream. The decoding device (150) can obtain the prediction information from the bitstream and perform prediction on the target block using the prediction information, thereby generating a prediction block.

[0388] Prediction information may include intra-prediction information, inter-prediction information, and IBC prediction information. In embodiments, prediction information may be replaced with intra-prediction information, inter-prediction information, and / or IBC information. Intra-prediction information may include information used for intra-prediction as described in embodiments. Inter-prediction information may include information used for inter-prediction as described in embodiments. IBC information may include information used for IBC prediction as described in embodiments.

[0389]

[0390] Intra prediction

[0391] Figure 3 illustrates the structure of intra prediction according to one embodiment.

[0392] Intra prediction can be performed using reference samples and coding parameters of the target block. The reference sample can be a (restored) sample within the (restored) reference block. Alternatively, an intermediate prediction sample can be generated using a sample described in the embodiment, such as a reconstructed sample, and a reference sample can be generated again using the intermediate prediction sample. Processing described in the embodiment, such as filtering, can be applied when generating the reference sample.

[0393] A reference block may be a (spatial) neighboring block of the target block. The coding parameters may be coding parameters for the target block and / or coding parameters for the reference block. In intra prediction, a reference sample may mean a neighboring sample.

[0394] A prediction block can be generated by performing intra prediction on a target block according to an intra prediction mode based on reference samples within a target image and information related to the reference samples. The size of the target block and the size of the prediction block can be the same.

[0395] In embodiments, the prediction block may be a PU. Alternatively, the prediction block may correspond to a CU or TU described in the embodiments. The prediction block may have a square or rectangular shape.

[0396] 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. The prediction directions of a plurality of intra prediction modes for a target block are illustrated in the lower right corner of Fig. 3. Among the plurality of intra prediction modes, the remaining intra prediction modes excluding the DC and planar modes may be directional modes. A directional mode may be an intra prediction mode having a specific direction or a specific angle. The intra prediction mode for the target block may be selected from among directional modes and non-directional modes.

[0397] In the lower right rectangle representing the target block, 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. In the lower right rectangle representing the target block, the arrows from the center to the periphery of the rectangle may represent the prediction directions of the directional intra prediction modes. In addition, the number indicated close to the arrow may represent an example of the mode value assigned to the intra prediction mode or the prediction direction of the intra prediction mode.

[0398] Intra prediction can be performed based on an intra prediction mode for the target block. One of the available intra prediction modes for the target block can be used as the intra prediction mode for the target block.

[0399] The number of intra prediction modes available to a target block may be a predefined value. Alternatively, the number of intra prediction modes available to a target block may be determined based on the properties of the prediction block. For example, the properties of the prediction block may include coding parameters such as shape, size, and color components.

[0400] For example, in Figure 3, the directional modes depicted by the dotted lines (i.e., the directional modes numbered between -14 and -1, or between 67 and 80) can only be applied to predictions for non-square blocks. Therefore, the number of intra prediction modes available for predictions for square blocks can be 67 (planar mode, DC mode, and 65 directional modes).

[0401] For example, the number of available intra prediction modes may vary depending on whether the color component of the block is a luma signal or a chroma signal. The number of available intra prediction modes for a block containing a luma component may be greater than the number of available intra prediction modes for a block containing a chroma component.

[0402] Intra prediction modes may include horizontal-below mode, horizontal mode, vertical mode, and vertical-right mode. The horizontal-below mode may be an intra prediction mode located below the horizontal mode. The vertical-right mode may be a mode located to the right of the vertical mode. For example, in FIG. 3, the mode value of the horizontal mode may be 18. The mode value of the vertical mode may be 50. 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 value is one of 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, and 17 can be horizontal bottom modes.

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

[0404] When the intra prediction mode is the planar mode, when generating a prediction block of a target block, a sample value of the prediction sample can be generated using a weighted sum (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 sample within the prediction block.

[0405] When the intra prediction mode is DC mode, a prediction block may be generated based on an average of sample values ​​of a plurality of reference samples. The plurality of reference samples may include upper reference samples and left reference samples of the target block. The value of the prediction sample of the prediction block may be determined based on an average of the sample values ​​of the plurality of reference samples. In addition, filtering using the values ​​of the reference samples may be performed for specific rows and / or specific columns within the target block. The specific rows may be one or more upper rows adjacent to the upper reference samples. The specific columns may be one or more left columns adjacent to the left reference samples.

[0406] 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.

[0407] The intra prediction mode of the target block may be determined based on the intra prediction mode of a neighboring block of the target block. Information for determining the intra prediction mode of the target block may be signaled.

[0408] For example, if the intra prediction modes of the target block and the neighboring block are the same, an indicator indicating that the intra prediction modes of the target block and the neighboring block are the same can be signaled.

[0409] 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.

[0410] For example, if the intra prediction modes of the target block and neighboring blocks are different, an indicator indicating the intra prediction mode of the target block may be signaled. Alternatively, information used to derive the intra prediction mode of the target block based on the intra prediction mode of the neighboring block may be signaled.

[0411] Reference samples used for intra prediction for the target block may include lower left reference samples, left reference samples, upper left reference samples, upper reference samples, and upper right reference samples.

[0412] For example, the left reference samples may be reconstructed reference samples adjacent to the left side of the target block. The top reference samples may be reconstructed reference samples adjacent to the top side of the target block. The top left reference sample may be a reconstructed reference sample diagonally adjacent to the top left side of the target block. The bottom left reference samples may be reference samples located below the left reference samples among samples located on the same line as the left sample line composed of the left reference samples. The top right reference samples may be reference samples located on the right side of the top reference samples among samples located on the same line as the top sample line composed of the top reference samples.

[0413] Reference samples used for intra prediction for a target block can be determined based on the intra prediction mode of the target block. One or more reference samples can be used to determine the sample value of a prediction sample of a prediction block. In FIG. 3, the direction of the intra prediction mode indicated by the arrow can represent the direction from the prediction sample to the reference sample. The direction of the intra prediction mode can represent the dependency relationship between the reference samples and the prediction samples. For example, depending on the intra prediction mode, the sample value of a specific reference sample can be used as the sample value of at least one sample of the prediction block. Here, the specific reference sample and the at least one sample of the prediction block can be samples designated by a straight line in the direction of the intra prediction mode. In other words, the sample value of the specific reference sample can be copied as the sample value of the prediction sample located in the reverse direction of the direction of the intra prediction mode. Alternatively, the sample value of the prediction sample of the prediction block can be the sample value of the reference sample located in the direction of the intra prediction mode based on the position of the prediction sample.

[0414] The reference samples used for intra prediction may not be limited to samples immediately adjacent to the target block. As illustrated in FIG. 3, at least one of reference sample lines 0 to 3 may be used for intra prediction of the target block.

[0415] Each reference sample line of FIG. 3 may include one or more reference samples. A smaller number of a reference sample line may be a line of reference samples closer to the target block. Reference sample line 0 may be a line of reference samples immediately adjacent to the target block. When the upper left coordinates of the target block are (X, Y), the horizontal length is W, and the vertical length is H, the reference samples of reference sample line 0 may be samples whose x-coordinate is X-1 or whose y-coordinate is Y-1. Here, the y-coordinates of the reference samples whose x-coordinate is X-1 may be Y-1 to Y+2H. The x-coordinates of the reference samples whose y-coordinate is Y-1 may be X-1 to X+2W. The reference samples of reference sample line A may be samples whose x-coordinate is XA-1 or whose y-coordinate is YA-1. Here, the y-coordinates of the reference samples whose x-coordinate is XA-1 may be YA-1 to Y+2H+A. The x-coordinates of reference samples whose y-coordinate is YA-1 can be XA-1 to X+2W+A. A can be 1, 2, or 3.

[0416] Instead of obtaining samples from the reconstructed neighboring blocks, the samples of segment A and segment F can be derived using padding using the nearest samples of segment B and segment E, respectively.

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

[0418] When inter-color component intra prediction is used for a target block, a prediction block of a second color component can be generated based on a reconstructed block of a first color component for the target block. For example, the first color component can be a luma component, and the second color component can be a chroma component.

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

[0420] For example, 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 restoration block of the first color component corresponding to these reference samples.

[0421] Once the parameters are derived, a prediction block of the second color component for the target block can be generated by applying the reconstructed block of the first color component to a linear model. Depending on the image format or the type of intra prediction between color components, subsampling / downsampling can be performed on the surrounding samples of the reconstructed block of the first color component and the reconstructed block of the first color component. When subsampling is performed, the derivation of the parameters and intra prediction between color components can be performed using the corresponding samples derived by the subsampling.

[0422] Intra Sub-Partitions (ISP) prediction may refer to sequential intra prediction for multiple sub-blocks generated by dividing a target block. In ISP prediction, a target block may be divided into two or four sub-blocks in the horizontal and / or vertical directions. The divided sub-blocks may be sequentially reconstructed. As intra prediction is performed on a sub-block, a sub-prediction block for the sub-block may be generated. Additionally, as inverse quantization and / or inverse transformation is performed on the sub-block, a sub-residual block for the sub-block may be generated. A reconstructed sub-block may be generated by adding the sub-prediction block to the sub-residual block. The reconstructed sub-block may be used as a reference sample for intra predictions for other sub-blocks to be processed subsequently.

[0423] In performing prediction on a target block, it can be determined whether samples included in a reconstructed neighboring block can be used as reference samples of the target block. If there is an unavailable 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 the sample value of at least one sample among the samples included in the reconstructed neighboring block can replace the sample value of the unavailable 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.

[0424] In intra prediction, the sample value of a prediction sample of a prediction block can be determined by the sample value of a reference sample. The position of the reference sample can be specified by the position of the prediction sample and the direction of the intra prediction mode. If the position specified by the position of the prediction sample and the direction of the intra prediction mode is an integer position, the sample value of one reference sample pointed to by the integer position can be used to determine the sample value of the prediction sample of the prediction block. If the position specified by the position of the prediction sample 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 specified position. The sample value of the interpolated reference sample can be used to determine the sample value of the prediction sample. That is, when the position specified by the position of the prediction sample and the direction of the intra prediction mode indicates a gap between two reference samples, an interpolated sample value can be generated based on the sample values ​​of the two samples.

[0425]

[0426] Inter prediction

[0427] FIG. 4 may represent the structure of inter prediction to explain the inter prediction process according to one embodiment.

[0428] The rectangle illustrated in Fig. 4 can represent an image. Additionally, the arrow in Fig. 4 can represent a prediction direction.

[0429] Each picture composing a video can be classified into an I picture (i.e., an intra picture), a P picture (i.e., a uni-prediction picture), and a B picture (i.e., a bi-prediction picture) according to its coding type. Coding can be performed for each picture according to its coding type.

[0430] If the target picture is an I-picture, coding for the target picture can be performed using information within the target picture without inter prediction referring to other images. For example, coding for the I-picture can be performed using intra prediction and / or IBC prediction.

[0431] Coding for P pictures and B pictures can be performed by at least one of intra prediction, IBC prediction, and inter prediction using a reference picture.

[0432] If the target picture is a P picture, coding for the target picture can be performed using unidirectional inter prediction using one reference picture list.

[0433] When the target picture is a B picture, coding for the target picture can be performed using unidirectional inter prediction or bidirectional inter prediction using two reference picture lists.

[0434] Below, inter prediction for a target block in inter mode according to an embodiment is specifically described.

[0435] When the prediction mode of the target block is inter mode, inter prediction can be performed on the target block. The target block can be a prediction block or a split prediction block.

[0436] Inter prediction can be performed using reference images and motion information. In inter prediction, a reference image can be selected using a reference image index, and a reference block corresponding to a target block within the reference image can be determined using motion information. A prediction block for the target block can be generated using the determined reference block.

[0437] Motion information can be derived using coding parameters, etc. For example, 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.

[0438] In embodiments, a candidate list may be used for inter prediction. The candidate list may include multiple candidates. An index indicating a candidate used for inter prediction for a target block among the candidates in the candidate list may be signaled. The candidate list may be derived in the same manner based on the same information in the encoding device (110) and the decoding device (150). Here, the same information may include a restored image and a restored block. Furthermore, in order to specify a candidate by index, the order of the candidates within the candidate list may need to be consistent.

[0439] In one embodiment, prediction of a target block can be performed by using motion information of a spatial candidate or a temporal candidate as motion information of the target block. The motion information of the spatial candidate may be referred to as spatial motion information. The motion information of the temporal candidate may be referred to as temporal motion information.

[0440] A spatial candidate may be a restored spatial neighboring block that is spatially adjacent to the target block.

[0441] A spatial candidate may be a block that 1) exists within the target image, 2) has already been restored through decryption, and 3) is adjacent to the target block.

[0442] Spatial candidates may include the left block, the top block, the bottom left block, the top right block, and the top left block of the target block.

[0443] A temporal candidate may be a restored temporal neighboring block corresponding to a target block in a restored COL image.

[0444] In embodiments, the motion information of a spatial candidate may be motion information of a block containing the spatial candidate. The motion information of a temporal candidate may be motion information of a block containing the temporal candidate.

[0445] In inter prediction, a call (COL) block for a target block can be identified. The area of ​​the target block within the target image and the area of ​​the call block within the call image may be identical. In other words, a call block may be a block occupying a specific area within the call image. The specific area may correspond to the area of ​​the target block within the call image.

[0446] A temporal candidate may be a location inside and / or outside a call block within a call image.

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

[0448] The MV of the target block can be determined based on the MV of the call block. Scaling can be performed on the MV of the call block. The scaled MV of the call block can be used as the MV of the target block or as the predicted MV. Alternatively, the MV of the temporal candidate stored in the candidate list associated with inter prediction can be a scaled MV.

[0449] The ratio of the scaled MV and the MV of the call 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 image and the target image of the target block. The second temporal distance may be the distance between the reference image and the call image of the call block.

[0450] The method by which motion information is derived can be determined by the inter prediction mode of the target block. For example, as the inter prediction mode, AMVP mode, merge mode, skip mode, merge mode with MVD, subblock merge mode, GPM, Combined Inter Intra Prediction (CIIP) mode, and affine inter mode can be used. In the embodiments below, each of the inter prediction modes is described.

[0451]

[0452] AMVP mode

[0453] When the AMVP mode is used as a prediction mode, an MV candidate list including one or more MV candidates can be generated using the MV of the spatial candidate, the MV of the temporal candidate, the history-based MV candidate, and the zero vector. At least one of the MV of the spatial candidate, the MV of the temporal candidate, and the zero vector can be determined and used as an MV candidate.

[0454] A spatial candidate may include a reconstructed spatial neighboring block. The MV of the reconstructed spatial neighboring block may be referred to as a spatial MV candidate (spatial motion vector candidate). A temporal candidate may include a called block and a block adjacent to the called block. The MV of the called block or the MV of a block adjacent to the called block may be referred to as a temporal MV candidate (temporal motion vector candidate). A history-based MV candidate may be an MV in a list including MVs of other blocks that were previously encoded / decoded prior to encoding / decoding of the target block.

[0455] The encoding device (110) can use the MV candidate list to determine an MV to be used for encoding the target block within the search range. The maximum number of MV candidates in the MV candidate list can be predefined. N can represent a predefined maximum number. For example, N can be 2. Alternatively, the maximum number of candidates can be signaled from the encoding device to the decoding device or derived from the decoding device. The encoding device (110) can determine an MV candidate to be used as a prediction MV of the target block among the MV candidates in the MV candidate list. The MV to be used for encoding the target block can be an MV that can be encoded at the minimum cost. The encoding device (110) can determine whether to use the AMVP mode in encoding the target block, and can generate AMVP mode usage information indicating whether the AMVP mode is used.

[0456] Inter prediction information may include 1) AMVP mode usage information, 2) MV candidate index, 3) MVD, 4) MVD resolution information, 5) reference direction, and 6) reference image index, and may include a residual block. The inter prediction information may be signaled from the encoding device (110) to the decoding device (150) in the form of a bitstream.

[0457] The decoding device (150) can obtain AMVP mode usage information from the bitstream. If the AMVP mode usage information indicates that the AMVP mode is used, the decoding device (150) can obtain an MV candidate index, an MVD, MVD resolution information, a reference direction, and a reference image index from the bitstream. Among the MV candidates included in the MV candidate list, an MV candidate indicated by the MV candidate index can be selected as the prediction MV of the target block.

[0458] The MVD may represent the difference between the MV to be actually used for inter prediction of the target block and the predicted MV. The encoding device (110) may derive a predicted MV that is close to the MV to be actually used for inter prediction of the target block in order to use an MVD with the smallest possible size. The decoding device (150) may derive the MV of the target block by combining the MVD and the predicted MV. In other words, the MV of the target block derived by the decoding device (150) may be the sum of the MVD and the predicted MV candidate.

[0459] Additionally, the encoding device (110) can generate MVD resolution information. The MVD resolution information may be information used to adjust the resolution of the MVD. The decoding device (150) can adjust the resolution of the MVD using the MVD resolution information.

[0460] Meanwhile, the encoding device (110) can calculate the MVD based on the affine model. The affine control point MV of the target block can be derived based on the sum of the affine control point MV candidate and the MVD. The MV of each subblock within the target block can be derived using the affine control point MV.

[0461]

[0462] Merge mode

[0463] When merge mode is used, a merge candidate list including multiple merge candidates can be generated using motion information of spatial candidates and motion information of temporal candidates. The motion information can include 1) MV, 2) reference image index, and 3) reference direction. The merge candidate can be motion information.

[0464] Merge candidates may include 1) a spatial merge candidate generated based on a spatial candidate, 2) a temporal merge candidate generated based on a temporal candidate, 3) a history-based merge candidate, 4) an average merge candidate, and 5) a zero merge candidate.

[0465] A history-based merge candidate may be motion information within a list that includes motion information of other blocks that were previously encoded / decoded prior to encoding / decoding of the target block.

[0466] An average merge candidate may be a merge candidate generated based on the average of two merge candidates in the merge candidate list.

[0467] A zero merge candidate may be zero vector motion information. Zero vector motion information may be motion information whose MV is a zero vector.

[0468] Merge candidates can be added to the merge candidate list according to a predefined method and a predefined order so that the merge candidate list has a set number of merge candidates. The same merge candidate list can be constructed in the encoding device (110) and the decoding device (150) through the predefined method and the predefined order.

[0469] The encoding device (110) can select a merge candidate to be used for encoding a target block from among the merge candidates in the merge candidate list. The encoding device (110) can determine whether to use a merge mode in encoding the target block, and can generate merge mode usage information indicating whether the merge mode is used.

[0470] Inter prediction information may include 1) merge mode usage information, 2) merge index, and 3) correction information, and may include a residual block. Inter prediction information may be signaled from an encoding device (110) in bitstream form to a decoding device (150) in bitstream form.

[0471] The decoding device (150) can obtain merge mode usage information from the bitstream. If the merge mode usage information indicates that the merge mode is being used, the decoding device (150) can obtain information related to the merge mode, such as a merge index, from the bitstream.

[0472] The encoding device (110) can select an optimal merge candidate from among the merge candidates included in the merge candidate list, and set the value of the merge index to point to the selected merge candidate.

[0473] Correction information may be information used for correcting an MV. The encoding device (110) may generate the correction information. The decoding device (150) may perform correction on the MV of the merge candidate selected by the merge index based on the correction information, thereby deriving a corrected MV. The corrected MV may be used as the MV of the target block.

[0474] In one embodiment, the correction information may include an MVD. The correction information may include one or more of correction usage information, correction direction information, and correction size information. The correction usage information may indicate whether correction is used for the MV. A merge mode that performs correction for the MV based on the correction information may be referred to as a merge mode with an MVD.

[0475] In merge mode, prediction for a target block can be performed using a merge candidate pointed to by a merge index among the merge candidates included in the merge candidate list.

[0476] Motion information of the target block can be derived from 1) MV, 2) reference image index, and 3) reference direction of the merge candidate pointed to by the merge index.

[0477] In one embodiment, the merge candidates in the merge candidate list 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. From this perspective, a specific mode may be considered a specific inter-prediction information derivation mode or a specific motion information derivation mode. A specific mode may include a series of processes that derive inter-prediction information.

[0478] Inter prediction information of a target block can be derived based on a specific mode indicated by a merge candidate selected by a merge index among the merge candidates in the merge candidate list. For example, the specific modes may include a subblock-level motion information derivation mode and an affine motion information derivation mode, and may include other modes for deriving motion information described in the embodiments.

[0479] Skip mode may be a mode that does not use residual blocks. That is, when skip mode is used, the reconstructed block may be identical to the predicted block. The description of merge mode in the embodiments may also apply to skip mode. The difference between merge mode and skip mode may be whether or not residual blocks are signaled and used. That is, skip mode may be similar to merge mode except that residual blocks are not transmitted / used, and the description of merge mode may also apply to skip mode.

[0480] The subblock merge mode may be a mode in which motion information of a target subblock is derived for a target subblock within a target block. When the subblock merge mode is applied, a list of subblock merge candidates may be generated using affine control point motion vector merge candidates and / or subblock-based temporal merge candidates. The subblock-based temporal merge candidates may be motion information of a call subblock of the target subblock.

[0481] In GPM, a first prediction block and a second prediction block can be generated using two pieces of motion information for a target block. For each coordinate of the target block, a final prediction sample of a final prediction block can be generated using a weighted sum of the first prediction sample of the first prediction block and the second prediction sample of the second prediction block.

[0482] Here, the first weight for the weighted consensus first prediction sample and the second weight for the weighted consensus second prediction sample can be determined based on the boundary of the GPM. The boundary can represent a dividing line that divides the target block. Based on the boundary, the target block can be divided into a first divided region and a second divided region.

[0483] If the distance between the final prediction sample and the boundary is less than or equal to a reference value, the value of the final prediction sample of the final prediction block may be determined using a weighted sum of the first prediction sample of the first prediction block and the second prediction sample of the second prediction block. If the distance between the final prediction sample and the boundary is greater than the reference value, one of the first weight and the second weight may be 1, and the other may be 0.

[0484] Combined Inter-Intra Prediction (CIIP) 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.

[0485] In the aforementioned modes, self-improvement of the derived motion information can be performed, and the improved motion information can be used as motion information for the target block. For example, blocks within a specific region determined based on the derived motion information can be searched, and the motion information of the block with the smallest sum of absolute differences (SAD) value among the searched blocks can be used as the improved motion information for the target block. The specific region can be a square region within a reference image specified by the motion information. The point indicated by the motion information can be the center of the specific region.

[0486] In the aforementioned modes, compensation for prediction samples derived through inter prediction can be performed using optical flow.

[0487]

[0488] Figure 5 shows the order in which spatial candidates are added to the candidate list according to one embodiment.

[0489] In Fig. 5, the locations of spatial candidates are shown.

[0490] The large block in the center can represent the target block. The five smaller blocks adjacent to the target block can represent spatial candidates.

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

[0492] A spatial candidate A0 may be a block adjacent to the lower left of the target block. A0 may be a block that occupies samples at coordinates (xP - 1, yP + nPSH).

[0493] 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 that occupies a sample at coordinates (xP - 1, yP + nPSH - 1).

[0494] A spatial candidate B0 may be a block adjacent to the upper right of the target block. B0 may be a block that occupies a sample at coordinates (xP + nPSW, yP - 1).

[0495] 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 that occupies a sample at coordinates (xP + nPSW - 1, yP - 1).

[0496] A spatial candidate B2 may be a block adjacent to the upper left of the target block. B2 may be a block that occupies a sample at coordinates (xP - 1, yP - 1).

[0497] As shown in Figure 5, when adding spatial candidates to the candidate list, B1, A1, The order of B0, A0 and B2 can be used, i.e. B1, A1, Available spatial candidates can be added to the candidate list in the order of B0, A0, and B2. The order in which the spatial candidates are added to the merge candidate list illustrated in Fig. 5 may be merely an example.

[0498] The above candidate list may include a motion information candidate list, a merge candidate list, an MV candidate list, a BV candidate list, and an MPM list.

[0499] To include a spatial or temporal candidate in the candidate list, its availability can be determined. If the candidate block is outside the boundaries of an image, slice, or tile, the candidate block's availability can be set to false. The phrase "availability is set to false" can mean "it is set to non-availability."

[0500] The maximum number of candidates in a candidate list can be set. N can represent the set maximum number. The set maximum number can be signaled through a parameter set or header, etc. For example, the maximum number of candidates in the candidate list for a target block within a slice can be set by the slice header. For example, the default value of N can be 5.

[0501]

[0502] IBC mode

[0503] IBC mode may be an intra-block copy prediction mode that generates prediction blocks for target blocks by referencing already-restored regions within the target image. In this respect, IBC mode may also be referred to as a current image reference mode. A block vector (BV) may be used to specify the already-restored region.

[0504] Whether the target block is encoded / decoded in IBC mode can be determined using IBC mode usage information. The encoding device (110) can determine whether to use IBC mode in encoding the target block and can generate IBC mode usage information indicating whether IBC mode is used. The decoding device (150) can obtain IBC mode usage information from the bitstream.

[0505] In IBC mode, a prediction block of a target block can be generated based on a block vector (BV). The BV can specify a reference block. The BV can indicate displacement between the target block and the reference block. The reference block can be a block within the target image. The description of the MV in the embodiments can also be applied to the BV.

[0506] The IBC mode may include skip mode, merge mode, and AMVP mode. The description of the AMVP mode, merge mode, and skip mode of the embodiments may also be similarly applied to the AMVP mode, merge mode, and skip mode of the IBC mode.

[0507] In skip mode or merge mode, a merge candidate list can be constructed, and a merge index can specify one merge candidate among the merge candidates in the merge candidate list. The BV of the specified merge candidate can be used as the BV of the target block.

[0508] In AMVP mode, BVD can be used. The description of MVD in the embodiments can also be applied to BVD.

[0509] The reference block in IBC mode may be limited to a block within an already reconstructed region of the target image. Alternatively, the reference block may be contained within at least one of the target CTU or the left CTUs. For example, the value of BV may be limited so that the reference block is located within a specific region. The specific region may be an area of ​​three blocks of a specific size that are encoded / decoded before the block of a specific size that contains the target block. The specific size may be 64x64.

[0510]

[0511] Transformation and quantization

[0512] A quantized level can be generated by performing transformation and / or quantization on a residual block. The residual block can represent the difference between the original block and the predicted block. A reconstructed residual block can be generated by performing inverse quantization and / or inverse transformation on the quantized level. The reconstructed residual block can represent the difference between the reconstructed block and the predicted block.

[0513] When a transformation or inverse transformation is performed, a separable transformation or a 2-dimensional (2D) non-separable transformation can be performed on the residual block. A separable transformation can be a transformation that performs 1-dimensional (1D) transformations on the residual block in each of the horizontal and vertical directions.

[0514] The transform kernels used for the transformation may include various DCT kernels such as DCT type 2 (DCT-II), 1) DST kernels, and 3) kernels induced by training. For 1D transform, the DCT type and DST type may include DCT-V, DCT-VIII, DST-I, and DST-VII in addition to DCT-II.

[0515] A set of transforms may be used to determine the DCT type, DST type, or learning-induced kernel to be used for the transformation. Each transform set may include multiple transform candidates. Each transform candidate may be a DCT type, a DST type, or a learning-induced kernel.

[0516] The encoding device (110) can perform transformation and inverse transformation using transformation candidates included in the transformation set. The decoding device (150) can perform inverse transformation using transformation candidates included in the transformation set. Transform selection information indicating which transformation candidate among a plurality of transformation candidates included in the transformation set applied to the residual block is used can be signaled. The transformation selection information can include vertical transformation selection information and horizontal transformation selection information. The vertical transformation selection information can indicate which transformation among the transformations included in the transformation set is used for vertical transformation. The horizontal transformation selection information can indicate which transformation among the transformations included in the transformation set is used for horizontal transformation.

[0517] The transform may include at least one of a primary transform and a secondary transform. A primary transform coefficient may be generated by performing a primary transform on a residual block, and a secondary transform coefficient may be generated by performing a secondary transform on the transform coefficient. Here, the transform coefficient may include a primary transform coefficient and a secondary transform coefficient.

[0518] The primary transformation may mean Multiple Transform Selection (MTS), which applies different transformations for each of the 1D directions (i.e., vertical and horizontal directions).

[0519] A secondary transform may be a transform for improving the energy concentration of the transform coefficients generated by the primary transform. The secondary transform may be 1) a separable transform like the primary transform, or 2) a 2D non-separable transform. The 2D non-separable transform may refer to a low frequency non-separable transform (LFNST) or a non-separable primary transform (NSPT).

[0520] NSPT can be applied to specific block sizes such as 4x4, 4x8, 8x4, 4x16, 16x4, 8x8, 8x16, and 16x8 for intra coding.

[0521] The primary transform can be performed using at least one of a plurality of predefined transform methods. For example, the plurality of predefined transform methods can include DCT, DST, and KLT. In addition, the primary transform can be a transform having various transform types according to a transform kernel function defining DCT and DST. For example, the primary transform can include a plurality of transforms such as DCT-2, DCT-4, DCT-5, DCT-7, DCT-8, DST-1, DST-2, DST-4, DST-7, and DST-8 according to a plurality of transform kernels.

[0522] In one embodiment, the transform type may be determined based on coding parameters associated with the target block. For example, the transform type may be determined based on one or more 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 split type applied to the target block (e.g., one of QT, BT, TT, and non-split).

[0523] As with the first-order transformation, a set of transformations can also be defined for the second-order transformation. The methods for deriving and / or determining the set of transformations of the embodiments can be applied to both the first-order transformation and the second-order transformation.

[0524] In one embodiment, a primary transformation and / or a secondary transformation may be determined for a specific target. The transformation selection information may include transformation target information. The transformation target information may indicate the target to which the primary transformation and / or the secondary transformation is applied.

[0525] For example, a first-order transform and / or a second-order transform may be applied to one or more of the signal components, including the luma component and the chroma component.

[0526] In one embodiment, the transform selection information may include primary transform usage information and secondary transform usage information. The primary transform usage information may indicate whether the primary transform is applied to the residual block of the target block. The secondary transform usage information may indicate whether the secondary transform is applied to the residual block of the target block.

[0527] In one embodiment, whether a primary transform and / or a secondary transform is applied may be determined based on coding parameters for the target / neighboring blocks, such as the size and shape of the target / neighboring blocks.

[0528] In one embodiment, the transform selection information may include primary transform selection information and secondary transform selection information. The primary transform selection information may indicate a transform method to be applied to a residual block among a plurality of transform methods that may be used in the primary transform. The primary transform selection information may be a primary transform index. The secondary transform selection information may indicate a transform method to be applied to a transform coefficient among a plurality of transform methods that may be used in the secondary transform. The secondary transform selection information may be a secondary transform index.

[0529] In one embodiment, the transformation methods of the first and second transformations may each be derived based on specific information such as coding parameters. For example, the coding parameters may include coding parameters for target / neighboring blocks.

[0530] In embodiments, information related to transformation, such as transformation selection information, and sub-information of the transformation selection information may be signaled for a specific target. For example, the specific target may be a CU.

[0531] Information related to transformation, such as transformation selection information, and sub-information of transformation selection information can be derived for a specific target. For example, the specific target may be a CU.

[0532] Quantized levels can be generated by performing quantization on the result or residual block generated by performing the first transform and / or the second transform.

[0533] The description of the transformation described above can also be applied to the inverse transformation. In this application, the reverse processing of the processing described for the transformation can be performed in the inverse transformation. The term "transformation" in the name related to the transformation can be changed to "inverse transformation." Furthermore, the input of the transformation can be considered the output of the inverse transformation. The output of the transformation can be considered the input of the inverse transformation. The decoding device (150) can obtain information related to the transformation, such as transformation selection information, and can perform the reverse processing of the processing related to the transformation indicated by the information related to the transformation using the information related to the transformation.

[0534] A target block may include multiple subblocks. Each subblock may be defined according to a minimum block size or a minimum block shape. The target block may be divided into multiple subblocks, and each subblock may include coefficients of sizes such as 4x4, 2x8, and 8x2. The target block may be a transform block. Transform coefficients or quantized levels may be expressed in the form of a block. The transform coefficients may be quantized transform coefficients.

[0535] The transform coefficients or quantized levels can be scanned according to at least one of the scanning types, such as diagonal scanning, vertical scanning, and horizontal scanning. The diagonal scanning can be right-upper diagonal scanning or left-lower diagonal scanning.

[0536] For example, coefficients can be transformed or arranged into a one-dimensional vector by scanning the coefficients of a block using diagonal scanning. Vertical scanning can scan coefficients in the form of two-dimensional blocks in the column direction. Horizontal scanning can scan coefficients in the form of two-dimensional blocks in the row direction.

[0537] The scanning type for coefficients can be determined based on coding parameters such as the intra prediction mode, block size, and block shape. For example, whether diagonal scanning, vertical scanning, or horizontal scanning is used can be determined based on coding parameters such as the intra prediction mode, block size, and block shape. A block can be a transform unit.

[0538] Scanning for each scanning type can start at a specific starting point and end at a specific ending point.

[0539] In scanning, a scanning order based on the scanning type may first be applied between subblocks. Next, a scanning order based on the scanning type may be applied to transform coefficients or quantized levels within the subblock.

[0540] The encoding device (110) can perform entropy encoding on transform coefficients or quantized levels to generate a bitstream including entropy-encoded transform coefficients or entropy-encoded quantized levels.

[0541] The decoding device (150) can obtain entropy-encoded transform coefficients or entropy-encoded quantized levels from a bitstream and perform entropy decoding to generate transform coefficients or quantized levels. The coefficients can be arranged in the form of two-dimensional blocks through inverse scanning. The arrangement of the inverse scanning can be a rearrangement opposite to the arrangement of the scanning.

[0542] Inverse scanning of coefficients can generate inversely scanned transform coefficients or inversely scanned quantized levels. At this time, the inverse scanning types of the inverse scanning can include diagonal scanning, vertical scanning, and horizontal scanning, and the inverse scanning type of the inverse transformation corresponding to the scanning type of the transformation can be selected.

[0543] In the decoding device (150), inverse quantization can be performed on (inversely scanned) 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. A restored residual block can be generated by selectively performing the second inverse transform and the first inverse transform on the coefficients.

[0544]

[0545] Filtering

[0546] To improve the image quality, filtering may be performed on blocks. The values ​​of target samples may be determined or updated through filtering.

[0547] The target sample may be one of the samples described in the embodiments. For example, the target sample may be one or more of the samples described in the embodiments, such as a prediction sample, a reference sample, a residual sample, a restored sample, and a restored sample with filtering applied.

[0548] The target sample may be a sample within one or more of a target picture, a target slice, a target CTB, a target block, a reference sample line, and a template. The target block may be one of the blocks described in the embodiments. For example, the target block may be one or more of the blocks described in the embodiments, such as a transform block, a prediction block, a reference block, a residual block, and a reconstruction block.

[0549] In embodiments, the filtering process described as being applied to one object may also be applied to other objects. For example, the filtering process described in a specific in-loop filtering may also be applied to transform blocks, prediction blocks, reference blocks, and residual blocks.

[0550] A specific type of filtering may be used for the filters of the embodiments. The type of filtering may include filter taps (or filter tap lengths), filter shapes, filter strengths, filter coefficients (or weights), and offsets.

[0551] The filter tab may indicate the number of input samples used for the filter. The input samples may include the target sample. Alternatively, the input samples may include a specific value determined for the target sample. The input samples may include one or more reference samples. The one or more reference samples may be determined based on an attribute of the target block described in the embodiments. The attribute may include a coding parameter. For example, an attribute of the target sample may include a position of the target sample. One or more reference samples may be specified based on a relative position with respect to the position of the target sample.

[0552] A filter shape can represent the shape formed by input samples. A specific value determined for a target sample can be considered a target sample. In other words, if a specific value determined for a target sample is used as an input sample of a filter, the target sample can also be considered to form a filter shape.

[0553] The number of samples whose values ​​are determined by filtering may be multiple. The filter strength may indicate the range of samples whose values ​​are determined by filtering. The filter strength may be either a strong filtering strength or a weak filtering strength. The number of samples whose values ​​are determined by a strong filtering strength may be greater than the number of samples whose values ​​are determined by a weak filtering strength. Alternatively, the filter strength may indicate the range of values ​​that are changed by filtering. The range of sample values ​​that are changed by a strong filtering strength may be wider than the range of sample values ​​that are changed by a weak filtering strength.

[0554] The filter coefficients can be coefficients or weights of the input samples.

[0555] An offset can be a specific value that is added to the result calculated using the values ​​and coefficients of the input samples, such as a weighted sum.

[0556] Filtering, interpolation, and sampling may have in common that they update the values ​​of samples. Therefore, the description of any one of filtering, interpolation, and sampling in the embodiments may also apply to any other of filtering, interpolation, and sampling. Here, sampling may include at least one of upsampling, downsampling, and subsampling.

[0557] Filtering may include filtering performed by predictor (123) and predictor (163), etc.

[0558] In encoding a target block, a prediction error may exist between the original samples of the original block and the prediction samples of the prediction block. To reduce the prediction error, filtering may be performed on at least one of the prediction samples of the prediction block and the reference samples referenced for prediction.

[0559] For example, in intra prediction, the reference sample may include one or more of the upper left reference sample, the upper reference sample, the upper right reference sample, the left reference sample, and the lower left reference sample. Filtering on the predicted sample may be performed by applying specific weights to the predicted sample, the left reference sample, the upper reference sample, and / or the upper left reference sample, respectively.

[0560] Filtering of at least one of the prediction sample and the reference sample may be performed based on the attributes of the target block and the attributes of the prediction sample. For example, whether filtering is performed, the type of filter, the area to which the filtering is applied, the filtering weights, the reference sample, the range of the reference sample, and the location of the reference sample may each be determined based on the attributes of the target block and the attributes of the prediction sample.

[0561] For example, the properties of the target block may include information related to the target block described in the embodiments, such as 1) size of the target block, 2) prediction mode, 3) intra prediction mode, 4) reference sample line, 5) sample value, and 6) coding parameter.

[0562] For example, the attributes of a prediction sample may include information related to the prediction sample described in the embodiments, such as 1) a sample value of the prediction sample and 2) a location within a target block, and may include coding parameters related to the prediction sample.

[0563] Filtering may include in-loop filtering performed by filter (130) and filter (170), etc.

[0564]

[0565] Figure 6 illustrates multiple in-loop filters according to an example.

[0566] The plurality of in-loop filters of the in-loop filtering may include one or more of Luma Mapping with Chroma Scaling (LMCS), a deblocking filter, a Sample Adaptive Offset (SAO), and an Adaptive Loop Filter (ALF).

[0567] Multiple in-loop filters can be connected sequentially. For example, the multiple in-loop filters can be connected in the order of LMCS, deblocking filter, SAO, and ALF. Furthermore, the multiple in-loop filters can be connected in any order among all available permutations of the multiple in-loop filters. The output from one of the multiple in-loop filters can be used as the input to the next filter.

[0568] As illustrated in FIG. 6, an input image may be input to the first filter. The input image may be a block described in the embodiments. For example, the input image may be a reconstructed block generated by an adder (129) or an adder (169). The output from one filter may be input to the next filter. An output image may be generated by the last filter. The output image may be a filtered block described in the embodiments. For example, the output image may be a filtered reconstructed image generated by a filter (130) or a filter (170).

[0569] The target block can represent an image input to the filter. The filtered target block can represent an image output from the filter.

[0570] LMCS may include luma signal mapping to a luma signal of a target block and chroma signal scaling to a chroma signal of the target block.

[0571] Luma signal mapping can perform codeword redistribution for the luma signal.

[0572] Luma signal mapping can include forward mapping and reverse mapping. In forward mapping, the existing dynamic range can be divided into multiple intervals. The mapped dynamic range can be determined by performing codeword redistribution on the input image using a linear model for each interval. In reverse mapping, reverse mapping is performed from the mapped dynamic range to the existing dynamic range.

[0573] Chroma scaling can correct chroma signals based on the correlation between a luma signal and a corresponding chroma signal.

[0574] Forward mapping can be performed between inter prediction for a luma signal and reconstruction for the luma signal, and between inter prediction for the luma signal and chroma scaling. Backward mapping can be performed between reconstruction for the luma signal and in-loop filtering for the luma signal. Chroma scaling can be performed between inverse transformation and reconstruction for the chroma signal.

[0575] According to this structure, inverse quantizations for luma and chroma signals, inverse transformations for luma and chroma signals, prediction for luma signals, and restoration for luma signals can be performed within the mapped dynamic range. In-loop filterings for luma and chroma signals, inter predictions for luma and chroma signals, intra prediction for chroma signals, and restoration for chroma signals can be performed within the existing dynamic range.

[0576] A deblocking filter can remove block distortion occurring at boundaries between blocks within a restored image. For example, the blocks may be transform blocks. Furthermore, the blocks may be subblocks of a specific block described in the embodiments. Here, the boundaries between blocks may refer to samples adjacent to the boundaries between blocks.

[0577] Deblocking filters can be applied to vertical and horizontal boundaries between blocks. After filtering the vertical boundaries of blocks, filtering can be performed again on the horizontal boundaries of the filtered blocks.

[0578] A deblocking filter may be applied selectively. Whether to apply a deblocking filter to a target block may be determined based on at least one of the sample(s) contained within a specific number of columns or rows within the target block and the sample(s) contained within a specific number of columns or rows within a neighboring block adjacent to a specific boundary.

[0579] When a deblocking filter is applied to a target block, the filter to be applied may be determined based on the strength of the required deblocking filtering. In other words, among multiple other filters, a filter determined based on the strength of the deblocking filtering may be applied to the target block. The multiple filters may include one of a long-tap filter, a strong filter, a weak filter, and a Gaussian filter.

[0580] The maximum length of the deblocking filter can be determined based on the properties of the target block, such as the size of the target block, the components of the target block, and the coding parameters.

[0581] SAO can compensate for distortion between the original and reconstructed images on a sample-by-sample basis. To compensate, SAO can apply an appropriate offset to the sample values ​​of each sample. That is, the offset can be added to the sample values.

[0582] An offset can be determined for the target block. For example, an offset can be determined for each component of the CTB. The determined offset can be applied to samples within a specific component of the CTB.

[0583] SAO may include SAO using Edge Offset (EO) and SAO using Band Offset (BO). Depending on the characteristics of samples within a specific block, such as a CTU, whether SAO using EO or SAO using BO may be performed may be determined.

[0584] In SAO using EO, distortion correction of samples can be performed based on the direction of the edge within the target block. Pattern classes of EO can include horizontal patterns, vertical patterns, 135 degree diagonal patterns, and 45 degree diagonal patterns. For a target block, information indicating a pattern class applied to the target block and multiple offsets of the pattern class can be signaled. There can be four offsets. For a target sample within the target block, adjacent samples of the target sample can be determined based on the direction of the pattern class. An offset to be applied to the target sample can be determined based on the pattern of the adjacent samples.

[0585] In an offset using BO, distortion of a sample can be corrected by classifying the brightness values ​​of samples within a target block into specific bands. The bit depth of an input image can be divided into m sections. For example, m can be 32. The specific bands can be n consecutive sections among the m sections. For example, n can be 4. N offsets for the n sections can be signaled. Additionally, information indicating a first section selected as one of the n sections among the m sections can be signaled. The offset of the section to which the target sample corresponds can be added to the sample value of the target sample of the target unit.

[0586] ALF can compensate for distortion between the restored image and the original image.

[0587] The filter coefficients of ALF can be signaled via the bitstream.

[0588] The filter shape of ALF can be determined by the components of the target block. For example, a 7x7 diamond-shaped filter can be used for the luma component. A 5x5 diamond-shaped filter can be used for the chroma component.

[0589] In ALF, the characteristics of a specific block can be determined for a specific block, and the class of the specific block can be determined based on the characteristics. In other words, the determination of characteristics and class of ALF can be performed in units of 4x4 blocks. Filter coefficients can be calculated based on the class. A specific block can be a 4x4 block.

[0590] One of 25 classes can be determined as the class of a specific block based on the direction and activity determined using the gradient of the specific block. Rotation, vertical symmetry, and / or diagonal symmetry transformations can be applied to the filter based on the gradient of the specific block.

[0591] Information regarding whether ALF applies can be signaled for specific units, such as CTB.

[0592] An index indicating a filter to be applied to a specific unit among available filters may be signaled. Here, the available filters may include fixed filters and filters configured using a parameter set. For example, the parameter set may be an adaptive parameter set (APS). The fixed filters may be identically predefined in the encoding device (110) and the decoding device (150). The filter coefficients of the filters configured using the parameter set may be determined based on coding parameters.

[0593]

[0594] Entropy encoding and entropy decoding

[0595] Figure 7 illustrates entropy encoding and entropy decoding according to an example.

[0596] The processes of entropy encoding by the entropy encoder (139) are illustrated at the top of Fig. 7.

[0597] The entropy encoder (139) may include a context modeler, a binarization unit, and an entropy encoder. The context modeler may include a context selection unit and a context memory.

[0598] The binarization unit can generate bins for syntactic elements by performing binarization on the syntactic elements of the target block. Binarization may be a process of converting syntactic elements into the form of bins.

[0599] Information about syntactic elements and bins can be provided from the binarization unit to the context selection unit.

[0600] A context modeler can perform context updates.

[0601] Context can mean occurrence probability information for each bin for syntactic elements that have already been encoded.

[0602] The context modeler can update the context to apply current probability information to the entropy encoding of the bins of the syntactic elements of the target block. The updated context can be stored in the context memory. At this time, the updated context corresponding to the syntactic elements of the target block (or bins within the syntactic elements of the target block) can be derived by the context modeler.

[0603] The context selector can select a context corresponding to a bin of a syntactic element of a target block. The selected context can be loaded from the context memory and used as an updated context for entropy encoding of the bins of the syntactic element of the target block.

[0604] The updated context can be used for entropy encoding of syntactic elements of the target block.

[0605] The entropy encoding unit can generate encoded information about syntactic elements of a target block by performing entropy encoding using the generated bins and the updated context, and can generate a bitstream including the encoded information. The entropy encoding unit can use at least one of an arithmetic encoding method and a bypass encoding method.

[0606] The processes of entropy decryption by the entropy decoder (161) are shown at the bottom of Fig. 7.

[0607] The entropy decoder (161) may include a context modeler, an entropy decoder, and an inverse binarizer. The context modeler may include a context selection unit and a context memory.

[0608] A context modeler can perform context updates.

[0609] Context can mean the occurrence probability information of each bin for syntactic elements that have already been decoded.

[0610] The context modeler can update the context to apply the currently decoded probability information to entropy decoding for the bins of the syntactic elements of the target block. The updated context can be stored in the context memory. At this time, the updated context corresponding to the syntactic elements of the target block (or the bins within the syntactic elements of the target block) can be derived by the context modeler.

[0611] The context selector can select a context corresponding to a blank of a syntactic element of a target block. The selected context can be loaded from the context memory and used as an updated context for entropy decoding of the syntactic element of the target block.

[0612] The updated context can be used for entropy decoding of syntactic elements of the target block.

[0613] The entropy decoding unit can generate bins for the delimiting elements of the target block by performing entropy decoding on the encoded information of the bitstream based on the updated context. The entropy decoding unit can use at least one of an arithmetic decoding method and a bypass decoding method.

[0614] The debinarization unit can obtain a syntactic element of the target block by performing debinarization on at least one of the generated bins. The debinarization may be a process of converting at least one of the bins into a form of a syntactic element.

[0615] Information about syntactic elements and bins can be provided from the de-binarization unit to the context selection unit.

[0616] A syntax element may be one of the coding parameters described in the embodiments.

[0617]

[0618] Methods for binarization, debinarization, entropy encoding, and entropy decoding

[0619] In embodiments, one or more of the binarization methods, inverse binarization methods, entropy encoding methods and entropy decoding methods listed below may be used to perform signaling for specific information.

[0620] - Signed 0-th order Exponential Golomb binarization / debinarization method (abbreviated as se(v))

[0621] - k-order exponential-Golomb binarization / inverse binarization method with sign (abbreviated as sek(v))

[0622] - 0-order exponent-Golomb binarization / inverse binarization method for unsigned positive integers (abbreviated as ue(v))

[0623] - k-order exponential-Golomb binarization / inverse binarization method for unsigned positive integers (abbreviated as uek(v))

[0624] - Fixed-length binarization / debinarization method (abbreviated as f(n))

[0625] - Truncated Rice binarization / debinarization method or truncated unary binarization / debinarization method (abbreviated as tu(v))

[0626] - Truncated binary binarization / debinarization method (abbreviated as tb(v))

[0627] - Context-adaptive arithmetic encoding / decoding method (abbreviated as ae(v))

[0628] - bit string in bytes (abbreviated as b(8))

[0629] - Signed integer binarization / debinarization method (abbreviated as i(n))

[0630] - Unsigned positive integer binarization / debinarization method (abbreviated as u(n)) ('u(n)' can also mean fixed-length binarization / debinarization method.)

[0631] - Unary binarization / inverse binarization method

[0632]

[0633] FIG. 8 is a flowchart of a method for predicting a target block and a method for generating a bitstream according to one embodiment.

[0634] The prediction method and bitstream generation method of the target block of the embodiment can be performed by the encoding device (110). The embodiment can be a part of the encoding method of the target block or the video encoding method.

[0635] At step (810), the processor (120) can determine prediction information to be applied to encoding the target block.

[0636] Prediction information may include information used for the aforementioned prediction. For example, the prediction information may include inter-prediction information. For example, the prediction information may include intra-prediction information. For example, the prediction information may include IBC prediction information.

[0637] At step (820), the processor (120) can perform prediction for the target block using information about the target block and determined prediction information.

[0638] A predicted block can be generated by prediction for a target block.

[0639] A residual block, which is the difference between the target block and the predicted block, can be generated. By applying transformation and quantization to the residual block, information about the target block can be generated.

[0640] Information about a target block may include transform and quantized coefficients for the target block. Information about the target block may include prediction information.

[0641] Additionally, a reconstructed block can be generated, which is the sum of the prediction block and the reconstructed residual block.

[0642] At step (830), the processor (120) can generate a bitstream.

[0643] The bitstream may contain information about the target block. Additionally, the bitstream may contain information as described above in the embodiments. For example, the bitstream may contain coding parameters related to the target block and / or attributes of the target block.

[0644] The bitstream may include prediction signal filtering information. Alternatively, information about the target block may include prediction signal filtering information.

[0645] The information included in the bitstream may be generated in step (830), or may be generated at least partially in steps (810 and 820).

[0646] The processor (120) can store the generated bitstream in the storage (140). Alternatively, the communication device (149) can transmit the bitstream to the decryption device (150).

[0647] The bitstream may include information about an encoded target block. The processor (120) may generate information about the encoded target block by performing entropy encoding on the information about the target block.

[0648] The bitstream may include encoded prediction signal filtering information. Alternatively, information about an encoded target block may include encoded prediction signal filtering information. The processor (120) may generate encoded prediction signal filtering information by performing entropy encoding on the prediction signal filtering information.

[0649]

[0650] FIG. 9 is a flowchart of a method for predicting a target block using a bitstream according to one embodiment.

[0651] The method of predicting a target block using the bitstream of the embodiment can be performed by a decoding device (150). The embodiment can be a part of a decoding method of a target block or a video decoding method.

[0652] In step (910), the communication device (189) can obtain a bitstream. The communication device (189) can receive the bitstream from the encoding device (110).

[0653] The bitstream may contain information about the target block.

[0654] Information about a target block may include transform and quantized coefficients for the target block. Information about the target block may include prediction information.

[0655] The bitstream may include prediction signal filtering information.

[0656] Additionally, the bitstream may include information as described above in the embodiments. For example, the bitstream may include coding parameters related to the target block and / or properties of the target block.

[0657] A computer-readable recording medium may include a bitstream, and prediction and decoding of a target block may be performed using information about the target block included in the bitstream.

[0658] The bitstream may include information about an encoded target block. The processor (160) may generate information about the target block by performing entropy decoding on the information about the encoded target block.

[0659] The bitstream may include encoded prediction signal filtering information. The processor (160) may generate prediction signal filtering information by performing entropy decoding on the encoded prediction signal filtering information.

[0660] The processor (160) can store the acquired bitstream in a storage (180).

[0661] At step (920), the processor (160) can determine prediction information to be applied to decryption of the target block.

[0662] The processor (160) can determine prediction information using the method used in the above-described embodiment.

[0663] The processor (160) can determine prediction information of the target block based on information related to the prediction method obtained from the bitstream.

[0664] Prediction information may include inter-prediction information. Prediction information may include intra-prediction information. For example, prediction information may include IBC prediction information.

[0665] At step (930), the processor (160) can perform prediction for the target block using information about the target block and determined prediction information.

[0666] In step (930), a prediction block can be generated by performing a prediction on a target block using prediction information.

[0667] Additionally, a reconstructed block can be generated that is the sum of the predicted block and the reconstructed residual block.

[0668] In embodiments, a particular object being encoded in a particular method / mode may mean that a particular method / mode is used in encoding / decoding the particular object.

[0669] Additionally, in embodiments, encoding may mean encoding and / or decoding.

[0670]

[0671] Specific steps of encoding / decryption

[0672] Fig. 10 is a flowchart of a coding method according to an example. The coding method may include an encoding method and / or a decoding method.

[0673] The coding method may include steps (1010, 1020, and 1030). Step (1030) may include steps (1031, 1032, and 1033).

[0674] Step (820) of FIG. 8 may include steps (1010, 1020, and 1030).

[0675] Step (930) of FIG. 9 may include steps (1010, 1020, and 1030). Alternatively, step (1010) may be included in step (920).

[0676] In the coding method of Fig. 10, the prediction signal may be an IBC prediction signal. The filter may be an IBC filter.

[0677] In step (1010), prediction signal filtering information can be obtained. The prediction signal filtering information can be IBC prediction signal filtering information.

[0678] A bitstream may be transmitted from an encoding device (110) to a decoding device (150). The bitstream may include prediction signal filtering information. Alternatively, the bitstream may include encoded prediction signal filtering information.

[0679] Prediction signal filtering information can be obtained from a bitstream. Alternatively, prediction signal filtering information can be derived by decoding encoded prediction signal filtering information of a bitstream.

[0680] In one embodiment, the prediction signal filtering information may include at least one of information indicating whether filtering is performed; information indicating the type of the filter; information indicating the type of the filter template; the number of filter coefficient sets; a filter model; and a filter mode. For example, the prediction signal filtering information may include at least one of information indicating whether filtering is performed; information indicating the type of the filter; information indicating the type of the filter template; the number of filter coefficient sets; a filter model; and a filter mode.

[0681] In one embodiment, the prediction signal filtering information may include at least one of: information indicating whether filtering is performed; information indicating the type of the filter; information indicating the type of the filter template; the number of filter coefficient sets; a filter model; and a filter mode. For example, the prediction signal filtering information may include at least one of: information indicating whether IBC filtering is performed; information indicating the type of the IBC filter; information indicating the type of the IBC filter template; the number of IBC filter coefficient sets; an IBC filter model; and an IBC filter mode.

[0682] In one embodiment, such predictive signal filtering information is a template T of the target block. t ; filtering flag; filter type; filter template type; number of filter sets; prediction mode flag; general merge flag; merge index; DBV mode; motion information; second filter template type; average of prediction signals; average of filter templates of target block; histogram distribution of prediction signal; histogram distribution of filter template of target block; coding parameter of target block and / or coding parameter of unit including target block; and coding parameter of reference block and / or coding parameter of unit including reference block; may be determined based on at least one of the following. Here, different information described in the embodiments may be used to derive different information included in prediction signal filtering information.

[0683] In embodiments, the coding parameters may include information described in the embodiments, information signaled via a bitstream described in the embodiments, and syntax elements described in the embodiments.

[0684] In one embodiment, such predictive signal filtering information is a template T of the target block. t; ibc_filtering_flag; ibc_filter_shape; ibc_filter_tpl_shape; ibc_filter_set_num; pred_mode_ibc_flag; general_merge_flag; merge_idx, DBV mode; Block Vector BV (BV x , BV y ); ibc_filter_tpl_shape2; an average of IBC prediction signals; an average of filter templates of a target block; a histogram distribution of an IBC prediction signal; a histogram distribution of filter templates of a target block; a coding parameter of a target block and / or a coding parameter of a unit including the target block; and a coding parameter of a reference block and / or a coding parameter of a unit including the reference block. Here, different pieces of information described in the embodiments may be used to derive different pieces of information included in the prediction signal filtering information.

[0685] At step (1020), a prediction signal may be generated. The prediction signal may be an IBC prediction signal.

[0686] In one embodiment, motion information; the location of the target block (x t_lf , y t_lf ); a reference block; a position of the reference block; a horizontal size xCbW of the target block; a vertical size xCbH of the target block; a coding parameter of the target block and / or a coding parameter of a unit including the target block; and a coding parameter of the reference block and / or a coding parameter of a unit including the reference block; A prediction signal for the target block may be generated based on at least one of:

[0687] In one embodiment, a block vector BC (BV x , BV y ); the position of the target block (x t_lf , y t_lf ); IBC Reference Block Blk ref; Location of IBC reference block (x ref_if , y ref_if ); an IBC prediction signal P for the target block based on at least one of: a horizontal size xCbW of the target block; a vertical size xCbH of the target block; a coding parameter of the target block and / or a coding parameter of a unit including the target block; and a coding parameter of a reference block and / or a coding parameter of a unit including the reference block; t can be created.

[0688] In step (1030), filtering of the prediction signal may be performed based on the prediction signal filtering information. A filtered prediction signal may be generated by filtering the prediction signal. In the embodiments, the prediction signal and prediction block may refer to a filtered prediction signal.

[0689] In step (1031), a filter model can be specified. The filter model can be an IBC filter model.

[0690] In one embodiment, the filter shape may be specified based on at least one of: prediction signal filtering information; prediction pixels; neighbor pixels of the prediction pixels; bias; filter coefficients; filter shape; filter mode; coding parameters of the target block and / or coding parameters of a unit including the target block; and coding parameters of the reference block and / or coding parameters of a unit including the reference block.

[0691] In one embodiment, IBC prediction signal filtering information; IBC prediction pixel P t ; surrounding pixels of an IBC prediction pixel; bias; filter coefficients; filter shape; ibc_filter_shape; IBC filter mode; coding parameters of a target block and / or coding parameters of a unit including the target block; and coding parameters of a reference block and / or coding parameters of a unit including the reference block; The filter shape may be specified based on at least one of:

[0692] In step (1032), filtering coefficients according to a filter model can be obtained. The filtering coefficients may be IBC prediction signal filtering coefficients.

[0693] In one embodiment, the filter type; the number of filter sets; the template T of the target block t ; Template T of the IBC reference block ref ; A filter model and a filter coefficient set (FilterSet) can be obtained based on at least one of: a coding parameter of a target block and / or a coding parameter of a unit including the target block; and a coding parameter of a reference block and / or a coding parameter of a unit including the reference block.

[0694] In one embodiment, ibc_filter_shape; ibc_filter_set_num; template T of the target block t ; Template T of the IBC reference block ref ; IBC filter model; A filter model and a filter coefficient set (FilterSet) can be obtained based on at least one of: coding parameters of a target block and / or coding parameters of a unit including the target block; and coding parameters of a reference block and / or coding parameters of a unit including the reference block.

[0695] In step (1033), filtering may be performed on the prediction signal based on the filtering coefficient. The prediction signal may be an IBC prediction signal.

[0696] In one embodiment, a prediction signal on which filtering is performed based on at least one of a filter coefficient set (FilterSet); the number of filter sets; a prediction signal; a filter model; a coding parameter of a target block and / or a coding parameter of a unit including the target block; and a coding parameter of a reference block and / or a coding parameter of a unit including the reference block may be obtained.

[0697] In one embodiment, a set of filter coefficients (FilterSet), ibc_filter_set_num, and an IBC prediction signal P t ; an IBC prediction signal P' on which filtering is performed based on at least one of a filter model, a coding parameter of a target block and / or a coding parameter of a unit including the target block; and a coding parameter of a reference block and / or a coding parameter of a unit including the reference block; t can be obtained.

[0698] The order in which steps (1010, 1020, and 1030) are executed may be changed. For example, an operation described as being executed in one of steps (1010, 1020, and 1030) may be executed before or after another step. Furthermore, the order in which steps (1010, 1020, and 1030) are executed may be changed.

[0699] The order in which steps (1031, 1032, and 1033) are executed may be changed. For example, an operation described as being executed in one of steps (1031, 1032, and 1033) may be executed before or after another step. Furthermore, the order in which steps (1031, 1032, and 1033) are executed may be changed.

[0700]

[0701] Terms used in the examples

[0702] Target Block: The target block may be the current block that is currently the target of encoding / decoding.

[0703] Block vector: A block vector can be a vector that specifies the location of a reference block in Intra Block Copy (IBC) mode. A block vector can be a vector that points from the current block to the reference block. In IBC mode, a reference block can be a block within the current picture that includes the current block. IBC mode can also be referred to as block vector mode.

[0704] Pair average: Pair average represents the pairwise average or combined bi-predictive.

[0705] Skip mode: Skip mode can be a prediction mode that uses block vectors of surrounding blocks, but does not transmit residual signals.

[0706] Merge Mode: Merge mode can be a prediction mode that uses block vectors of surrounding blocks and transmits residual signals.

[0707] In embodiments, "merge mode" may refer to the previously described skip mode; merge mode; or skip mode and merge mode. For example, "merge mode" may additionally refer to skip mode, or may be understood as being replaced with skip mode.

[0708] Merge Candidate List: The merge candidate list may be a list containing merge candidates used in skip mode and merge mode.

[0709] Prediction block vector: The prediction block vector can be a motion vector of a temporal neighboring block or a spatial neighboring block of the target block.

[0710] Target block vector: The target block vector can be a motion vector pointing to a predicted block of the target block.

[0711] Residual block vector: The residual block vector can be the difference vector between the predicted block vector and the target block vector. In other words, the target block vector can be the sum of the predicted block vector and the residual block vector.

[0712] Block vector information: Block vector information may be information composed of a predicted block vector and a residual block vector.

[0713] Reference Image Index: The reference image index can indicate the image referenced by the target block. The reference image index can also indicate the slice or tile referenced by the target block. If the reference image index points to an image that includes the target block, it can indicate that the encoding / decoding mode of the target block is block vector prediction mode. If the reference image index points to an image that does not include the target block, it can indicate that the encoding / decoding mode of the target block is inter prediction mode.

[0714] Neighbor Pixel: A neighbor pixel of an object can be any of the pixels within a specific relative position to the object's position.

[0715] For example, the surrounding pixels of a target pixel may be pixels adjacent to the target pixel.

[0716] For example, the surrounding pixels of a target may be pixels whose distance from the target is 1. Here, the distance may be a horizontal distance; a vertical distance; or a maximum of the horizontal distance and the vertical distance. In this case, the surrounding pixels of the target may be adjacent pixels of the target. The surrounding pixels may be limited to available pixels (e.g., pixels that have already been restored). Alternatively, the surrounding pixels may be one of the pixels diagonally adjacent to the top-left corner of the target; the pixels vertically adjacent to the top of the target; and the pixels horizontally adjacent to the left of the target.

[0717] For example, the surrounding pixels of a target may be pixels whose distance from the target is N or less. Here, the distance may be a horizontal distance; a vertical distance; or a maximum of the horizontal distance and the vertical distance. N may be one of integers greater than or equal to 1. The surrounding pixels may be limited to available pixels (e.g., pixels that have already been reconstructed). Alternatively, the surrounding pixels may be pixels within a specific area that includes an area of ​​the target block. Here, the area of ​​the target block may be rectangular. The specific area may be rectangular. The positions of the bottom-rightmost pixels of the target block and the positions of the bottom-rightmost pixels of the specific area may be the same. A first difference between the width of the specific area and the width of the area of ​​the target block and a second difference between the height of the specific area and the height of the area of ​​the target block may be the same.

[0718] For example, as shown in Fig. 11, the surrounding pixels of the target block have a minimum value among the horizontal distance from the target block and the vertical distance from the target block. t The coordinates of the top-leftmost pixel of the target block are (x, y), and the width and height of the target block are (w, h), the surrounding pixels are, 1) the x-coordinate is x - size t 2) the y coordinate is less than or equal to y - size t 3) is less than or equal to y + h - 1; and 4) is not contained within the target block; may be a pixel. size t can be an integer greater than or equal to 1.

[0719] For example, as shown in Figure 12, the surrounding pixels of the target block have a vertical distance of size from the target block. tThe pixels may be less than or equal to . When the coordinates of the top-leftmost pixel of the target block are (x, y), and the width and height of the target block are (w, h), the surrounding pixels are 1) the x-coordinate is greater than or equal to x and less than or equal to x + h - 1; and 2) the y-coordinate is y - size. t 3) is less than or equal to y - 1; and 4) is not contained within the target block; may be a pixel. size t can be an integer greater than or equal to 1.

[0720] For example, as shown in Figure 13, the surrounding pixels of the target block have a horizontal distance of size from the target block. t The coordinates of the top-leftmost pixel of the target block are (x, y), and the width and height of the target block are (w, h), the surrounding pixels are, 1) the x-coordinate is x - size t 1) is greater than or equal to x - 1; 2) the y coordinate is greater than or equal to y; less than or equal to y + h - 1; and 3) is not contained within the target block; may be a pixel. size t can be an integer greater than or equal to 1.

[0721]

[0722] Technical Description

[0723] Figures 11, 12 and 13 illustrate forms of filter templates according to an example.

[0724] Figure 11 illustrates an L-shaped template according to an example.

[0725] In Fig. 11, the L-shaped template T L-shape was shown.

[0726] Figure 12 illustrates an upper template according to an example.

[0727] In Fig. 12, the upper template T Top was shown.

[0728] Figure 13 illustrates a left template according to an example.

[0729] In Fig. 13, the left template T Left was shown.

[0730]

[0731] IBC-Local Illumination Compensation (IBC-LIC)

[0732] IBC-LIC may be a technique for applying linear filtering to an IBC prediction signal (or IBC prediction block) generated by prediction using IBC.

[0733] The formula for linear filtering can be as shown in [Formula 1] below.

[0734] [Formula 1]

[0735] P'(x, y) = aP(x, y) + b

[0736] In [Formula 1], P(x, y) may represent an IBC prediction signal (or IBC prediction value) before filtering is applied to the pixel whose coordinates are (x, y). P'(x, y) may represent an IBC prediction signal (or IBC prediction value) after filtering is applied to the pixel whose coordinates are (x, y). a and b may be filtering coefficients.

[0737] IBC-LIC is a target block (P t ) adjacent restored pixels and IBC reference block (P ref ) are each restored pixels adjacent to the filter templates (T t , T ref ) can be specified. Filter coefficients can be derived from these filter templates.

[0738] As shown in Figures 11, 12 and 13, the size of the filter template (size T ) may mean the size of the template used to derive the filter coefficients.

[0739] For example, size T can be 4. Or, sizeT can be an integer greater than or equal to 1 T can be determined based on the coding parameters described in the embodiments.

[0740]

[0741] IBC-LIC related technologies

[0742] A combined IBC and intra prediction (IBC-CIIP) method can be used. When IBC-CIIP is applied to a CU, two prediction blocks can be obtained using IBC and intra prediction. A weighted sum of the two prediction blocks can be derived to generate the final prediction block.

[0743] When the intra prediction mode is planar mode or DC mode, the final prediction block can be derived as shown in [Formula 2] below.

[0744] [Formula 2]

[0745] P = (w ibc × P ibc + ((1 << shift) - w ibc ) × P intra + (1 << (shift - 1))) >> shift

[0746] P ibc and P intra can represent IBC prediction blocks and intra prediction blocks, respectively.

[0747] (w ibc , shift) can be set to (1, 2) if both the upper CU and the left CU are intra-coded, (2, 2) if either the upper CU or the left CU is intra-coded, or (3, 2) if both the upper CU and the left CU are IBC-coded. Otherwise (i.e., if the intra prediction is in directional mode), the final prediction block can be obtained by adaptively switching the prediction block of the intra mode and the prediction block of the IBC mode.

[0748] When the size of the current CU is w×h and the intra mode prediction mode is horizontal mode or vertical mode, if both the upper CU and the left CU are intra coded, the left 3 / 4×h part (horizontal mode) or the upper w×3 / 4h part (vertical mode) of the final prediction block can be set as the intra prediction signal.

[0749] If only one of the upper CU and the left CU is intra-coded, the left 1 / 2w×h portion (horizontal mode) or the upper w×1 / 2h portion (vertical mode) of the final prediction block can be set as the intra-prediction signal.

[0750] If both the upper CU and the left CU are IBC or inter-coded, the left 1 / 4w×h portion (horizontal mode) or the upper w×1 / 4h portion (vertical mode) of the final prediction block can be set as the intra prediction signal.

[0751] (w ibc , shift) can be set to (13, 4) and (1, 1) for IBC merge mode and IBC AMVP mode, respectively.

[0752] Besides the intra prediction part, other parts of the final prediction block can be set as IBC prediction samples.

[0753] For intra prediction signals, an intra prediction mode candidate list may be used. The size of the intra candidate list may be predefined, such as 2. An IPM index may be signaled to indicate which IPM is used.

[0754] IBC-CIIP can be applied to IBC AMVP mode and IBC merge mode. A CU flag can be signaled to indicate whether IBC-CIIP is used.

[0755] Higher-level flags, such as SPS level flags, may be used. SPS level flags may indicate whether the blending method of the embodiments is applied to the IBC merge mode at the SPS level.

[0756] IBC with Geometry Partitioning Method (IBC-GPM) can be used. When IBC-GPM is applied to a CU, the CU can generate prediction blocks for two sub-blocks using IBC and intra prediction. IBC-GPM can be applied to regular IBC merge mode and IBC TM merge mode. A CU flag indicating whether IBC-GPM is used can be signaled.

[0757] The intra prediction mode candidate list can be configured to include inter prediction and intra prediction for intra prediction. The size of the IPM candidate list can be predefined as 3. The 48 geometric partition modes can be divided into two sets of geometric partition modes.

[0758] When IBC-GPM is used, a flag indicating which of the two sets has been selected and an index for the selected set can be signaled. Additionally, a flag indicating whether an intra prediction mode is used for the first subpartition can be signaled. If intra prediction is used for the subpartition, an intra prediction mode index can be signaled. If IBC is used for the subpartition, a merge index can be signaled.

[0759] IBC-LIC can be a technique for compensating for local illumination variations within an image between an IBC-coded CU and a predicted block using a linear equation. When IBC-LIC is applied to a CU, the local illumination variation between the CU and the predicted block can be modeled as a linear equation. The parameters of the linear equation can be derived similarly to LIC for inter prediction. In contrast, in IBC-LIC, a reference template can be generated using a block vector.

[0760] IBC-LIC can be applied to IBC AMVP mode and IBC Merge mode. For IBC AMVP mode, the IBC-LIC flag can be signaled to indicate whether IBC-LIC is used. For IBC Merge mode, the IBC-LIC flag can be inferred from the merge candidate.

[0761]

[0762] IBC-LIC extension

[0763] IBC-LIC may be a coding tool for compensating for local illumination variations within a picture between a current block coded using IBC and a prediction block having a linear model.

[0764] The parameters of the linear model can be derived in the same way as LIC for inter prediction, except that the reference template is generated using the block vector of IBC-LIC.

[0765] For example, IBC-LIC can only be applied to current blocks with a block size greater than or equal to 32 and less than or equal to 256.

[0766] IBC-LIC can be applied to IBC AMVP mode and IBC merge mode.

[0767] For IBC AMVP mode, the IBC-LIC flag may be signaled to indicate the use of IBC-LIC.

[0768] For IBC merge mode, the IBC-LIC flag can be inferred from the merge candidate.

[0769] Three modes can be added to IBC-LIC:

[0770] The first two modes may be related to the choice of template form.

[0771] For IBC-LIC to derive single model parameters, a top-only template, a left-only template, or an L-shaped template can be used.

[0772] The third mode extends the Multi-Model Linear Model (MMLM) to IBC-LIC, allowing IBC-LIC to have two linear models within a single current block. Furthermore, in this third mode, the template can be L-shaped.

[0773] Additionally, the large block size constraint for IBC-LIC may be removed. In one embodiment, IBC-LIC may be applied to current blocks with a block size of 32 or greater.

[0774] In IBC AMVP mode, the signaling of the signal can be as listed below.

[0775] - A value of "0" may indicate not IBC-LIC mode.

[0776] - The value "100" may indicate the default IBC-LIC mode.

[0777] - The value "101" can indicate multi-models IBC-LIC mode.

[0778] - The value "110" can indicate top-only IBC-LIC mode.

[0779] - Only the left-hand side of the value "111" can indicate IBC-LIC mode.

[0780] As an extension mode of IBC-LIC technology, multi-direction mode and multi-model mode can be added to IBC-LIC.

[0781] IBC-LIC multi-direction is an L-shaped template of blocks (T L-shape ), top template (T Top ), and the left template (T Left ) can be one of the IBC-LIC extended modes that selects one of the template forms and derives the filter coefficients using the selected template.

[0782] T L-shape , as shown in Fig. 11, may refer to the upper restoration pixels and the left restoration pixels adjacent to the block.

[0783] T Top , as illustrated in Fig. 12, may refer to the upper restored pixels adjacent to the block.

[0784] T Left , as illustrated in Fig. 13, may refer to the left restored pixels adjacent to the block.

[0785] The IBC-LIC multi-model can derive a threshold based on the value of the filter template of the target block, and can be one of the IBC-LIC extension modes that supports using two sets of filter coefficients based on the threshold.

[0786]

[0787] Filtered IBC (FIBC)

[0788] An additional filtered IBC mode can be introduced. Here, the filter can be applied to the IBC predictor. The IBC predictor can be derived by minimizing the mean squared error (MSE) between the current template and the reference template.

[0789] The output of the filter can be calculated as shown in [Equation 3] below:

[0790] [Formula 3]

[0791] predLumaVal = c0C + c1N + c2S + c3E + c4W + c5P + c6B

[0792] The nonlinear term P can be expressed as a power of two of the central sample C, scaled to the range of sample values ​​in the content:

[0793] [Formula 4]

[0794] P = ( C*C + midVal ) >> bitDepth

[0795] The bias term B can represent a scalar offset between input and output and can be set to the middle luma value (512 for 10-bit content).

[0796] Filter coefficients c i can be computed by minimizing the MSE between the reference template and the target template.

[0797] These filtered modes can be used as additional modes for non-merge IBC blocks, and the filtered modes may not be used with IBC-LIC, IBC-CIIP, or RR-IBC. For IBC merge modes, these filtered modes can be inherited when the merge mode list is built. The mode flag can be signaled before the IBC-LIC flag.

[0798] A FIBC flag may be introduced to signal FIBC. The FIBC flag may be conditionally signaled based on the IBC-LIC flag. Specifically, if the IBC-LIC flag is true, the FIBC flag may be signaled and used to indicate whether FIBC is applied to the target block.

[0799] For IBC merge modes, this filtering mode may be inherited when the merge list is constructed, and thus no additional signaling may be required.

[0800] In one embodiment, the FIBC flag may only apply to Screen Content Coding (SCC) sequences.

[0801] When merge candidates are derived from blocks coded with IntraTMP, FIBC may be disabled by default.

[0802]

[0803] Filtering of filtered IBC

[0804] Figure 14 shows the shape of a FIBC filter according to an example.

[0805] To improve prediction accuracy, FIBC can apply a linear filter to the prediction samples of IBC.

[0806] As illustrated in Figure 14, a linear filter can be composed of five spatial terms and one bias term. The five spatial terms can be composed of a center (C) location, an upper / north (N) neighbor, a lower / south (S) neighbor, a left / west (W) neighbor, and a right / east (E) neighbor.

[0807] The filtering of FIBC can be configured according to [Formula 5] below.

[0808] [Formula 5]

[0809] predVal = α0·C + α1·N + α2·S + α3·W + α4·E + α5·β

[0810] Alternatively, the filtering of the FIBC can be configured according to [Formula 6] below.

[0811] [Formula 6]

[0812] P'(x, y) = α0·C + α1·N + α2·S + α3·W + α4·E + α5·P + β

[0813] In [Formula 6], C may be a prediction signal P(x, y) of a pixel whose coordinates are (x, y) before filtering is applied. Each of N, S, W, and E, including C, may correspond to a pixel at the location indicated in Fig. 2.

[0814] N can be the predicted signal P(x, y-1) of the pixel whose coordinates are (x, y-1) before filtering is applied.

[0815] S can be the predicted signal P(x, y+1) of the pixel whose coordinates are (x, y+1) before filtering is applied.

[0816] W can be the predicted signal P(x-1, y) of the pixel whose coordinates are (x-1, y) before filtering is applied.

[0817] E can be the predicted signal P(x+1, y) of the pixel whose coordinates are (x+1, y) before filtering is applied.

[0818] P is P(x, y) 2 can mean . Also, α i can mean the i-th filter coefficient. β can mean a bias value or an offset.

[0819] FIBC is a target block (P t ) adjacent restored pixels and IBC reference block (P ref ) are each restored pixels adjacent to the filter templates (T t , T ref) can be specified. Filter coefficients can be derived from these filter templates.

[0820] A 7-tap filter can perform filtering using a pixel (C) to which filtering is applied; four adjacent pixels, namely, the upper adjacent pixel (N), the lower adjacent pixel (S), the left adjacent pixel (W), and the right adjacent pixel (E) of the pixel; a nonlinear term (P); and a bias value. In other words, a 7-tap filter can perform filtering using all seven values ​​listed above.

[0821] Up to four rows above the target block and up to four columns to the left of the target block can be applied to derive filter coefficients.

[0822] The filter coefficients can be derived by minimizing the difference between the template sample and the reference sample corresponding to the template sample, using the same regression-based minimization technique used in other prediction methods, such as the Convolutional Cross-Component Model (CCCM).

[0823] A FIBC flag may be introduced, signaled after the IBC-LIC flag. The FIBC flag may be a flag indicating whether FIBC is used for the target block.

[0824] For example, if the IBC-LIC flag is true, the FIBC flag may be signaled.

[0825] FIBC is T L-shape It may be limited to supporting only template formats, and may only support modes that use a single set of filter coefficients. In other words, FIBC may not support multi-direction and multi-models.

[0826]

[0827] Filter Template

[0828] In embodiments, the filter template may mean a template for deriving filter coefficients for filtering an IBC prediction signal.

[0829] These filter templates can represent adjacent restored pixels of the target block and adjacent restored pixels of the IBC reference block.

[0830] As shown in Figures 11, 12 and 13, the size of the template t can be set to a certain value.

[0831] In the embodiments, the filter templates are described with respect to filtering IBC prediction signals, but the filter templates may also be applied to prediction signals (i.e., prediction blocks) generated by other prediction methods described in the embodiments.

[0832]

[0833] Filter type

[0834] In embodiments, the filter shape may refer to pixels used for filtering and / or a shape formed by the pixels.

[0835] For example, the filter shape may be a square of a given size or a cross of a given size.

[0836] For example, as illustrated in FIG. 16, the filter shape may be a 1x1 square.

[0837] For example, as illustrated in FIG. 17, the filter shape may be a 3x3 cross.

[0838] For example, as illustrated in FIG. 18, the filter shape may be a 3x3 square.

[0839] Additionally, the filter shape may have other shapes and sizes as described in the embodiments. For example, the filter shape may be a p-gon of size nxm. Each of n, m, and p may be an integer greater than or equal to 1.

[0840]

[0841] Template format

[0842] In embodiments, the template form may mean the form of a filter template.

[0843] As shown in Figures 11, 12 and 13, the left template of the block (T Left ); Top template of the block (T Top ); and L-shaped templates that use both the left and top templates of the block (T L-shape ); can be used. T Left , T Top and T L-shape Filtering can be performed using at least one of:

[0844]

[0845] Filter coefficient set

[0846] In embodiments, a filter coefficient set may refer to a set of filter coefficients used in a filter model. In embodiments, the number of filter coefficient sets may be 1 or greater.

[0847] When filtering is performed on a signal predicted by the IBC of a target block, one or more sets of filter coefficients may be used.

[0848]

[0849] Filter model

[0850] In embodiments, the filter model may refer to a formula used to perform IBC prediction signal filtering.

[0851] The formula can be constructed using at least one of an IBC prediction pixel to which filtering is to be applied; surrounding pixels of the IBC prediction pixel; a bias; and a filter coefficient.

[0852] For example, the formula of the filter model may be [Formula 1] described above.

[0853] For example, the formula of the filter model may be [Formula 6] described above.

[0854] For example, the formula of the filter model can be [Formula 7] below.

[0855] [Formula 7]

[0856] P'(x, y) = α0·C + α1·N + α2·S + α3·W + α4·E + α5·β

[0857] Alternatively, the formula of the filter model may be another formula that derives P'(x, y) as described in the embodiments.

[0858]

[0859] Obtaining predictive signal filtering information

[0860] Below, the acquisition of prediction signal filtering information in step (1010) is described in more detail.

[0861] The operations described below can be performed in step (1010).

[0862]

[0863] Indicates whether filtering is performed

[0864] Information can be obtained as to whether filtering is performed on the IBC prediction signal.

[0865] The ibc_filtering_flag syntax element can indicate whether filtering is performed.

[0866] Filtering may be performed on the IBC prediction block when ibc_filtering_flag is the first value, and filtering may not be performed when ibc_filtering_flag is the second value.

[0867] For example, the first value may be "1". The second value may be "0".

[0868]

[0869] An embodiment that indicates whether filtering is performed.

[0870] As explained above, filtering may be performed on the IBC prediction block when ibc_filtering_flag is the first value, and filtering may not be performed when ibc_filtering_flag is the second value.

[0871] Depending on the value of ibc_filtering_flag, it can be determined whether the steps (1010, 1020, 1030, 1031, 1032, and 1033) described above are performed with reference to FIG. 10.

[0872] When filtering is performed on an IBC prediction block, when performing encoding / decoding using the IBC prediction mode for the target block, steps (1010, 1020, and 1030) and steps (1031, 1032, and 1033) within step (1030) described above with reference to FIG. 10 may be performed.

[0873] If filtering is not performed on an IBC prediction block, when performing encoding / decoding using the IBC prediction mode for the target block, steps (1010, 1020, and 1030) and steps (1031, 1032, and 1033) within step (1030) described above with reference to FIG. 10 may not be performed and may be skipped. In this case, step (1010) may be performed within the scope of obtaining ibc_filtering_flag and determining whether filtering is performed based on the value of ibc_filtering_flag.

[0874]

[0875] Filter type

[0876] Information about the filter shape for filtering the IBC prediction signal can be obtained.

[0877] The ibc_filter_shape syntax element can indicate the filter shape.

[0878] The filter shape may be one of a square of a predetermined size; and a cross of a predetermined size; or the filter shape may have a specific shape described in the embodiments and may have a specific size.

[0879] For example, the filter may be one of a rectangular filter having a predetermined size; and a cross-shaped filter having a predetermined size.

[0880] Among the available filter shapes and available filter sizes, the filter shape and filter size can be selected based on the coding parameters.

[0881] One of the available filter shapes and available filter sizes can be used as the default filter shape and default filter size.

[0882] For example, the default filter shape can be either a square or a cross.

[0883] For example, if ibc_filter_shape is not signaled, a rectangular filter may be determined to be used.

[0884] For example, if ibc_filter_shape is not signaled, a cross-shaped filter may be determined to be used.

[0885]

[0886] First embodiment of the filter-type instruction

[0887] Figure 15 illustrates the use of a 1x1 rectangular filter according to an example.

[0888] Figure 16 illustrates the use of a 3x3 cross filter according to an example.

[0889] In FIGS. 15 and 16, it is shown that a 1x1 rectangular filter is used when the ibc_filter_shape syntax element is the first value, and a 3x3 cross filter is used when it is the second value.

[0890] The ibc_filter_shape syntax element can indicate the filter shape.

[0891] If the ibc_filter_shape syntax element is the first value, IBC prediction signal filtering can be applied using a 1x1 rectangular filter.

[0892] If the ibc_filter_shape syntax element is the second value, IBC prediction signal filtering can be applied using a 3x3 cross filter.

[0893] That is, when the ibc_filter_shape syntax element is the first value, as illustrated in FIG. 15, when filtering is applied to the p0 pixel, filtering can be performed using the pixel value of the p0 pixel.

[0894] That is, when the ibc_filter_shape syntax element is the second value, as illustrated in FIG. 16, when filtering is applied to the p0 pixel, filtering can be performed using the pixel values ​​of the p0 pixel, the p1 pixel, the p2 pixel, the p3 pixel, and the p4 pixel together.

[0895] For example, the first value may be 1. The second value may be 0.

[0896]

[0897] Second embodiment of the filter-type instruction

[0898] Figure 17 illustrates the use of a 3x3 rectangular filter according to an example.

[0899] Figure 18 illustrates the use of a 3x3 cross filter according to an example.

[0900] In FIGS. 17 and 18, it is shown that a 3x3 square filter is used when the ibc_filter_shape syntax element is the first value, and a 3x3 cross filter is used when the ibc_filter_shape syntax element is the second value.

[0901] The ibc_filter_shape syntax element can indicate the filter shape.

[0902] If the ibc_filter_shape syntax element is the first value, IBC prediction signal filtering can be applied using a 3x3 rectangular filter.

[0903] If the ibc_filter_shape syntax element is the second value, IBC prediction signal filtering can be applied using a 3x3 cross filter.

[0904] That is, when the ibc_filter_shape syntax element is the first value, as illustrated in FIG. 15, when filtering is applied to the p0 pixel, filtering can be performed using the pixel values ​​of the p0 pixel, the p1 pixel, the p2 pixel, the p3 pixel, the p4 pixel, the p5 pixel, the p6 pixel, the p7 pixel, and the p8 pixel together.

[0905] That is, when the ibc_filter_shape syntax element is the second value, as illustrated in FIG. 16, when filtering is applied to the p0 pixel, filtering can be performed using the pixel values ​​of the p0 pixel, the p1 pixel, the p2 pixel, the p3 pixel, and the p4 pixel together.

[0906] For example, the first value may be 1. The second value may be 0.

[0907]

[0908] The form of the filter template

[0909] For IBC prediction signal filtering, information about the filter template shape can be obtained.

[0910] The ibc_filter_tpl_shape syntax element can indicate the shape of a filter template.

[0911] As shown in Figures 11, 12 and 13, the template shape is T Left , T Top and T L-shape It could be one of them.

[0912] For example, if ibc_filter_tpl_shape is the first value, then the L-shape template T is used as the filter template shape.L-shape can be used.

[0913] For example, if ibc_filter_tpl_shape is the second value, the top template T of the block in the form of a filter template Top can be used.

[0914] For example, if ibc_filter_tpl_shape is the third value, the left template T of the block in the form of a filter template Left can be used.

[0915] For example, the first value could be "0". The second value could be "1". The third value could be "2".

[0916] If ibc_filter_tpl_shape is not signaled, a pre-defined template shape can be defined.

[0917] For example, as a pre-defined template form, T L-shape can be used.

[0918] For example, as a pre-defined template form, T Top can be used.

[0919] For example, as a pre-defined template form, T Left can be used.

[0920]

[0921] Number of filter coefficient sets

[0922] Information about the number of filter coefficient sets for IBC prediction signal filtering can be obtained.

[0923] The ibc_filter_set_num syntax element can indicate the number of filter coefficient sets.

[0924] If ibc_filter_set_num is the first value, it can be indicated that one filter coefficient set is used. If ibc_filter_set_num is i, it can be indicated that i filter coefficient sets are used. i can be an integer greater than or equal to 2.

[0925] For example, the first value may be "1". The i-th value may be "i-1".

[0926] If ibc_filter_set_num is the first value, it may be indicated that one filter coefficient set is used. If ibc_filter_set_num is the second value, it may be indicated that multiple filter coefficient sets are used.

[0927] For example, the first value may be "0". The second value may be "1".

[0928] If ibc_filter_set_num is not signaled, a pre-defined number of filter coefficient sets can be used.

[0929] For example, when a pre-defined number of filter coefficient sets are used, one filter coefficient set can be used for IBC prediction signal filtering, i.e., ibc_filter_set_num can be derived to have a value of 1.

[0930] For example, when a pre-defined number of filter coefficient sets are used, two filter coefficient sets can be used for IBC prediction signal filtering, i.e., ibc_filter_set_num can be derived to have a value of 2.

[0931] For example, when a pre-defined number of filter coefficient sets are used, three filter coefficient sets can be used for IBC prediction signal filtering. That is, ibc_filter_set_num can be derived to have a value of 3.

[0932] Additionally, the number of filter coefficient sets can be derived based on the coding parameters described in the embodiments.

[0933]

[0934] Embodiments for indicating the number of filter coefficient sets

[0935] Filtering using a filter set can be expressed as in [Formula 8] below.

[0936] [Formula 8]

[0937] P t '(x, y) = F(P t (x, y), FilterSet)

[0938] P t (x, y) can be the pixel value of the IBC prediction pixel whose coordinates are (x, y).

[0939] P t '(x, y) is P t It can be the pixel value of a filtered pixel derived by applying filtering to (x, y).

[0940] F(P t (x, y), FilterSet) returns a pixel P using FilterSet. t It can be expressed as applying filtering to (x, y).

[0941]

[0942] First embodiment of the indication of the number of filter coefficient sets

[0943] In one embodiment, if ibc_filter_set_num is the first value, it may be indicated that one filter coefficient set is used. If ibc_filter_set_num is the second value, it may be indicated that two filter coefficient sets are used.

[0944] If one set of filter coefficients is used, P is used using one set of filter coefficients. t (x, y) can be filtered.

[0945] In other words, if ibc_filter_set_num is the first value, filtering according to [Formula 9] below can be performed.

[0946] [Formula 9]

[0947] P t '(x, y) = F(P t (x, y), FilterSet)

[0948] When two sets of filter coefficients are used, which one of the two sets of filter coefficients is to be used may be determined based on certain criteria. The certain criteria may include a combination of one or more coding parameters of the embodiments.

[0949] For example, when two sets of filter coefficients are used, a filter coefficient set can be selected based on Thres, and the selected filter coefficient set can be used. Thres can be the average value of pixels included in the filter template. Alternatively, Thres can be another statistical value of the pixels.

[0950] For example, P t If the value of (x, y) is less than or equal to Thres, the first filter coefficient set FilterSet1 can be used, and P t If the value of (x, y) is greater than Thres, the second filter coefficient set FilterSet2 can be used.

[0951] That is, when ibc_filter_set_num is the second value, filtering according to [Formula 10] and [Formula 11] below can be performed.

[0952] [Formula 10]

[0953] P t '(x, y) = F(P t (x, y), FilterSet1) if, P t (x, y) ≤ Thres

[0954] [Formula 11]

[0955] P t '(x, y) = F(P t (x, y), FilterSet2) if, P t (x, y) > Thres

[0956]

[0957] Second embodiment for indicating the number of filter coefficient sets

[0958] In one embodiment, if ibc_filter_set_num is the first value, it may be indicated that one filter coefficient set is used. If ibc_filter_set_num is the second value, it may be indicated that three filter coefficient sets are used.

[0959] If one set of filter coefficients is used, P is used using one set of filter coefficients. t (x, y) can be filtered.

[0960] In other words, if ibc_filter_set_num is the first value, filtering according to [Formula 12] below can be performed.

[0961] [Formula 12]

[0962] P t '(x, y) = F(P t (x, y), FilterSet)

[0963] When three sets of filter coefficients are used, which of the three sets of filter coefficients is to be used can be determined based on certain criteria. The certain criteria may include a combination of one or more coding parameters of the embodiments.

[0964] For example, when three filter coefficient sets are used, a filter coefficient set can be selected based on two threshold values ​​Thres0 and Thres1, and the selected filter coefficient set can be used.

[0965] Here, Thres0 may refer to the first threshold value. Thres1 may refer to the second threshold value. Thres1 may be greater than Thres0.

[0966] For example, a filter template may contain N pixels. At this time, the N pixels may be sorted in ascending order of their pixel values. Among the N pixels sorted in ascending order, the pixel value of the N / 3-th pixel may be set to Thres0. The pixel value of the 2N / 3-th pixel may be set to Thres1. In other words, when the pixels in the filter template are sorted in ascending order of their pixel values, Thres0 and Thres0 may be values ​​of two points that divide the sorted pixels into three equal parts.

[0967] For example, P t If the value of (x, y) is less than or equal to Thres0, the first filter coefficient set FilterSet1 can be used. P t If the value of (x, y) is greater than Thres0 and less than Thres1, the second filter coefficient set FilterSet2 can be used. P t If the value of (x, y) is greater than Thres1, the third filter coefficient set FilterSet3 can be used.

[0968] That is, when ibc_filter_set_num is the second value, filtering according to [Formula 13], [Formula 14], and [Formula 15] below can be performed.

[0969] [Formula 13]

[0970] P t '(x, y) = F(P t (x, y), FilterSet1) if, P t (x, y) ≤ Thres0

[0971] [Formula 14]

[0972] Pt '(x, y) = F(P t (x, y), FilterSet2) if, Thres0< P t (x, y) ≤ Thres1

[0973] [Formula 15]

[0974] P t '(x, y) = F(P t (x, y), FilterSet3) if, P t (x, y) > Thres1

[0975]

[0976] Third embodiment for indicating the number of filter coefficient sets

[0977] In one embodiment, if ibc_filter_set_num is a first value, it may indicate that one filter coefficient set is used. If ibc_filter_set_num is a second value, it may indicate that two filter coefficient sets are used. If ibc_filter_set_num is a third value, it may indicate that three filter coefficient sets are used.

[0978] If one set of filter coefficients is used, P is used using one set of filter coefficients. t (x, y) can be filtered.

[0979] In other words, if ibc_filter_set_num is the first value, filtering according to [Formula 16] below can be performed.

[0980] [Formula 16]

[0981] P t '(x, y) = F(P t (x, y), FilterSet)

[0982] When two sets of filter coefficients are used, which one of the two sets of filter coefficients is to be used may be determined based on certain criteria. The certain criteria may include a combination of one or more coding parameters of the embodiments.

[0983] For example, when two sets of filter coefficients are used, a filter coefficient set can be selected based on Thres, and the selected filter coefficient set can be used. Thres can be the average value of pixels included in the filter template. Alternatively, Thres can be another statistical value of the pixels.

[0984] For example, P t If the value of (x, y) is less than or equal to Thres, the first filter coefficient set FilterSet1 can be used, and P t If the value of (x, y) is greater than Thres, the second filter coefficient set FilterSet2 can be used.

[0985] That is, when ibc_filter_set_num is the second value, filtering according to [Formula 17] and [Formula 18] below can be performed.

[0986] [Formula 17]

[0987] P t '(x, y) = F(P t (x, y), FilterSet1) if, P t (x, y) ≤ Thres

[0988] [Formula 18]

[0989] P t '(x, y) = F(P t (x, y), FilterSet2) if, P t (x, y) > Thres

[0990] When three sets of filter coefficients are used, which of the three sets of filter coefficients is to be used can be determined based on certain criteria. The certain criteria may include a combination of one or more coding parameters of the embodiments.

[0991] For example, when three filter coefficient sets are used, a filter coefficient set can be selected based on two threshold values ​​Thres0 and Thres1, and the selected filter coefficient set can be used.

[0992] Here, Thres0 may refer to the first threshold value. Thres1 may refer to the second threshold value. Thres1 may be greater than Thres0.

[0993] For example, a filter template may contain N pixels. At this time, the N pixels may be sorted in ascending order of their pixel values. Among the N pixels sorted in ascending order, the pixel value of the N / 3-th pixel may be set to Thres0. The pixel value of the 2N / 3-th pixel may be set to Thres1. In other words, when the pixels in the filter template are sorted in ascending order of their pixel values, Thres0 and Thres0 may be values ​​of two points that divide the sorted pixels into three equal parts.

[0994] For example, P t If the value of (x, y) is less than or equal to Thres0, the first filter coefficient set FilterSet1 can be used. P t If the value of (x, y) is greater than Thres0 and less than Thres1, the second filter coefficient set FilterSet2 can be used. P t If the value of (x, y) is greater than Thres1, the third filter coefficient set FilterSet3 can be used.

[0995] That is, when ibc_filter_set_num is the third value, filtering according to [Formula 19], [Formula 20], and [Formula 21] below can be performed.

[0996] [Formula 19]

[0997] P t '(x, y) = F(P t (x, y), FilterSet1) if, P t (x, y) ≤ Thres0

[0998] [Formula 20]

[0999] P t '(x, y) = F(P t (x, y), FilterSet2) if, Thres0< P t (x, y) ≤ Thres1

[1000] [Formula 21]

[1001] P t '(x, y) = F(P t (x, y), FilterSet3) if, P t (x, y) > Thres1

[1002]

[1003] IBC filter mode

[1004] The IBC filter mode may be defined by at least one of the information described in the embodiments, such as whether filtering is performed; the filter type; the filter template type; and the number of filter coefficient sets.

[1005] Additionally, the IBC filter mode can be determined by the coding parameters of the embodiments.

[1006] For example, as will be described later in the first embodiment for the IBC filter mode below, the IBC filter mode may be defined by at least one of the signaled syntax elements ibc_filter_flag, ibc_filter_shape, ibc_filter_tpl_shape and ibc_filter_set_num.

[1007] For example, a syntax element for indicating an IBC filter mode may be signaled, as will be described later in the second embodiment for the IBC filter mode below.

[1008] For example, as will be described later in the third and fourth embodiments for the IBC filter mode below, the IBC filter mode may be defined by at least one of the signaled ibc_filter_flag, ibc_filter_shape, ibc_filter_tpl_shape1, ibc_filter_tpl_shape2 and ibc_filter_set_num syntax elements.

[1009] For example, nine IBC filter modes can be defined, as described below.

[1010] - Not IBC-LIC mode may be a mode where filtering is not applied.

[1011] - L-shaped IBC-LIC mode is T L-shape , may be a mode that applies filtering using a rectangular filter and one set of filter coefficients.

[1012] - Multi-model IBC-LIC mode is T L-shape , may be a mode for applying filtering using a rectangular filter and multiple filter coefficient sets. The multiple filter coefficient sets may be two filter coefficient sets.

[1013] - Top-only IBC-LIC mode is T Top, may be a mode that applies filtering using a rectangular filter and one set of filter coefficients.

[1014] - Left-only IBC-LIC mode is T Left , may be a mode that applies filtering using a rectangular filter and one set of filter coefficients.

[1015] - L-shaped FIBC mode is T L-shape , a cross-shaped filter, may be a mode that applies filtering using a single set of filter coefficients.

[1016] - Multi-model FIBC mode is T L-shape , may be a mode for applying filtering using a cross filter and multiple filter coefficient sets. The multiple filter coefficient sets may be two filter coefficient sets.

[1017] - Top-only FIBC mode is T Top , may be a mode that applies filtering using a cross filter and one set of filter coefficients.

[1018] - Left-only FIBC mode is T Left , may be a mode that applies filtering using a cross filter and one set of filter coefficients.

[1019]

[1020] First embodiment for IBC filter mode

[1021] In one embodiment, the IBC filter mode may be determined by at least one of the signaled ibc_filter_flag, ibc_filter_shape, ibc_filter_tpl_shape, ibc_filter_set_num.

[1022] For example, if ibc_filter_shape is the first value (or a 1x1 rectangular filter is used) and ibc_filter_flag is the first value, non-IBC-LIC can be specified.

[1023] For example, if ibc_filter_flag is the second value, it can be specified that filtering by at least one of IBC-LIC and FIBC is performed.

[1024] For example, ibc_filter_shape is the first value (or a 1x1 rectangular filter is used), ibc_filter_flag is the second value, and ibc_filter_tpl_shape is the first value (or T L-shape If ), ibc_filter_set_num is the first value (or 1 filter coefficient set is used), L-type IBC-LIC can be specified.

[1025] For example, ibc_filter_shape is the first value (or a 1x1 rectangular filter is used), ibc_filter_flag is the second value, and ibc_filter_tpl_shape is the first value (or T L-shape If ibc_filter_set_num is the second value (or multiple filter coefficient sets are used), a multi-model IBC-LIC can be specified. Here, the multiple filter coefficient sets can be two filter coefficient sets or three filter coefficient sets.

[1026] For example, ibc_filter_shape is the first value (or a 1x1 rectangular filter is used), ibc_filter_flag is the second value, and ibc_filter_tpl_shape is the second value (or T Top If ibc_filter_set_num is the first value (or 1 filter coefficient set is used), then only the top-only IBC-LIC can be specified.

[1027] For example, ibc_filter_shape is the first value (or a 1x1 rectangular filter is used), ibc_filter_flag is the second value, and ibc_filter_tpl_shape is the third value (or T Left If ibc_filter_set_num is the first value (or 1 filter coefficient set is used), a left-only IBC-LIC can be specified.

[1028] For example, ibc_filter_shape is the second value (or a 3x3 cross filter is used), and ibc_filter_tpl_shape is the first value (or T L-shape If ibc_filter_set_num is the first value (or one filter coefficient set is used), an L-shaped FIBC can be specified.

[1029] For example, ibc_filter_shape is the second value (or a 3x3 cross filter is used), and ibc_filter_tpl_shape is the first value (or T L-shape If ibc_filter_set_num is the second value (or multiple filter coefficient sets are used), a multi-model FIBC can be specified. Here, the multiple filter coefficient sets can be two filter coefficient sets or three filter coefficient sets.

[1030] For example, ibc_filter_shape is the second value (or a 3x3 cross filter is used), and ibc_filter_tpl_shape is the second value (or T Top If ibc_filter_set_num is the first value (or 1 filter coefficient set is used), a top-only FIBC can be specified.

[1031] For example, ibc_filter_shape is the second value (or a 3x3 cross filter is used), ibc_filter_tpl_shape is the third value (or T Left If ibc_filter_set_num is the first value (or 1 filter coefficient set is used), a left-only FIBC can be specified.

[1032]

[1033] Second embodiment for IBC filter mode

[1034] In one embodiment, a syntax element ibc_lic_efibc_idx may be signaled to indicate the IBC filter mode.

[1035] The IBC filter mode can be specified depending on the value of ibc_lic_efibc_idx.

[1036] For example, if ibc_lic_efibc_idx is the first value, a non-IBC-LIC can be specified.

[1037] For example, if ibc_lic_efibc_idx is the second value, an L-type IBC-LIC can be specified.

[1038] For example, if ibc_lic_efibc_idx is the third value, a multi-model IBC-LIC (L-type) can be specified.

[1039] For example, if ibc_lic_efibc_idx is the fourth value, only the top-most IBC-LIC can be specified.

[1040] For example, if ibc_lic_efibc_idx is the fifth value, a left-only IBC-LIC can be specified.

[1041] For example, if ibc_lic_efibc_idx is the 6th value, an L-type FIBC can be specified.

[1042] For example, if ibc_lic_efibc_idx is the 7th value, a multi-model FIBC (L-type) can be specified.

[1043] For example, if ibc_lic_efibc_idx is the 8th value, only top-end FIBCs can be specified.

[1044] For example, if ibc_lic_efibc_idx is the 9th value, a left-only FIBC can be specified.

[1045]

[1046] Binarization of ibc_lic_efibc_index

[1047] Figure 19 shows binarization of ibc_lic_efibc_index according to an example.

[1048] Figure 20 shows binarization of ibc_lic_efibc_index according to another example.

[1049] Figure 21 shows binarization of ibc_lic_efibc_index according to another example.

[1050] ibc_lic_efibc_index can be binarized as illustrated in FIGS. 19, 20, and 21.

[1051] For example, as illustrated in FIG. 19, for the values ​​available to ibc_lic_efibc_index, the first value can be binarized as "00", the second value as "0100", the third value as "0101", the fourth value as "0110", the fifth value as "0111", the sixth value as "100", the seventh value as "101", the eighth value as "110", and the ninth value as "111".

[1052] For example, as illustrated in FIG. 20, for the values ​​available to ibc_lic_efibc_index, the first value can be binarized as "00", the second value as "010", the third value as "0110", the fourth value as "01110", the fifth value as "01111", the sixth value as "10", the seventh value as "110", the eighth value as "1110", and the ninth value as "1111".

[1053] For example, as illustrated in FIG. 21, for the values ​​available to ibc_lic_efibc_index, the first value can be binarized to "00", the second value to "010", the third value to "011", the fourth value to "100", the fifth value to "101", the sixth value to "1100", the seventh value to "1101", the eighth value to "1110", and the ninth value to "1111".

[1054] In the above binarization, the binarization values ​​for two specific values ​​of ibc_lic_efibc_index can be changed to each other.

[1055]

[1056] Instructions for IBC filter mode

[1057] Figure 22 illustrates flag signaling according to an example.

[1058] Syntax elements such as ibc_filter_flag, ibc_lic_flag, and ibc_lic_filter_index can be signaled.

[1059] In one embodiment, as illustrated in FIG. 23, based on ibc_filter_flag, ibc_lic_flag and ibc_lic_filter_index, at least one of non-IBC-LIC, L-type IBC-LIC, multi-model IBC-LIC, top-only IBC-LIC, left-only IBC-LIC, L-type FIBC, multi-model FIBC, top-only FIBC and left-only FIBC may be indicated.

[1060] For example, if ibc_filter_flag is the first value (or a 1x1 rectangular filter is used) and ibc_lic_flag is the first value, then non-IBC-LIC can be specified.

[1061] For example, if ibc_filter_flag is the second value, it can be specified that filtering of at least one of IBC-LIC and FIBC is performed.

[1062] For example, if ibc_filter_flag is the first value (or a 1x1 rectangular filter is used), ibc_lic_flag is the second value (or filtering is performed), and ibc_lic_filter_index is the first value, L-shaped IBC-LIC can be specified as the IBC filter mode.

[1063] For example, if ibc_filter_flag is the first value (or a 1x1 rectangular filter is used), ibc_lic_flag is the second value (or filtering is performed), and ibc_lic_filter_index is the second value, then multi-model IBC-LIC can be specified as the IBC filter mode.

[1064] For example, if ibc_filter_flag is the first value (or a 1x1 rectangular filter is used), ibc_lic_flag is the second value (or filtering is performed), and ibc_lic_filter_index is the third value, then top-only IBC-LIC can be specified as the IBC filter mode.

[1065] For example, if ibc_filter_flag is the first value (or a 1x1 rectangular filter is used), ibc_lic_flag is the second value (or filtering is performed), and ibc_lic_filter_index has the fourth value, then left-only IBC-LIC can be specified as the IBC filter mode.

[1066] For example, if ibc_filter_flag is the second value (or a 3x3 cross filter is used), ibc_lic_flag is the first value (or filtering is performed), and ibc_lic_filter_index is the first value, L-shaped FIBC can be specified as the IBC filter mode.

[1067] For example, if ibc_filter_flag is the second value (or a 3x3 cross filter is used), ibc_lic_flag is the first value (or filtering is performed), and ibc_lic_filter_index is the second value, then multi-model FIBC can be specified as the IBC filter mode.

[1068] For example, if ibc_filter_flag is the second value (or a 3x3 cross filter is used), ibc_lic_flag is the second value (or filtering is performed), and ibc_lic_filter_index is the third value, then top-only FIBC can be specified as the IBC filter mode.

[1069] For example, if ibc_filter_flag is the second value (or a 3x3 cross filter is used), ibc_lic_flag is the second value (or filtering is performed), and ibc_lic_filter_index is the fourth value, then left-only FIBC can be specified as the IBC filter mode.

[1070]

[1071] Third embodiment for IBC filter mode

[1072] Syntax elements such as ibc_filter_flag, ibc_filter_shape, ibc_filter_tpl_shape1, ibc_filter_tpl_shape2, and ibc_filter_set_num can be signaled.

[1073] An IBC filter mode can be defined based on at least one of ibc_filter_flag, ibc_filter_shape, ibc_filter_tpl_shape1, ibc_filter_tpl_shape2, and ibc_filter_set_num.

[1074]

[1075] FIG. 23 is a first block diagram illustrating signaling of information for an IBC filter mode according to an example.

[1076] For example, if ibc_filter_tpl_shape1 is the first value, the filter template shape is T L-shape It can be directed that.

[1077] For example, if ibc_filter_tpl_shape1 is the second value, the filter template shape is T Top and T Left It can be indicated that one of them is

[1078] For example, if ibc_filter_tpl_shape2 is the first value, the filter template shape is T Top It can be directed that.

[1079] For example, if ibc_filter_tpl_shape2 is the second value, the filter template shape is T Left It can be directed that.

[1080] For example, if ibc_filter_shape is the first value and ibc_filter_flag is the first value, non-IBC-LIC can be specified. Alternatively, if ibc_filter_flag is the first value, non-IBC-LIC can be used.

[1081] For example, if ibc_filter_shape is the first value, ibc_filter_flag is the second value, ibc_filter_tpl_shape1 is the first value, and ibc_filter_set_num is the first value, an L-shaped IBC-LIC can be specified.

[1082] For example, if ibc_filter_shape is the first value, ibc_filter_flag is the second value, ibc_filter_tpl_shape1 is the first value, and ibc_filter_set_num is the second value, a multi-model IBC-LI can be specified.

[1083] For example, if ibc_filter_shape is the first value, ibc_filter_flag is the second value, ibc_filter_tpl_shape1 is the second value, and ibc_filter_tpl_shape2 is the first value, then only the top IBC-LIC can be specified.

[1084] For example, if ibc_filter_shape is the first value, ibc_filter_flag is the second value, ibc_filter_tpl_shape1 is the second value, and ibc_filter_tpl_shape2 is the second value, then left-only IBC-LIC can be specified.

[1085] For example, if ibc_filter_shape is the second value, ibc_filter_tpl_shape1 is the first value, and ibc_filter_set_num is the first value, an L-shaped FIBC can be specified.

[1086] For example, a multi-model FIBC can be specified when ibc_filter_shape is the second value, ibc_filter_tpl_shape1 is the first value, and ibc_filter_set_num is the second value.

[1087] For example, if ibc_filter_shape is the second value, ibc_filter_tpl_shape1 is the second value, and ibc_filter_tpl_shape2 is the first value, a top-only FIBC can be specified.

[1088] For example, if ibc_filter_shape is the second value, ibc_filter_tpl_shape1 is the second value, and ibc_filter_tpl_shape2 is the second value, a left-only FIBC can be specified.

[1089]

[1090] Fourth embodiment for IBC filter mode

[1091] Syntax elements such as ibc_filter_flag, ibc_filter_shape, ibc_filter_tpl_shape1, ibc_filter_tpl_shape2, and ibc_filter_set_num can be signaled.

[1092] An IBC filter mode can be defined based on at least one of ibc_filter_flag, ibc_filter_shape, ibc_filter_tpl_shape1, ibc_filter_tpl_shape2, and ibc_filter_set_num.

[1093]

[1094] FIG. 24 is a second block diagram illustrating signaling of information for an IBC filter mode according to an example.

[1095] For example, if ibc_filter_tpl_shape1 is the first value, the filter template shape is T L-shape , and it can be indicated that one set of filter coefficients is used.

[1096] For example, if ibc_filter_tpl_shape1 is the second value, multiple models are used; or the filter template shape is T Top and T Left One of them may be indicated;

[1097] For example, if ibc_filter_tpl_shape2 is the first value, the filter template shape is T Top It can be directed that.

[1098] For example, if ibc_filter_tpl_shape2 is the second value, the filter template shape is T Left It can be directed that.

[1099] For example, if ibc_filter_shape is the first value and ibc_filter_flag is the first value, non-IBC-LIC can be used.

[1100] For example, if ibc_filter_flag is the first value, non-IBC-LIC can be used.

[1101] For example, if ibc_filter_shape is the first value, ibc_filter_flag is the second value, and ibc_filter_tpl_shape1 is the first value, then L-shaped IBC-LIC can be used.

[1102] For example, if ibc_filter_shape is the first value, ibc_filter_flag is the second value, ibc_filter_tpl_shape1 is the first value, and ibc_filter_set_num is the second value, a multi-model IBC-LIC can be specified.

[1103] For example, if ibc_filter_shape is the first value, ibc_filter_flag is the second value, ibc_filter_tpl_shape1 is the second value, and ibc_filter_tpl_shape2 is the first value, then only the top IBC-LIC can be specified.

[1104] For example, if ibc_filter_shape is the first value, ibc_filter_flag is the second value, ibc_filter_tpl_shape1 is the second value, and ibc_filter_tpl_shape2 is the second value, then left-only IBC-LIC can be specified.

[1105] For example, if ibc_filter_shape is the second value, ibc_filter_tpl_shape1 is the first value, and ibc_filter_set_num is the first value, an L-shaped FIBC can be specified.

[1106] For example, a multi-model FIBC can be specified when ibc_filter_shape is the second value, ibc_filter_tpl_shape1 is the first value, and ibc_filter_set_num is the second value.

[1107] For example, if ibc_filter_shape is the second value, ibc_filter_tpl_shape1 is the second value, and ibc_filter_tpl_shape2 is the first value, a top-only FIBC can be specified.

[1108] For example, if ibc_filter_shape is the second value, ibc_filter_tpl_shape1 is the second value, and ibc_filter_tpl_shape2 is the second value, a left-only FIBC can be specified.

[1109]

[1110] Inheritance of filter information in merge mode

[1111] In embodiments, merge mode may mean IBC merge mode.

[1112] At least one of pred_mode_ibc_flag, general_merge_flag, and merge_idx may be used to signal that IBC merge mode is used for encoding / decoding.

[1113] In IBC merge mode, at least one of the information used for filtering described in the embodiments, such as whether filtering is performed, filter type, filter template type, filter coefficients, number of filter coefficient sets, and IBC filter mode, may be inherited.

[1114] Inheritance may mean that specific information of a referenced object described in the embodiments is used as information of a specific block of the target. The referenced object may be one of the units described in the embodiments. For example, inheritance may be a candidate of a list. For example, the referenced object may be an IBC merge candidate within an IBC merge list. For example, the referenced object may be a reference block of the target block, or an adjacent block of the target block.

[1115] In IBC merge mode, at least one of the information used for filtering described in the embodiments, such as ibc_filter_flag, ibc_filter_shape, ibc_filter_tpl_shape, ibc_filter_set_num, and IBC filter mode, may be inherited.

[1116] For example, in IBC merge mode, if the merge candidate block uses multi-models, the target block may also use multi-models.

[1117] For example, in IBC merge mode, if the merge candidate block uses an L-shaped template, the target block can also use an L-shaped template.

[1118] For example, in IBC merge mode, if the merge candidate block uses a top-only template, the target block can also use a top-only template.

[1119] For example, in IBC merge mode, if the merge candidate block uses a left-only template, the target block can also use a left-only template.

[1120] For example, if filtering using a non-IBC-LIC filter mode is not performed on an IBC merge candidate, filtering may not be performed on the target block either.

[1121] For example, if filtering using the L-shaped IBC-LIC filter mode is applied to an IBC merge candidate, filtering using the L-shaped IBC-LIC mode may also be performed on the target block.

[1122] For example, if filtering using the multi-model IBC-LIC filter mode is applied to an IBC merge candidate, filtering using the multi-model IBC-LIC mode may also be performed on the target block.

[1123] For example, if filtering using the top-only IBC-LIC filter mode is applied to an IBC merge candidate, filtering using the top-only IBC-LIC mode may also be performed on the target block.

[1124] For example, if filtering using the left-only IBC-LIC filter mode is applied to an IBC merge candidate, filtering using the left-only IBC-LIC mode may also be performed on the target block.

[1125] For example, if filtering using the L-shaped FIBC filter mode is applied to an IBC merge candidate, filtering using the L-shaped FIBC mode may also be performed on the target block.

[1126] For example, if filtering using the multi-model FIBC filter mode is applied to an IBC merge candidate, filtering using the multi-model FIBC mode may also be performed on the target block.

[1127] For example, if filtering using the top-only FIBC filter mode is applied to an IBC merge candidate, filtering using the top-only FIBC mode may also be performed for the target block.

[1128] For example, if filtering using the left-only FIBC filter mode is applied to an IBC merge candidate, filtering using the left-only FIBC mode may also be performed on the target block.

[1129]

[1130] Inheritance of FIBC model information

[1131] FIBC model information may be information indicating whether multiple filter models are used.

[1132] In IBC merge mode, FIBC model information can be inherited from merge candidates.

[1133] For example, if an IBC merge candidate is encoded / decoded using multi-model FIBC, multi-model FIBC may also be used for target blocks that inherit these settings.

[1134] For example, if the IBC merge candidate is encoded / decoded using multi-model FIBC, the number of FIBC filter coefficient sets of the target block inheriting these settings may be 2.

[1135] For example, if an IBC merge candidate is encoded / decoded using one of L-shaped FIBC, top-only FIBC, and left-only FIBC, the number of FIBC filter coefficient sets of the target block inheriting these settings may be 1.

[1136]

[1137] Exception to inheritance in the form of filter templates

[1138] In IBC merge mode, filter template shapes such as L-shape, top-only, and left-only may not be inherited from merge candidates. That is, when IBC merge mode is used for a target block, default values ​​may be used for the target block.

[1139] In one embodiment, the default value may be an L-shaped template.

[1140] For example, if an IBC merge candidate is encoded / decoded with one of L-shaped FIBC, top-only FIBC, and left-only FIBC, the target block inheriting these settings can be encoded / decoded using L-shaped FIBC.

[1141] In one embodiment, the default value may be another template described in the embodiments.

[1142]

[1143] Optional inheritance of model information

[1144] In IBC merge mode, filter template types such as L-shape, top-only, and left-only can be inherited from merge candidates. The FIBC model information, which indicates whether multiple filter models are used, may not be inherited from merge candidates.

[1145] For example, if an IBC merge candidate is encoded using L-form FIBC, a target block that inherits information from the IBC merge candidate can be encoded using L-form FIBC.

[1146] For example, if an IBC merge candidate is encoded using top-only FIBC, a target block that inherits information from the IBC merge candidate can be encoded using top-only FIBC.

[1147] For example, if an IBC merge candidate is encoded using left-only FIBC, a target block that inherits information from the IBC merge candidate can be encoded using left-only FIBC.

[1148] For example, if an IBC merge candidate is encoded using multi-model FIBC, a target block that inherits information from the IBC merge candidate can be encoded using multi-model FIBC.

[1149] For example, if the IBC merge candidate is not encoded using multi-model FIBC, the target block that inherits information from the IBC merge candidate may be encoded using a filter template form that is the same as the filter template form of the IBC merge candidate.

[1150] For example, if the IBC merge candidate is not encoded using multi-model FIBC, the target block that inherits information from the IBC merge candidate may be encoded using the same filtering method (or filtering mode) as the filtering method (or filtering mode) of the IBC merge candidate.

[1151] For example, if an IBC merge candidate is encoded using multi-model FIBC, target blocks that inherit information from the IBC merge candidate may be encoded using default values.

[1152] In embodiments, the default value may be an L-shaped FIBC, or other filtering methods (or filtering modes) described in the embodiments.

[1153] In IBC merge mode, filter template shapes such as L-shape, top-only, and left-only may not be inherited from merge candidates. FIBC model information, which indicates whether multiple filter models are used, may be inherited from merge candidates.

[1154] For example, if an IBC merge candidate is encoded using L-form FIBC, a target block that inherits information from the IBC merge candidate can be encoded using L-form FIBC.

[1155] For example, if an IBC merge candidate is encoded using top-only FIBC, the target block that inherits information from the IBC merge candidate can be encoded using L-shaped FIBC.

[1156] For example, if an IBC merge candidate is encoded using a left-only FIBC, a target block that inherits information from the IBC merge candidate can be encoded using an L-shaped FIBC.

[1157] For example, if an IBC merge candidate is encoded using multi-model FIBC, a target block that inherits information from that IBC merge candidate can be encoded using multi-model FIBC.

[1158] For example, if the IBC merge candidate is not encoded using multi-model FIBC, the target block that inherits information from the IBC merge candidate may be encoded using default values.

[1159] In embodiments, the default value may be an L-shaped FIBC, or other filtering methods (or filtering modes) described in the embodiments.

[1160]

[1161] Inheritance of luma filter information in chroma DBV mode

[1162] Direct Block Vector (DBV) can be used to improve coding efficiency for luma components when dual tree is activated within an intra slice.

[1163] When dual tree is enabled within an intra slice, for a chroma block coded in DBV mode, if one of the luma blocks within the five positions is coded in IBC mode or IntraTMP mode, the block vector bvL of the luma block can be used to derive the block vector bvC of the chroma block.

[1164] The five positions may include a center position, a top-leftmost position, a top-rightmost position, a bottom-leftmost position, and a bottom-rightmost position.

[1165] The block vector scaling process can be determined based on template matching.

[1166] If the luma block is coded with RR-IBC, flip-aware BV adjustment can be performed for bvL.

[1167] Next, using the position (xCb, yCb) of the current chroma block and the block vector bvC of the current chroma block, a corresponding offset position (xCb + bvC[0], yCb + bvC[1]) can be determined. The corresponding offset position may be the position of the top-leftmost pixel of the reference block. Block copy prediction can be performed using the reference block pointed to by the offset position.

[1168] When a chroma block is encoded / decoded using DBV mode, the block vector of the luma block can be inherited by the chroma block. In this case, the target block can be a chroma component of the target block. Additionally, the chroma block can be a chroma target block that is the target of encoding / decoding.

[1169] DBV may be a chroma prediction mode that, when prediction is performed on a chroma block, if a luma block corresponding to a chroma target block is encoded / decoded using IBC or intraTMP, derives a scaled block vector by scaling a block vector used for the luma block, and uses the scaled block vector to generate a chroma prediction signal.

[1170] At this time, at least one of the information used for filtering described in the embodiments, such as whether filtering is performed, filter type, filter template type, filter coefficients, number of filter coefficient sets, and IBC filter mode, may also be inherited, along with the block vector.

[1171] When a chroma block is encoded / decoded using DBV, the block vector of the luma block may be inherited by the chroma block. At this time, along with the block vector, at least one of the information used for filtering described in the embodiments, such as ibc_filter_flag, ibc_filter_shape, ibc_filter_tpl_shape, ibc_filter_set_num, and IBC filter mode, may also be inherited.

[1172] For example, if a chroma block is encoded / decoded using DBV, and multi-models were used for the luma block corresponding to the chroma block, multi-models may also be used for the chroma block.

[1173] For example, if a chroma block is encoded / decoded using DBV, and an L-shaped template was used for the luma block corresponding to the chroma block, an L-shaped template may also be used for the chroma block.

[1174] For example, if a chroma block is encoded / decoded using DBV, and a top-only template was used for the luma block corresponding to the chroma block, a top-only template may also be used for the chroma block.

[1175] For example, if a chroma block is encoded / decoded using DBV, and a left-only template was used for the luma block corresponding to the chroma block, a left-only template may also be used for the chroma block.

[1176] If filtering using a non-IBC-LIC filter mode is not performed on the luma block corresponding to the chroma block, filtering may not be performed on the chroma block either.

[1177] When filtering using the L-shaped IBC-LIC filter mode is applied to a luma block corresponding to a chroma block, filtering using the L-shaped IBC-LIC mode can also be performed for the chroma block.

[1178] When filtering using the multi-model IBC-LIC filter mode is applied to a luma block corresponding to a chroma block, filtering using the multi-model IBC-LIC mode can also be performed for the chroma block.

[1179] When filtering using the top-only IBC-LIC filter mode is applied to a luma block corresponding to a chroma block, filtering using the top-only IBC-LIC mode can also be performed for the chroma block.

[1180] When filtering using the left-only IBC-LIC filter mode is applied to a luma block corresponding to a chroma block, filtering using the left-only IBC-LIC mode can also be performed for the chroma block.

[1181] When filtering using the L-shaped FIBC filter mode is applied to a luma block corresponding to a chroma block, filtering using the L-shaped FIBC mode can also be performed for the chroma block.

[1182] When filtering using the multi-model FIBC filter mode is applied to a luma block corresponding to a chroma block, filtering using the multi-model FIBC mode can also be performed for the chroma block.

[1183] When filtering using the top-only FIBC filter mode is applied to a luma block corresponding to a chroma block, filtering using the top-only FIBC mode can also be performed for the chroma block.

[1184] When filtering using the left-only FIBC filter mode is applied to a luma block corresponding to a chroma block, filtering using the left-only FIBC mode can also be performed for the chroma block.

[1185]

[1186] Derivation of the form of an IBC filter template using surrounding restored pixels.

[1187] In deriving the IBC filter template form, the IBC prediction signal and pixel values ​​of surrounding restored pixels of the target block can be used.

[1188] In embodiments, the restored pixels around the target block may be pixels of the filter template of the target block.

[1189] To derive the template shape, the entire region or a portion of the IBC prediction signal can be used.

[1190] The ibc_filter_tpl_shape syntax element can be used to derive the shape of an IBC filter template from pixel values ​​of an IBC reference block and surrounding reconstructed pixels of the target block.

[1191] In one embodiment, at least part of the generation of the prediction signal of step (1020) may be performed first. By performing the generation of the prediction signal of step (1020), an IBC prediction signal P of the IBC mode t can be obtained. The shape of the IBC filter template can be derived from the IBC prediction signal; and the pixel values ​​of the surrounding restored pixels of the target block.

[1192]

[1193] First embodiment of deriving a filter template form

[1194] Figure 25 illustrates a case where the values ​​of the entire block are used to calculate the difference according to an example.

[1195] Figure 26 illustrates a first case where only a region of a specific size is used for calculating the difference according to an example.

[1196] Figure 27 illustrates a second case where only a region of a specific size is used for calculating the difference according to an example.

[1197] The shape of the IBC filter template can be derived using the difference between the mean of the IBC prediction signal and the mean of the filter template of the target block.

[1198] is the average of the IBC prediction signals; and the top template T of the target block. t,Top The average of; may be the difference between.

[1199] In embodiments, the average of the template may be an average of the pixel values ​​of the pixels within the template.

[1200] In embodiments, the average of a specific object, such as a template, may be replaced with another statistical value of the specific object. The specific statistical value for the template may be a statistical value for the pixel values ​​of pixels within the template.

[1201] is the average of the IBC prediction signal; and the left template T of the target block. t,Left The average of; may be the difference between.

[1202] and If the following [Formula 22] is satisfied, the form of the filter template is T Top It could be.

[1203] [Formula 22]

[1204]

[1205] If [Formula 23] below is satisfied, the form of the filter template is T Left It could be.

[1206] [Formula 23]

[1207]

[1208] Here, each of α1, β1, α2, and β2 can be a given value. For example, α1 can be 1. α1 can be 1.2. β1 can be 0. β2 can be 0.

[1209] For example, α2 can be 1. α2 can be 1.2.

[1210] If both [Formula 22] and [Formula 23] above are not satisfied, the form of the filter template is T L-shape It could be.

[1211] In one embodiment, as illustrated in FIG. 25, the average of the IBC prediction signal may be the average value of all the IBC prediction signals. The average of the IBC prediction signal is Area A It can be the average value of the pixel values ​​of the pixels within the area. A can be the entire area within the target block.

[1212] In one embodiment, as illustrated in FIG. 26, the average of the IBC prediction signal may be the average value of a specific portion of the IBC prediction signals. The average of the IBC prediction signal may be Area L-shape It may be the average value of the pixel values ​​of the pixels within.

[1213] Area L-shape may be the sum of the top area and the left area within the target block.

[1214] For example, Area L-shape is the first distance among the pixels within the target block T It can be a distance less than or equal to . Here, size T Referring to FIG. 11, the distance value used to determine the surrounding pixels of the target block and to determine the size of the template of the target block may be the same as that used. That is, the L-shaped width of the template described in the embodiments is Area L-shape It can be the same width as the L-shaped one.

[1215] The first distance of a pixel may be the smaller of the vertical distance from the top side of the target block to the pixel and the horizontal distance from the left side of the target block to the pixel.

[1216] When the coordinates of the top-leftmost pixel of the target block are (x, y) and the width and height of the target block are (w, h), Area L-shape My pixels are, 1) x coordinate is greater than x, x + size t - less than or equal to 1; 2) y coordinate is greater than or equal to y; y + size t - less than or equal to 1, and 3) contained within the target block; may be pixels. size t can be an integer greater than or equal to 1.

[1217] In one embodiment, as illustrated in FIG. 27, When the IBC prediction signal is derived, the average of the IBC prediction signal may be the average value of a specific subset of the IBC prediction signals. That is to say, When is derived, the average of the IBC prediction signal is Area Top It may be the average value of the pixel values ​​of the pixels within.

[1218] Area Top may be the upper area within the target block.

[1219] For example, Area Top is the second distance among the pixels within the target block T It can be a distance less than or equal to . Here, size T Referring to FIG. 12, the distance value used to determine the surrounding pixels of the target block and to determine the size of the template of the target block may be the same as that used. That is, the L-shaped width of the template described in the embodiments is Area Top may be equal to the vertical length of .

[1220] The second distance of the pixel may be the vertical distance from the top surface of the target block to the pixel.

[1221] When the coordinates of the top-leftmost pixel of the target block are (x, y) and the width and height of the target block are (w, h), Area Top The pixels within are, 1) the y coordinate is greater than y; y + size t - less than or equal to 1, and 2) contained within the target block; may be pixels. size t can be an integer greater than or equal to 1.

[1222] In one embodiment, as illustrated in FIG. 27, When the IBC prediction signal is derived, the average of the IBC prediction signal may be the average value of a specific subset of the IBC prediction signals. That is to say, When is derived, the average of the IBC prediction signal is Area Left It may be the average value of the pixel values ​​of the pixels within.

[1223] Area Left may be the left area within the target block.

[1224] For example, Area Left is the third distance among the pixels within the target block T It can be a distance less than or equal to . Here, size T Referring to FIG. 13, the distance value used to determine the surrounding pixels of the target block and the size of the template of the target block may be the same as that used to determine the size of the template of the target block. That is, the L-shaped width of the template described in the embodiments is Area Top may be equal to the horizontal length of .

[1225] The third distance of a pixel may be the horizontal distance from the left side of the target block to the pixel.

[1226] When the coordinates of the top-leftmost pixel of the target block are (x, y) and the width and height of the target block are (w, h), Area Left My pixels are, 1) x coordinate is greater than x, x + size t- less than or equal to 1; 2) contained within the target block; may be pixels. size t can be an integer greater than or equal to 1.

[1227] Area described above L-shape , Area Top and Area Left Definitions and descriptions of Area are mentioned in other embodiments L-shape , Area Top and Area Left This can also be applied, and duplicate explanations can be omitted.

[1228]

[1229] Second embodiment of deriving filter template form

[1230] The shape of the IBC filter template can be derived using the difference between the mean of the IBC prediction signal and the mean of the filter template of the target block.

[1231] is the average of the IBC prediction signal; and the L-shaped template T of the target block. t,L-shape The average of; may be the difference between.

[1232] is the average of the IBC prediction signals; and the top template T of the target block. t,Top The average of; may be the difference between.

[1233] is the average of the IBC prediction signal; and the left template T of the target block. t,Left The average of; may be the difference between.

[1234] The format of the filter template is as above , and It can be determined based on the smallest mean difference among them.

[1235] For example, the smallest mean difference is If , T L-shapeIt can be used as a filter template.

[1236] For example, the smallest mean difference is If , T Top It can be used as a filter template.

[1237] For example, the smallest mean difference is If , T Left It can be used as a filter template.

[1238] In one embodiment, as described above with reference to FIG. 25, the average of the IBC prediction signal may be the average value of all the IBC prediction signals. The average of the IBC prediction signal may be Area A It may be the average value of the pixel values ​​of the pixels within.

[1239] In one embodiment, as described above with reference to FIG. 26, When the IBC prediction signal is derived, the average of the IBC prediction signal may be the average value of a specific subset of the IBC prediction signals. That is to say, When is derived, the average of the IBC prediction signal is Area L-shape It may be the average value of the pixel values ​​of the pixels within.

[1240] In one embodiment, as described above with reference to FIG. 27, When the IBC prediction signal is derived, the average of the IBC prediction signal may be the average value of a specific subset of the IBC prediction signals. That is to say, When is derived, the average of the IBC prediction signal is Area Top It may be the average value of the pixel values ​​of the pixels within.

[1241] In one embodiment, as described above with reference to FIG. 27, When the IBC prediction signal is derived, the average of the IBC prediction signal may be the average value of a specific subset of the IBC prediction signals. That is to say, When is derived, the average of the IBC prediction signal is Area LeftIt may be the average value of the pixel values ​​of the pixels within.

[1242] In embodiments, the average of a specific object, such as a template, may be replaced with another statistical value of the specific object. The specific statistical value for the template may be a statistical value for the pixel values ​​of pixels within the template.

[1243]

[1244] Third embodiment of deriving a filter template form

[1245] The shape of the IBC filter template can be derived using the difference between the histogram distribution of the IBC prediction signal and the histogram distribution of the filter template of the target block.

[1246] is the histogram distribution of the IBC prediction signal; and the top template T of the target block. t,Top The histogram distribution of ; may be the difference between

[1247] In embodiments, the histogram distribution of the template may be a histogram distribution of pixel values ​​of pixels within the template.

[1248] In embodiments, the histogram distribution of a specific object, such as a template, may be replaced with other statistical values ​​of the specific object. The specific statistical values ​​for the template may be statistical values ​​for pixel values ​​of pixels within the template.

[1249] is the histogram distribution of the IBC prediction signal; and the left template T of the target block. t,Left The histogram distribution of ; may be the difference between

[1250] and If the following [Formula 24] is satisfied, the form of the filter template is T Top It could be.

[1251] [Formula 24]

[1252] If [Formula 25] below is satisfied, the form of the filter template is T Left It could be.

[1253] [Formula 25]

[1254]

[1255] Here, each of α1, β1, α2, and β2 can be a given value. For example, α1 can be 1. α1 can be 1.2. β1 can be 0. β2 can be 0.

[1256] For example, α2 can be 1. α2 can be 1.2.

[1257] If both [Formula 24] and [Formula 25] above are not satisfied, the form of the filter template is T L-shape It could be.

[1258] In one embodiment, as illustrated in FIG. 25, the histogram distribution of the IBC prediction signal may be the histogram distribution value of the entire IBC prediction signals. The histogram distribution of the IBC prediction signal may be Area A It can be a histogram distribution value of the pixel values ​​of the pixels within the area. A can be the entire area within the target block.

[1259] In one embodiment, as illustrated in FIG. 26, the histogram distribution of the IBC prediction signal may be the histogram distribution values ​​of a specific portion of the IBC prediction signals. The histogram distribution of the IBC prediction signal may be Area L-shape It can be a histogram distribution value of the pixel values ​​of the pixels within.

[1260] In one embodiment, as illustrated in FIG. 27, When induced, the histogram distribution of the IBC prediction signal may be the histogram distribution values ​​of a specific portion of the IBC prediction signals. That is to say, When is induced, the histogram distribution of the IBC prediction signal is AreaTop It can be a histogram distribution value of the pixel values ​​of the pixels within.

[1261] In one embodiment, as illustrated in FIG. 27, When induced, the histogram distribution of the IBC prediction signal may be the histogram distribution values ​​of a specific portion of the IBC prediction signals. That is to say, When is induced, the histogram distribution of the IBC prediction signal is Area Left It can be a histogram distribution value of the pixel values ​​of the pixels within.

[1262]

[1263] A fourth embodiment of deriving a filter template form

[1264] The shape of the IBC filter template can be derived using the difference between the histogram distribution of the IBC prediction signal and the histogram distribution of the filter template of the target block.

[1265] is the histogram distribution of the IBC prediction signal; and the L-shaped template T of the target block. t,L-shape The histogram distribution of ; may be the difference between

[1266] is the histogram distribution of the IBC prediction signal; and the top template T of the target block. t,Top The histogram distribution of ; may be the difference between

[1267] is the histogram distribution of the IBC prediction signal; and the left template T of the target block. t,Left The histogram distribution of ; may be the difference between

[1268] The format of the filter template is as above , and It can be determined based on the smallest histogram distribution difference among them.

[1269] For example, the smallest histogram distribution difference is If , T L-shape It can be used as a filter template.

[1270] For example, the smallest histogram distribution difference is If , T Top It can be used as a filter template.

[1271] For example, the smallest histogram distribution difference is If , T Left It can be used as a filter template.

[1272] In one embodiment, as described above with reference to FIG. 25, the histogram distribution of the IBC prediction signal may be the histogram distribution value of the entire IBC prediction signals. The histogram distribution of the IBC prediction signal may be Area A It can be a histogram distribution value of the pixel values ​​of the pixels within.

[1273] In one embodiment, as described above with reference to FIG. 26, When induced, the histogram distribution of the IBC prediction signal may be the histogram distribution values ​​of a specific portion of the IBC prediction signals. That is to say, When is induced, the histogram distribution of the IBC prediction signal is Area L-shape It can be a histogram distribution value of the pixel values ​​of the pixels within.

[1274] In one embodiment, as described above with reference to FIG. 27, When induced, the histogram distribution of the IBC prediction signal may be the histogram distribution values ​​of a specific portion of the IBC prediction signals. That is to say, When is induced, the histogram distribution of the IBC prediction signal is Area Top It can be a histogram distribution value of the pixel values ​​of the pixels within.

[1275] In one embodiment, as described above with reference to FIG. 27, When induced, the histogram distribution of the IBC prediction signal may be the histogram distribution values ​​of a specific portion of the IBC prediction signals. That is to say, When is induced, the histogram distribution of the IBC prediction signal is Area Left It can be a histogram distribution value of the pixel values ​​of the pixels within.

[1276] In embodiments, the histogram distribution of a specific object, such as a template, may be replaced with other statistical values ​​of the specific object. The specific statistical values ​​for the template may be statistical values ​​for pixel values ​​of pixels within the template.

[1277]

[1278] Derivation of the availability of templates using block vectors

[1279] Block vector BV (BV x , BV y ) and at least one of the coordinates (x, y) of the target block can be used to derive the availability of the template. The availability of the template can be information indicating whether the template can be used.

[1280] For example, when a template is not available, IBC prediction signal filtering may not be performed.

[1281] For example, when a template is not available, ibc_filtering_flag can be derived to a second value.

[1282] In one embodiment, the filter template form T L-shape For this, the following treatments may be applied.

[1283] - Coordinates (x + BV x - size t , y + BV y - size T ) does not exist in the restored pixel value, IBC prediction signal filtering may not be performed.

[1284] - Coordinates (x + BV x - size t , y + BV y - size T ) if there is no restored pixel value, ibc_filtering_flag may be derived as a second value, i.e., IBC prediction signal filtering may not be performed.

[1285] In embodiments, the absence of restored pixel values ​​at specific coordinates may mean that the pixels at the specific coordinates have not been restored. Alternatively, the absence of restored pixel values ​​at specific coordinates may mean that the specific coordinates are not a target for restoration. In other words, the absence of restored pixel values ​​at specific coordinates may mean that the specific coordinates are not within a specific target for which restoration is performed. The absence of restored pixel values ​​at specific coordinates may mean that the specific coordinates cannot be referenced.

[1286] In one embodiment, the filter template form T Top For this, the following treatments may be applied.

[1287] - Coordinates (x + BV x - size t , y + BV y ) does not exist in the restored pixel value, IBC prediction signal filtering may not be performed.

[1288] - Coordinates (x + BV x - size t , y + BV y ) if there is no restored pixel value, ibc_filtering_flag may be derived as a second value, i.e., IBC prediction signal filtering may not be performed.

[1289] In one embodiment, the filter template form T LeftFor this, the following treatments may be applied.

[1290] - Coordinates (x + BV x , y + BV y ) does not exist in the restored pixel value, IBC prediction signal filtering may not be performed.

[1291] - Coordinates (x + BV x , y + BV y ) if there is no restored pixel value, ibc_filtering_flag may be derived as a second value, i.e., IBC prediction signal filtering may not be performed.

[1292] In other words, depending on the filter template type, the coordinates used to determine the availability of the template may change.

[1293]

[1294] Generation of IBC prediction signals

[1295] Below, the generation of the prediction signal at step (1020) is described in more detail.

[1296] The operations described below can be performed in step (1020).

[1297]

[1298] Figure 28 illustrates an intra block copy according to an example.

[1299] In one embodiment, the IBC prediction signal search process generates a prediction signal P t can be created.

[1300] If IBC mode is used for prediction of target block, BV; pred_mode_ibc_flag; general_merge_flag; merge_idx; Reconstructed Reordered Intra Block Copy; RRIBC flag; RRIBC index; Location of target block (x t_lf , y t_lf); horizontal size of the target block (xCbW); vertical size of the target block (xCbH); DBV mode; and prediction signal P of IBC mode using at least one of the components of the target block. t can be obtained. The prediction signal P in IBC mode t Other information and coding parameters described in the embodiments may be used to obtain .

[1301] In Fig. 28, IBC reference block Blk ref The prediction signal P in IBC mode t It could be.

[1302] P t For this, [Formula 26] below can be established.

[1303] [Formula 26]

[1304] P t (x, y) = Rec(x + BV x , y + BV y )

[1305] Here, (BV x , BV y ) can be a block vector. Rec(a, b) can be the reconstructed pixel value at coordinates (a, b).

[1306]

[1307] Filtering for IBC prediction signals

[1308] Below, filtering of the prediction signal at step (1030) is described in more detail.

[1309] The operations described below can be performed at step (1030).

[1310]

[1311] Overview of Filtering

[1312] Using the IBC prediction signal filtering information obtained in step (1010), the IBC prediction signal P generated in step (1020) tBy performing filtering on the filtered prediction signal P t ' can be obtained.

[1313] A filter model can be specified using IBC prediction signal filtering information.

[1314] Filter coefficients can be derived using filter model and IBC prediction signal filtering information.

[1315] IBC prediction signal P using filter model and filter coefficients t By performing filtering on the filtered prediction signal P t ' can be obtained.

[1316]

[1317] Specifics of the filter model

[1318] Below, the specifics of the filter model at step (1031) are described in more detail.

[1319] The operations described below can be performed in step (1031).

[1320] A filter model can be specified using IBC prediction signal filtering information.

[1321] A filter model may refer to a formula used to perform filtering on an IBC prediction signal.

[1322] The formula can be constructed using at least one of an IBC prediction pixel to which filtering is to be applied; surrounding pixels of the IBC prediction pixel; a bias; and a filter coefficient.

[1323] Additionally, information such as coding parameters described in the embodiments may be used to specify the filter model.

[1324] For example, a filter model can be specified using at least one of a filter shape and an IBC filter mode.

[1325] For example, a filter model can be specified using at least one of ibc_filter_shape and IBC filter mode.

[1326]

[1327] Specific filter model when a square-shaped filter is used

[1328] When the filter shape is a square of size MxN, the filter model can be specified using MxN pixels within a square surrounding the target pixel centered on the target pixel to which filtering is to be applied at coordinates (x, y), as in [Equation 27] below.

[1329] [Formula 27]

[1330]

[1331] Here, [Equation 28] and [Equation 29] below can be applied to m and n.

[1332] [Formula 28]

[1333] m = (M - 1) >> 2

[1334] [Formula 29]

[1335] n = (N - 1) >> 2

[1336] Here, c α,β and c b can be a filter coefficient. b can be a bias.

[1337] When the IBC filter mode is one of the L-shaped IBC-LIC mode; the multi-model IBC-LIC mode; the top-only IBC-LIC mode; and the left-only IBC-LIC mode, the filter model can be specified using MxN pixels in a square surrounding the target pixel, centered on the target pixel to which filtering is to be applied, having coordinates (x, y), as expressed in [Equation 27].

[1338]

[1339] A specific filter model using a 1x1 rectangular filter.

[1340] Figure 29 illustrates a 1x1 rectangular filter according to an example.

[1341] When the filter shape is a 1x1 square, as shown in Fig. 29, the filter model can be specified as in [Formula 30] below using 1x1 pixels within a square surrounding the target pixel centered on the target pixel to be filtered.

[1342] [Formula 30]

[1343] P t '(x, y) = c 0,0 P t (x, y) + c b b

[1344] Here, c 0,0 and c b can be a filter coefficient. b can be a bias.

[1345] In embodiments, the first filter model may mean a square-shaped filter where M is 1 and N is 1.

[1346] When the IBC filter mode is one of the L-shaped IBC-LIC mode; the multi-model IBC-LIC mode; the top-only IBC-LIC mode; and the left-only IBC-LIC mode, the filter model can be specified as expressed in [Equation 30] using 1x1 pixels of a square surrounding the target pixel centered on the target pixel to which filtering is to be applied, as illustrated in FIG. 29.

[1347]

[1348] A specific filter model using a 3x3 rectangular filter.

[1349] Figure 30 shows a 3x3 rectangular filter according to an example.

[1350] When the filter shape is a 3x3 square, as shown in Fig. 30, the filter model can be specified as in [Formula 31] below using 3x3 pixels within a square surrounding the target pixel centered on the target pixel to be filtered.

[1351] [Formula 31]

[1352]

[1353] Here, m and n can be 1, as derived according to [Equation 32] and [Equation 33] below.

[1354] [Formula 32]

[1355] m = (3 - 1) >> 2 = 1

[1356] [Formula 33]

[1357] n = (3 - 1) >> 2 = 1

[1358] In embodiments, the second filter model may mean a square-shaped filter where M is 3 and N is 3.

[1359] When the IBC filter mode is one of the L-shaped IBC-LIC mode; the multi-model IBC-LIC mode; the top-only IBC-LIC mode; and the left-only IBC-LIC mode, the filter model can be specified as expressed in [Equation 31] using 3x3 pixels within a rectangle surrounding the target pixel centered on the target pixel to which filtering is to be applied, as illustrated in FIG. 30.

[1360]

[1361] Specific filter model when a cross-shaped filter is used

[1362] When the filter shape is a cross of size MxN, the filter model can be specified using MxN pixels within the cross shape surrounding the target pixel centered on the target pixel to which filtering is to be applied at coordinates (x, y), as in [Equation 34] below.

[1363] [Formula 34]

[1364]

[1365] Here, [Equation 35] and [Equation 36] below can be applied to m and n.

[1366] [Formula 35]

[1367] m = (M - 1) >> 2

[1368] [Formula 36]

[1369] n = (N - 1) >> 2

[1370] Here, c α,β and c b can be a filter coefficient. b can be a bias.

[1371] When the IBC filter mode is one of the L-shaped FIBC mode; the multi-model FIBC mode; the top-only FIBC mode; and the left-only FIBC mode, the filter model can be specified using MxN pixels within a cross shape around the target pixel to which filtering is to be applied, centered on the target pixel having coordinates (x, y), as expressed in [Equation 34].

[1372]

[1373] A specific filter model using a 3x3 cross-shaped filter.

[1374] Figure 31 shows a 3x3 cross-shaped filter according to an example.

[1375] When the filter shape is a 3x3 cross shape, as shown in Fig. 31, the filter model can be specified as in [Formula 37] below using 3x3 pixels within the cross shape surrounding the target pixel to be filtered.

[1376] [Formula 37]

[1377]

[1378] Here, m and n can be 1, as derived according to [Equation 38] and [Equation 49] below.

[1379] [Formula 38]

[1380] m = (3 - 1) >> 2 = 1

[1381] [Formula 39]

[1382] n = (3 - 1) >> 2 = 1

[1383] In embodiments, the third filter model may mean a cross-shaped filter where M is 3 and N is 3.

[1384] When the IBC filter mode is one of the L-shaped FIBC mode; the multi-model FIBC mode; the top-only FIBC mode; and the left-only FIBC mode, the filter model can be specified as expressed in [Equation 37] using 3x3 pixels within a cross shape around the target pixel to which filtering is to be applied, as shown in FIG. 31.

[1385]

[1386] A specific filter model utilizing non-linear terms when a cross-shaped filter is used.

[1387] When the filter shape is a cross of size MxN, the filter model can be specified by a formula including a non-linear term, using MxN pixels within a cross shape surrounding the target pixel centered on the target pixel to which filtering is to be applied at coordinates (x, y), as in [Formula 40] below.

[1388] [Formula 40]

[1389]

[1390] Here, [Equation 41] and [Equation 42] below can be applied to m and n.

[1391] [Formula 41]

[1392] m = (M - 1) >> 2

[1393] [Formula 42]

[1394] n = (N - 1) >> 2

[1395] P t (x, y) 2may be a non-linear term.

[1396] Here, c α,β , c p and c b can be a filter coefficient. b can be a bias.

[1397] When the IBC filter mode is one of the L-shaped FIBC mode; the multi-model FIBC mode; the top-only FIBC mode; and the left-only FIBC mode, the filter model can be specified by an equation including a non-linear term, using MxN pixels within a cross shape around the target pixel to which filtering is to be applied, centered on the target pixel having coordinates (x, y), as expressed in [Equation 40].

[1398]

[1399] A specific filter model using a 3x3 cross-shaped filter and a non-linear term.

[1400] When the filter shape is a 3x3 cross shape, as illustrated in Fig. 31, the filter model can be specified by an equation including a non-linear term such as [Equation 43] below, using 3x3 pixels within the cross shape surrounding the target pixel to be filtered.

[1401] [Formula 43]

[1402]

[1403] Here, m and n can be 1, as derived according to [Equation 44] and [Equation 45] below.

[1404] [Formula 44]

[1405] m = (3 - 1) >> 2 = 1

[1406] [Formula 45]

[1407] n = (3 - 1) >> 2 = 1

[1408] P t (x, y) 2may be a non-linear term.

[1409] Here, c α,β , c p and c b can be a filter coefficient. b can be a bias.

[1410] In the embodiments, the fourth filter model may mean a cross-shaped filter in which M is 3, N is 3, and a non-linear term is used.

[1411] When the IBC filter mode is one of the L-shaped FIBC mode; the multi-model FIBC mode; the top-only FIBC mode; and the left-only FIBC mode, the filter model can be specified by an equation including a non-linear term, using MxN pixels within a cross shape around the target pixel to which filtering is to be applied, centered on the target pixel having coordinates (x, y), as expressed in [Equation 43].

[1412]

[1413] Obtaining filtering coefficients

[1414] Below, the acquisition of the filtering coefficients in step (1032) is described in more detail.

[1415] The operations described below can be performed at step (1032).

[1416] IBC Reference Block Template T ref The resulting value can be derived by applying the IBC filter model to the pixel values ​​of the pixels within. The filter coefficient set of the IBC filter model is the derived resulting value; and the target block template T t The pixel values ​​of the corresponding pixels within; can be derived to have the best correlation (or similarity).

[1417] Here, IBC Reference Block Template T ref can be a template for a reference block. Target block template T tcan be a template for the target block.

[1418] IBC Reference Block Template T ref My first pixel and target block template T t The second pixel in my image can correspond to each other. The IBC reference block template T of the first pixel ref Coordinates within and target block template T of the second pixel t If the coordinates within are the same, the first pixel and the second pixel can be considered to correspond to each other.

[1419] In deriving the filter coefficient, the filter coefficient derivation method of IBC-LIC and the filter coefficient derivation method of FIBC can be used.

[1420] As a set of filter coefficients of the embodiments, one filter coefficient set FilterSet or multiple filter coefficient sets FilterSet n This can be derived.

[1421] FilterSet is c α,β , c p and c b There can be at least one of them.

[1422] FilterSet n Is , and There can be at least one of them.

[1423] For example, if one set of filter coefficients is used, the IBC reference block template T ref For pixel values ​​of all pixels in the IBC reference block template T ref The resulting value derived by applying the IBC filter model to the pixel value of the pixel of the target block template T t The filter coefficients can be derived to have the best correlation (or similarity) with the pixel values ​​of the corresponding pixels within the filter. The filter coefficients are c α,β , c p and c bThere can be at least one of them.

[1424] For example, when two filter coefficient sets (FilterSet1, FilterSet2) are used, the filter coefficients for pixels with values ​​smaller than the threshold (Thres) , and A first filter coefficient set including at least one of; and filter coefficients for pixels having a value greater than a threshold value (Thres). , and A second filter coefficient set including at least one of; can be derived.

[1425] For example, if two sets of filter coefficients are used, the threshold value may be the average value of the pixels included within the filter template.

[1426] For example, if three filter coefficient sets (FilterSet1, FilterSet2, FilterSet3) are used, the first filter coefficient set, the second filter coefficient set, and the third filter coefficient set can be derived using two threshold values ​​(Thres0, Thres1) as a reference.

[1427] Here, Thres1 can be greater than Thres0.

[1428] For example, Thres0 could mean the first threshold value. Thres1 could mean the second threshold value.

[1429] For example, the first filter coefficient set is the filter coefficients for pixels satisfying [Equation 46] below. , and It may be a set of filter coefficients including at least one of:

[1430] [Formula 46]

[1431] P t (x, y) ≤ Thres0

[1432] For example, the second filter coefficient set is the filter coefficients for pixels satisfying [Equation 47] below. , and It may be a set of filter coefficients including at least one of:

[1433] [Formula 47]

[1434] Thres0< P t (x, y) ≤ Thres1

[1435] For example, the third filter coefficient set is the filter coefficients for pixels satisfying [Equation 48] below. , and It may be a set of filter coefficients including at least one of:

[1436] [Formula 48]

[1437] P t (x, y) > Thres1

[1438] When there are N pixels included in the filter template, the N pixels can be sorted in ascending order of their pixel values. Among the N pixels sorted in ascending order, the pixel value of the N / 3-th pixel can be set to Thres0. The pixel value of the 2N / 3-th pixel can be set to Thres1. In other words, when the pixels in the filter template are sorted in ascending order of their pixel values, Thres0 and Thres0 can be values ​​of two points that divide the sorted pixels into three equal parts.

[1439]

[1440] Performing filtering

[1441] Below, the performance of filtering in step (1033) is described in more detail.

[1442] The operations described below can be performed at step (1033).

[1443]

[1444] Filtering of IBC prediction signals using the first filter model and one set of filter coefficients.

[1445] In one embodiment, IBC prediction signal filtering can be performed using a first filter model and one set of filter coefficients.

[1446] P t (x, y) may mean the pixel value of the IBC prediction signal at coordinates (x, y).

[1447] P t '(x, y) is P t It can mean the filtered pixel value derived by applying filtering to (x, y).

[1448] In the examples, P t '(x, y) can be obtained by [Formula 49] below.

[1449] [Formula 49]

[1450] P t '(x, y) = c 0,0 P t (x, y) + c b b

[1451] At this time, the filter coefficient set FilterSet is {c 0,0 , c b} may be.

[1452]

[1453] IBC prediction signal filtering using the first filter model and two sets of filter coefficients.

[1454] In one embodiment, IBC prediction signal filtering can be performed using a first filter model and two sets of filter coefficients.

[1455] P t (x, y) may mean the pixel value of the IBC prediction signal at coordinates (x, y).

[1456] P t '(x, y) is Pt It can mean the filtered pixel value derived by applying filtering to (x, y).

[1457] P t '(x, y) can be obtained by [Formula 50] and [Formula 51] below.

[1458] [Formula 50]

[1459]

[1460] [Formula 51]

[1461]

[1462] At this time, the first filter coefficient set FilterSet1 is { , } can be. The first filter coefficient set FilterSet2 is { , } may be.

[1463]

[1464] Filtering of IBC prediction signals using a second filter model and one set of filter coefficients.

[1465] In one embodiment, IBC prediction signal filtering can be performed using a second filter model and one set of filter coefficients.

[1466] P t (x, y) may mean the pixel value of the IBC prediction signal at coordinates (x, y).

[1467] P t '(x, y) is P t It can mean the filtered pixel value derived by applying filtering to (x, y).

[1468] In the examples,...

Claims

1. A step of obtaining prediction signal filtering information; a step of generating a prediction signal; and A step of performing filtering on the prediction signal based on the above prediction signal filtering information. A decryption method including:

2. In paragraph 1, A decryption method wherein the above prediction signal is an IBC prediction signal generated by Intra Block Copy (IBC).

3. In paragraph 1, The step of performing the filtering on the prediction signal based on the above prediction signal filtering information is: Step of specifying a filter model; A step of obtaining a filtering coefficient according to the above filter model; and A step of performing the filtering on the prediction signal based on the filtering coefficient. A decryption method including:

4. In paragraph 1, The above filtering is a decryption method performed using a filter template.

5. In paragraph 4, A decryption method in which a filter template is selected from a plurality of filter templates having different shapes.

6. In paragraph 4, A decoding method in which the shape of the filter template is derived based on the above prediction signal.

7. In paragraph 1, A decoding method in which multiple filter coefficient sets are used for the above filtering.

8. Step of obtaining prediction signal filtering information; a step of generating a prediction signal; and A step of performing filtering on the prediction signal based on the above prediction signal filtering information. An encoding method including:

9. In paragraph 8, An encoding method wherein the above prediction signal is an IBC prediction signal generated by Intra Block Copy (IBC).

10. In paragraph 8, The step of performing the filtering on the prediction signal based on the above prediction signal filtering information is: Step of specifying a filter model; A step of obtaining a filtering coefficient according to the above filter model; and A step of performing the filtering on the prediction signal based on the filtering coefficient. An encoding method including:

11. In paragraph 8, The above filtering is an encoding method performed using a filter template.

12. In paragraph 11, An encoding method in which a filter template is selected from a plurality of filter templates having different shapes.

13. In paragraph 11, An encoding method in which the shape of the filter template is derived based on the above prediction signal.

14. A computer-readable recording medium storing a bitstream generated by the encoding method of Article 8.

15. A computer-readable recording medium storing a bitstream for video decoding, wherein the bitstream comprises: Predictive signal filtering information Including, A prediction signal is generated, A computer-readable recording medium in which filtering is performed on the prediction signal based on the above prediction signal filtering information.

16. In paragraph 1, A computer-readable recording medium wherein the above prediction signal is an IBC prediction signal generated by an intra block copy (IBC).

17. In paragraph 15, A computer-readable recording medium wherein the filtering of the prediction signal, which is performed based on the prediction signal filtering information, includes specifying a filter model, obtaining a filtering coefficient according to the filter model, and performing the filtering of the prediction signal based on the filtering coefficient.

18. In paragraph 15, A computer-readable recording medium in which the above filtering is performed using a filter template.

19. In Article 18, A computer-readable recording medium in which a filter template is selected from a plurality of filter templates having different shapes.

20. In paragraph 18, A computer-readable recording medium in which the shape of the filter template is derived based on the above prediction signal.

Citation Information

Patent Citations

  • Methods and apparatus for adaptive filtering of prediction pixels for chroma components in video encoding and decoding

    KR101757947B1

  • Image encoding method and apparatus, and image decoding method and apparatus

    KR1020180093950A

  • Aligning module and substrate processing system having the same

    KR1020210026270A

  • Method and device for intra prediction in a video coding system

    KR102160667B1