Image encoding / decoding method and device using mapping model adjustment-offset, and bitstream storage medium
The method addresses redundancy in image encoding/decoding by using a mapping model to reduce signaling bits, enhancing efficiency and reducing costs for high-resolution images.
Patent Information
- Application Number
- PCT/KR2025/000666
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-08
- Filing Date
- 2025-01-10
- Publication Date
- 2025-07-17
AI Technical Summary
Existing image encoding/decoding methods face limitations in improving encoding efficiency due to redundancy between luminance and chrominance component samples and within target blocks, leading to increased transmission and storage costs for high-resolution, high-quality images.
A method and device that utilize a mapping model to reduce signaling bits by leveraging redundancy between samples through model-based prediction, including constructing a sample set, applying a mapping model to a target block, and performing entropy encoding/decoding.
Improves encoding/decoding efficiency by reducing signaling bits and optimizing the encoding process for high-resolution, high-quality images, thereby decreasing transmission and storage costs.
Smart Images

Figure KR2025000666_17072025_PF_FP_ABST
Abstract
Description
Mapping model adjustment-offset-based video encoding / decoding method, device, and bitstream storage medium
[0001] The present disclosure relates to a method and device for encoding / decoding an image, and more particularly, to a method and device for encoding / decoding an image including a weighted sum of prediction blocks.
[0002] Recently, the demand for high-resolution, high-quality images, such as HD (High Definition) and UHD (Ultra High Definition) images, is increasing across various application fields. As image data becomes higher in resolution and quality, the relative amount of data increases compared to conventional image data. Therefore, transmitting image data using existing media such as wired or wireless broadband lines or storing it using existing storage media leads to increased transmission and storage costs. To address these issues arising as image data becomes higher in resolution and quality, highly efficient image encoding / decoding technologies for higher-resolution and higher-quality images are required.
[0003] There are various technologies for image compression, such as inter-picture prediction technology that predicts pixel values included in the current picture from pictures before or after the current picture, intra-picture prediction technology that predicts pixel values included in the current picture using pixel information in the current picture, transformation and quantization technology for compressing the energy of the residual signal, and entropy coding technology that assigns short codes to values with high frequency of appearance and long codes to values with low frequency of appearance. Using these image compression technologies, image data can be effectively compressed and transmitted or stored.
[0004] In conventional image encoding / decoding methods and devices, there is a limit to improving encoding efficiency because there is redundancy of information between luminance component samples and chrominance component samples; between surrounding samples of a target block and samples within the target block;
[0005] Accordingly, the present disclosure can provide a method and device for reducing signaling bits by utilizing redundancy of information between samples through model-based prediction to improve encoding / decoding efficiency of an image.
[0006] One embodiment of the present disclosure may be a video encoding method and device characterized by performing the steps of constructing a sample set and deriving a mapping model; applying the mapping model to a target block; and entropy encoding / decoding encoding information.
[0007] The video encoding / decoding method and the method for transmitting a bitstream of the present disclosure include the steps of generating a candidate list of a current block, the step of rearranging the candidate list based on a matching cost, the step of obtaining prediction information of the current block from the rearranged candidate list, and the step of performing prediction of the current block based on the prediction information of the current block, wherein the candidate list may include at least one of a spatial candidate, a temporal candidate, a history-based candidate, and a default candidate of the current block.
[0008] In the video encoding / decoding method and the method for transmitting a bitstream of the present disclosure, the spatial candidate may include an adjacent spatial candidate adjacent to the current block and a non-adjacent spatial candidate non-adjacent to the current block.
[0009] In the video encoding / decoding method and the bitstream transmitting method of the present disclosure, the non-adjacent spatial candidate can be determined based on the width and height of the current block.
[0010] In the video encoding / decoding method and the method for transmitting a bitstream of the present disclosure, the non-adjacent spatial candidate may be a block spaced apart from the specific location by N times the unit distance in the horizontal or vertical direction.
[0011] In the video encoding / decoding method and the method for transmitting a bitstream of the present disclosure, the temporal candidate can be obtained from a block at a shifted position of the temporal block of the current block.
[0012] In the video encoding / decoding method and the bitstream transmitting method of the present disclosure, the temporal block can be determined by a motion vector of a spatially adjacent block of the current block.
[0013] In the video encoding / decoding method and the method for transmitting a bitstream of the present disclosure, the history-based candidate can be obtained using a table that accumulates and stores prediction information prior to the current block.
[0014] In the video encoding / decoding method and the method for transmitting a bitstream of the present disclosure, the prediction of the current block can be performed by a weighted sum of a first prediction block obtained based on a first mapping model and a second prediction block obtained based on a second mapping model.
[0015] In the video encoding / decoding method and the bitstream transmitting method of the present disclosure, the first mapping model may be included in the prediction information of the current block obtained from the candidate list of the current block.
[0016] The present disclosure can provide a method and device for reducing signaling bits by utilizing redundancy of information between samples through model-based prediction to improve encoding / decoding efficiency of an image.
[0017] Figure 1 illustrates a system for video coding according to one embodiment.
[0018] Figure 2 shows a segmentation structure of an image according to one embodiment.
[0019] Figure 3 illustrates the structure of intra prediction according to one embodiment.
[0020] Figure 4 shows the structure of inter prediction to explain the inter prediction process according to one embodiment.
[0021] Figure 5 shows the order in which spatial candidates are added to the candidate list according to one embodiment.
[0022] Figure 6 illustrates multiple in-loop filters according to an example.
[0023] Figure 7 shows the structure of entropy encoding and entropy decoding according to an example.
[0024] Figure 8 shows examples of segmentation boundaries in geometric segmentation mode.
[0025] Figure 9 is a drawing for explaining the division boundary, division offset, and division angle in geometric division mode.
[0026] FIG. 10 is an embodiment showing a weight map used for each prediction block according to a specified segmentation boundary.
[0027] Figure 11 is a diagram of one embodiment of template matching.
[0028] Figure 12 shows various examples of subsampling methods.
[0029] Figure 13 shows various examples of subsampling methods.
[0030] Figures 14 to 19 each illustrate a search method in template matching, for example.
[0031] Figure 20 illustrates a first template configuration method in affine mode according to an example.
[0032] Figure 21 illustrates a second template configuration method in affine mode according to an example.
[0033] Figure 22 shows an example of a surrounding block of a target block.
[0034] Figure 23 illustrates bilateral matching according to an example.
[0035] FIGS. 24A and 24B are flowcharts of an encoding method for a target block according to one embodiment.
[0036] FIGS. 25A and 25B are flowcharts of a decryption method for a target block according to one embodiment.
[0037] Figure 26 is a diagram showing a reference area in a model-based prediction method according to an example.
[0038] Figure 27 is a drawing to explain a specific location.
[0039] FIG. 28 is an embodiment for describing the surrounding samples within the target block and BOUND_LINE_NUM rows / columns and the samples within BOUND_LINE_NUM rows / columns within the target block.
[0040] FIG. 29 is an embodiment of determining whether to use an upper-direction peripheral sample for configuring at least one of an independent sample set, a dependent sample set, and a target sample set based on a sample value of at least one of the peripheral samples within two adjacent rows / columns and / or at least one of the samples within two rows / columns within the target block, for an upper-direction boundary surface of the target block.
[0041] Figure 30 shows the positions of luminance components and surrounding components corresponding to CHROMA_PIX.
[0042] Figure 31 shows an example of a 3x3 sized low-pass filter for prediction sample correction.
[0043] Figure 32 shows luminance component samples and surrounding samples.
[0044] Figure 33 is a block diagram showing the configuration according to one embodiment of an encoding device to which the present invention is applied.
[0045] Figure 34 is a block diagram showing the configuration according to one embodiment of a decryption device to which the present invention is applied.
[0046] Figure 35 is a diagram schematically showing the division structure of an image when encoding and decoding an image.
[0047] Figure 36 is a drawing for explaining an embodiment of an on-screen prediction process.
[0048] Figure 37 is a diagram for explaining an embodiment of a screen-to-screen prediction process.
[0049] Figure 38 is a diagram for explaining the process of transformation and quantization.
[0050] Figure 39 illustrates embodiments representing segmentation boundaries in geometric segmentation mode.
[0051] Figure 40 is a drawing showing the division boundary, division offset, and division angle in geometric division mode.
[0052] Figure 41 illustrates an embodiment of a weight map used for each prediction block according to a geometric segmentation boundary.
[0053] Figure 42 is a diagram of one embodiment of template matching.
[0054] Figure 43 illustrates a method for subsampling a search area of template matching.
[0055] Figure 44 illustrates a subsampling method for a template of template matching.
[0056] FIGS. 45 to 50 each illustrate a search method in template matching according to one embodiment.
[0057] FIG. 51 illustrates a first template configuration method in affine mode according to one embodiment.
[0058] Figure 52 illustrates a second template configuration method in affine mode according to an example.
[0059] Figure 53 illustrates various examples of subsampling methods in two-sided matching.
[0060] Figure 54 illustrates bilateral matching according to one embodiment.
[0061] Figure 55 is a flowchart of an encoding method for a target block according to one embodiment.
[0062] Figure 56 is a flowchart of a decryption method for a target block according to one embodiment.
[0063] Figure 57 is a flowchart of a decryption method for a target block according to one embodiment.
[0064] Figure 58 illustrates an embodiment for a first input structure and a second input structure.
[0065] Figure 59 is a drawing to explain a specific location.
[0066] Figure 60 illustrates the reference area used to derive the mapping model.
[0067] Figure 61 shows samples of the calculation of the mapping model output.
[0068] Figure 62 is a diagram for explaining the surrounding samples within the target block and BOUND_LINE_NUM rows / columns and the samples within BOUND_LINE_NUM rows / columns within the target block.
[0069] FIG. 63 illustrates an embodiment of determining whether to use upper peripheral samples in constructing various sample sets based on at least one of peripheral samples within the upper two rows / columns of a target block or samples within two rows / columns within the target block.
[0070] Figure 64 is a diagram showing non-adjacent blocks of the current block.
[0071] Figure 65 illustrates a filter based on the luminance component position.
[0072] Figure 66 shows an example of a 3x3 sized low-pass filter for prediction sample correction.
[0073] Figure 67 is a reference drawing for the convenience of explaining the mapping model function.
[0074] Figure 68 illustrates a first luminance component sample and surrounding samples.
[0075] FIG. 69 illustrates a first embodiment for generating a reference block when a motion vector (or block vector) indicates an integer-pixel position.
[0076] FIG. 70 illustrates a second embodiment for generating a reference block when a motion vector (or block vector) indicates a sub-pixel location.
[0077] The present invention is capable of various modifications. Furthermore, the present invention may have various embodiments. Specific embodiments are described in detail in the drawings and detailed description.
[0078] 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.
[0079] 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.
[0080] 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.
[0081] 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.
[0082] 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.
[0083] 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.
[0084] 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.
[0085] 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.
[0086] 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.
[0087] 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.
[0088]
[0089] Interchange between terms in the examples
[0090] 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.
[0091] - 'one or more', 'at least one'
[0092] - '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'.)
[0093] - 'Information', 'Signal'
[0094] - 'value', 'predefined value', 'specific value', 'threshold', 'threshold value', 'baseline value', 'reference value'
[0095] - 'statistical value', 'statistics value'
[0096] - 'indicator', 'index', 'index', 'flag', 'information'
[0097] - 'encoder', 'encoding apparatus'
[0098] - 'decoder', 'decoding apparatus'
[0099] - 'Entropy encoding', 'encoding', 'encoding'
[0100] - 'Entropy decryption', 'decoding', 'decoding'
[0101] - 'coding', 'encoding and / or decoding'
[0102] - 'video', 'moving picture', 'image', 'picture', 'frame', 'screen'
[0103] - 'Reference picture', 'Reference video'
[0104] - 'Reference Picture List (RPL),' 'Reference Image List'
[0105] - 'original', 'input', 'source'
[0106] - 'Block', 'Unit', 'Signal'
[0107] - 'square', 'square shape'
[0108] - 'pixel', 'pixels', 'samples', 'pels'
[0109] - 'region', 'area', 'part', 'segment'
[0110] - 'partition', 'split', 'divide'
[0111] - 'quad', 'quarternary'
[0112] - 'luma component', 'luma', 'luminance component', 'luminance', 'Y'
[0113] - 'chroma component', 'chroma', 'chrominance', 'chrominance component', 'Cb and Cr', 'Cb or Cr', 'Cb', 'Cr', 'U and V', 'U or V', 'U', 'V'
[0114] - 'target', 'current' (e.g. target block and current block, or target image and current image)
[0115] - 'neighbor', 'neighboring', 'adjacent', 'neighbor / neighboring' (e.g., neighboring block, adjacent block, and surrounding block)
[0116] - 'collocated', 'collected'
[0117] - 'reconstruction', 'reconstruction', 'decoding'
[0118] - 'reconstructed', 'reconstructed', 'decoded'
[0119] - 'difference', 'difference', 'difference', 'error', 'residual', 'residual'
[0120] - Largest Coding Unit (LCU), Coding Tree Unit (CTU)
[0121] - 'inter', 'inter-screen'
[0122] - 'Inter prediction', 'inter prediction', 'motion compensation'
[0123] - 'Inter mode', 'Inter prediction mode', 'Inter-screen mode', 'Inter-screen prediction mode'
[0124] - 'Motion vector', 'Predicted motion vector', 'Advanced Motion Vector Prediction (AMVP)'
[0125] - 'list', 'candidate list'
[0126] - 'Spatial candidate', 'Spatial merge candidate'
[0127] - 'Temporal candidate', 'Temporal merge candidate'
[0128] - 'Prediction motion vector candidate', 'motion vector predictor'
[0129] - 'Prediction method', 'Prediction mode'
[0130] - 'Intra', 'Intra'
[0131] - 'Intra prediction', 'Intra prediction'
[0132] - 'Intra mode', 'Intra prediction mode'
[0133] - 'Dequantization', 'scaling'
[0134] - 'Quantization matrix', 'Scaling list'
[0135] - 'Quantization matrix coefficients', 'matrix coefficients'
[0136] - 'Transform coefficient level', 'quantized level', 'quantized coefficient', 'quantized transform coefficient', 'quantized transform coefficient level'
[0137] - 'Dequantized coefficient', 'dequantized transform coefficient'
[0138] - 'Scanning type', 'Scanning direction'
[0139] - 'Directional mode', 'Angle mode', 'Angular mode', 'Intra prediction mode'
[0140] - '(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'
[0141] - 'Merge Mode', 'Movement Merge Mode'
[0142] - 'Geometric Partitioning Mode (GPM)', 'Triangle Partitioning Mode'
[0143] 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.
[0144]
[0145] The range of information and values of information described in the examples
[0146] 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'.
[0147] Information can have one of multiple values. 'n-th value' can mean the nth value among multiple values.
[0148] 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.
[0149] 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.
[0150] 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.
[0151]
[0152] Coding related concepts
[0153] Below, concepts related to coding are described. The descriptions disclosed below can be applied to embodiments.
[0154] 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'.
[0155] 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."
[0156] 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.
[0157] - 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.
[0158] Coding: Coding can mean encoding and / or decoding of images.
[0159] 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.
[0160] 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."
[0161] - A picture can mean the entire picture, or it can mean a part of a picture, such as a block.
[0162] 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.
[0163] Subpicture: A picture can be divided into one or more subpictures.
[0164] - A subpicture may be a square or rectangular area within a picture. A subpicture may contain one or more CTUs.
[0165] - 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.
[0166] - 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.
[0167] 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.
[0168] 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.
[0169] CTU: An image can be divided into multiple coding tree units (CTUs).
[0170] - 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.
[0171] - 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.
[0172] CTB: CTB can refer to one of Y CTB, Cb CTB, and Cr CTB.
[0173] 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.
[0174] - 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.
[0175] - 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.
[0176] - A unit can contain syntax elements. In other words, a block and its syntax elements can be combined to form a unit.
[0177] - 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.
[0178] - 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.
[0179] - 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.
[0180] - 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.
[0181] - Unit information may include unit type, unit size, unit depth, unit encoding order, and unit decoding order.
[0182] 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.
[0183] 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.
[0184] - 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.
[0185] - 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.
[0186] - 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.
[0187] 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.
[0188] 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.
[0189] - 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.
[0190] 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.
[0191] - 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.
[0192] Parameter set: A parameter set may correspond to header information among the structures within a bitstream.
[0193] - 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).
[0194] - 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.
[0195] - 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.
[0196] MPM (Most Probable Mode): MPM can indicate the intra prediction mode that is likely to be used for intra prediction for the target block.
[0197] - 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.
[0198] - 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.
[0199] MPM List: An MPM list may contain one or more MPMs. The number of MPMs in an MPM list may be predefined.
[0200] 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.
[0201] MPM Usage Directive: The MPM usage directive can indicate whether the MPM list is used for prediction on the target block.
[0202] 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.
[0203] Reference image list: The reference image list may be a list containing one or more reference images used for prediction for the target block.
[0204] - There may be multiple reference image lists. Multiple reference image lists may include List 0 (L0), List 1 (L1), etc.
[0205] - 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.
[0206] 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.
[0207] 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.
[0208] 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.
[0209] Reference sample: A reference sample may be a sample that is referenced for encoding / decoding of a target block, such as prediction and filtering.
[0210] 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.
[0211] 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.
[0212] - 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'.
[0213] 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.
[0214] - 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.
[0215] - 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.
[0216] Picture Order Count (POC): The POC of a picture can indicate the display order or output order of the picture.
[0217] 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.
[0218] - 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.
[0219] 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.
[0220] - 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.
[0221] -The zero vector can be (0, 0) MV.
[0222] 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.
[0223] - 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.
[0224] -The zero vector can be (0, 0) BV.
[0225] 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.
[0226] 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.
[0227] Motion information candidate list: The motion information candidate list may mean a list constructed using one or more motion information candidates.
[0228] 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.
[0229] - 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.
[0230] - 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.
[0231] - 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.
[0232] 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.
[0233] 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.
[0234] - 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.
[0235] Merge Candidate List: A merge candidate list may be a list constructed using one or more merge candidates.
[0236] 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.
[0237] 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.
[0238] Spatial neighboring blocks: Spatial neighboring blocks can be blocks that are spatially adjacent to the target block.
[0239] - The target block and spatial neighboring blocks can be included within the target image.
[0240] - 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.
[0241] - A spatial neighboring block may include a block diagonally adjacent to a vertex of the target block.
[0242] - 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.
[0243] Temporal neighboring blocks: Temporal neighboring blocks can be blocks that are temporally adjacent to the target block.
[0244] - 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.
[0245] - 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.
[0246] - 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.
[0247] - 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.
[0248] - A temporal neighboring block may be a block that is temporally adjacent to a spatial neighboring block of the target block.
[0249] 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.
[0250] 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.
[0251] Quantized level: A quantized level can be an integer quantity used as input to dequantization.
[0252] 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.
[0253] 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.
[0254] 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.
[0255] 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.
[0256] 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.
[0257] Quantization matrix coefficients: Quantization matrix coefficients can be each element within a quantization matrix.
[0258] 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.
[0259] 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.
[0260] 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.
[0261] 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.
[0262] - 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.
[0263] - 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.
[0264] - 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.
[0265] 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).
[0266] 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.
[0267] 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.
[0268] 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.
[0269] - 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.
[0270] Entropy decoding: Entropy decoding can reverse the processes performed in entropy encoding. Symbols can be generated by entropy decoding a bitstream.
[0271] 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.
[0272] 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.
[0273]
[0274] Coding parameters
[0275] 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.
[0276] 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.
[0277] 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.
[0278] 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.
[0279] 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.
[0280] 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.”
[0281] 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.”
[0282] 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.
[0283] 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.”
[0284] 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.”
[0285]
[0286] System for video coding
[0287] Figure 1 illustrates a system for video coding according to one embodiment.
[0288] The system (100) may include at least one of an encoding device (110) and a decoding device (150).
[0289] Each of the encoding device (110) and the decoding device (150) may be a computer or an electronic apparatus.
[0290]
[0291] Structure of the encoding device
[0292] The encoding device (110) may include a processor (120), storage (140), and a communicator (149).
[0293] The processor (120), storage (140), and communication device (149) can be connected via a bus.
[0294] 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.
[0295] 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.
[0296] 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).
[0297] 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).
[0298] 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.
[0299] 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).
[0300] 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).
[0301] 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.
[0302]
[0303] Operation of the encoding device
[0304] The encoding device (110) can sequentially encode one or more images of a video.
[0305] The storage (140) can store the original image. The original image can be used as a target image in the encoding device (110).
[0306] 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).
[0307] The segmenter (122) can determine a target block by performing segmentation on the target image.
[0308] 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.
[0309] 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.
[0310] 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.
[0311] 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.
[0312] 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.
[0313] 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.
[0314] The transformer (125) can perform a transformation on the residual block to generate transformation coefficients.
[0315] The converter (125) can perform the conversion using one of a plurality of conversion methods.
[0316] 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.
[0317] 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.
[0318] 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.
[0319] 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.
[0320] Information for decoding an image may include quantized levels and syntax elements produced by a quantizer (126).
[0321] The probability distribution can be determined based on the quantized levels and coding parameters.
[0322] 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.
[0323] 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.
[0324] The dequantizer (127) can generate dequantized transform coefficients by performing dequantization on the quantized level.
[0325] 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.
[0326] The adder (129) can generate a restored block by combining a predicted block and a restored residual block.
[0327] 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.
[0328] 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.
[0329] 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).
[0330]
[0331] Structure of the decryption device
[0332] The decryption device (150) may include a processor (160), a storage (180), and a communication device (189).
[0333] 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.
[0334] 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).
[0335] The storage (180) may include a reference picture buffer (181).
[0336] 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).
[0337] 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.
[0338]
[0339] Operation of the decryption device
[0340] 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).
[0341] 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).
[0342] The processor (160) can obtain a bitstream from a storage (180) or a computer-readable recording medium.
[0343] A bitstream may contain encoded information.
[0344] 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.
[0345] Information for decoding an image may include quantized levels and syntax elements.
[0346] 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.
[0347] The entropy decoder (161) can provide syntax elements to other components of the processor (160), such as the segmenter (162).
[0348]
[0349] A common description of the relationship between the components of the encoding device and the components of the decoding device.
[0350] 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.
[0351] 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.
[0352] 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).
[0353]
[0354] Division of the units that make up the image
[0355] Figure 2 shows a segmentation structure of an image according to one embodiment.
[0356] Figure 2 can schematically represent an example in which one unit is divided into multiple sub-units.
[0357] 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.
[0358] 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).
[0359] 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.
[0360] 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.
[0361] 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.
[0362] 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.
[0363] 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'.
[0364] 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.
[0365] 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.
[0366] 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.
[0367] 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.
[0368] 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.
[0369] 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.
[0370] 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.
[0371] 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.
[0372] 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.
[0373] 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.
[0374] 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.
[0375] Here, each of the aforementioned split direction information and split type information may be a flag having a specific length (e.g., 1 bit).
[0376] The CU's partition information may also include QT partition information, partition direction information, and partition shape information.
[0377] 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.
[0378] 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.
[0379] 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.
[0380] 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.
[0381] 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.
[0382] 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.
[0383] 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.
[0384] 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.
[0385] 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.
[0386]
[0387] Processing blocks according to their properties
[0388] 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.
[0389] The blocks to which the specific processing described in the examples is applied may have a square shape or a non-square shape.
[0390] 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.
[0391] 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.
[0392] In one embodiment, a minimum block size and / or a maximum block size for a particular process may be predefined.
[0393] 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.
[0394] 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.
[0395] In one embodiment, the processing of the embodiment may be applied / performed only when the block size is a predefined block size.
[0396] 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.
[0397] 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.
[0398] 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.
[0399]
[0400] Predictive information for prediction
[0401] Prediction information can be used to generate a prediction block for the target block.
[0402] 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.
[0403] 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.
[0404]
[0405] Intra prediction
[0406] Figure 3 illustrates the structure of intra prediction according to one embodiment.
[0407] 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.
[0408] 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.
[0409] 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.
[0410] 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.
[0411] 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.
[0412] 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.
[0413] 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.
[0414] 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.
[0415] 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).
[0416] 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.
[0417] 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.
[0418] 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.
[0419] 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.
[0420] 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.
[0421] 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.
[0422] 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.
[0423] 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.
[0424] 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.
[0425] 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.
[0426] 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.
[0427] 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.
[0428] 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.
[0429] 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.
[0430] 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.
[0431] Instead of obtaining samples from the reconstructed neighboring blocks, samples of segment A and segment F can be derived using padding using the nearest samples from segment B and segment E, respectively.
[0432] 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.
[0433] 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.
[0434] 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.
[0435] 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.
[0436] 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.
[0437] 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.
[0438] 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.
[0439] 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 represents a space between two reference samples, an interpolated sample value can be generated based on the sample values of the two samples.
[0440]
[0441] Inter prediction
[0442] Figure 4 shows the structure of inter prediction to explain the inter prediction process according to one embodiment.
[0443] The rectangle illustrated in Fig. 4 can represent an image. Additionally, the arrow in Fig. 4 can represent a prediction direction.
[0444] 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.
[0445] 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.
[0446] 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.
[0447] 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.
[0448] 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.
[0449] Below, inter prediction for a target block in inter mode according to an embodiment is specifically described.
[0450] 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.
[0451] 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.
[0452] 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.
[0453] 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.
[0454] 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.
[0455] A spatial candidate may be a restored spatial neighboring block that is spatially adjacent to the target block.
[0456] 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.
[0457] 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.
[0458] A temporal candidate may be a restored temporal neighboring block corresponding to a target block in a restored COL image.
[0459] 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.
[0460] 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.
[0461] A temporal candidate may be a location inside and / or outside a call block within a call image.
[0462] 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.
[0463] 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.
[0464] 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.
[0465] 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.
[0466]
[0467] AMVP mode
[0468] 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.
[0469] 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.
[0470] 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.
[0471] 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. Inter prediction information may be signaled from an encoding device (110) to a decoding device (150) in the form of a bitstream.
[0472] 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.
[0473] 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.
[0474] 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.
[0475] 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.
[0476]
[0477] Merge mode
[0478] 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.
[0479] 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.
[0480] 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.
[0481] An average merge candidate may be a merge candidate generated based on the average of two merge candidates in the merge candidate list.
[0482] A zero merge candidate may be zero vector motion information. Zero vector motion information may be motion information whose MV is a zero vector.
[0483] 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.
[0484] 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.
[0485] 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.
[0486] 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.
[0487] 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.
[0488] 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.
[0489] 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.
[0490] 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.
[0491] 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.
[0492] 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.
[0493] 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.
[0494] 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.
[0495] 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.
[0496] 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.
[0497] 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.
[0498] 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.
[0499] 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.
[0500] 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.
[0501] In the aforementioned modes, compensation for prediction samples derived through inter prediction can be performed using optical flow.
[0502]
[0503] Figure 5 shows the order in which spatial candidates are added to the candidate list according to one embodiment.
[0504] In Fig. 5, the locations of spatial candidates are shown.
[0505] The large block in the center can represent the target block. The five smaller blocks adjacent to the target block can represent spatial candidates.
[0506] The coordinates of the target block can be (xP, yP), and the size of the target block can be (nPSW, nPSH).
[0507] 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).
[0508] 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).
[0509] 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).
[0510] 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).
[0511] 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).
[0512] 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.
[0513] 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.
[0514] 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."
[0515] 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.
[0516]
[0517] IBC mode
[0518] 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.
[0519] 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.
[0520] 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.
[0521] 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.
[0522] 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.
[0523] In AMVP mode, BVD can be used. The description of MVD in the embodiments can also be applied to BVD.
[0524] 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.
[0525]
[0526] Transformation and quantization
[0527] 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.
[0528] 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.
[0529] The transform kernel 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.
[0530] 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.
[0531] 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.
[0532] 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.
[0533] 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).
[0534] 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).
[0535] NSPT can be applied to specific block sizes such as 4x4, 4x8, 8x4, 4x16, 16x4, 8x8, 8x16, and 16x8 for intra coding.
[0536] 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.
[0537] 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).
[0538] 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.
[0539] 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.
[0540] 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.
[0541] 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.
[0542] 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.
[0543] 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.
[0544] 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.
[0545] 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.
[0546] 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.
[0547] 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.
[0548] The description of the transformation described above can also be applied to the inverse transformation. In such an 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.
[0549] 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.
[0550] 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.
[0551] 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.
[0552] 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.
[0553] Scanning for each scanning type can start at a specific starting point and end at a specific ending point.
[0554] 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.
[0555] 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.
[0556] 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.
[0557] 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.
[0558] 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.
[0559]
[0560] Filtering
[0561] To improve image quality, filtering may be performed on blocks. The values of target samples may be determined or updated through filtering.
[0562] 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.
[0563] 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.
[0564] 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.
[0565] 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.
[0566] 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.
[0567] 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.
[0568] 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.
[0569] The filter coefficients can be coefficients or weights of the input samples.
[0570] 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.
[0571] 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.
[0572] Filtering may include filtering performed by predictor (123) and predictor (163), etc.
[0573] 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.
[0574] 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.
[0575] 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.
[0576] 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.
[0577] 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.
[0578] Filtering may include in-loop filtering performed by filter (130) and filter (170), etc.
[0579]
[0580] Figure 6 illustrates multiple in-loop filters according to an example.
[0581] 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).
[0582] 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.
[0583] 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).
[0584] The target block can represent an image input to the filter. The filtered target block can represent an image output from the filter.
[0585] 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.
[0586] Luma signal mapping can perform codeword redistribution for the luma signal.
[0587] 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.
[0588] Chroma scaling can correct chroma signals based on the correlation between a luma signal and a corresponding chroma signal.
[0589] 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.
[0590] 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.
[0591] 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.
[0592] 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.
[0593] 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.
[0594] 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.
[0595] 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.
[0596] 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.
[0597] 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.
[0598] 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.
[0599] 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.
[0600] 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.
[0601] ALF can compensate for distortion between the restored image and the original image.
[0602] The filter coefficients of ALF can be signaled via the bitstream.
[0603] 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.
[0604] 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.
[0605] 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.
[0606] Information regarding whether ALF applies can be signaled for specific units, such as CTB.
[0607] 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.
[0608]
[0609] Entropy encoding and entropy decoding
[0610] Figure 7 illustrates entropy encoding and entropy decoding according to an example.
[0611] The processes of entropy encoding by the entropy encoder (139) are illustrated at the top of Fig. 7.
[0612] 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.
[0613] 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.
[0614] Information about syntactic elements and bins can be provided from the binarization unit to the context selection unit.
[0615] A context modeler can perform context updates.
[0616] Context can mean occurrence probability information for each bin for syntactic elements that have already been encoded.
[0617] 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.
[0618] 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.
[0619] The updated context can be used for entropy encoding of syntactic elements of the target block.
[0620] 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.
[0621] The processes of entropy decryption by the entropy decoder (161) are shown at the bottom of Fig. 7.
[0622] 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.
[0623] A context modeler can perform context updates.
[0624] Context can mean the occurrence probability information of each bin for syntactic elements that have already been decoded.
[0625] 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.
[0626] 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.
[0627] The updated context can be used for entropy decoding of syntactic elements of the target block.
[0628] 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.
[0629] 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.
[0630] Information about syntactic elements and bins can be provided from the de-binarization unit to the context selection unit.
[0631] A syntax element may be one of the coding parameters described in the embodiments.
[0632]
[0633] Methods for binarization, debinarization, entropy encoding, and entropy decoding
[0634] 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.
[0635] - Signed 0-th order Exponential Golomb binarization / debinarization method (abbreviated as se(v))
[0636] - k-order exponential-Golomb binarization / inverse binarization method with sign (abbreviated as sek(v))
[0637] - 0-order exponent-Golomb binarization / inverse binarization method for unsigned positive integers (abbreviated as ue(v))
[0638] - k-order exponential-Golomb binarization / inverse binarization method for unsigned positive integers (abbreviated as uek(v))
[0639] - Fixed-length binarization / debinarization method (abbreviated as f(n))
[0640] - Truncated Rice binarization / debinarization method or truncated unary binarization / debinarization method (abbreviated as tu(v))
[0641] - Truncated binary binarization / debinarization method (abbreviated as tb(v))
[0642] - Context-adaptive arithmetic encoding / decoding method (abbreviated as ae(v))
[0643] - bit string in bytes (abbreviated as b(8))
[0644] - Signed integer binarization / debinarization method (abbreviated as i(n))
[0645] - Unsigned positive integer binarization / debinarization method (abbreviated as u(n)) ('u(n)' can also mean fixed-length binarization / debinarization method.)
[0646] - Unary binarization / inverse binarization method
[0647] A neighboring block can refer to a block adjacent to the target block. Neighboring blocks can include spatial and temporal neighboring blocks. Neighboring blocks can also refer to reconstructed neighboring blocks within a reference image. Neighboring blocks do not necessarily have to be adjacent to the target block.
[0648] A spatial neighboring block may be a block that is spatially adjacent to the target block.
[0649] The target block and spatial neighboring blocks may be included within the target image.
[0650] A spatial neighboring block may include a block whose boundary touches at least a portion of the 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 reference value.
[0651] A spatial neighboring block may include a block diagonally adjacent to a vertex of the target block.
[0652] 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 bottom of the target block, and a lower right block adjacent to the lower right of the target block.
[0653] A temporal neighboring block may be a block that is temporally adjacent to the target block.
[0654] 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.
[0655] A call block can be determined based on the location of the target block within the target image. Two blocks being "temporally adjacent" may mean that the locations of the two blocks satisfy certain conditions.
[0656] The location of a call block within a call image may be the same as the location of the target block within the target image. Alternatively, the location of a call block within a call image may correspond to the location of the target block within the target image. Here, the correspondence of the locations of blocks may mean that the areas of the blocks are identical, that the area of one block is included in the area of another block, or that one block occupies a specific location of another block.
[0657] 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 within a call image that contains a call pixel. A call pixel may be a pixel having coordinates identical to the coordinates of a specific pixel in the target block.
[0658] A temporal neighboring block may be a block that is temporally adjacent to a spatial neighboring block of the target block.
[0659] A neighbor sample may refer to a sample within a neighboring block. Neighbor samples may include predicted samples, reconstructed samples, residual samples, and decoded samples.
[0660] 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.
[0661] “Motion information”, “motion vector”, “block vector”
[0662] “Bidirectional prediction”, “Bidirectional prediction”, “Inter-screen bidirectional prediction”, “Inter-screen bidirectional prediction”
[0663] Predefined value: A predefined value may refer to a value commonly used by 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.
[0664] The values derived through the same procedure in the encoding device and the decoding device may include values derived through the same procedure for the same value and / or the same information in the encoding device and the decoding device.
[0665] The values derived through the same procedure in the encoding device and decoding device may include values derived using the same conditional statement for the same value and / or the same information in the encoding device and decoding device.
[0666] The above description of predefined values can also be applied to predefined information. In the above descriptions, "value" can be replaced with "information."
[0667] Motion information may mean information including at least one of a motion vector, a reference picture index, and an inter prediction indicator, as well as reference picture list information, a reference image, a motion vector candidate, a motion vector candidate index, a merge candidate and a merge index, a block vector, a block vector candidate, and a block vector candidate index.
[0668] In the present disclosure, “when an indicator indicating whether a specific method is used is true” may mean when the indicator indicates whether the specific method is used is true in the prediction mode; motion information; coding parameters; and / or location; indicated by the indicator.
[0669] For example, an indicator indicating whether a specific mode is performed can have a value from 0 to 3, and the specific mode can be performed only when the indicator has a value of 1 or 3. In this case, when the indicator indicating whether a specific mode is performed is true, it can mean when the indicator indicating whether a specific mode is performed has a value of 1 or 3.
[0670] In this disclosure, “when an indicator indicating whether a specific method is used is false” may mean when the indicator indicating whether a specific method is used is not true.
[0671] In embodiments, reordering for a particular object may mean sorting for the particular object or elements within the particular object.
[0672] In the present disclosure, “if an indicator indicating whether to perform a specific method (or mode) on a target block is true” and “if a specific method is performed on a target block” may be used with the same meaning and may be replaced with each other.
[0673] In the present disclosure, “when an instruction indicating whether to perform a specific method (or mode) on a target block is false” and “when a specific method is not performed on a target block” may be used with the same meaning and may be replaced with each other.
[0674] In the present disclosure, the matching cost may include a template matching cost and a two-sided matching cost.
[0675] In Adaptive Motion Vector Resolution (AMVR), the resolution of the motion vector difference can be adjusted on a block-by-block basis.
[0676] Adaptive motion vector resolution can have the effect of improving encoding / decoding efficiency by adjusting the resolution of the motion vector difference.
[0677] For example, the adjusted resolution can mean, but is not limited to, one of 16-pel, 8-pel, 4-pel, full-pel, half-pel, and quarter-pel. The pel refers to a pixel unit. For example, if the adjusted resolution of the current block is 4-pel, each component of the motion vector difference can have a value that is a multiple of 4 pixels.
[0678] The resolution of the above motion vector difference can be predefined.
[0679] Subsampling may mean that only some of the samples within a certain region are selected.
[0680] That subsampling is performed may mean that only some of the samples within a specific area are selected, such that 1) the SUBSAMPLE_START_HORth sample in the horizontal direction and the SUBSAMPLE_START_VERth sample in the vertical direction with respect to the specific sample; and 2) samples whose sample intervals are a multiple of SUBSAMPLE_STEP_HOR in the horizontal direction and a multiple of SUBSAMPLE_STEP_VER in the vertical direction with respect to the sample in 1) are selected. Alternatively, that subsampling is performed may mean that some of the samples in 1) and 2) are selected.
[0681] The specific location may be the upper left sample of the area where subsampling is performed. However, the specific location is not limited to the upper left sample of the area where subsampling is performed.
[0682] SUBSAMPLE_START_HOR and SUBSAMPLE_START_VER can be 0 or a positive integer, respectively. Information about at least one of SUBSAMPLE_START_HOR and SUBSAMPLE_START_VER can be signaled / encoded / decoded, or the value of SUBSAMPLE_START_HOR and / or SUBSAMPLE_START_VER can be determined as a predefined value without signaling / encoding / decoding the information.
[0683] SUBSAMPLE_STEP_VER and SUBSAMPLE_STEP_HOR can be 0, 1, 2, or a positive integer, respectively. Information about at least one of SUBSAMPLE_STEP_VER and SUBSAMPLE_STEP_HOR can be signaled / encoded / decoded, or the values of SUBSAMPLE_STEP_VER and / or SUBSAMPLE_STEP_HOR can be determined as predefined values without signaling / encoding / decoding the information.
[0684] Subsampling methods can be distinguished by the area in which subsampling is performed, the location of the area in which subsampling is performed, the size of the area in which subsampling is performed, SUBSAMPLE_START_HOR, SUBSAMPLE_START_VER, SUBSAMPLE_STEP_HOR, and SUBSAMPLE_STEP_VER. However, the criteria for distinguishing subsampling methods are not limited to the values described above.
[0685] Information about the subsampling method can be signaled / encoded / decoded, or a predefined subsampling method can be used without signaling / encoding / decoding.
[0686] Information about the subsampling method may be information for determining the subsampling method.
[0687] For example, information about the subsampling method may be information about an area in which subsampling is performed, a location in the area in which subsampling is performed, a size of the area in which subsampling is performed, and at least one of SUBSAMPLE_START_HOR, SUBSAMPLE_START_VER, SUBSAMPLE_STEP_HOR, and SUBSAMPLE_STEP_VER.
[0688] For example, a subsampling method may be determined based on at least one of motion information, coding parameters, size, and prediction mode of the target block.
[0689] The subsampling method may be determined in at least one unit among a sequence level, a picture level, a tile level, a tile group level, a slice level, a CTU (Coding Tree Unit) level, a CU (Coding Unit) level, and a PU (Prediction Unit), but the determined unit is not limited thereto.
[0690] Geometric Partitioning Mode (GPM) may be a method of determining a partitioning boundary that divides a target block into two in various directions in a straight line shape, and weighting two prediction blocks (or reference blocks) using a weight map determined based on the partitioning boundary.
[0691] For example, at least one prediction block (or at least one reference block) in geometric segmentation mode may mean a unidirectional and / or bidirectional predicted prediction block or a reference block in at least one direction in unidirectional and / or bidirectional prediction.
[0692] Alternatively, for example, at least one prediction block in geometric segmentation mode may mean a predicted prediction block within the screen.
[0693] For example, in geometric partitioning mode, one prediction block may be inter-predicted and another prediction block may be intra-predicted.
[0694] Figure 8 shows examples of segmentation boundaries in geometric segmentation mode.
[0695] Figure 9 is a drawing for explaining the division boundary, division offset, and division angle in geometric division mode.
[0696] FIG. 10 is an embodiment showing a weight map used for each prediction block according to a specified segmentation boundary.
[0697] Figure 11 is a diagram of one embodiment of template matching.
[0698] In template matching, the motion information of the target block can be determined and / or changed based on the calculation result of the cost function between the target template and the reference template.
[0699] The reference block may include at least one of 1) a block indicated by initial motion information, 2) a block indicated by motion information derived during the search process of template matching, 3) a block indicated by motion information finally improved through template matching, 4) a block having a sample (or location) belonging to the search range of template matching as one of the upper left, lower left, upper right, lower right, and center, and 5) a block finally determined through template matching.
[0700] The size of the reference block can be the same as the size of the target block.
[0701] The motion information improved through template matching may be the motion information with the lowest matching cost derived from the template matching search process. However, the method for deriving the motion information is not limited to the aforementioned criteria.
[0702] The template matching cost may mean the result of a calculation using a cost function for the template of the target block used in template matching and the template of the reference block.
[0703] Each of the reference block, the reference template, and the reference region may include at least one of a prediction sample, a reconstruction sample, a residual sample, and a decoded sample of the reference image. Alternatively, each of the reference block, the reference template, and the reference region may include at least one of a prediction sample, a reconstruction sample, a residual sample, and a decoded sample of the target image.
[0704] The template configuration for template matching can be as follows:
[0705] First, the target template may include surrounding samples of the target block.
[0706] The reference region of the target block may include surrounding samples of the target block.
[0707] For example, the reference region of the target block may include at least one of the samples located in the lower left, left, upper left, upper and upper right regions around the target block.
[0708] For example, in template matching, the target template may be identical to the reference region of the target block.
[0709] For example, samples of a target template based on a target block may be samples corresponding to samples of a reference template based on a reference block.
[0710] For example, in template matching, when constructing a target template, some of the samples within the reference area of the target block may be selected. The target template may be constructed using the selected samples.
[0711] For example, the samples selected for configuring the target template based on the target block may be samples corresponding to the samples selected for configuring the template of the reference block based on the reference block.
[0712] For example, the reference area of the target block based on the target block may be an area corresponding to the reference area of the reference block based on the reference block.
[0713] A reference template may contain surrounding samples of the reference block.
[0714] The reference region of a reference block may include surrounding samples of the reference block.
[0715] For example, the reference area of a reference block may include at least one of the samples located in the lower left, left, upper left, upper and upper right areas around the reference block.
[0716] For example, in template matching, the reference template may be identical to the reference region of the reference block.
[0717] For example, samples of a reference template based on a reference block may be samples corresponding to samples of a target template based on a target block.
[0718] For example, when constructing a reference template in template matching, some of the samples within the reference region of the reference block may be selected. The reference template may be constructed using the selected samples.
[0719] For example, the samples selected for configuring the reference template based on the reference block may be samples corresponding to the samples selected for configuring the template of the target block based on the target block.
[0720] For example, the reference area of the reference block based on the reference block may be an area corresponding to the reference area of the target block based on the target block.
[0721] The template matching method may include at least one of an intra-screen template matching mode and an inter-screen template matching mode.
[0722] The in-screen template matching mode may mean a template matching method in which each of a reference block, a reference template, and a reference region includes at least one of a prediction sample, a restoration sample, a residual sample, and a decoded sample of a target image.
[0723] The inter-screen template matching mode may mean a template matching method in which each of a reference block, a reference template, and a reference region includes at least one of a prediction sample, a reconstruction sample, a residual sample, and a decoded sample of a reference image.
[0724] The target / reference template of a template matching may include at least one of: 1) at least one sample within TMSIZE_LEFT lines adjacent to the left of the target / reference block; and 2) at least one sample within TMSIZE_ABOVE lines adjacent to the top of the target / reference block.
[0725] However, the positional relationship between each sample and the target / reference block within the template and / or the method of configuring the template are not limited to the aforementioned relationship or method.
[0726] TMSIZE_LEFT and TMSIZE_ABOVE can each be 0, 1, 2, 3, 4, or a positive integer greater than or equal to 4.
[0727] TMSIZE_LEFT and TMSIZE_ABOVE can be equal, or TMSIZE_LEFT and TMSIZE_ABOVE can be different.
[0728] TMSIZE_LEFT and TMSIZE_ABOVE can each be a predefined value or a value determined based on signaling / encoding / decoding information.
[0729] Each of TMSIZE_LEFT and TMSIZE_ABOVE can be determined based on at least one of motion information, coding parameters, size, and prediction mode of the target block.
[0730] Subsampling can be performed in the template configuration of template matching.
[0731] When constructing a template for template matching, all samples within the reference region may be used, or only some of the samples within the reference region may be used.
[0732] The template for the above template matching may mean at least one of a template of a target block and a template of a reference block.
[0733] The above reference area may mean at least one of a reference area of a target block for template matching and a reference area of a reference block.
[0734] In constructing a template for template matching using only some samples located in the reference region, subsampling may be performed for the entire reference region or a portion of the reference region.
[0735] In constructing a template for template matching using only some samples located in a reference region, the reference region may be divided into two or more regions. The divided regions may be one of: 1) a region where subsampling is performed, 2) a region used for template construction without subsampling, and 3) a region not used for template construction. A template for template matching may be constructed using samples selected through subsampling in 1) and samples within the region 2).
[0736] For example, the area corresponding to 1) may be an area within the reference area, belonging to the left and / or upper left of the block.
[0737] For example, the area corresponding to 1) may be an area within the reference area, which belongs to the top and / or top left of the block.
[0738] Alternatively, when constructing a template for template matching using only some samples located in the reference region, the reference region may be divided into two or more regions. Each of the divided regions may be one of 1) a region where subsampling is performed and 2) a region not used for template construction. A template for template matching may be constructed using samples selected through subsampling in 1).
[0739] In template matching, when calculating the cost function between the target template and the reference template, all samples within each template may be used, or only a portion of the samples within each template may be used. In other words, the cost function may be calculated only for some samples.
[0740] In computing the cost function between templates using only some samples within the template, subsampling may be performed on all or part of the template region.
[0741] In calculating a cost function between templates using only some samples within the template, the template region for template matching may be divided into two or more regions. The divided regions may be one of: 1) a region where subsampling is performed, 2) a region where subsampling is not performed and is used for calculating the cost function, and 3) a region where subsampling is not performed. Calculation of the cost function between templates in template matching may be performed using samples selected through subsampling in 1) and samples within the region 2).
[0742] Alternatively, when calculating the cost function between templates using only some samples within the template, the template region for template matching may be divided into two or more regions. The divided regions may be either 1) a region where subsampling is performed and 2) a region not used for calculating the cost function. Calculation of the cost function between templates in template matching may be performed using samples selected through subsampling in 1).
[0743] When performing the search process for template matching, all samples / locations within the search area may be used, or only a portion of the samples / locations within the search area may be selected. The search and / or matching cost may be calculated only for the selected samples / locations. Alternatively, the search and / or matching cost may be calculated only for the motion information indicating the selected samples / locations.
[0744] In performing the search process of template matching using only some of the samples / locations within the search area, subsampling may be performed on the entire search area or part of the search area.
[0745] In performing the search process of template matching using only some of the samples / positions within the search region, the search region may be divided into two or more regions. The divided regions may be one of 1) a region where subsampling is performed, 2) a region where the search process is performed without subsampling, and 3) a region where the search process is not performed. The search process of template matching may be performed on pixels and / or selected positions selected through subsampling in 1) and samples / positions within the region 2). Alternatively, the search process of template matching may be performed on motion information indicating samples / positions selected through subsampling in 1) and samples / positions within the region 2).
[0746] Alternatively, when performing the search process of template matching using only some of the samples / locations within the search region, the search region may be divided into two or more regions. Each of the divided regions may be one of 1) a region where subsampling is performed and 2) a region where the search process is not performed. The search process of template matching may be performed using the samples / locations selected through subsampling in 1). Alternatively, the search process of template matching may be performed on motion information indicating the samples / locations selected through subsampling in 1).
[0747] Figure 12 shows various examples of subsampling methods.
[0748] Figure 13 shows various examples of subsampling methods.
[0749] The shaded samples (or locations) in FIGS. 12 and 13 may represent samples (or locations) selected through subsampling.
[0750] For the entire or part of the reference area, subsampling can be performed as illustrated in FIG. 13, and a template can be constructed using only selected samples (or locations).
[0751] For the entire or part of the template area of template matching, subsampling can be performed as illustrated in Fig. 13, and calculation of the cost function can be performed only for selected samples (or locations).
[0752] For the entire or part of the search area of template matching, subsampling can be performed as illustrated in FIG. 12, and the search and / or matching cost calculation can be performed only for selected pixels and / or locations.
[0753] For the entire or part of the search area of template matching, subsampling can be performed as illustrated in FIG. 12, and search and / or matching cost calculation can be performed only for motion information indicating selected pixels and / or locations.
[0754] The search can be performed using the computation of a cost function to determine the similarity between NUM_TEMPLATE_COMPARE templates.
[0755] A search for a specific condition may include a process of determining at least one piece of motion information that satisfies a specific condition within a specific search range. The motion information of the target block may be determined and / or changed based on the at least one piece of motion information determined through the search.
[0756] The key motion information may mean, but is not limited to, motion information having the lowest matching cost among the motion information within the search range.
[0757] Alternatively, the search may involve determining at least one block that satisfies a specific condition within a specific search range. Motion information indicating the block determined through the search may be used as motion information for the target block.
[0758] Blocks that meet certain conditions are referenced among the blocks within the search range.
[0759] The cost function may mean a function that determines the similarity between at least one sample in a target template and at least one sample in a reference template.
[0760] The similarity between the first value and the second value can be determined using at least one of the following operations: 1) a difference between two values, 2) a ratio between two values, and 3) comparing the difference between two values with a specific value.
[0761] It may be a function that determines the similarity between at least one sample in the target template and a corresponding sample in the reference template.
[0762] The cost function may be one or more of the Sum of Absolute Differences (SAD), the Sum of Absolute Transformed Differences (SATD), the Mean-Removed Sum of Absolute Differences (MR-SAD), the Mean Squared Error (MSE), and the Sum of Squared Error (SSE). However, the cost functions may not be limited to the items listed above.
[0763] The cost function used in template matching can be predefined or determined based on signaling / encoding / decoding information.
[0764] For example, MR-SAD can be used as a cost function in template matching when the target block satisfies the activation conditions of bilateral matching and / or part of the activation conditions of bilateral matching, or when bilateral matching is performed in the target block.
[0765] For example, SAD can be used as a cost function in template matching when the target block does not satisfy the activation conditions of two-sided matching and / or part of the activation conditions of two-sided matching, or when two-sided matching is not performed in the target block.
[0766] For example, the type of cost function in two-sided matching may be determined based on whether a specific condition is satisfied. In this case, the type of cost function in template matching may be determined based on whether the activation condition for two-sided matching and the above-mentioned specific conditions for determining the type of cost function in two-sided matching are satisfied.
[0767] For example, if the target block satisfies the activation condition of the two-sided matching and the above-mentioned specific condition, MR-SAD can be used as a cost function in the two-sided matching, and if it does not satisfy the condition, SAD can be used as a cost function in the two-sided matching.
[0768] For example, if the target block satisfies the activation condition of bilateral matching; if inter-weighted bilateral prediction is performed or the number of samples in the target block is greater than a certain value; MR-SAD can be used as the cost function in template matching; otherwise, SAD can be used as the cost function in template matching.
[0769] The search range can be a specific range centered around the location indicated by the initial motion information. In other words, the center of the search range can be the location indicated by the initial motion information.
[0770] Alternatively, the search range may be a specific range with the upper left corner being the location indicated by the initial motion information. In other words, the upper left corner of the search range may be the location indicated by the initial motion information.
[0771] Alternatively, the search range may be comprised of a previously restored region surrounding the target block. For example, the search range may include at least one of samples (or locations of samples) located in the lower left, left, upper left, upper, and upper right regions surrounding the target block.
[0772] At least one of the size and shape of the search range for the target block may be predefined in the encoder and decoder.
[0773] Alternatively, at least one of the size and shape of the search range in the target block may be determined based on at least one of the target block size, the coding parameters of the target block, the motion information of the target block, and the prediction mode of the target block.
[0774] Alternatively, information indicating one of the size and shape of the search range for the target block may be encoded and signaled.
[0775] The search range may have the shape of a rectangle with a width of SR_X and a height of SR_Y. Alternatively, the search range may have the shape of a diamond with a width of SR_X and a height of SR_Y. However, the shape and size of the search range may not be limited to the embodiments described above.
[0776] Each of SR_X and SR_Y can be a positive integer. Each of SR_X and SR_Y can be a predefined value or a value determined based on signaling / encoding / decoding information.
[0777] The initial motion information may be determined based on at least one of motion information of the target block, a coding parameter of the target block, a motion vector of the target block, a reference image of the target block, a block vector of the target block, a motion vector predictor of the target block, a block vector predictor of the target block, motion information of at least one surrounding block of the target block, a merge candidate of the target block, a motion vector differential of the target block, and a block vector differential of the target block.
[0778] Search methods can be categorized based on search patterns, search resolution, search range, initial motion information, and units from which motion information is derived.
[0779] The search method may be determined based on at least one of motion information of the target block, coding parameters of the target block, a size of the target block, a prediction mode of the target block, a reference image of the target block, at least one sample value within the target block, a target template, at least one sample value within the target template, and an area of the target template.
[0780] The search pattern can be one of the diamond pattern, cross pattern, or full-search pattern. However, the search pattern may not be limited to the patterns listed above.
[0781] A search using a diamond pattern may mean searching one or more of the positions (0, 2×RR), (RR, RR), (2×RR, 0), (RR, -RR), (0, -RR), (-RR, -RR), (-RR, 0), (-RR, RR) and (0, 0), when (0, 0) represents the position pointed to by the initial motion information.
[0782] A search using a cross pattern may mean searching one or more of the positions (0, RR), (RR, 0), (0, -RR), (-RR, 0) and (0, 0), when (0, 0) represents the position pointed to by the initial motion information.
[0783] RR can be a value determined based on the search resolution or a search resolution, and can be a predefined positive integer.
[0784] A search using the full-search pattern may mean searching all locations within a pre-defined search range.
[0785] For example, when FS_i has values from -FS_X to FS_X, and FS_j has values from -FS_Y to FS_Y, a search using a full-search pattern may mean searching the positions of (FS_i×RR, FX_j×RR). Here, (0, 0) may be the position indicated by the initial motion information. However, the search range is not limited to the aforementioned positions. Each of FS_X and FS_Y may be a predefined positive integer.
[0786] The search resolution may be one of 4-pel, full-pel, half-pel, or quarter-pel. However, the search resolution may not be limited to the aforementioned pels.
[0787] The search resolution may be determined based on at least one of the information about the predefined or adaptive motion vector resolution, or based on signaled / encoded / decoded values.
[0788] The unit from which motion information is derived may include a full block unit and a sub-block unit.
[0789] Figures 14 to 19 each illustrate a search method in template matching, for example.
[0790] Based on the motion information, coding parameters, prediction mode, and adaptive motion vector resolution of the target block, specific columns in the tables illustrated in FIGS. 14 to 19 can be determined. A search can be performed using a search pattern and search resolution corresponding to rows marked with “v” in order from the top to the bottom of the determined columns.
[0791] For example, in FIG. 14, if the target block is in AMVP mode and the resolution determined through the adaptive motion vector resolution is 4-pel, a search for a diamond pattern using the 4-pel search resolution may be performed, and then a search for a cross pattern using the 4-pel search resolution may be performed.
[0792] ALT_IF may represent the index of an adaptive interpolation filter. An interpolation filter may be applied to calculate a pixel value at a sample location of a specific resolution. The adaptive interpolation filter may be an interpolation filter selected by an index from among multiple interpolation filters. In other words, when an adaptive interpolation filter is applied, different interpolation filters may be used depending on the index to calculate a pixel value at a sample location of a specific resolution.
[0793] For example, a particular resolution may be half-pel. However, a particular resolution may not be limited to half-pel.
[0794] For example, the interpolation filter determined by the index may be one of a 6-tap interpolation filter and an 8-tap interpolation filter. However, the method for determining the interpolation filter may not be limited to the above-described method.
[0795] Figure 20 illustrates a first template configuration method in affine mode according to an example.
[0796] Figure 21 illustrates a second template configuration method in affine mode according to an example.
[0797] CPMV can stand for affine control point motion vector (CPMV). Using CPMV, the MV of each subblock within the target block can be derived.
[0798] When the target block is in affine mode, the target block can be divided into subblocks of width N and height M. Motion information for each subblock can be determined based on at least one of motion information, coding parameters, and size of the target block. The template matching cost for the target block can be determined based on at least one of the template matching costs for the divided subblocks. For example, the template matching cost for the target block can be the sum of the template matching costs for the divided subblocks or the average of the template matching costs for each subblock.
[0799] N and M can be 2, 4, 8 or any positive integer, respectively.
[0800] N and M can be predefined values, or values determined based on signaling / encoding / decoding information.
[0801] The motion information of a target block can be determined based on the motion information of surrounding blocks. This can be expressed as "the target block inherits motion information from surrounding blocks."
[0802] For example, if the target block is in merge mode, one merge candidate can be specified based on the merge index from the merge candidate list, and the motion information of the specified merge candidate can be used as the motion information of the target block.
[0803] For example, if the target block is in AMVP mode, one MV candidate can be specified based on the MV candidate index from the MV candidate list, and the motion information of the specified MV candidate can be used as the motion information of the target block.
[0804] An embodiment in which template matching is performed in a target block when the motion information inherited by the target block from the surrounding blocks indicates bidirectional prediction may be as follows.
[0805] In the first step, template matching is performed for each of the L0 and L1 directions. Template matching costs C0 and C1 can be calculated for the motion information determined for the L0 and L1 directions.
[0806] At this time, when performing template matching for each direction, template matching can be performed in the same way as template matching in one-way prediction for the corresponding direction without considering motion information in other directions.
[0807] For example, at this time, if the target block satisfies the predefined conditions, MR-SAD can be used as the cost function, and if it does not, SAD can be used as the cost function.
[0808] The above-described condition may be a condition based on at least one of: whether a model-based prediction method is performed in the target block; an indicator indicating whether a model-based prediction method is performed in the target block; whether two-sided matching is performed in the target block; an indicator indicating whether two-sided matching is performed in the target block; motion information of the target block; a size of the target block; a coding parameter of the target block; motion information of a neighboring block of the target block; a coding parameter of a neighboring block of the target block; and a type of a cost function in template matching in a neighboring block of the target block.
[0809] For example, if the indication of whether a model-based prediction method is performed on a target block is true, or if an indicator indicating whether a model-based prediction method is performed on a target block is true, MR-SAD can be used as a cost function, and otherwise, SAD can be used as a cost function.
[0810] For example, if the indication of whether to perform two-sided matching in the target block is true, or if the indication of whether to perform two-sided matching in the target block is true, and the number of samples in the target block is greater than a specific value, MR-SAD can be used as the cost function, and otherwise, SAD can be used as the cost function.
[0811] The above cost function may refer to a cost function used in the search for template matching; and / or a cost function used to calculate at least one of C0, C1, and C'. The cost function commonly used in the search for template matching and the cost function used to calculate at least one of C0, C1, and C' may be the same or different.
[0812] For example, when searching for template matching, MR-SAD can be used as a cost function, and C0, C1, and C' can be calculated using SAD.
[0813] In the second step, if C0 < C1, a new target template T' can be generated using the target template and the template in the L0 direction.
[0814] For example, when the target template T, the reference template in the L0 direction are T0, and the reference template in the L1 direction are T1,
[0815] T' = W T ×T + W T0 × can be determined as T0.
[0816] W T Wow W T0 Each can be a predefined value.
[0817] W T Wow W T0 may be a value determined based on whether inter-weighted quantile prediction is performed in the target block; and / or a weight in inter-weighted quantile prediction.
[0818] For example, W T is 2, and W T0 can be -1.
[0819] If C0 > C1, a new target template T' can be generated using the target template and the template in the L1 direction.
[0820] If the values of C0 and C1 are the same, it can be considered as one of the cases of C0 < C1 or C1 > C0 and the second step of the procedure can be performed.
[0821] In the third step, if C0 < C1, template matching is performed with the target template as T' in the L1 direction. The template matching cost C' for the motion information determined in the L1 direction can be calculated.
[0822] If C0 > C1, template matching can be performed with the target template as T' in the L0 direction, and the template matching cost C' for the motion information determined in the L0 direction can be calculated.
[0823] If the values of C0 and C1 are the same, it can be considered as one of the cases of C0 < C1 or C1 > C0 and the third step of the procedure can be performed.
[0824] In the fourth step, if C' = W C0 × C0 + W C1 × In the case of C1, the motion information of the target block can be changed to motion information that indicates unidirectional prediction in the L0 direction or L1 direction based on the C0 and C1 values.
[0825] If C0 < C1, the motion information of the target block can be changed to motion information that indicates unidirectional prediction in the L0 direction. Alternatively, the motion information for the L1 direction can be considered unavailable in the target block.
[0826] If C0 > C1, the motion information of the target block can be changed to motion information that indicates unidirectional prediction in the L0 direction. Alternatively, the motion information for the L1 direction can be considered unavailable in the target block.
[0827] If the values of C0 and C1 are the same, it can be considered as one of the cases of C0 < C1 or C1 > C0 and the fourth step can be performed.
[0828] W C0 Wow W C1 Each can be a predefined value.
[0829] W C0 Wow W C1 may be a value determined based on whether inter-weighted quantile prediction is performed in the target block; and / or a weight in inter-weighted quantile prediction.
[0830] For example, W C0 is 1, and W C1 can be 1 / 8.
[0831] For example, the second to fourth steps may be performed only if the target block satisfies a predefined condition.
[0832] For example, the second to fourth steps may be performed only when the target block is a bidirectional prediction, bilateral matching is not performed in the target block, or the target block does not satisfy the activation condition of bilateral matching.
[0833] In bilateral matching, a reference block in the L0 direction and a reference block in the L1 direction are used as templates, and the motion information of the target block can be determined and / or changed based on the calculation result of the cost function between the two templates.
[0834] The reference block may include at least one of 1) a reference block pointed to by initial motion information, 2) a reference block pointed to by motion information derived during the search process of bilateral matching, and 3) a reference block pointed to by motion information finally improved through bilateral matching.
[0835] For example, when constructing a template for two-sided matching, a reference block in the L0 direction and a reference block in the L1 direction can be used as templates.
[0836] The two-sided matching cost may mean the result value of a calculation using a cost function for the template of the L0-direction reference block and the L1-direction reference block used in the two-sided matching.
[0837] Subsampling may be performed in constructing templates for two-sided matching.
[0838] For example, when constructing a template for bilateral matching, only some of the pixels and / or positions within the reference block in the L0 direction and the reference block in the L1 direction may be selected. The template may be constructed using only the selected pixels and / or the selected positions.
[0839] The template for the above two-sided matching may mean at least one of a template in the L0 direction and a template in the L1 direction.
[0840] For example, in constructing a template for bilateral matching, subsampling for a reference block in the L0 direction and a reference block in the L1 direction can be used.
[0841] For example, in constructing a template for bilateral matching, subsampling of a portion of the reference block in the L0 direction and a portion of the reference block in the L1 direction may be used.
[0842] Alternatively, for example, in constructing a template for bilateral matching, a reference block in the L0 direction and a reference block in the L1 direction may each be divided into two or more regions. The divided regions may be one of: 1) a region in which subsampling is performed, 2) a region used for constructing a template without performing subsampling, and 3) a region not used for constructing a template. A template for bilateral matching may be constructed using pixels and / or selected positions through subsampling in 1) and pixels and / or positions within the region 2).
[0843] Alternatively, for example, in constructing a template for bilateral matching, the reference block in the L0 direction and the reference block in the L1 direction may each be divided into two or more regions. The divided regions may be either 1) a region where subsampling is performed and 2) a region not used for constructing the template. A template for bilateral matching may be constructed using pixels and / or positions selected through subsampling in 1).
[0844] For example, when constructing a template for two-sided matching, the region used for constructing the template may be a portion of a reference block in the L0 direction and a portion of a reference block in the L1 direction.
[0845] For example, when constructing a template for bilateral matching, pixels (or locations) used in constructing the template may be selected only from some areas of the reference block in the L0 direction and some areas of the reference block in the L1 direction.
[0846] The size of some areas of the reference block in the L0 direction may be smaller than the size of the area of the reference block in the L0 direction.
[0847] For example, the height (vertical size) of some area of the reference block in the L0 direction may be smaller than the height (vertical size) of the reference block in the L0 direction.
[0848] For example, the width (horizontal size) of some area of the reference block in the L0 direction may be smaller than the width (horizontal size) of the reference block in the L0 direction.
[0849] The size of some areas of the reference block in the L1 direction may be smaller than the size of the area of the reference block in the L1 direction.
[0850] For example, the height (vertical size) of some area of the reference block in the L1 direction may be smaller than the height (vertical size) of the reference block in the L1 direction.
[0851] For example, the width (horizontal size) of some region of the reference block in the L1 direction may be smaller than the width (horizontal size) of the reference block in the L1 direction.
[0852] For example, when calculating a cost function between templates in a two-sided matching, only some of the pixels and / or locations within the template area may be selected. The cost function may be calculated only for the selected pixels and / or locations.
[0853] For example, in performing calculation of a cost function between templates in bilateral matching, subsampling may be performed for the template region in the L0 direction and the template region in the L1 direction.
[0854] For example, in performing calculation of a cost function between templates in bilateral matching, subsampling may be performed on a portion of the template region in the L0 direction and a portion of the template region in the L1 direction.
[0855] Alternatively, for example, in performing calculation of a cost function between templates in bilateral matching, the region of the L0-direction template and the region of the L1-direction template may each be divided into two or more regions. The divided regions may each be one of: 1) a region in which subsampling is performed, 2) a region in which subsampling is not performed and is used for calculating the cost function, and 3) a region in which the cost function is not calculated. Calculation of the cost function between templates in bilateral matching may be performed using pixels and / or selected positions through subsampling in 1) and pixels and / or positions within the region 2).
[0856] Alternatively, for example, in performing the calculation of the cost function between templates in bilateral matching, the region of the L0-direction template and the region of the L1-direction template may each be divided into two or more regions. The divided regions may be either 1) a region where subsampling is performed and 2) a region not used in the calculation of the cost function. In 1), the calculation of the cost function between templates in bilateral matching may be performed using the pixels and / or positions selected through subsampling.
[0857] For example, when calculating a cost function between templates in a two-sided matching, the region used for calculating the cost function may be a part of the L0 direction template and a part of the L1 direction template.
[0858] The size of some areas of the template in the L0 direction may be smaller than the size of the area of the template in the L0 direction.
[0859] For example, the height (vertical size) of some area of the template in the L0 direction may be smaller than the height (vertical size) of the template in the L0 direction.
[0860] For example, the width (horizontal size) of some area of the template in the L0 direction may be smaller than the width (horizontal size) of a block of the template in the L0 direction.
[0861] The size of some areas of the template in the L1 direction may be smaller than the size of the area of the template in the L1 direction.
[0862] For example, the height (vertical size) of some area of the template in the L1 direction may be smaller than the height (vertical size) of the template in the L1 direction.
[0863] For example, the width (horizontal size) of some areas of the template in the L1 direction may be smaller than the width (horizontal size) of the template in the L1 direction.
[0864] For example, when performing a search process for two-sided matching, only some pixels and / or locations within the search area may be selected. The search and / or matching cost may be calculated only for the selected pixels and / or locations. Alternatively, the search and / or matching cost may be calculated only for the motion information indicating the selected pixels and / or locations.
[0865] For example, in performing the search process of two-sided matching, subsampling may be performed on the entire or part of the search area.
[0866] Alternatively, for example, in performing the search process of bilateral matching, the search area may be divided into two or more areas. The divided areas may be one of 1) an area where subsampling is performed, 2) an area where the search process is performed without subsampling, and 3) an area where the search process is not performed. The search process of bilateral matching may be performed on pixels and / or selected positions selected through subsampling in 1) and pixels and / or positions within the area 2). Alternatively, the search process of bilateral matching may be performed on motion information indicating pixels and / or selected positions selected through subsampling in 1) and pixels and / or positions within the area 2).
[0867] Alternatively, for example, when performing a search process for bilateral matching, the search area may be divided into two or more areas. The divided areas may be either 1) an area where subsampling is performed and 2) an area where the search process is not performed. The search process for bilateral matching may be performed using pixels and / or positions selected through subsampling in 1). Alternatively, the search process for bilateral matching may be performed on motion information indicating pixels and / or positions selected through subsampling in 1).
[0868] Example contents
[0869] FIG. 12 may be a diagram showing various examples of subsampling methods in two-sided matching.
[0870] The shaded samples (or locations) in Fig. 12 may represent samples (or locations) selected through subsampling.
[0871] For the reference block area in the L0 direction and the reference block area in the L1 direction, subsampling can be performed as shown in [Figure 12], and a template can be constructed using only selected samples (or locations).
[0872] For some areas of the reference block area in the L0 direction and some areas of the reference block area in the L1 direction, subsampling can be performed as shown in Fig. 12, and a template can be constructed using only selected samples (or locations).
[0873] For all or part of the template area of the two-sided matching, subsampling can be performed as illustrated in Fig. 12, and calculation of the cost function can be performed only for selected samples (or locations).
[0874] For the entire or part of the search area of the two-sided matching, subsampling can be performed as illustrated in Fig. 12, and the search and / or matching cost calculation can be performed only for selected pixels and / or locations.
[0875] For the entire or part of the search area of the two-sided matching, subsampling can be performed as illustrated in FIG. 12, and the search and / or matching cost calculation can be performed only for the motion information indicating the selected pixels and / or positions.
[0876] Two-sided matching may only work if predefined enabling conditions are satisfied.
[0877] For example, two-sided matching can always work.
[0878] For example, bilateral matching can be performed when inter prediction mode is used for the target block and two or more reference blocks are used.
[0879] For example, bilateral matching can be performed only when the first direction and the second direction are different, and the first POC interval and the second POC interval are the same. The first direction can be a direction from the target image to the L0 direction reference image. The second direction can be a direction from the target image to the L1 direction reference image. The first POC interval can be the difference between the POC of the target image and the POC of the L0 direction reference image. The second POC interval can be the difference between the POC of the target image and the POC of the L1 direction reference image.
[0880] For example, bilateral matching can be performed only when the first and second directions are different. The first direction can be the direction from the target image to the L0-direction reference image. The second direction can be the direction from the target image to the L1-direction reference image.
[0881] Here, the fact that the first and second directions are different may mean that Equation 1 below is satisfied.
[0882] [Formula 1] (POC t - POC0) × (POC t - POC1) < 0
[0883] Here, the fact that the first direction and the second direction are equal may mean that Equation 2 below is satisfied.
[0884] [Formula 2] (POC t - POC0) × (POC t - POC1) > 0
[0885] POC t may be the POC of the target image.
[0886] POC0 can be the POC of the L0 direction reference image.
[0887] POC1 can be the POC of the L1 direction reference image.
[0888] Bilateral matching may involve one or more search steps.
[0889] For example, bilateral matching may be configured to sequentially include 1) a step of deriving motion information for the entire block and 2) a step of deriving motion information for sub-blocks of the block. However, the method of deriving motion information performed at each step and the order of the steps are not limited to the aforementioned configuration.
[0890] At each search step of the two-sided matching, the motion information for BM_NUM directions among the motion information for the L0 direction and the motion information for the L1 direction can be improved. BM_NUM can be 0, 1, 2, or a positive integer. The BM_NUMs used in the two-sided matching steps can be the same or different.
[0891] For example, if BM_NUM is 1 at a specific search step, then LX at the specific search step above BM Motion information improvement can only be performed on the motion information of the direction.
[0892] For example, at a particular search step, BM_NUM is 1, and X BM If this is 0, in the specific search step above, only search in the L0 direction can be performed while the template in the L1 direction and the motion information in the L1 direction are fixed.
[0893] X BM can be 0, 1, or a positive integer.
[0894] X BM can be pre-defined.
[0895] For example, X BM The direction may be a direction with a larger POC interval between the L0 direction and the L1 direction. The POC may be the difference between the POC of the reference image (in a specific direction) and the POC of the target image.
[0896] For example, X BMThe direction may be a direction with a higher template matching cost among the L0 direction and the L1 direction. Here, the template matching cost of a specific direction may be the template matching cost of motion information of the specific direction.
[0897] For example, X BM Information about can be signaled / encoded / decoded.
[0898] For example, X BM can be 0 if the first POC difference is greater than the second POC difference, otherwise it can be 1. Or, X BM The first POC difference may be 1 if the first POC difference is greater than the second POC difference, and 0 otherwise. The first POC difference may be the difference between the POC of the target image and the POC of the reference image in the L0 direction. The second POC difference may be the difference between the POC of the target image and the POC of the reference image in the L1 direction.
[0899] For example, X BM can be determined based on a context model and / or a probability model used to entropy encode and entropy decode motion information and coding parameters of the target block.
[0900] For example, X BM may be determined based on at least one of a context model and / or a probability model used in entropy encoding and entropy decoding of an inter prediction indicator in a target block.
[0901] For example, from the context model and / or probability model used in entropy encoding and entropy decoding of the inter prediction indicator, the more likely direction in the target block among L0-direction unidirectional prediction and L1-direction unidirectional prediction is LX. BMdirection can be selected. For example, from the context model and / or probability model used in entropy encoding and entropy decoding of inter prediction indicators, the more likely direction in the target block among L0 direction unidirectional prediction and L1 direction unidirectional prediction is LX BM Can be selected in direction.
[0902] Or, for example, from the context model and / or probability model used in entropy encoding and entropy decoding of the inter prediction indicator, the more likely direction in the target block among L0 direction unidirectional prediction and L1 direction unidirectional prediction is L(1-X BM ) direction. For example, from the context model and / or probability model used in entropy encoding and entropy decoding of the inter prediction indicator, a more likely direction in the target block among L0 direction unidirectional prediction and L1 direction unidirectional prediction is L(1-X BM ) can be selected in the direction.
[0903] A more probable direction may refer to a direction in which fewer bits are used when performing entropy encoding using a contextual model and / or a probability model. Alternatively, a more probable direction may refer to a direction in which the contextual model and / or the probability model indicate a higher probability for that direction.
[0904] For example, LX BM can be determined based on the inter-prediction weights of the target block. For example, LX BM may be a direction in which the inter-prediction weight is higher in the target block between the L0 direction and the L1 direction. Or, for example, LX may be a direction in which the inter-prediction weight is lower in the target block between the L0 direction and the L1 direction.
[0905] For example, X BM can be determined based on at least one of the motion information and coding parameters of the surrounding blocks.
[0906] Figure 22 shows an example of a surrounding block of a target block.
[0907] For example, X in the target block can be determined based on at least one of the motion information and coding parameters of the surrounding blocks corresponding to at least one of A0, A1, B0, B1, and B2 of FIG. 22.
[0908] For example, X in the target block BM can be determined based on at least one of the inter prediction indicator and inter prediction weight in the surrounding blocks.
[0909] For example, X BM One or more context models and / or probability models can be used for entropy encoding and entropy decoding.
[0910] Among multiple context models and / or probability models, X in the target block is based on at least one of the motion information and coding information of the surrounding blocks. BM The context model and / or probability model used for entropy encoding and entropy decoding can be determined.
[0911] For example, X in blocks BM The context model and / or probability model used for entropy encoding and entropy decoding of XBM may be the same. Alternatively, the context model and / or probability model used for entropy encoding and entropy decoding of XBM in blocks may be different depending on at least one of the inter-prediction direction and inter-prediction weight of the surrounding blocks.
[0912] Same X in the search stages of both sides matching BM can be used. Alternatively, different X BM Each of them can be used.
[0913] For example, in performing bilateral matching, a cost function used for calculating the bilateral matching cost may be determined based on the weights of the bi-prediction with weights of the target block and / or the weight index of the bi-prediction with weights.
[0914] In embodiments, weighted bi-prediction may mean bi-prediciton with CU-level Weights (BCW).
[0915] For example, if the first and second weights of the target block are the same, the two-sided matching cost can be calculated using SAD or SATD. If the first and second weights of the target block are different, the two-sided matching cost can be calculated using MRSAD or MRSATD. Here, the first weight can be a weight in the inter-weighted biprediction for the L0 direction. The second weight can be a weight in the inter-weighted biprediction for the L1 direction.
[0916] BM_NUM can be 0, 1, 2, or any positive integer.
[0917] BM_NUM can be pre-defined.
[0918] The BM_NUM in each search step of the two-sided matching may be determined based on coding parameters. Alternatively, the BM_NUM may be determined based on at least one of motion information, a search step of the two-sided matching, a matching cost in a previous search step, a matching cost for initial motion information in the current search step, and the BM_NUM in the previous search step.
[0919] For example, in the first search step of a two-sided match, BM_NUM can be 1 or 2.
[0920] For example, the BM_NUM of the current search step can be determined based on the matching cost in the previous search step.
[0921] For example, if the difference between the matching cost for the initial motion information of the previous search step and the matching cost for the improved motion information of the previous search step is less than COSTDIFF_FORBMNUM, the BM_NUM of the current search step may be 0.
[0922] COSTDIFF_FORBMNUM can be 0, 1, 2, 4, 8, 16, or any positive integer.
[0923] For example, the COSTDIFF_FORBMNUM may be determined based on the size of the target block. COSTDIFF_FORBMNUM may be the product of the number of pixels in the target block and a specific value. The specific value may be 0, 1, 2, 4, 8, or a positive integer.
[0924] For example, if BM_NUM in the previous search step was 0, BM_NUM in the current search step may be 0.
[0925] For example, if the matching cost for the initial motion information of the current search step is less than COSTDIFF_FORBMNUM_INIT, the BM_NUM of the target block can be 0.
[0926] COSTDIFF_FORBMNUM can be 0, 1, 2, 4, 8, 16, or any positive integer.
[0927] For example, COSTDIFF_FORBMNUM_INIT can be determined based on the size of the target block. COSTDIFF_FORBMNUM_INIT can be the product of the number of pixels in the target block and a specific value. The specific value can be 0, 1, 2, 4, 8, or a positive integer.
[0928] For example, when motion improvement is performed in the search phase of bilateral matching, motion information improvement for L0-direction motion information can be performed only when the matching cost for L0-direction motion information of the initial motion information of the current search phase is greater than COSTDIFF_FORBMNUM_INIT.
[0929] For example, when motion improvement is performed in the search phase of bilateral matching, motion information improvement for L1 direction motion information can be performed only when the matching cost for L1 direction motion information of the initial motion information of the current search phase is greater than COSTDIFF_FORBMNUM_INIT.
[0930] COSTDIFF_FORBMNUM can be 0, 1, 2, 4, 8, 16, or any positive integer.
[0931] For example, COSTDIFF_FORBMNUM_INIT can be determined based on the size of the target block. COSTDIFF_FORBMNUM_INIT can be the product of the number of pixels in the target block and a specific value. The specific value can be 0, 1, 2, 4, 8, or a positive integer.
[0932] A BM_NUM of 0 in a specific search step of two-sided matching may indicate that motion information enhancement is not performed in said specific search step. Alternatively, a BM_NUM of 0 in a specific search step of two-sided matching may indicate that said specific search step is not performed.
[0933] For example, when two-sided matching is performed, BM_NUM in the motion information derivation step for the entire block may be 1, and BM_NUM in the motion information derivation step for the sub-block may be 2. In this case, LX in the motion information derivation step for the entire block BMOnly the motion information for the direction can be improved, and in the motion information derivation step for the sub-block, both the motion information in the L0 direction and the motion information in the L1 direction can be improved.
[0934] Figure 23 illustrates bilateral matching according to an example.
[0935] Figure 23 shows the case where BM_NUM is 2 in the motion information derivation step for the entire block of two-sided matching.
[0936] MV0 may be the initial motion information for the L0 direction.
[0937] MV1 may be the initial motion information for the L1 direction.
[0938] MV diff may refer to the motion information improvement value derived through two-sided matching.
[0939] MV0' and MV1' may be motion information derived through bilateral matching.
[0940] In bilateral matching, the magnitude of the motion information improvement value in the L0 direction and the magnitude of the motion information improvement value in the L1 direction may be the same. The directions of the motion information improvement value in the L0 direction and the motion information improvement value in the L1 direction may be opposite to each other. That is, Equations 3 and 4 below may be established.
[0941] [Formula 3]
[0942] MV0' = MV0 + MV diff
[0943] [Formula 4]
[0944] MV1' = MV1 - MV diff
[0945] In the embodiments, subsampling may be performed based on at least one of: whether template matching is performed; an indicator indicating whether template matching is performed; whether bilateral matching is performed; an indicator indicating whether bilateral matching is performed; motion information of the target block; coding parameters of the target block; and a search step in template matching and / or bilateral matching.
[0946] For example, the subsampling method may be determined based on at least one of: whether template matching is performed; an indicator indicating whether template matching is performed; whether bilateral matching is performed; an indicator indicating whether bilateral matching is performed; motion information of the target block; coding parameters of the target block; and a search step in template matching and / or bilateral matching.
[0947] For example, when performing template matching and / or two-sided matching, the subsampling method used may be the same for the search steps.
[0948] Alternatively, for example, when performing template matching and / or two-sided matching, the subsampling method used may vary from step to step.
[0949] In the embodiments, whether subsampling is performed may be determined based on at least one of: whether template matching is performed; an indicator indicating whether template matching is performed; whether bilateral matching is performed; an indicator indicating whether bilateral matching is performed; motion information of the target block; coding parameters of the target block; and a search step in template matching and / or bilateral matching.
[0950] For example, whether to perform subsampling may be determined based on at least one of: whether to perform template matching; an indicator indicating whether to perform template matching; whether to perform bilateral matching; an indicator indicating whether to perform bilateral matching; motion information of the target block; coding parameters of the target block; and a search step in template matching and / or bilateral matching.
[0951] For example, when performing template matching and / or two-sided matching, whether subsampling is performed or not may be the same for the search steps.
[0952] Alternatively, for example, when performing template matching and / or two-sided matching, whether subsampling is performed may vary from search step to search step.
[0953] For example, whether subsampling is performed in the horizontal direction or in the vertical direction may be the same.
[0954] For example, whether subsampling is performed in the horizontal direction or in the vertical direction may be different.
[0955] The subsampling method in the search step in which a search is performed for the entire target block in template matching and / or bilateral matching and the subsampling method in the search step in which a search is performed for a sub-block within the target block in template matching and / or bilateral matching may be the same or different.
[0956] A mapping model may be a model representing an association from a first set of variables to a second set of variables.
[0957] The first set of variables may be referred to as the set of independent variables (or, the set of independent variables).
[0958] A set of independent variables can be a set of variables that affect or are expected to affect other variables (dependent variables).
[0959] The second set of variables may be referred to as the set of dependent variables (or, the set of dependent variables).
[0960] A set of dependent variables can be a set of variables whose values are determined or are expected to be determined based on other variables (independent variables).
[0961] A mapping model can be a model that shows how a dependent variable changes as an independent variable changes.
[0962] A prediction can be made for at least one of the samples of the target block based on a mapping model that calculates the correlation between the independent sample set and the dependent sample set and the target sample set.
[0963] A prediction can be made for at least one of the samples of the target block based on a result obtained by inputting a set of target samples into the mapping model or a set of results obtained.
[0964] At least one of the sample values of the target block may be changed based on a mapping model that computes the association between the independent sample set and the dependent sample set and the target sample set.
[0965] At least one of the sample values of the target block can be changed based on the result obtained by inputting a target sample set to the mapping model or the set of results obtained.
[0966] In one embodiment, for the inter-component prediction mode, the independent sample set may represent luminance component restoration samples around the target block, the dependent sample set may represent chrominance component restoration samples around the target block, and the target sample set may represent the target block of the chrominance component.
[0967] FIGS. 24A and 24B are flowcharts of an encoding method for a target block according to one embodiment.
[0968] The embodiment may be part of a method for encoding a target block or a method for encoding a video.
[0969] The target block may be encoded by including at least one of the steps of constructing a sample set and deriving a mapping model; applying the mapping model to the target block; and entropy encoding the encoding information.
[0970] FIGS. 25A and 25B are flowcharts of a decryption method for a target block according to one embodiment.
[0971] The embodiment may be part of a method for decrypting a target block or a method for decrypting a video.
[0972] The target block can be decrypted by including at least one of the steps of: entropy decoding the encoded information; constructing a sample set and deriving a mapping model; and applying the mapping model to the target block.
[0973] For example, a model-based prediction method may be performed including the following processing steps.
[0974] - Steps to construct independent, dependent, and target sample sets
[0975] - Input configuration step for each sample / location within the independent sample set
[0976] - Target output configuration step for each sample / location in the dependent sample set corresponding to each sample / location in the independent sample set.
[0977] - A step for deriving coefficients of a mapping model to minimize the sum (or average) of differences between input and target output for all samples / locations within a set of independent samples.
[0978] - Input configuration step for each sample / location within the target sample set
[0979] - After outputting the result value from the input and mapping model for each sample / location in the target sample set, a step of performing (at least one of prediction, restoration, and decoding) on the target block using this.
[0980] The input structure may be about how to structure the input for a given sample (or location).
[0981] The output structure can be about what form the output will take for a given input.
[0982] The input structure of the mapping model may be information including at least one of information about each input component of the mapping model, a relationship between at least two input components of the mapping model (e.g., a positional relationship between a first input component and a second input component; e.g., a method of deriving a second input component from the first input component), and information about the number of input components of the mapping model (size of the input).
[0983] The output structure of the mapping model may be information including at least one of information about each output component of the mapping model, information about a relationship between at least two output components of the mapping model, and information about the number of output components of the mapping model (size of the output).
[0984] Information about a specific input (or, output) component may be information including at least one of a type of the input (or, output) component, a method of deriving the input (or, output) component, a method of determining the input (or, output) component, and a relationship with other input (or, output) components (e.g., a positional relationship, a derivation method).
[0985] The type of a particular input (or output) component may include at least one of: a value of a sample and / or a value based thereon; a location of a sample and / or a value based thereon; and a bias.
[0986] A value based on the value of a specific sample may be (at least one of a luminance component and a chrominance component) of (at least one of a target block, a neighboring block of the target block, a reference block of the target block, and a neighboring block of the reference block of the target block) of (at least one of a prediction sample, a restored sample, a residual sample, and a decoded sample).
[0987] It can mean the result of performing a specific operation on the values of a sample or values that contain the values of a specific sample.
[0988] A value based on the location of a particular sample may mean the result of performing a particular operation on the location of a particular sample or on values containing the location of a particular sample.
[0989] For example, an input structure may have four input components.
[0990] For example, the input structure may have four inputs for a particular sample: the sample, the left sample of the sample, the right sample of the sample, and the bias.
[0991] That a first input structure includes a second input structure may mean one of the following:
[0992] - When configuring input for the same sample (or location) using the first input structure and the second input structure, the input using the first input structure includes all input components of the input using the second input structure.
[0993] - Or, when configuring input for the same sample (or location) using the first input structure and the second input structure, the input using the first input structure includes at least one input component of the input using the second input structure.
[0994] In the present disclosure, bias and bias value may be used interchangeably and interchangeably.
[0995] The bias may be a value determined based on at least one of motion information of the target block, coding parameters of the target block, the size of the target block, a range of values that the luminance component of the target block can have, a range of values that the chrominance component of the target block can have, availability of surrounding blocks of the target block, coding parameters of surrounding blocks of the target block, and surrounding samples of the target block.
[0996] For example, at least one of the bias values may be a value that divides the size of the range of values that the luminance component (or chrominance component) of the target block can have by a specific value.
[0997] The above specific value can be 2, 4 or a positive integer.
[0998] For example, at least one of the bias values may be an intermediate value of the values that the luminance component (or chrominance component) of the target block can have.
[0999] The intermediate value of the values that the above luminance component (or chrominance component) can have can be a value determined by the bit depth or a pre-defined value.
[1000] For example, at least one of the bias values may be the value of a sample present at a specific location relative to the target block or the value of a sample present at a specific location relative to the call block.
[1001] Figure 27 is a drawing to explain a specific location.
[1002] At least one of the bias values may be a value of a sample present at at least one of the shaded locations relative to the target block and the shaded locations relative to the call block in FIG. 27.
[1003] The size of a block may mean at least one of the width of the block, the height of the block, and the number of samples within the block.
[1004] In the present disclosure, a specific operation may include at least one of exponentiation, weighted average, weighted sum, arithmetic operation, and filtering.
[1005] For example, a particular operation may include at least one of a weighted average, a weighted sum, and an arithmetic operation with a particular value.
[1006] The above specific value may be determined based on at least one of a prediction mode of the target block, motion information of the target block, coding parameters of the target block, a size of the target block, a range of values that the luminance component of the target block can have, a range of values that the chrominance component of the target block can have, availability of surrounding blocks of the target block, coding parameters of surrounding blocks of the target block, and surrounding samples of the target block.
[1007] For example, the particular value may be a value of a sample present at at least one of the shaded locations in FIG. 27.
[1008] For example, the specific value may be a middle value in the range of values that the luminance component (or chrominance component) of the target block can have.
[1009] The location of the sample may mean the relative location from the top left sample of the target block or the relative location from the top left sample of the image.
[1010] Position in the image can mean the relative position from the upper left sample of the image.
[1011] For example, the specific value may be the x-component and / or y-component of the position of the upper left sample of the target block.
[1012] A value based on a first value may mean a result of performing a specific operation on the first value.
[1013] Selecting at least one sample can be considered as forming a sample set.
[1014] When determining a region of a sample, and using at least one of the following to derive a mapping model: a value of at least one sample within the region; position information of at least one sample; a value of at least one sample; motion information of at least one sample; a value based on motion information and / or position information of at least one sample position; etc., determining a region of a sample can be considered as forming a sample set.
[1015] Figure 26 is a diagram showing a reference area in a model-based prediction method according to an example.
[1016] For example, if a reference area of FIG. 26 is determined and the value of at least one sample within that area is used to derive a mapping model, determining the reference area can be considered as constructing a sample set using samples within the reference area.
[1017] The sample set may mean at least one of an independent sample set, a dependent sample set, and a target sample set.
[1018] Information for determining at least one of the independent sample set, the dependent sample set, or the target sample set may be predefined in the encoder and decoder. According to the predefined rules in the encoder and decoder, a sample set for deriving a mapping model may be constructed; and / or a sample set to which a mapping model is to be applied may be constructed.
[1019] An independent sample set can be a set of independent variables in a mapping model.
[1020] Alternatively, the set of independent variables of the mapping model can be determined based on a set of independent samples.
[1021] The dependent sample set may be a set of dependent variables of the mapping model. Alternatively, the set of dependent variables of the mapping model may be determined based on the dependent sample set.
[1022] The subject sample set may be a set of variables to which a mapping model is applied for prediction of at least one of the samples of the subject block and / or for changing at least one of the sample values of the subject block. Alternatively, the set of variables to which a mapping model is applied for prediction of at least one of the samples of the subject block and / or for changing at least one of the sample values of the subject block may be determined based on the subject sample set.
[1023] The inputs of the mapping model can be configured for each sample (or location) within the independent sample set and / or the target sample set.
[1024] If the input of the mapping model is configured for each sample (or location) in the independent sample set, the target output for that input can be configured for each sample (or location) in the dependent sample set corresponding to each sample (or location) in the target sample set.
[1025] Each of the independent sample set, the dependent sample set, and the target sample set may include at least one of a sample of a reference area, a sample within a target block, and a sample within a block corresponding to the target block.
[1026] For example, the reference region may contain none, one, or more samples within the reference region of the target block.
[1027] For example, a reference region may contain none, one, or more samples within the reference region of a reference block.
[1028] For example, the reference area may be an area adjacent to at least one of the target block, the reference area, and a block corresponding to the target block.
[1029] In this disclosure, “adjacent” may not necessarily mean “in contact with”.
[1030] Figure 26 is a diagram showing a reference area in a model-based prediction method according to an example.
[1031] LINENUM_L, LINENUM_LB, LINENUM_A, and LINENUM_RA can each be 0, 1, 2, or a positive integer.
[1032] LINENUM_L, LINENUM_LB, LINENUM_A, and LINENUM_RA can each be a predefined value.
[1033] LINENUM_MORE_X can be 0, 1, 2, or any positive integer (where X is A, B, L, or R).
[1034] LINENUM_MORE_X can be a predefined value, or information about LINENUM_MORE_X can be signaled / encoded / decoded.
[1035] For example, when configuring the input of a mapping model for a specific sample in an independent sample set of a mapping model, if a sample located at a position at most N away in a specific direction from the position of the sample is used, the value of LINENUM_MORE_X for the specific direction may be determined as N. N may be 0, 1, or a positive integer. The specific direction may include at least one of the top, bottom, left, or right.
[1036] In the present disclosure, “specific information is determined based on a mapping model” may mean that the specific information is determined based on at least one of: MODEL_INPUT_NUM of the mapping model; MODEL_OUTPUT_NUM of the mapping model; at least one bias value in the mapping model; a method for configuring an input of the mapping model; an input structure of the mapping model; an output structure of the mapping model; a method for performing (prediction, restoration, decoding) of a sample in a target block from an output of the mapping model; and a method for changing a (prediction, restoration, decoding) value of a sample in a target block from an output of the mapping model; but the meaning of “specific information is determined based on the mapping model” is not limited thereto.
[1037] The independent sample set, the dependent sample set, and the target sample set may each include at least one of a target block, a neighboring block of the target block, a reference block of the target block, and at least one of a luminance component and a chrominance component of at least one neighboring block of the reference block of the target block; at least one of a prediction sample, a reconstruction sample, a residual sample, and a decoded sample;
[1038] That a particular sample is included in a particular sample set may mean that at least one of a sample value of the particular sample; motion information of the particular sample; a coding parameter of the particular sample; a prediction mode of the particular sample; an x-component of the position of the sample; a y-component of the position of the sample; motion information in a block including the particular sample; and motion information at the position of the particular sample is included in the particular sample set. Alternatively, that a particular sample is included in a particular sample set may mean that a value based on at least one of a sample value of the particular sample, motion information of the particular sample, a coding parameter of the particular sample, a prediction mode of the particular sample, an x-component of the position of the sample, a y-component of the position of the sample, motion information in a block including the particular sample, and motion information at the position of the particular sample is included in the particular sample set.
[1039] “A specific sample is included in a specific sample set” and “A specific sample is used in the composition of a specific sample set” can be used interchangeably in the embodiments.
[1040] “A value based on a specific value” can mean the result of performing a specific operation on a specific value.
[1041] The prediction sample may mean a luminance component prediction component and / or a chrominance component prediction component.
[1042] The restored sample may mean a luminance component restored component and / or a chrominance component restored component.
[1043] The residual sample may refer to a luminance component residual component and / or a chrominance component residual component.
[1044] The decoded sample may mean a luminance component decoded component and / or a chrominance component decoded component.
[1045] The reference block may include at least one of a reference block in the L0 direction in inter-screen prediction, a reference block in the L1 direction in inter-screen prediction, a reference block in intra-screen template matching, and a reference block in intra-screen block copying.
[1046] The in-screen template matching mode may mean a template matching method in which each of a reference block, a reference template, and a reference region includes at least one of a prediction sample, a restoration sample, a residual sample, and a decoded sample of a target image.
[1047] Information about how at least one of the independent sample set, the dependent sample set and the target sample set is constructed can be signaled / encoded / decoded.
[1048] The method of constructing a specific sample set may mean a method including at least one of 1) the number of samples used to construct the sample set and / or the maximum number of samples used to construct the sample set; 2) the size and / or location of the region in which the samples used to construct the sample set exist; 3) the shape, size and / or location of the region from which the samples used to construct the sample set are selected; 4) the type of at least one of the samples used to construct the sample set; 5) whether a bias value is included; 6) a method of determining a bias value, 7) a padding method in constructing the corresponding sample set; and 8) the size and / or location of a reference region.
[1049] The method of constructing a specific sample set may be distinguished based on at least one of: 1) the number of samples used to construct the sample set and / or the maximum number of samples used to construct the sample set; 2) the size and / or location of the region in which the samples used to construct the sample set exist; 3) the shape, size and / or location of the region from which the samples used to construct the sample set are selected; 4) the type of at least one of the samples used to construct the sample set; 5) whether a bias value is included; 6) a method of determining the bias value; 7) a padding method in constructing the corresponding sample set; and 8) the size and / or location of the reference region.
[1050] Information on the method of constructing the above sample set may include at least one of: 1) the number of samples used to construct the sample set and / or the maximum number of samples used to construct the sample set; 2) the size and / or location of an area where samples used to construct the sample set exist; 3) the shape, size and / or location of an area from which samples used to construct the sample set are selected; 4) the type of at least one of the samples used to construct the sample set; 5) whether a bias value is included; 6) a method of determining a bias value; 7) a padding method in constructing the corresponding sample set; and 8) the size and / or location of a reference area.
[1051] Information on how to construct at least one of the independent sample set, the dependent sample set, and the target sample set can be determined based on at least one of the prediction mode of the target block, the motion information of the target block, the coding parameters of the target block, the size of the target block, the range of values that the luminance component of the target block can have, the range of values that the chrominance component of the target block can have, the availability of the surrounding blocks of the target block, the coding parameters of the surrounding blocks of the target block, and the surrounding samples of the target block.
[1052] For example, information on how to construct at least one of the independent sample set, the dependent sample set, and the target sample set can be determined without signaling / encoding / decoding based on at least one of the prediction mode of the target block, motion information of the target block, coding parameters of the target block, a size of the target block, a range of values that the luminance component of the target block can have, a range of values that the chrominance component of the target block can have, availability of neighboring blocks of the target block, coding parameters of neighboring blocks of the target block, neighboring samples of the target block, and a mapping model.
[1053] For example, a method of composing at least one of the independent sample set, the dependent sample set, and the target sample set can be determined based on whether surrounding blocks in a specific direction are available for the target block.
[1054] The above availability may include existence.
[1055] The above specific direction can be one of left-above, above, right-above, left, right, left-below, below, and right-below.
[1056] In forming at least one of an independent sample set, a dependent sample set, and a target sample set, it may be determined whether to include at least one of the samples in a specific direction in the sample set based on whether at least one surrounding block located in a specific direction with respect to the target block is available.
[1057] For example, based on the ratio of the width and height of the target block, the composition method of at least one of the independent sample set, the dependent sample set, and the target sample set can be determined.
[1058] In forming at least one of an independent sample set, a dependent sample set, and a target sample set, it may be determined whether to include at least one of the samples in a specific direction in the sample set based on a ratio of the width and height of the target block.
[1059] The above specific direction can be one of left-above, above, right-above, left, right, left-below, below, and right-below.
[1060] In configuring at least one of the independent sample set, the dependent sample set, and the target sample set, the size and / or location of the reference area may be determined based on the ratio of the width and height of the target block.
[1061] For example, a method of composing at least one sample set among the independent sample set, the dependent sample set, and the target sample set can be determined based on at least one of the prediction mode, motion information, and coding parameters of the target block.
[1062] In composing at least one of an independent sample set, a dependent sample set, and a target sample set, the type of at least one of the samples used to compose the sample set can be determined based on at least one of a prediction mode, motion information, and coding parameters of the target block.
[1063] The types of the above samples may include at least one of (at least one of a target block, a neighboring block of the target block, a reference block of the target block, and a neighboring block of the reference block of the target block), (at least one of a luminance component and a chrominance component), (at least one of a prediction sample, a restoration sample, a residual sample, and a decoded sample); and at least one bias value.
[1064] For example, if the target block is in geometric partition mode, a method of composing at least one sample set among the independent sample set, the dependent sample set, and the target sample set can be determined.
[1065] For example, if the target block is in a geometric segmentation mode, at least one of the independent sample set, the dependent sample set, and the target sample set can be determined based on at least one of the information about the geometric segmentation mode.
[1066] Information about the geometric segmentation mode may mean at least one of a segmentation boundary, a segmentation mode, a segmentation angle, and a segmentation offset of the geometric segmentation mode, but the information about the geometric segmentation mode is not limited thereto.
[1067] For example, for a specific directional boundary of a target block, it may be determined whether to use the specific directional surrounding samples for configuring at least one of the independent sample set, the dependent sample set, and the target sample set based on the sample value of at least one of the surrounding samples within the adjacent BOUND_LINE_NUM rows / columns and / or at least one of the samples within the BOUND_LINE_NUM rows / columns within the target block.
[1068] BOUND_LINE_NUM can be 1, 2, or a positive integer. BOUND_LINE_NUM can be determined based on at least one of the motion information of the target block, the coding parameters of the target block, the size of the target block, the range of values that the luminance component of the target block can have, the range of values that the chrominance component of the target block can have, the availability of surrounding blocks of the target block, the coding parameters of surrounding blocks of the target block, and the surrounding samples of the target block.
[1069] FIG. 28 is an embodiment for describing the surrounding samples within the target block and BOUND_LINE_NUM rows / columns and the samples within BOUND_LINE_NUM rows / columns within the target block.
[1070] FIG. 29 is an embodiment of determining whether to use an upper-direction peripheral sample for configuring at least one of an independent sample set, a dependent sample set, and a target sample set based on a sample value of at least one of the peripheral samples within two adjacent rows / columns and / or at least one of the samples within two rows / columns within the target block, for an upper-direction boundary surface of the target block.
[1071] In Fig. 29 If the value of (W0× p(x, 2) + W1+ p(x, 1) + W2× q(x, 1) + W3× q(x,2)) is greater than a certain threshold, the surrounding samples in the upper direction of the target block may not be used to construct the independent sample set, dependent sample set, and target sample set. For example, if If the value of (W0× p(x, 2) + W1+ p(x, 1) + W2× q(x, 1) + W3× q(x,2)) is less than a certain threshold, at least one of the surrounding samples in the upper direction of the target block can be used to construct at least one of the independent sample set, the dependent sample set, and the target sample set.
[1072] In the above embodiment, since the block size is 8x8, x has values from 0 to 7. However, even if the block size is 8x8, x may have values in a different range. In addition, x may have values determined at intervals greater than 1 (e.g., 0, 2, 4, 6).
[1073] For example, the mapping model could be a regression model.
[1074] For example, a mapping model can be a filter.
[1075] For example, a mapping model can be derived through regression analysis.
[1076] For example, to reduce complexity when deriving a mapping model, at least one of LU decomposition, LDL decomposition, and Gaussian elimination may be used.
[1077] A mapping model can be a model that outputs a result value having MODEL_OUTPUT_NUM components from an input consisting of MODEL_INPUT_NUM components.
[1078] That a specific sample is included in the input of the mapping model may mean that at least one of a sample value of the specific sample; motion information of the specific sample; coding parameters of the specific sample; prediction mode of the specific sample; an x-component of the position of the sample, a y-component of the position of the sample, motion information in a block including the specific sample, and motion information at the position of the specific sample is included in the specific sample set. Alternatively, that a specific sample is included in the specific sample set may mean that a value based on at least one of a sample value of the specific sample, motion information of the specific sample, coding parameters of the specific sample, a prediction mode of the specific sample, an x-component of the position of the sample, a y-component of the position of the sample, motion information in a block including the specific sample, and motion information at the position of the specific sample is included in the input.
[1079] “The input includes a specific sample” and “the input is composed of a specific sample” can be used interchangeably in the embodiments and can be used interchangeably.
[1080] “Result of the mapping model” and “output of the mapping model” can be used interchangeably in the embodiments.
[1081] MODEL_INPUT_NUM and MODEL_OUTPUT_NUM can each be a positive integer.
[1082] MODEL_INPUT_NUM and MODEL_OUTPUT_NUM can each be a predefined value. Alternatively, information about at least one of MODEL_INPUT_NUM and MODEL_OUTPUT_NUM can be signaled / encoded / decoded.
[1083] The mapping model can be a linear model. Alternatively, the mapping model can be a non-linear model.
[1084] Mapping model f, input X = {x1, x2, ... , X MODEL_INPUT_NUM} and the relationship between the result values Y = {y1, y2, ... , yMODEL_OUTPUT_NUM} can be expressed as in the examples below.
[1085] Y = f(X)
[1086] y1= a 1,1 × x1+ a 2,1 × x2+ ... + a(MODEL_INPUT_NUM),1× xMODEL_INPUT_NUM
[1087] y2= a 1,2 × x1+ a 2,2 × x2+ ... + a(MODEL_INPUT_NUM),2× xMODEL_INPUT_NUM
[1088] ...
[1089] yMODEL_OUTPUT_NUM= a1, MODEL_OUTPUT_NUM× x1+ a2, MODEL_OUTPUT_NUM× x2+ ... + a(MODEL_INPUT_NUM), (MODEL_OUTPUT_NUM)× xMODEL_INPUT_NUM
[1090] a i,j can mean the coefficient of the mapping model f.
[1091] i can have a value from 1 to MODEL_INPUT_NUM.
[1092] j can have a value from 1 to MODEL_OUTPUT_NUM.
[1093] Saying that a mapping model f is derived may mean that at least one of the coefficients of the mapping model f is derived.
[1094] For a particular sample in a set of independent samples, an input can be determined that consists of MODEL_INPUT_NUM components, including at least one of the sample; a surrounding sample adjacent to the sample; a surrounding sample non-adjacent (not touching) to the sample; a bias value; and a result of performing a particular operation on at least one of the aforementioned elements.
[1095] For example, at least one of the adjacent surrounding samples and / or at least one of the bias values used to construct the input for a particular sample within the set of independent samples may not be included in the set of independent samples.
[1096] For example, the input may include a bias value that is independent of the particular sample.
[1097] For a particular sample in a set of independent samples, a target output can be determined that consists of MODEL_OUTPUT_NUM components, including at least one of: a sample in a set of dependent samples corresponding to the sample; a surrounding sample adjacent to the sample in the set of dependent samples corresponding to the sample; a surrounding sample that is non-adjacent (not touching) to the sample in the set of dependent samples corresponding to the sample; and a bias value.
[1098] A mapping model can be a model that computes the association between input and target output for each sample in a set of independent samples.
[1099] The mapping model can be derived such that when the input and target output are determined for each sample in a set of independent samples, the output value of the mapping model for the input for the entire sample is similar to the target output on average.
[1100] For a specific sample within a set of independent samples, when using a surrounding sample of the sample as input, if the specific surrounding sample is not available, a sample determined based on at least one of the available sample(s) closest to the location of the surrounding sample may be used as input in place of the specific surrounding sample. This process can be expressed as performing padding on the surrounding sample.
[1101] A sample in a set of dependent samples corresponding to a particular sample in a set of independent samples may mean at least one of a sample in a set of dependent samples corresponding to a location of that sample; and / or at least one of the target outputs determined for that sample.
[1102] For example, when constructing an independent sample set and / or a dependent sample set, NUM_SAMPLE_TO_REF samples can be used.
[1103] The above NUM_SAMPLE_TO_REF may be a fixed constant value. Alternatively, the NUM_SAMPLE_TO_REF may be a value that is adaptively determined based on at least one of the prediction mode of the target block, motion information of the target block, coding parameters of the target block, the size of the target block, the range of values that the luminance component of the target block can have, the range of values that the chrominance component of the target block can have, the availability of neighboring blocks of the target block, coding parameters of neighboring blocks of the target block, and neighboring samples of the target block.
[1104] For example, if the size of the target block is less than a certain value, it can have the value of NUM_SAMPLE_TO_REF=(H+W), and if not, it can have the value of NUM_SAMPLE_TO_REF=(H+W) / STEP_TO_REF.
[1105] STEP_TO_REF can be 2, 4, 8, or any positive integer.
[1106] Alternatively, for example, if the target block size is less than or equal to a certain value, it may have a value of NUM_SAMPLE_TO_REF=(H+W), otherwise it may have a value of NUM_SAMPLE_TO_REF= NUM_SAMPLE_TO_REF_CONST.
[1107] NUM_SAMPLE_TO_REF_CONST can be 8, 16, 32, 64, 128, or any positive integer.
[1108] The size of the target block may mean at least one of the height, width, product of height and width, sum of height and width, larger value of height and width, smaller value of height and width, and diagonal length of the target block.
[1109] For a particular sample in a set of dependent samples, a target output can be determined that consists of MODEL_OUTPUT_NUM components, including at least one of the sample; a surrounding sample adjacent to the sample; a non-adjacent (non-touching) surrounding sample to the sample; a bias value; and a result of performing a particular operation on at least one of the aforementioned elements.
[1110] For example, at least one of the adjacent surrounding samples and / or at least one of the bias values used to construct the input for a particular sample within the dependent sample set may not be included in the independent sample set.
[1111] For a particular sample in a dependent sample set, an input can be determined that consists of MODEL_INPUT_NUM components, including at least one of: a sample in a corresponding independent sample set; a surrounding sample adjacent to the sample in the corresponding independent sample set; a non-adjacent (non-touching) surrounding sample in the corresponding dependent sample set; a bias value; and a result of performing a specific operation on at least one of the aforementioned elements.
[1112] A mapping model can be a model that computes the association between input and target output for each sample in a set of dependent samples.
[1113] The mapping model can be derived such that when the input and target output are determined for each sample in the dependent sample set, the output value of the mapping model for the input for all samples is similar to the target output on average.
[1114] For a specific sample within a set of dependent samples, when using a surrounding sample of the sample as the target output, if the specific surrounding sample is not available, a sample determined based on at least one of the available sample(s) closest to the location of the surrounding sample may be used as the target output instead of the specific surrounding sample. This process can be expressed as performing padding on the surrounding sample.
[1115] A sample in the set of independent samples corresponding to a particular sample in the set of dependent samples may mean at least one of a sample in the set of independent samples corresponding to the location of that sample; and / or at least one of the inputs determined for that sample.
[1116] Mapping model f, input X = {x1, x2, ..., xMODEL_INPUT_NUM} and target output Y target = {y target_1 , y target_2 , ... , ytarget(MODEL_OUPUT_NUM)} relationship can be expressed as in the examples below. ε can mean the error between the output value of the mapping model for the input and the target output.
[1117] Y target = f(X)+ε
[1118] The mapping model f can be derived to minimize the sum or mean of ε over all samples in the dependent sample set or over some samples in the dependent sample set.
[1119] For example, in deriving a mapping model, at least one coefficient of the mapping model can be determined as one value selected from a candidate list consisting of predefined DEFAULT_COEF_NUM values. The DEFAULT_COEF_NUM can be 1, 2, 3, or a positive integer. The value of DEFAULT_COEF_NUM can be predefined, or information about DEFAULT_COEF_NUM can be signaled / encoded / decoded. For example, information about which candidate value among the DEFAULT_COEF_NUM candidate values is used to determine the coefficient of the mapping model can be signaled / encoded / decoded.
[1120] The input of the mapping model may include at least one of: 1) a value of at least one sample in the independent sample set and / or a value based thereon; 2) a location of at least one sample in the independent sample set and / or a value based thereon; 3) a value of at least one sample in the target sample set and / or a value based thereon; 4) a location of at least one sample in the target sample set and / or a value based thereon; and 5) a bias.
[1121] Information about a model-based prediction method in a target block can be stored. The model-based prediction method can be performed in a block encoded / decoded after the target block based on the information about the model-based prediction method stored in the target block. The model-based prediction method can be performed in the target block based on the information about the model-based prediction method in a block encoded / decoded before the target block.
[1122] The information may include at least one of: an indicator indicating whether and / or not to perform a model-based prediction method in the target block; a method for configuring at least one of an independent sample set, a dependent sample set, and a target sample set in the target block; at least one of a sample, a location, and a value included in the independent / dependent / target sample set in the target block; a method for determining a reference area in the target block; mapping model information in the target block; an indicator indicating whether and / or not to use multiple mapping models in the target block; and the number and / or the maximum number of mapping models in the target block.
[1123] The mapping model information may be information including at least one of the MODEL_INPUT_NUM of the mapping model; the MODEL_OUTPUT_NUM of the mapping model; at least one coefficient of the mapping model; the input structure of the mapping model; and the output structure of the mapping model.
[1124] The type of a particular variable may be determined by its components. For example, the type of a particular variable may be determined based on at least one of the following: whether an operation is performed, the type of operation performed, or the type of its components.
[1125] The types of components may include at least one of (at least one of a target block, a neighboring block of the target block, a reference block of the target block, and a neighboring block of the reference block of the target block) (at least one of a luminance component and a chrominance component) (at least one of a prediction sample, a reconstruction sample, a residual sample, and a decoded sample); and at least one bias value.
[1126] The model-based prediction method in the first block may be performed based on information about the model-based prediction method stored in the second block that is encoded / decoded prior to the first block. Alternatively, information about the model-based prediction method in the first block may be determined based on information about the model-based prediction method stored in the second block that is encoded / decoded prior to the first block.
[1127] In the present disclosure, “inheriting information about a model-based prediction method in a second block from a first block” may refer to that the model-based prediction method in the first block is performed based on information about the model-based prediction method stored in a second block that is encoded / decoded before the first block. Alternatively, in the present disclosure, “inheriting information about the model-based prediction method in the second block from the first block” may refer to that information about the model-based prediction method in the first block is determined based on information about the model-based prediction method stored in a second block that is encoded / decoded before the first block.
[1128] For example, at least one coefficient of at least one mapping model included in the information on the model-based prediction method stored in the second block may be determined as one of the coefficients of the mapping model in the first block.
[1129] The mapping model f in the first block can be considered as inheriting information about the model-based prediction method in the second block from the first block.
[1130] For example, some of the coefficients of at least one mapping model included in the information about the model-based prediction method stored in the second block may be determined as some of the coefficients of the mapping model in the first block. Thereafter, the remaining coefficients of the mapping model in the first block may be derived through regression analysis.
[1131] Information about the model-based prediction method of the current block can be inherited from at least one candidate block. The candidate block may include at least one of a neighboring block adjacent to the current block and a non-adjacent block not adjacent to the current block.
[1132] For example, an adjacent block may include at least one of the blocks adjacent to the top, top left, top right, left, and bottom left of the current block, as illustrated in FIG. 27. A non-adjacent block may include a block whose distance from at least one of the top and left boundaries of the current block is N, as illustrated in the example illustrated in FIG. 32. N may be an integer such as 4, 8, or 16. After deriving merge candidates from adjacent blocks, merge candidates may be derived using non-adjacent blocks.
[1133] Alternatively, the non-adjacent block may be a block indicated by at least one of a block vector of the target block, a motion vector of the target block, a block vector of a luminance component block corresponding to the target block if the target block is a chrominance component block, a motion vector of a luminance component block corresponding to the target block if the target block is a chrominance component block, a block vector of a neighboring block, a motion vector of a neighboring block, a block vector around the target block, and a motion vector around the target block.
[1134] For example, a neighboring block may be an adjacent block.
[1135] For example, among at least two blocks among the blocks indicated by the block vector of the target block, the motion vector of the target block, the block vector of the luminance component block corresponding to the target block if the target block is a chrominance component block, the motion vector of the luminance component block corresponding to the target block if the target block is a chrominance component block, the block vector of the neighboring block, the motion vector of the neighboring block, the block vector around the target block, and the motion vector around the target block, a merge candidate can be derived from N blocks having the lowest template matching cost among these.
[1136] Merge candidates can also be derived from temporally adjacent blocks. The temporally adjacent block may be a block (called block) corresponding to the position of the current block within the called picture, as in the example illustrated in Fig. 27, or may be an adjacent block of the called block.
[1137] For example, deriving a merge candidate using a specific candidate block may mean using the specific candidate block as a merge candidate. Alternatively, deriving a merge candidate using a specific candidate block may mean using the mapping models used in the specific candidate block or a portion thereof as a merge candidate.
[1138] Merge candidates can also be derived from temporally adjacent blocks. The temporally adjacent block may be a block (called block) corresponding to the position of the current block within the called picture, as in the example illustrated in Fig. 27, or may be an adjacent block of the called block.
[1139] For example, a temporally adjacent block may be a block located to the right, bottom, bottom right, top left, or bottom left of a call block.
[1140] There can be N temporally adjacent blocks for deriving merge candidates for the target block. N can be 0, 1, 2, 3, 6, 12, or a positive integer. In addition, there can be M merge candidates derived from temporally adjacent blocks in the target block. M can be 0, 1, 2, 3, 6, 12, or a positive integer.
[1141] The number of temporal adjacent blocks may be adaptively determined depending on the number of available spatial adjacent blocks.
[1142] Merge candidates can also be derived from non-adjacent blocks of a call block. For example, merge candidates can be derived based on temporal blocks whose horizontal or vertical distances are at least unit distance or N times the unit distance from the upper left position of the call block. For example, if the upper left position of the call block is (x, y), merge candidates can be derived from temporal blocks whose upper left positions are (x + (N*horizontal), y), (x, y +((N*vertical)) or (x + (N* horizontal), y + (N*vertical)).
[1143] Here, horizontal represents the unit distance in the horizontal direction, and vertical represents the unit distance in the vertical direction. The unit distance can be determined based on the size of the target block. For example, the horizontal unit distance and the vertical unit distance can be set equal to the width and height of the target block, respectively.
[1144] N can be a natural number greater than or equal to 1. If the temporal block derived when the first value is applied to N is unavailable, N can be increased by 1 to search for a temporal block.
[1145] A merge candidate may also be derived from a block at a shifted position of a temporal block (hereinafter referred to as a shifted temporal block). Here, the shifted temporal block may be located at a position spaced apart by a motion vector from the position of the temporal block. Here, the motion vector may be a motion vector of a spatially adjacent block of the target block. For example, the shifted temporal block may be determined based on the motion vector of the left or upper neighboring block of the target block. Alternatively, when the spatial neighboring blocks of the target block are searched in a predefined order, the shifted temporal block may be determined based on the motion vector of the first searched available block. If there is no available block among the spatial neighboring blocks, shifting may not be performed and the temporal block at the original position may be used.
[1146] Whether a temporal adjacent block is available can be determined based on at least one of the picture / slice type (e.g., whether it is an I picture / I slice) and the type of the matching model.
[1147] A prediction method information merge list can be constructed based on information about the prediction method of at least one candidate block. In the prediction method information merge list, candidate blocks or information about the prediction method of a candidate block can be inserted as merge candidates.
[1148] Default prediction method information may be inserted into the prediction method information merge list. For example, the default prediction method information may be a default scaling parameter set predefined in the encoder / decoder. Alternatively, the default prediction method information may be derived by adding / differentiating a predefined offset to a merge candidate pre-inserted in the prediction method information merge candidate list. Here, the pre-inserted merge candidate may be a merge candidate having a smallest index or a largest index among the merge candidates inserted in the prediction method information merge candidate list. The default prediction method may be inserted when the number of merge candidates included in the prediction method information m...
Claims
1. Step of generating a candidate list of the current block; A step of reordering the above candidate list based on the matching cost; A step of obtaining prediction information of the current block from the above rearranged candidate list; and A step of performing prediction of the current block based on prediction information of the current block, A method for decoding an image, characterized in that the candidate list includes at least one of a spatial candidate, a temporal candidate, a history-based candidate, and a default candidate of the current block.
2. In paragraph 1, An image decoding method, characterized in that the spatial candidates include adjacent spatial candidates adjacent to the current block and non-adjacent spatial candidates non-adjacent to the current block.
3. In paragraph 2, A method for decoding an image, wherein the above non-adjacent spatial candidate is determined based on the width and height of the current block.
4. In paragraph 3, An image decoding method, characterized in that the non-adjacent spatial candidate is a block spaced apart from the specific location by N times the unit distance in the horizontal or vertical direction.
5. In paragraph 1, A method for decoding an image, characterized in that the temporal candidate is obtained from a block at a shifted position of a temporal block of the current block.
6. In paragraph 5, An image decoding method, characterized in that the temporal block is determined by a motion vector of a spatially adjacent block of the current block.
7. In paragraph 1, An image decoding method, characterized in that the above history-based candidate is obtained by using a table that accumulates and stores prediction information prior to the current block.
8. In paragraph 1, A method for decoding an image, wherein the prediction of the current block is performed by a weighted sum of a first prediction block obtained based on a first mapping model and a second prediction block obtained based on a second mapping model.
9. In paragraph 8, An image decoding method, characterized in that the first mapping model is included in prediction information of the current block obtained from the candidate list of the current block.
10. Step of generating a candidate list for the current block; A step of reordering the above candidate list based on the matching cost; A step of obtaining prediction information of the current block from the above rearranged candidate list; and A step of performing prediction of the current block based on prediction information of the current block, A video encoding method, characterized in that the candidate list includes at least one of a spatial candidate, a temporal candidate, a history-based candidate, and a default candidate of the current block.
11. In paragraph 10, An image encoding method, characterized in that the spatial candidates include adjacent spatial candidates adjacent to the current block and non-adjacent spatial candidates non-adjacent to the current block.
12. In paragraph 11, A method of image encoding, wherein the above non-adjacent spatial candidates are determined based on the width and height of the current block.
13. In paragraph 12, An image encoding method, characterized in that the non-adjacent spatial candidate is a block spaced apart from the specific location by N times the unit distance in the horizontal or vertical direction.
14. In paragraph 10, A video encoding method, characterized in that the temporal candidate is obtained from a block at a shifted position of a temporal block of the current block.
15. In paragraph 14, A video encoding method, characterized in that the temporal block is determined by a motion vector of a spatially adjacent block of the current block.
16. In paragraph 10, An image encoding method, characterized in that the above history-based candidate is obtained by using a table that accumulates and stores prediction information prior to the current block.
17. In paragraph 10, A method for encoding an image, wherein the prediction of the current block is performed by a weighted sum of a first prediction block obtained based on a first mapping model and a second prediction block obtained based on a second mapping model.
18. In paragraph 17, A video encoding method, characterized in that the first mapping model is included in prediction information of the current block obtained from the candidate list of the current block.
19. A method for transmitting a bitstream generated by a video encoding method, The above image encoding method comprises the steps of: generating a candidate list of a current block; A step of reordering the above candidate list based on the matching cost; A step of obtaining prediction information of the current block from the above-mentioned rearranged candidate list; A step of performing prediction of the current block based on prediction information of the current block to obtain a prediction block of the current block; and Including a step of transmitting the bitstream obtained by encoding the above prediction block, A method for transmitting a bitstream, characterized in that the candidate list includes at least one of a spatial candidate, a temporal candidate, a history-based candidate and a default candidate of the current block.
Citation Information
Patent Citations
Pharmaceutical composition for preventing or treating cardiovascular diseases comprising compound with ITGB4 inhibitory activity as an active ingredient
KR1020250027005A
Venting device and battery pack with the same
KR1020250058198A
Water Repellent Textile Manufacturing Device and Method
KR102169546B1
Image decoding method and device based on inter prediction in an image coding system
KR102387363B1