Method, device, and recording medium for image encoding / decoding
The use of weighted sum prediction blocks in image encoding/decoding technologies addresses inefficiencies in compressing and reconstructing high-resolution video, enhancing video quality and reducing data needs.
Patent Information
- Application Number
- PCT/KR2025/009782
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-07-07
- Filing Date
- 2025-07-07
- Publication Date
- 2026-01-08
AI Technical Summary
Existing video encoding/decoding technologies face challenges in efficiently compressing and reconstructing high-resolution, high-quality video data, particularly in handling prediction, transformation, quantization, and entropy encoding/decoding processes.
The implementation of a method and device for image encoding/decoding using a weighted sum of prediction blocks, where subsidiary blocks are determined based on surrounding blocks and their motion vectors, allowing for improved prediction accuracy and efficiency.
Enhances the compression and reconstruction of high-resolution video by optimizing prediction methods, leading to improved video quality and reduced data requirements.
Smart Images

Figure KR2025009782_08012026_PF_FP_ABST
Abstract
Description
Method, device and recording medium for video encoding / decoding
[0001] The present invention relates to a method, device, and recording medium for image encoding / decoding. Specifically, the present invention provides a method, device, and recording medium for performing image encoding / decoding using prediction.
[0002] The present invention claims the benefit of the filing dates of Korean Patent Application No. 10-2024-0089246, filed July 5, 2024, Korean Patent Application No. 10-2024-0093994, filed July 16, 2024, Korean Patent Application No. 10-2024-0142436, filed October 17, 2024, Korean Patent Application No. 10-2024-0146983, filed October 24, 2024, and Korean Patent Application No. 10-2025-0091095, filed July 7, 2025, the entire contents of which are incorporated herein by reference.
[0003] With the continuous development of the information and communication industry, services providing video through broadcasting and the Internet have spread worldwide.
[0004] Users demand higher resolution and higher quality video. To meet these demands, video encoding / decoding technologies tailored to these needs are required. Video encoding technology can create compressed video by compressing the video representing the images into a smaller amount of data. Video decoding technology can use the compressed video to create reconstructed images.
[0005] When it comes to video encoding / decoding, various technologies exist, including segmentation, prediction, transformation, quantization, filtering, and entropy encoding / decoding. By introducing, modifying, improving, and combining these diverse technologies, video and images can be compressed, transmitted, and stored more effectively.
[0006] One embodiment may provide a device, method and recording medium for performing image encoding / decoding using prediction.
[0007] One embodiment may provide a device, method and recording medium for performing image encoding / decoding using a weighted sum.
[0008] In one aspect, a decoding method is provided, comprising: a step of determining prediction information; and a step of generating a prediction block by performing a prediction on a target block using the prediction information.
[0009] The above prediction block may be a weighted sum of a first prediction block and a second prediction block.
[0010] The above second prediction block may be a block generated by prediction for a side block.
[0011] The above-mentioned subsidiary block may be at least one of a plurality of sub-blocks of the target block.
[0012] The prediction method of the above-mentioned sub-block can be determined based on at least one of the surrounding blocks of the target block that is closest to the above-mentioned sub-block.
[0013] The motion vector of the above-mentioned subsidiary block can be determined based on the motion vector of the first surrounding block of the target block and the motion vector of the second surrounding block of the target block.
[0014] Information of the above sub-block can be derived based on information of other sub-blocks of the target block.
[0015] Information of the above sub-block can be determined based on at least one of a plurality of other sub-blocks adjacent to the above sub-block.
[0016] The prediction method of the above-mentioned subsidiary block can be determined based on surrounding samples of the above-mentioned target block.
[0017] In another aspect, an encoding method is provided, comprising: a step of determining prediction information; and a step of generating a prediction block by performing a prediction on a target block using the prediction information.
[0018] The above prediction block may be a weighted sum of a first prediction block and a second prediction block.
[0019] The above second prediction block may be a block generated by prediction for a side block.
[0020] The above-mentioned subsidiary block may be at least one of a plurality of sub-blocks of the target block.
[0021] The prediction method of the above-mentioned sub-block can be determined based on at least one of the surrounding blocks of the target block that is closest to the above-mentioned sub-block.
[0022] The motion vector of the above-mentioned subsidiary block can be determined based on the motion vector of the first surrounding block of the target block and the motion vector of the second surrounding block of the target block.
[0023] Information of the above sub-block can be derived based on information of other sub-blocks of the target block.
[0024] Information of the above sub-block can be determined based on at least one of a plurality of other sub-blocks adjacent to the above sub-block.
[0025] The prediction method of the above-mentioned subsidiary block can be determined based on surrounding samples of the above-mentioned target block.
[0026] In another aspect, a computer-readable recording medium for storing a bitstream generated by the above encoding method may be provided.
[0027] In another aspect, a computer-readable recording medium storing a bitstream for image decoding is provided, wherein the bitstream includes prediction information, and a computer-readable recording medium is provided for generating a prediction block by performing a prediction on a target block using the prediction information.
[0028] The above prediction block may be a weighted sum of a first prediction block and a second prediction block.
[0029] The above second prediction block may be a block generated by prediction for a side block.
[0030] The above-mentioned subsidiary block may be at least one of a plurality of sub-blocks of the target block.
[0031] The prediction method of the above-mentioned sub-block can be determined based on at least one of the surrounding blocks of the target block that is closest to the above-mentioned sub-block.
[0032] The motion vector of the above-mentioned subsidiary block can be determined based on the motion vector of the first surrounding block of the target block and the motion vector of the second surrounding block of the target block.
[0033] Information of the above sub-block can be derived based on information of other sub-blocks of the target block.
[0034] A device, method and recording medium for performing image encoding / decoding using prediction are provided.
[0035] A device, method and recording medium for performing image encoding / decoding using a weighted sum are provided.
[0036] Figure 1 illustrates a system for video coding according to one embodiment.
[0037] Figure 2 shows a segmentation structure of an image according to one embodiment.
[0038] Figure 3 illustrates the structure of intra prediction according to one embodiment.
[0039] Figure 4 shows the structure of inter prediction to explain the inter prediction process according to one embodiment.
[0040] Figure 5 shows the order in which spatial candidates are added to the candidate list according to one embodiment.
[0041] Figure 6 illustrates multiple in-loop filters according to an example.
[0042] Figure 7 shows the structure of entropy encoding and entropy decoding according to an example.
[0043] FIG. 8 is a flowchart of a method for predicting a target block and a method for generating a bitstream according to one embodiment.
[0044] FIG. 9 is a flowchart of a method for predicting a target block using a bitstream according to one embodiment.
[0045] Figure 10 illustrates template matching according to an example.
[0046] Figure 11 illustrates bilateral matching according to an example.
[0047] Figure 12 may represent neighboring blocks adjacent to another coding unit, for example.
[0048] Figure 13 illustrates neighboring reconstructed Y samples used for another DIMD chroma mode, for example.
[0049] Figure 14 shows neighboring reconstructed Cb samples used for another DIMD chroma mode as an example.
[0050] Figure 15 shows neighboring reconstructed Cr samples used for another DIMD chroma mode as an example.
[0051] Figure 16 illustrates the distinction between intra prediction blocks and inter prediction blocks according to an example.
[0052] Figure 17 shows blocks related to deriving motion information of a subsidiary block according to an example.
[0053] Figure 18 shows blocks related to deriving motion information of a subsidiary block according to another example.
[0054] FIG. 19 shows the shape of the reference sample illustrated in FIGS. 20 to 25 according to an example.
[0055] Figure 20 illustrates target blocks, side blocks and reference samples according to an example.
[0056] Figure 21 shows the locations of target blocks, side blocks and reference samples according to another example.
[0057] Figure 22 shows the locations of target blocks, side blocks and reference samples according to another example.
[0058] Figure 23 shows the locations of target blocks, side blocks and reference samples according to another example.
[0059] Figure 24 shows the locations of target blocks, side blocks and reference samples according to another example.
[0060] Figure 25 shows the locations of target blocks, side blocks and reference samples according to another example.
[0061] Figure 26 shows the shape of a reference sample of a subsidiary block and the shape of a target block according to an example.
[0062] Figure 27 illustrates the derivation of a reference sample for a sub-block according to an example.
[0063] Figure 28 illustrates the derivation of reference samples for subsidiary blocks according to another example.
[0064] Figure 29 illustrates the derivation of reference samples for a side block using a restoration sample according to another example.
[0065] Figure 30 illustrates the derivation of reference samples for a side block using a restoration sample according to an example.
[0066] Figure 31 illustrates the derivation of reference samples for side blocks using restoration samples according to another example.
[0067] Figure 32 shows the derivation of the upper reference sample of the subsidiary block according to an example.
[0068] Figure 33 shows the first diagonal direction and the second diagonal direction according to an example.
[0069] Figures 34, 35 and 36 illustrate ranges for determining whether a sub-block is used as a sub-block region based on the relative position of the sub-block with respect to a target block according to an example.
[0070] Figure 34 shows the range of intra prediction directions according to the relative positions of sub-blocks with respect to a target block according to an example.
[0071] Figure 35 shows intra prediction directions of the first range according to an example.
[0072] Figure 36 illustrates intra prediction directions of the second range according to an example.
[0073] Figure 37 shows the weighted sum of the target block and the subsidiary block according to an example.
[0074] Figure 38 shows that the samples on which weighted sum is performed are determined depending on which interval the difference belongs to according to an example.
[0075] Figure 39 illustrates filtering or blending at a sub-block boundary according to an example.
[0076] Figure 40 shows an extension of a weighted sum-based prediction method using intra prediction according to an example.
[0077] Figure 41 shows a prediction method of a target block according to an example and a prediction method of a subsidiary block determined according to a prediction method of a surrounding block.
[0078] The present invention is capable of various modifications. Furthermore, the present invention may have various embodiments. Specific embodiments are described in the accompanying drawings and detailed description.
[0079] It should be understood that the specific examples are not intended to limit the invention to specific embodiments, and that all modifications, equivalents, and substitutes falling within the spirit and scope of the invention are intended to be encompassed within the scope of the invention as embodiments.
[0080] 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.
[0081] 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.
[0082] 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.
[0083] 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.
[0084] 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.
[0085] 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.
[0086] 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.
[0087] 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.
[0088] 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.
[0089]
[0090] Interchange between terms in the examples
[0091] 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.
[0092] - 'one or more', 'at least one'
[0093] - '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'.)
[0094] - 'Information', 'Signal'
[0095] - 'value', 'predefined value', 'specific value', 'threshold', 'threshold value', 'baseline value', 'reference value'
[0096] - 'statistical value', 'statistics value'
[0097] - 'indicator', 'index', 'index', 'flag', 'information'
[0098] - 'encoder', 'encoding apparatus'
[0099] - 'decoder', 'decoding apparatus'
[0100] - 'Entropy encoding', 'encoding', 'encoding'
[0101] - 'Entropy decryption', 'decoding', 'decoding'
[0102] - 'coding', 'encoding and / or decoding'
[0103] - 'video', 'moving picture', 'image', 'picture', 'frame', 'screen'
[0104] - 'Reference picture', 'Reference video'
[0105] - 'Reference Picture List (RPL),' 'Reference Image List'
[0106] - 'original', 'input', 'source'
[0107] - 'Block', 'Unit', 'Signal'
[0108] - 'square', 'square shape'
[0109] - 'pixel', 'pixels', 'samples', 'pels'
[0110] - 'region', 'area', 'part', 'segment'
[0111] - 'partition', 'split', 'divide'
[0112] - 'quad', 'quarternary'
[0113] - 'luma component', 'luma', 'luminance component', 'luminance', 'Y'
[0114] - 'chroma component', 'chroma', 'chrominance', 'chrominance component', 'Cb and Cr', 'Cb or Cr', 'Cb', 'Cr', 'U and V', 'U or V', 'U', 'V'
[0115] - 'target', 'current' (e.g. target block and current block, or target image and current image)
[0116] - 'neighbor', 'neighboring', 'adjacent', 'neighbor / neighboring' (e.g., neighboring block, adjacent block, and surrounding block)
[0117] - 'collocated', 'collected'
[0118] - 'reconstruction', 'reconstruction', 'decoding'
[0119] - 'reconstructed', 'reconstructed', 'decoded'
[0120] - 'difference', 'difference', 'difference', 'error', 'residual', 'residual'
[0121] - Largest Coding Unit (LCU), Coding Tree Unit (CTU)
[0122] - 'inter', 'inter-screen'
[0123] - 'Inter prediction', 'inter prediction', 'motion compensation'
[0124] - 'Inter mode', 'Inter prediction mode', 'Inter-screen mode', 'Inter-screen prediction mode'
[0125] - 'Bi-prediciton', 'bi-directional prediction', 'inter bi-prediction', 'bi-directional inter-prediction'
[0126] - 'Motion information', 'Motion vector', 'Block vector', 'Predicted motion vector', 'Advanced Motion Vector Prediction (AMVP)'
[0127] - 'list', 'candidate list'
[0128] - 'Spatial candidate', 'Spatial merge candidate'
[0129] - 'Temporal candidate', 'Temporal merge candidate'
[0130] - 'Prediction motion vector candidate', 'motion vector predictor'
[0131] - 'Prediction method', 'Prediction mode'
[0132] - 'Intra', 'Intra'
[0133] - 'Intra prediction', 'Intra prediction'
[0134] - 'Intra mode', 'Intra prediction mode', '(Intra) predictor'
[0135] - 'Dequantization', 'scaling'
[0136] - 'Quantization matrix', 'Scaling list'
[0137] - 'Quantization matrix coefficients', 'matrix coefficients'
[0138] - 'Transform coefficient level', 'quantized level', 'quantized coefficient', 'quantized transform coefficient', 'quantized transform coefficient level'
[0139] - 'Dequantized coefficient', 'dequantized transform coefficient'
[0140] - 'Scanning type', 'Scanning direction'
[0141] - 'Directional mode', 'Angle mode', 'Angular mode', 'Intra prediction mode'
[0142] - '(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'
[0143] - 'Merge Mode', 'Movement Merge Mode'
[0144] - 'Geometric Partitioning Mode (GPM)', 'Triangle Partitioning Mode'
[0145] - 'Refinement', 'Correction'
[0146] 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.
[0147]
[0148] The range of information and values of information described in the examples
[0149] 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'.
[0150] Information can have one of multiple values. The 'nth value' can mean the nth value among the multiple values.
[0151] For example, the first value may represent '0' or (logical) false. The second value may represent '1' or (logical) true. Alternatively, the first value may represent '1' or (logical) true. The second value may represent '0' or (logical) false. The second value may mean a value other than the first value.
[0152] In the embodiments, "if certain information is false" may mean "if certain information is not true." A particular embodiment described as being performed when certain information is true may not be performed when the specific information is false. "If certain information is true" may mean "if certain information is not false." An embodiment described as being performed when certain information is false may not be performed when the specific information is false.
[0153] 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.
[0154] 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.
[0155]
[0156] Coding related concepts
[0157] Below, concepts related to coding are described. The descriptions disclosed below can be applied to embodiments.
[0158] 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 that an encoding device and a decoding device have.
[0159] In the encoding device and the decoding device, the 'value derived through the same procedure' may include a value derived through the same procedure and / or the same conditional statement for the same value and / or the same information in the encoding device and the decoding device.
[0160] The above description of predefined values can also be applied to predefined information. In the above descriptions, "value" can be replaced with "information."
[0161] 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."
[0162] 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.
[0163] - 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.
[0164] Coding: Coding can mean encoding and / or decoding of images.
[0165] 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.
[0166] 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."
[0167] - A picture can mean the entire picture, or it can mean a part of a picture, such as a block.
[0168] 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.
[0169] Subpicture: A picture can be divided into one or more subpictures.
[0170] - A subpicture may be a square or rectangular area within a picture. A subpicture may contain one or more CTUs.
[0171] - 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.
[0172] - 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.
[0173] 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.
[0174] 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.
[0175] CTU: An image can be divided into multiple coding tree units (CTUs).
[0176] - 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.
[0177] - 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.
[0178] CTB: CTB can refer to one of Y CTB, Cb CTB, and Cr CTB.
[0179] 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.
[0180] - 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.
[0181] - A unit can contain parameter sets, headers, bricks, CTUs, CUs, PUs, and TUs. A unit can contain VPSs, SPSs, PPSs, APSs, and DPSs. A unit can contain picture headers, subpicture headers, slice headers, tile group headers, and tile headers.
[0182] - 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.
[0183] - In the embodiments, a description applied to one of the various units described above may also be applied to other units.
[0184] - A unit may include syntactic elements. In other words, a block and syntactic elements for the block may be combined and referred to as a unit. In embodiments, a description of a particular unit as being a particular method / mode may mean that a particular method / mode is performed in the particular unit, and may mean that the particular unit has syntactic elements representing the particular method / mode.
[0185] - 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.
[0186] - 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.
[0187] - 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.
[0188] - 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.
[0189] - Unit information may include unit type, unit size, unit depth, unit encoding order, and unit decoding order.
[0190] 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.
[0191] 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.
[0192] - 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.
[0193] - 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.
[0194] - 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.
[0195] 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.
[0196] 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.
[0197] - 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.
[0198] 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.
[0199] In embodiments, the samples may include prediction samples, reconstruction samples, residual samples, and decoded samples.
[0200] - 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.
[0201] Parameter set: A parameter set may correspond to header information among the structures within a bitstream.
[0202] - 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).
[0203] - 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.
[0204] - 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.
[0205] MPM (Most Probable Mode): MPM can indicate the intra prediction mode that is likely to be used for intra prediction for the target block.
[0206] - 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.
[0207] - 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.
[0208] MPM List: An MPM list may contain one or more MPMs. The number of MPMs in an MPM list may be predefined.
[0209] 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.
[0210] MPM Usage Directive: The MPM usage directive can indicate whether the MPM list is used for prediction on the target block.
[0211] 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.
[0212] Reference image list: The reference image list may be a list containing one or more reference images used for prediction for the target block.
[0213] - There may be multiple reference image lists. Multiple reference image lists may include List 0 (L0), List 1 (L1), etc.
[0214] - 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.
[0215] 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.
[0216] 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.
[0217] 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.
[0218] Reference sample: A reference sample may be a sample that is referenced for encoding / decoding of a target block, such as prediction and filtering.
[0219] 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.
[0220] 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.
[0221] - 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'.
[0222] 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.
[0223] - 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.
[0224] - 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.
[0225] Picture Order Count (POC): The POC of a picture can indicate the display order or output order of the picture.
[0226] Motion information: Motion information may be information used to specify a reference block. The motion information may include information used in a specific prediction mode, such as a motion vector (MV), a reference picture index, an inter prediction indicator, reference picture list information, a reference picture, a prediction list utilization flag, an MV candidate, an MV candidate index, a merge candidate, a merge index, a block vector, a block vector candidate, and a block vector candidate index. A specific inter prediction mode may include an inter prediction mode and an intra block copy mode.
[0227] - 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.
[0228] 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.
[0229] - 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.
[0230] -The zero vector can be (0, 0) MV.
[0231] 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.
[0232] - 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.
[0233] -The zero vector can be (0, 0) BV.
[0234] 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.
[0235] 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.
[0236] Motion information candidate list: The motion information candidate list may mean a list constructed using one or more motion information candidates.
[0237] 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.
[0238] - 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.
[0239] - 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.
[0240] - 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.
[0241] 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.
[0242] 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.
[0243] - 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.
[0244] Merge Candidate List: A merge candidate list may be a list constructed using one or more merge candidates.
[0245] 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.
[0246] 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.
[0247] In one embodiment, a neighboring block of a target block may mean an adjacent block of the target block.
[0248] In one embodiment, a neighboring block does not necessarily have to be adjacent to the target block. A neighboring block of a target block may be a block whose distance from the target block is less than a certain value.
[0249] Distance: In embodiments, the distance between objects may be used. Each object may be a block, line, pixel, template, etc.
[0250] - The distance between objects may be the larger of the horizontal distance and the vertical distance. Alternatively, the distance may be the horizontal distance; the vertical distance; the diagonal distance; or the smaller of the horizontal distance and the vertical distance.
[0251] - The distance may be the shortest distance between objects, or may be the distance between specific locations described in the embodiments within the objects.
[0252] - The unit of distance may be a pixel or a block. Additionally, the unit of distance may be one of the objects or a specific unit described in the embodiments.
[0253] Spatial neighboring blocks: Spatial neighboring blocks can be blocks that are spatially adjacent to the target block.
[0254] - The target block and spatial neighboring blocks can be included within the target image.
[0255] - A spatial neighboring block may include a block whose boundary is at least partially adjacent to 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 specific value.
[0256] - A spatial neighboring block may include a block diagonally adjacent to a vertex of the target block.
[0257] - 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.
[0258] Temporal neighboring blocks: Temporal neighboring blocks can be blocks that are temporally adjacent to the target block.
[0259] - 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.
[0260] - 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.
[0261] - 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.
[0262] - 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.
[0263] - A temporal neighboring block may be a block that is temporally adjacent to a spatial neighboring block of the target block.
[0264] 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.
[0265] 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.
[0266] Quantized level: A quantized level can be an integer quantity used as input to dequantization.
[0267] 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.
[0268] 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.
[0269] 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.
[0270] 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.
[0271] 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.
[0272] Quantization matrix coefficients: Quantization matrix coefficients can be each element within a quantization matrix.
[0273] 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.
[0274] 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.
[0275] 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.
[0276] 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.
[0277] - 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.
[0278] - 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.
[0279] - 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.
[0280] 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).
[0281] 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.
[0282] 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.
[0283] 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.
[0284] - 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.
[0285] Entropy decoding: Entropy decoding can reverse the processes performed in entropy encoding. Symbols can be generated by entropy decoding a bitstream.
[0286] 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.
[0287] 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.
[0288]
[0289] Coding parameters
[0290] 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.
[0291] 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.
[0292] 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.
[0293] 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.
[0294] 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.
[0295] 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.”
[0296] 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.”
[0297] 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.
[0298] 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.”
[0299] 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.”
[0300]
[0301] indicator
[0302] In the embodiments, the expressions “method”, “mode” and “(encoding / decoding) method using mode” may be used interchangeably.
[0303] Whether a particular method is performed may be indicated by a directive for the particular method. A "directive" for a "particular method" may be abbreviated as "specific directive."
[0304] In embodiments, "if an indicator indicating whether a particular method is performed is true" may mean if it is true whether the particular method is performed on an object indicated by the indicator; or an object related to the indicator;
[0305] In embodiments, “when a specific object is a specific method” may mean when the specific method is performed on the specific object.
[0306] In embodiments, the object indicated by the indicator may include a unit described in the embodiments; a sample described in the embodiments; a location of the unit or sample described in the embodiments; a mode described in the embodiments, such as a prediction mode; information described in the embodiments, such as motion information; and coding parameters.
[0307] For example, an indicator indicating whether a specific method is performed may have one of a plurality of values, and the specific method may be performed only when the indicator has one of some of the plurality of values. Here, "when the indicator indicating whether a specific method is performed is true" may mean a case where the indicator indicating whether a specific method is performed has one of some of the values.
[0308] In embodiments, “if an indicator for a particular judgment is true” may mean if the result of the judgment is true in an object indicated by the indicator; or an object related to the indicator;
[0309] In embodiments, “when a particular method is performed” may mean when an indicator indicating whether a particular method is performed has a value of true.
[0310] In embodiments, if a particular method is not activated in a particular target, signaling / encoding / decoding of at least one of the syntactic elements for the particular target may be omitted in the particular target and sub-targets of the particular target.
[0311] In embodiments, a particular method being performed only under certain conditions may mean that said particular mode is enabled only when said particular condition is met.
[0312]
[0313] System for video coding
[0314] Figure 1 illustrates a system for video coding according to one embodiment.
[0315] The system (100) may include at least one of an encoding device (110) and a decoding device (150).
[0316] Each of the encoding device (110) and the decoding device (150) may be a computer or an electronic apparatus.
[0317]
[0318] Structure of the encoding device
[0319] The encoding device (110) may include a processor (120), storage (140), and a communicator (149).
[0320] The processor (120), storage (140), and communication device (149) can be connected via a bus.
[0321] 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.
[0322] 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.
[0323] 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).
[0324] 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).
[0325] 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.
[0326] 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).
[0327] 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).
[0328] 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.
[0329]
[0330] Operation of the encoding device
[0331] The encoding device (110) can sequentially encode one or more images of a video.
[0332] The storage (140) can store the original image. The original image can be used as a target image in the encoding device (110).
[0333] 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).
[0334] The segmenter (122) can determine a target block by performing segmentation on the target image.
[0335] 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.
[0336] 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.
[0337] 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.
[0338] 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.
[0339] 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.
[0340] 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.
[0341] The transformer (125) can perform a transformation on the residual block to generate transformation coefficients.
[0342] The converter (125) can perform the conversion using one of a plurality of conversion methods.
[0343] 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.
[0344] 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.
[0345] 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.
[0346] 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.
[0347] Information for decoding an image may include quantized levels and syntax elements produced by a quantizer (126).
[0348] The probability distribution can be determined based on the quantized levels and coding parameters.
[0349] 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.
[0350] 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.
[0351] The dequantizer (127) can generate dequantized transform coefficients by performing dequantization on the quantized level.
[0352] 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.
[0353] The adder (129) can generate a restored block by combining a predicted block and a restored residual block.
[0354] 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.
[0355] 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.
[0356] 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).
[0357]
[0358] Structure of the decryption device
[0359] The decryption device (150) may include a processor (160), a storage (180), and a communication device (189).
[0360] 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.
[0361] 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).
[0362] The storage (180) may include a reference picture buffer (181).
[0363] 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).
[0364] 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.
[0365]
[0366] Operation of the decryption device
[0367] 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).
[0368] 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).
[0369] The processor (160) can obtain a bitstream from a storage (180) or a computer-readable recording medium.
[0370] A bitstream may contain encoded information.
[0371] 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.
[0372] Information for decoding an image may include quantized levels and syntax elements.
[0373] 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.
[0374] The entropy decoder (161) can provide syntax elements to other components of the processor (160), such as the segmenter (162).
[0375]
[0376] A common description of the relationship between the components of the encoding device and the components of the decoding device.
[0377] 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.
[0378] 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.
[0379] 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).
[0380]
[0381] Division of the units that make up the image
[0382] Figure 2 shows a segmentation structure of an image according to one embodiment.
[0383] Figure 2 can schematically represent an example in which one unit is divided into multiple sub-units.
[0384] 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.
[0385] 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).
[0386] 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.
[0387] 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.
[0388] 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.
[0389] 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.
[0390] 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'.
[0391] 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.
[0392] 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.
[0393] 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.
[0394] 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.
[0395] 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.
[0396] 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.
[0397] 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.
[0398] 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.
[0399] 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.
[0400] 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.
[0401] 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.
[0402] Here, each of the aforementioned split direction information and split type information may be a flag having a specific length (e.g., 1 bit).
[0403] The CU's partition information may also include QT partition information, partition direction information, and partition shape information.
[0404] 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.
[0405] 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.
[0406] 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.
[0407] 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.
[0408] 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.
[0409] 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.
[0410] 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.
[0411] 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.
[0412] 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.
[0413]
[0414] Processing blocks according to their properties
[0415] 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.
[0416] The blocks to which the specific processing described in the examples is applied may have a square shape or a non-square shape.
[0417] 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.
[0418] 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.
[0419] In one embodiment, a minimum block size and / or a maximum block size for a particular process may be predefined.
[0420] 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.
[0421] 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.
[0422] In one embodiment, the processing of the embodiment may be applied / performed only when the block size is a predefined block size.
[0423] 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.
[0424] 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.
[0425] 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.
[0426]
[0427] Predictive information for prediction
[0428] Prediction information can be used to generate a prediction block for the target block.
[0429] 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.
[0430] 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.
[0431]
[0432] Intra prediction
[0433] Figure 3 illustrates the structure of intra prediction according to one embodiment.
[0434] 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.
[0435] 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.
[0436] 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.
[0437] 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.
[0438] 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.
[0439] 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.
[0440] 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.
[0441] 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.
[0442] 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).
[0443] 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.
[0444] 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.
[0445] 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.
[0446] 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.
[0447] 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.
[0448] 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.
[0449] 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.
[0450] 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.
[0451] 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.
[0452] 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.
[0453] 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.
[0454] 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.
[0455] 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.
[0456] 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.
[0457] 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.
[0458] 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.
[0459] 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.
[0460] 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.
[0461] 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.
[0462] 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.
[0463] 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.
[0464] 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.
[0465] 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.
[0466] In intra prediction, the sample value of a prediction sample of a prediction block can be determined by the sample value of a reference sample. The position of the reference sample can be specified by the position of the prediction sample and the direction of the intra prediction mode. If the position specified by the position of the prediction sample and the direction of the intra prediction mode is an integer position, the sample value of one reference sample pointed to by the integer position can be used to determine the sample value of the prediction sample of the prediction block. If the position specified by the position of the prediction sample and the direction of the intra prediction mode is not an integer position, an interpolated reference sample can be generated based on two reference samples closest to the specified position. The sample value of the interpolated reference sample can be used to determine the sample value of the prediction sample. That is, when the position specified by the position of the prediction sample and the direction of the intra prediction mode indicates a gap between two reference samples, an interpolated sample value can be generated based on the sample values of the two samples.
[0467]
[0468] Inter prediction
[0469] Figure 4 shows the structure of inter prediction to explain the inter prediction process according to one embodiment.
[0470] The rectangle illustrated in Fig. 4 can represent an image. Additionally, the arrow in Fig. 4 can represent a prediction direction.
[0471] 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.
[0472] 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.
[0473] 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.
[0474] 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.
[0475] 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.
[0476] Below, inter prediction for a target block in inter mode according to an embodiment is specifically described.
[0477] 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.
[0478] 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.
[0479] 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.
[0480] 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.
[0481] 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.
[0482] A spatial candidate may be a restored spatial neighboring block that is spatially adjacent to the target block.
[0483] 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.
[0484] 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.
[0485] A temporal candidate may be a restored temporal neighboring block corresponding to a target block in a restored COL image.
[0486] 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.
[0487] 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.
[0488] A temporal candidate may be a location inside and / or outside a call block within a call image.
[0489] 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.
[0490] 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.
[0491] 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.
[0492] 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.
[0493]
[0494] AMVP mode
[0495] 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.
[0496] 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.
[0497] 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.
[0498] Inter prediction information may include 1) AMVP mode usage information, 2) MV candidate index, 3) MVD, 4) MVD resolution information, 5) reference direction, and 6) reference image index, and may include a residual block. The inter prediction information may be signaled from the encoding device (110) to the decoding device (150) in the form of a bitstream.
[0499] 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.
[0500] 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.
[0501] 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.
[0502] 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.
[0503]
[0504] Merge mode
[0505] 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.
[0506] 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.
[0507] 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.
[0508] An average merge candidate may be a merge candidate generated based on the average of two merge candidates in the merge candidate list.
[0509] A zero merge candidate may be zero vector motion information. Zero vector motion information may be motion information whose MV is a zero vector.
[0510] 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.
[0511] 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.
[0512] 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.
[0513] 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.
[0514] 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.
[0515] 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.
[0516] 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.
[0517] 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.
[0518] 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.
[0519] 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.
[0520] 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.
[0521] 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.
[0522] 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.
[0523] 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.
[0524] 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.
[0525] 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.
[0526] 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.
[0527] 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.
[0528] In the aforementioned modes, compensation for prediction samples derived through inter prediction can be performed using optical flow.
[0529]
[0530] Figure 5 shows the order in which spatial candidates are added to the candidate list according to one embodiment.
[0531] In Fig. 5, the locations of spatial candidates are shown.
[0532] The large block in the center can represent the target block. The five smaller blocks adjacent to the target block can represent spatial candidates.
[0533] The coordinates of the target block can be (xP, yP), and the size of the target block can be (nPSW, nPSH).
[0534] 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).
[0535] 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).
[0536] 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).
[0537] 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).
[0538] 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).
[0539] 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.
[0540] 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.
[0541] 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."
[0542] 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.
[0543]
[0544] IBC mode
[0545] 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.
[0546] 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.
[0547] 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.
[0548] 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.
[0549] 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.
[0550] In AMVP mode, BVD can be used. The description of MVD in the embodiments can also be applied to BVD.
[0551] 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.
[0552]
[0553] Transformation and quantization
[0554] 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.
[0555] 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.
[0556] The transform kernels used for the transformation may include various DCT kernels such as DCT type 2 (DCT-II), 1) DST kernels, and 3) kernels induced by training. For 1D transform, the DCT type and DST type may include DCT-V, DCT-VIII, DST-I, and DST-VII in addition to DCT-II.
[0557] 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.
[0558] 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.
[0559] 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.
[0560] 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).
[0561] 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).
[0562] NSPT can be applied to specific block sizes such as 4x4, 4x8, 8x4, 4x16, 16x4, 8x8, 8x16, and 16x8 for intra coding.
[0563] 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.
[0564] 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).
[0565] 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.
[0566] 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.
[0567] 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.
[0568] 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.
[0569] 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.
[0570] 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.
[0571] 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.
[0572] 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.
[0573] 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.
[0574] 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.
[0575] The description of the transformation described above can also be applied to the inverse transformation. In this application, the reverse processing of the processing described for the transformation can be performed in the inverse transformation. The term "transformation" in the name related to the transformation can be changed to "inverse transformation." Furthermore, the input of the transformation can be considered the output of the inverse transformation. The output of the transformation can be considered the input of the inverse transformation. The decoding device (150) can obtain information related to the transformation, such as transformation selection information, and can perform the reverse processing of the processing related to the transformation indicated by the information related to the transformation using the information related to the transformation.
[0576] 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.
[0577] 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.
[0578] 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.
[0579] 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.
[0580] Scanning for each scanning type can start at a specific starting point and end at a specific ending point.
[0581] 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.
[0582] 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.
[0583] 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.
[0584] 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.
[0585] 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.
[0586]
[0587] Filtering
[0588] To improve the image quality, filtering may be performed on blocks. The values of target samples may be determined or updated through filtering.
[0589] 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.
[0590] 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.
[0591] 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.
[0592] 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.
[0593] 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.
[0594] 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.
[0595] 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.
[0596] The filter coefficients can be coefficients or weights of the input samples.
[0597] 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.
[0598] 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.
[0599] Filtering may include filtering performed by predictor (123) and predictor (163), etc.
[0600] 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.
[0601] 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.
[0602] 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.
[0603] 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.
[0604] 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.
[0605] Filtering may include in-loop filtering performed by filter (130) and filter (170), etc.
[0606]
[0607] Figure 6 illustrates multiple in-loop filters according to an example.
[0608] 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).
[0609] 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.
[0610] 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).
[0611] The target block can represent an image input to the filter. The filtered target block can represent an image output from the filter.
[0612] 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.
[0613] Luma signal mapping can perform codeword redistribution for the luma signal.
[0614] 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.
[0615] Chroma scaling can correct chroma signals based on the correlation between a luma signal and a corresponding chroma signal.
[0616] 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.
[0617] 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.
[0618] 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.
[0619] 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.
[0620] 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.
[0621] 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.
[0622] 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.
[0623] 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.
[0624] 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.
[0625] 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.
[0626] 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.
[0627] 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.
[0628] ALF can compensate for distortion between the restored image and the original image.
[0629] The filter coefficients of ALF can be signaled via the bitstream.
[0630] 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.
[0631] 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.
[0632] 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.
[0633] Information regarding whether ALF applies can be signaled for specific units, such as CTB.
[0634] 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.
[0635]
[0636] Entropy encoding and entropy decoding
[0637] Figure 7 illustrates entropy encoding and entropy decoding according to an example.
[0638] The processes of entropy encoding by the entropy encoder (139) are illustrated at the top of Fig. 7.
[0639] 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.
[0640] 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.
[0641] Information about syntactic elements and bins can be provided from the binarization unit to the context selection unit.
[0642] A context modeler can perform context updates.
[0643] Context can mean occurrence probability information for each bin for syntactic elements that have already been encoded.
[0644] 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.
[0645] 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.
[0646] The updated context can be used for entropy encoding of syntactic elements of the target block.
[0647] 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.
[0648] The processes of entropy decryption by the entropy decoder (161) are shown at the bottom of Fig. 7.
[0649] 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.
[0650] A context modeler can perform context updates.
[0651] Context can mean the occurrence probability information of each bin for syntactic elements that have already been decoded.
[0652] 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.
[0653] 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.
[0654] The updated context can be used for entropy decoding of syntactic elements of the target block.
[0655] 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.
[0656] 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.
[0657] Information about syntactic elements and bins can be provided from the de-binarization unit to the context selection unit.
[0658] A syntax element may be one of the coding parameters described in the embodiments.
[0659]
[0660] Methods for binarization, debinarization, entropy encoding, and entropy decoding
[0661] 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.
[0662] - Signed 0-th order Exponential Golomb binarization / debinarization method (abbreviated as se(v))
[0663] - k-order exponential-Golomb binarization / inverse binarization method with sign (abbreviated as sek(v))
[0664] - 0-order exponent-Golomb binarization / inverse binarization method for unsigned positive integers (abbreviated as ue(v))
[0665] - k-order exponential-Golomb binarization / inverse binarization method for unsigned positive integers (abbreviated as uek(v))
[0666] - Fixed-length binarization / debinarization method (abbreviated as f(n))
[0667] - Truncated Rice binarization / debinarization method or truncated unary binarization / debinarization method (abbreviated as tu(v))
[0668] - Truncated binary binarization / debinarization method (abbreviated as tb(v))
[0669] - Context-adaptive arithmetic encoding / decoding method (abbreviated as ae(v))
[0670] - bit string in bytes (abbreviated as b(8))
[0671] - Signed integer binarization / debinarization method (abbreviated as i(n))
[0672] - Unsigned positive integer binarization / debinarization method (abbreviated as u(n)) ('u(n)' can also mean fixed-length binarization / debinarization method.)
[0673] - Unary binarization / inverse binarization method
[0674]
[0675] FIG. 8 is a flowchart of a method for predicting a target block and a method for generating a bitstream according to one embodiment.
[0676] The prediction method and bitstream generation method of the target block of the embodiment can be performed by the encoding device (110). The embodiment can be a part of the encoding method of the target block or the video encoding method.
[0677] At step (810), the processor (120) can determine prediction information to be applied to encoding the target block.
[0678] Prediction information may include information used for prediction as described in the embodiments. For example, the prediction information may include inter-prediction information. The prediction information may include intra-prediction information. The prediction information may include IBC prediction information.
[0679] At step (820), the processor (120) can perform prediction for the target block using information about the target block and determined prediction information.
[0680] A predicted block can be generated by prediction for a target block.
[0681] A residual block, which is the difference between the target block and the predicted block, can be generated. By applying transformation and quantization to the residual block, information about the target block can be generated.
[0682] Information about a target block may include transform and quantized coefficients for the target block. Information about the target block may include prediction information.
[0683] Additionally, a reconstructed block can be generated, which is the sum of the prediction block and the reconstructed residual block.
[0684] At step (830), the processor (120) can generate a bitstream.
[0685] The bitstream may contain information about the target block. Additionally, the bitstream may contain information as described above in the embodiments. For example, the bitstream may contain coding parameters related to the target block and / or attributes of the target block.
[0686] The bitstream may contain encoded / decoded / signaled information as described in the embodiments.
[0687] The information included in the bitstream may be generated in step (830), or may be generated at least partially in steps (810 and 820).
[0688] The processor (120) can store the generated bitstream in the storage (140). Alternatively, the communication device (149) can transmit the bitstream to the decryption device (150).
[0689] The bitstream may include information about the encoded target block. The processor (120) may generate information about the encoded target block by performing entropy encoding on the information about the target block.
[0690]
[0691] FIG. 9 is a flowchart of a method for predicting a target block using a bitstream according to one embodiment.
[0692] The method of predicting a target block using the bitstream of the embodiment can be performed by the decoding device (150). The embodiment can be a part of a decoding method of a target block or a video decoding method.
[0693] In step (910), the communication device (189) can obtain a bitstream. The communication device (189) can receive the bitstream from the encoding device (110).
[0694] The bitstream may contain information about the target block.
[0695] Information about a target block may include transform and quantized coefficients for the target block. Information about the target block may include prediction information.
[0696] The bitstream may contain encoded / decoded / signaled information as described in the embodiments.
[0697] Additionally, the bitstream may include information as described above in the embodiments. For example, the bitstream may include coding parameters related to the target block and / or properties of the target block.
[0698] A computer-readable recording medium may include a bitstream, and prediction and decoding of a target block may be performed using information about the target block included in the bitstream.
[0699] The bitstream may include information about an encoded target block. The processor (160) may generate information about the target block by performing entropy decoding on the information about the encoded target block.
[0700] The processor (160) can store the acquired bitstream in a storage (180).
[0701] At step (920), the processor (160) can determine prediction information to be applied to decryption of the target block.
[0702] The processor (160) can determine prediction information using the method used in the above-described embodiment.
[0703] The processor (160) can determine prediction information of the target block based on information related to the prediction method obtained from the bitstream.
[0704] Prediction information may include information used for prediction as described in the embodiments. For example, the prediction information may include inter-prediction information. The prediction information may include intra-prediction information. The prediction information may include IBC prediction information.
[0705] At step (930), the processor (160) can perform prediction for the target block using information about the target block and determined prediction information.
[0706] In step (930), a prediction block can be generated by performing a prediction on a target block using prediction information.
[0707] Additionally, a reconstructed block can be generated that is the sum of the predicted block and the reconstructed residual block.
[0708] In embodiments, a particular object being encoded in a particular method / mode may mean that a particular method / mode is used in encoding / decoding the particular object.
[0709] Additionally, in embodiments, encoding may mean encoding and / or decoding.
[0710]
[0711] Improved motion information
[0712] In the embodiments, “motion information improvement value” and “motion information correction vector” may be used with the same meaning and may be replaced with each other.
[0713] In embodiments, deriving second motion information from first motion information may mean obtaining second motion information by correcting the first motion information.
[0714]
[0715] Pictures and Slices
[0716] The coding parameters may include at least one of the type of the target picture and the type of the target slice.
[0717] The type of the target picture can be one of I-picture, B-picture, and P-picture.
[0718] The type of the target slice can be one of I-slice, B-slice, and P-slice.
[0719] When the target image to be encoded is an I-slice, the target image can be encoded / decoded using data within the target image itself without inter prediction referring to other images. For example, the I-slice can be encoded / decoded only with intra prediction and / or intra block copy (IBC). Alternatively, the I-slice can be encoded / decoded without using inter prediction.
[0720] When the target image is a P slice, the target image can be encoded / decoded through inter prediction using only reference slices existing in a unidirectional direction. Here, the unidirectional direction can be the forward direction or the backward direction.
[0721] When the target image is a B slice, the target image can be encoded using inter prediction using reference slices existing in both directions; or inter prediction using reference slices existing in one of the forward and backward directions. Here, the bidirectional can be forward and backward.
[0722] P slices and B slices encoded / decoded using reference slices can be considered as images in which inter prediction is used.
[0723]
[0724] Surrounding samples of chroma component blocks
[0725] In embodiments, when the target block is a chroma component block, the neighboring samples of the target block may include luma component samples corresponding to the neighboring chroma component samples of the target block.
[0726]
[0727] Template matching
[0728] Figure 10 illustrates template matching according to an example.
[0729] In template matching, motion information of a target block can be determined and / or changed based on the result of calculating a cost function between a target template for a target block and a reference template for a reference block.
[0730] In one embodiment, template matching may be used to determine motion information of a target block. Motion information may be determined based on the calculation of costs between the target template and each of the reference templates.
[0731] Here, the motion information may correspond to the displacement from the position of the target block to the position of the reference block having the lowest cost reference template.
[0732] The lowest cost reference template may be the reference template with the lowest cost among the reference templates.
[0733] The determined motion information can be used as motion information of the target block.
[0734] In embodiments, when n objects are selected, "lowest cost" may refer to the first n costs among the costs of objects sorted in ascending order. "highest cost" may refer to the first n costs among the costs of objects sorted in descending order. n may be an integer greater than or equal to 1.
[0735] In another embodiment, template matching can be used to modify or improve motion information of a target block.
[0736] For example, reference templates can be determined for reference blocks at a location indicated by initial motion information for the target block; and at a location spaced apart from the location in a predetermined direction and at a predetermined interval.
[0737] And, based on the calculation of the costs between each of the target template and the reference templates, the motion information corresponding to the displacement from the target block to the reference block having the lowest cost reference template can be determined as the final motion vector of the target block.
[0738] In another embodiment, template matching may be used to reorder motion information candidates included in a motion information candidate list of a target block. For example, reference templates of reference blocks at locations indicated by each of the motion information candidates in the motion information candidate list may be constructed. Then, based on the calculation of costs between the target template and the reference templates, the motion information candidates may be reordered in ascending order of costs. Through this processing, motion information candidates with a high probability of being selected as motion information of the target block may be assigned lower indices.
[0739] In template matching, a reference block may include at least one of a reference block pointed to by initial motion information; a reference block pointed to by motion information derived during a search process of template matching; and a reference block pointed to by motion information finally improved by template matching.
[0740] Here, the initial motion information may be motion information of the target block signaled from the encoding device to the decoding device. The initial motion information may be motion information of the target block derived by another method of the embodiments.
[0741] The motion information improved by template matching may be motion information with the lowest matching cost derived from the template matching search process. However, the method for deriving the motion information may not be limited to the aforementioned method / criteria.
[0742] The template matching method may include at least one of an inter-template matching mode and an intra-template matching mode.
[0743] In embodiments involving template matching, the motion information may refer to a motion vector or a block vector. For example, the initial motion information may be an initial motion vector or an initial block vector.
[0744] Inter-template matching mode may refer to a template matching method in which a reference block is constructed based on a specific sample of a previously reconstructed reference picture prior to restoration of the target picture. The specific sample may be at least one of the samples of embodiments, such as a prediction sample, a restoration sample, and a residual sample.
[0745] Intra template matching mode may refer to a template matching method in which a reference block is constructed based on a specific sample of a target picture. The specific sample may be at least one of the samples of embodiments, such as a prediction sample, a reconstruction sample, and a residual sample.
[0746] The template matching cost may be the result of calculating the cost between the template of the target block used in template matching and the template of the reference block using a cost function. The template matching cost may refer to the template matching cost for the displacement between the target block and the reference block used in template matching, i.e., for the motion information.
[0747] If the target block is a chroma component block, the template matching cost can be determined based on sample values of the restored luma component area corresponding to the chroma component block.
[0748] For example, if the target block is a chroma component block, the template matching cost may mean a cost between samples within a luma component region corresponding to a reference chroma component block determined based on initial motion information of the target chroma component block; and samples within a luma component block corresponding to the target chroma component block.
[0749] The initial motion information may be a zero vector, or may be a motion vector obtained by applying scaling based on a chroma component format to a predetermined motion vector of a luma component region corresponding to the target chroma component block.
[0750] That the initial motion information is a zero vector may mean that the positions of the target chroma component blocks within the target picture and the positions of the reference chroma component blocks within the reference picture are the same.
[0751] A luma component region corresponding to a target chroma component block can be considered as a single luma component block. Template matching can be performed on these luma component blocks. Then, motion information of the target chroma component block can be determined based on motion information with the minimum cost.
[0752] When there are multiple luma component blocks within a luma component region corresponding to a target chroma component block, motion information of the target chroma component block may be determined by performing template matching on at least one of the multiple luma component blocks.
[0753] In another embodiment, the template matching cost of the target chroma component block can be determined by calculating the cost between the reference template of the luma component region / block corresponding to the reference chroma component reference block; and the target template of the luma component region / block corresponding to the target chroma component block.
[0754]
[0755] Template configuration
[0756] Templates used in template matching may include target templates and reference templates.
[0757] The target template can be constructed using a reference region containing surrounding samples of the target block.
[0758] The reference region of the target block may include at least one of samples located in the lower left region, the left region, the upper left region, the upper region, and the upper right region of the target block.
[0759] In one embodiment, the target template may be identical to the reference region of the target block.
[0760] In another embodiment, when constructing a target template in template matching, some of the samples within the reference region of the target block may be selected. The target template may then be constructed using the selected samples.
[0761] A reference template can be constructed using a reference region that includes surrounding samples of a reference block.
[0762] The reference area of the reference block may be an area corresponding to the reference area of the target block. For example, the reference area of the reference block may include at least one of samples located in the lower left area, the left area, the upper left area, the upper area, and the upper right area of the reference block.
[0763] In one embodiment, the reference template may be identical to the reference region of the reference block. For example, samples of the reference template specified with respect to the reference block may correspond to samples of the target template specified with respect to the target block.
[0764] In another embodiment, when constructing a reference template in template matching, some samples within the reference region of the reference block may be selected. The reference template may be constructed using the selected samples. For example, the samples selected for constructing a reference template based on the reference block may correspond to the samples selected for constructing a template of the target block based on the target block.
[0765] In inter-template matching mode, each of the reference block, the reference template, and the reference region may be composed of a specific sample of a previously reconstructed reference picture prior to restoration of the target picture. The specific sample may be at least one of the samples of embodiments, such as a prediction sample, a restoration sample, and a residual sample.
[0766] In intra template matching mode, each of the reference block, the reference template, and the reference region may be composed of a specific sample of the target picture. The specific sample may be at least one of the samples of the embodiments, such as a prediction sample, a reconstruction sample, and a residual sample.
[0767]
[0768] How to search for template matching
[0769] A first search step may be performed using first motion information encoded into or decoded from a bitstream as initial motion information.
[0770] Second motion information can be derived as a result of correcting the first motion information through the first search step.
[0771] The second search step performed after the first search step can use the second motion information as initial motion information.
[0772] If the initial motion information is not in units of integer pixels (i.e., in units of fractional pixels), the search may be performed using the result of applying rounding to the initial motion information. Instead of rounding, the initial motion information may be rounded down or up.
[0773] For example, in the search process, in order to generate a reference template at a position indicated by motion information generated by adding a specific offset to the initial motion information in units of fractional pixels, a sample at a position in units of fractional pixels can be generated by applying an interpolation filter to samples at positions of integer pixels.
[0774] Initial motion information may be limited to integer pixel units. In this case, interpolation of fractional pixel positions may not be performed during the search process. By eliminating interpolation, the search complexity can be reduced.
[0775]
[0776] Definition of navigation
[0777] The search can be performed using the computation of a cost function to determine the similarity between NUM_TEMPLATE_COMPARE templates.
[0778] The search may include a process of determining at least one motion information that satisfies a particular condition within a particular search range.
[0779] Motion information of a target block can be determined and / or changed based on at least one piece of motion information determined by the search.
[0780] Motion information satisfying a specific condition may refer to motion information with the lowest matching cost among motion information within the search range. However, motion information satisfying a specific condition may not be limited to motion information with the lowest matching cost.
[0781]
[0782] cost function
[0783] The cost function used for cost calculation may mean a function that determines the similarity between at least one sample in the target template and at least one sample in the reference template.
[0784] The similarity between the first value and the second value can be determined using at least one of: 1) a difference between the two values; 2) a ratio between the two values; and 3) an operation that compares the difference between the two values with a specific value.
[0785] As an embodiment of an operation that compares the difference between two values with a specific value, a method may be used in which one of a plurality of different similarity values is assigned depending on which interval the difference between two values belongs to among intervals distinguished by one or more threshold values.
[0786] For example, when a single threshold value is used, a method may be used in which a first similarity value (e.g., 1) is assigned if the difference between two values is less than or equal to the threshold value, and a second similarity value (e.g., 0) is assigned otherwise.
[0787] The cost function may be one or more of the methods for calculating statistical values described in the embodiments.
[0788] Methods for calculating statistical values may include Sum of Absolute Differences (SAD); Sum of Absolute Transformed Differences (SATD); Mean-Removed Sum of Absolute Differences (MR-SAD); Mean Squared Error (MSE); and Sum of Squared Error (SSE), and methods used to derive statistical values described in the embodiments.
[0789] The cost function used in template matching can be predefined and determined based on signaling / encoding / decoding information.
[0790] The cost function used in template matching may be determined based on at least one of: whether bilateral matching (BM) is performed; conditions related to bilateral matching; whether inter-weighted bi-prediction is performed; and the size of the target block.
[0791] In one embodiment, MR-SAD can be used as a cost function of template matching when the target block satisfies all or part of one or more activation conditions of the two-sided matching, or when the two-sided matching is performed on the target block.
[0792] In another embodiment, SAD may be used as a cost function of template matching when the target block does not satisfy all or some of one or more of the activation conditions of the two-sided matching, or when the two-sided matching is not performed on the target block.
[0793] In another embodiment, the type of the cost function in template matching may be determined based on specific conditions for determining the type of the cost function in bilateral matching. The type of the cost function in bilateral matching may be determined based on whether specific conditions are met. In this case, the type of the cost function in template matching may be determined based on whether the activation condition for bilateral matching and the above-mentioned specific conditions for determining the type of the cost function in bilateral matching are met.
[0794] For example, if the target block satisfies the activation condition of bilateral matching; and a specific condition for determining the cost function of bilateral matching; MR-SAD may be used as the cost function of template matching, and if it does not satisfy the condition, SAD may be used as the cost function of template matching.
[0795] In another embodiment, if the target block satisfies the activation condition of bilateral matching; inter-weighted bi-prediction is performed or the number of samples within the target block is greater than a certain value; MR-SAD may be used as the cost function in template matching; otherwise, SAD may be used as the cost function in template matching.
[0796]
[0797] Search scope (search area)
[0798] 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.
[0799] Alternatively, the search range may be a specific range where the upper left point is the location indicated by the initial motion information. In other words, the upper left point of the search range may be the location indicated by the initial motion information.
[0800] Alternatively, the search range may be an area including the positions of surrounding samples in at least one of the lower left, left, upper left, top, and upper right directions of the target block.
[0801] 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. Alternatively, the search range may have the shape of a hexagon with the lower right square area excluded. However, the shape and size of the search range may not be limited to the embodiments described above.
[0802]
[0803] How to navigate
[0804] The search method can be defined based on at least one of a search pattern, a search resolution, a search range, initial motion information, and a unit from which motion information is derived.
[0805] The search pattern can be one of the diamond, cross, or full-search patterns. However, the search pattern is not limited to the patterns listed above.
[0806] The search resolution can be one of 4-pel, full-pel, half-pel, and quarter-pel. However, the search resolution is not limited to the aforementioned pels.
[0807] The unit from which motion information is derived may include entire blocks and sub-blocks.
[0808] To determine a search method defined by a search pattern and a search resolution, at least one of a coding parameter of a target block, motion information 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 may be used.
[0809]
[0810] Two-sided matching
[0811] Figure 11 illustrates bilateral matching according to an example.
[0812] 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 result of calculating a cost function between the two templates.
[0813] The reference block may include at least one of the reference blocks described in the embodiments, such as 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.
[0814] For example, in constructing a template for bilateral matching, a reference block in the L0 direction and a reference block in the L1 direction can be used as templates.
[0815] The two-sided matching cost may refer to the result value of a calculation using cost functions for the templates of the L0-direction reference block and the L1-direction reference block used in the two-sided matching.
[0816] If the target block is in IBC mode and is predicted using two or more reference blocks, bilateral matching may be performed using two different reference blocks among the reference blocks of the target block as templates.
[0817] Below, bilateral prediction in inter prediction, not in IBC mode, is described, but at least some of the technical features of bilateral prediction in inter prediction can also be applied to IBC mode. In such a case, the reference blocks in the L0 and L1 directions can be replaced with two reference blocks generated in IBC mode.
[0818]
[0819] Conditions for performing two-sided matching
[0820] Bilateral matching may always be performed, or bilateral matching may be performed only when predefined enabling conditions are met.
[0821] 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.
[0822] In one embodiment, bilateral matching may be performed when the first direction and the second direction are different, and the first POC interval (or difference) and the second POC interval are equal.
[0823] The first direction may be a direction from the target image to the L0 direction reference image. The second direction may be a direction from the target image to the L1 direction reference image.
[0824] The first POC interval may be the difference between the POC of the target image and the POC of the L0 direction reference image. The second POC interval may be the difference between the POC of the target image and the POC of the L1 direction reference image.
[0825] In another embodiment, bilateral matching may be performed when the first and second directions are different. For example, bilateral matching may be performed when the first and second directions are different, even when the first and second POC intervals are different.
[0826] Here, the fact that the first and second directions are different may mean that [Mathematical Formula 1] below is satisfied.
[0827] [Mathematical Formula 1]
[0828] (POCt - POC0) × (POCt - POC1) < 0
[0829] Here, the fact that the first direction and the second direction are the same may mean that [Mathematical Formula 2] below is satisfied.
[0830] [Equation 2]
[0831] (POCt - POC0) × (POCt - POC1) > 0
[0832] In [Mathematical Formula 1] and [Mathematical Formula 2], POCt may represent the POC of the target image. POC0 may represent the POC of the L0-direction reference image. POC1 may represent the POC of the L1-direction reference image.
[0833] In another embodiment, the bilateral direction can be performed even when the first direction and the second direction are the same.
[0834] For example, bilateral matching can be performed when the prediction mode of the target block is an inter prediction mode, two or more reference blocks are used, the first direction and the second direction are the same, and a condition based on at least one of the first POC interval and the second POC interval is satisfied.
[0835] For example, bilateral matching can be performed when the first direction and the second direction are the same and the smaller value of the first POC interval and the second POC interval is less than a predetermined value.
[0836] As another example, bilateral matching can be performed when two or more reference blocks are used, the first direction and the second direction are the same, and the larger value of the first POC interval and the second POC interval is less than a predetermined value.
[0837] For example, bilateral matching may be performed based on the ratio of the first POC interval and the second POC interval. For example, bilateral matching may be performed when the ratio of the larger value to the smaller value among the first POC interval and the second POC interval is less than or equal to a predetermined value.
[0838] The given value can be 1, 2, 3, 4, 8, or a positive integer.
[0839] In bilateral matching, the relationship between the magnitude of the motion information improvement value for the L0 direction and the magnitude of the motion information improvement value for the L1 direction can be determined based on the first POC interval and the second POC interval.
[0840] For example, according to [Mathematical Formula 3] below, the magnitude of the motion information improvement value for the L0 direction and the magnitude of the motion information improvement value for the L1 direction can be determined.
[0841] [Equation 3]
[0842] (Size of the motion information improvement value for the L0 direction) : (Size of the motion information improvement value for the L1 direction) = (2nd POC interval) : (1st POC interval)
[0843] In bilateral matching, the relationship between the direction of the motion information improvement value for the L0 direction and the direction of the motion information improvement value for the L1 direction can be determined based on the first direction and the second direction.
[0844] For example, when the first direction and the second direction are the same, the direction of the motion information improvement value for the L0 direction and the direction of the motion information improvement value for the L1 direction may be the same, and otherwise, the direction of the motion information improvement value for the L0 direction and the direction of the motion information improvement value for the L1 direction may be opposite.
[0845]
[0846] Search method for two-sided matching
[0847] Definition of navigation
[0848] The search can be performed using the computation of a cost function to determine the similarity between two templates.
[0849] The search may include a process of determining at least one piece of motion information that satisfies a specific condition within a specific search range. The motion information of the target block may be determined and / or modified based on the at least one piece of motion information determined through the search.
[0850] For example, motion information that satisfies a specific condition may mean motion information with the lowest matching cost among motion information within the search range, but is not limited thereto.
[0851] The search may involve determining at least one block within a particular search range that satisfies certain conditions.
[0852] Motion information indicating a block determined through exploration can be used as motion information of the target block.
[0853] For example, a block satisfying a specific condition may mean, but is not limited to, motion information having the lowest matching cost among reference blocks within the search range.
[0854]
[0855] cost function
[0856] The cost function may mean a function that determines the similarity between at least one sample in the first template and at least one sample in the second template, for two templates of a two-sided matching.
[0857] For example, the cost function may be a function that determines the similarity between at least one sample in a first template and a corresponding sample in a second template.
[0858] 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.
[0859] The cost function may be one or more of the methods for calculating statistical values described in the embodiments.
[0860] Methods for calculating statistical values may include Sum of Absolute Differences (SAD); Sum of Absolute Transformed Differences (SATD); Mean-Removed Sum of Absolute Differences (MR-SAD); Mean Squared Error (MSE); and Sum of Squared Error (SSE), and methods used to derive statistical values described in the embodiments.
[0861] The cost function used in two-way matching can be predefined and determined based on signaling / encoding / decoding information.
[0862] For example, if the target block size is smaller than a certain value, SAD can be used as the cost function in two-sided matching. Otherwise, MR-SAD can be used as the cost function in two-sided matching.
[0863] In embodiments, the size of a block may include at least one of: a width of the block; a height of the block; a sum of the width of the block and the height of the block; a product of the width of the block and the height of the block; a larger value of the width and the height of the block; and a smaller value of the width and the height of the block.
[0864] For example, if BCW is not performed on the target block or if the same weights are used for the L0-direction reference block and the L1-direction reference block in BCW, SAD or SATD can be used as the cost function in bilateral matching. Otherwise, MR-SAD or MR SATD can be used as the cost function in bilateral matching.
[0865] For example, if Local Illumination Compensation (LIC) mode is not performed in the target block, SAD can be used as the cost function in bilateral matching. Otherwise, MR-SAD can be used as the cost function in bilateral matching.
[0866]
[0867] How to navigate
[0868] At least some of the descriptions of the search method for template matching can also be applied to the search method for two-sided matching.
[0869]
[0870] Search scope (search area)
[0871] In bilateral matching, the size of the search area in the L0 direction and the size of the search area in the L1 direction can be the same.
[0872] Alternatively, in a two-sided matching, the sizes of the search area in the L0 direction and the search area in the L1 direction can be determined based on the first POC interval and the second POC interval. Here, the sizes of the search areas can be the same or different.
[0873] In a two-sided matching, the center of the search area in the LX direction may be a location (or block) indicated by the motion information in the LX direction. The search area may be a rectangle with a height of a first value and a width of a second value. The first and second values may be the same or different.
[0874] The first value and the second value may be predefined values. Alternatively, the first value and the second value may be values determined based on at least one of: a coding parameter of the target block; a prediction mode of the target block; motion information of the target block; a size of the target block; a range of values that a luma component of the target block can have; a range of values that a chroma component of the target block can have; the availability of a surrounding block of the target block; a coding parameter of a surrounding block of the target block; surrounding samples of the target block; and motion information.
[0875] X can be 0 or 1. X can always be 0. Alternatively, X can always be 1. Alternatively, X can be 1 if the second POC interval is greater than the first POC interval, and 0 otherwise. Alternatively, X can be 0 if the second POC interval is greater than the first POC interval, and 1 otherwise.
[0876] The center of the search area in the L(1-X) direction can be a location (or block) indicated by the motion information in the L(1-X) direction. The search area can be a rectangle with a height of the third value and a width of the fourth value.
[0877] The third value and the fourth value may be determined based on the first value and the second value, respectively.
[0878] The third value may be a value determined based on the first value; and the first POC interval and the second POC interval; The fourth value may be a value determined based on the second value; and the first POC interval and the second POC interval;
[0879] For example, the third value may be derived by multiplying or dividing the first value by (first POC interval / second POC interval).
[0880] For example, the fourth value may be a value derived by multiplying or dividing the second value by (first POC interval / second POC interval).
[0881] For example, the third value may be a value derived by multiplying or dividing the first value by (first POC interval / second POC interval); and a predetermined value; whichever is greater.
[0882] For example, the fourth value may be a value derived by multiplying or dividing the second value by (first POC interval / second POC interval); and a predetermined value; whichever is greater.
[0883] These predetermined values may be 4, 8, 16, 32, or a positive integer. The predetermined values may be values determined based on at least one of: coding parameters of the target block; prediction mode of the target block; motion information of the target block; size of the target block; range of values that a luma component of the target block can have; range of values that a chroma component of the target block can have; availability of surrounding blocks of the target block; coding parameters of surrounding blocks of the target block; surrounding samples of the target block; and motion information.
[0884]
[0885] Exploration phase of two-sided matching
[0886] If the initial motion information is not in units of integer pixels (i.e., in units of fractional pixels), the search may be performed using the result of applying rounding to the initial motion information. Instead of rounding, the initial motion information may be rounded down or up.
[0887] For example, in order to generate a template at a position indicated by motion information generated by adding a specific offset to the initial motion information in units of fractional pixels during the search process, a sample at a position in units of fractional pixels can be generated by applying an interpolation filter to samples at positions of integer pixels.
[0888] Initial motion information may be limited to integer pixel units. In this case, interpolation of fractional pixel positions may not be performed during the search process. By eliminating interpolation, the search complexity can be reduced.
[0889] Bilateral matching may involve one or more search steps.
[0890] 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.
[0891] In Fig. 11, MV0 can represent initial motion information in the L0 direction. MV1 can represent initial motion information in the L1 direction.
[0892] MVdiff can mean the motion information improvement value induced by bilateral matching.
[0893] MV0' and MV1' may be motion information derived by bilateral matching.
[0894] 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, [Mathematical Equation 4] and [Mathematical Equation 5] below may be established.
[0895] [Equation 4]
[0896] MV0' = MV0 + MVdiff
[0897] [Equation 5]
[0898] MV1' = MV1 - MVdiff
[0899] For example, if the target block is in IBC mode and two or more reference blocks are used, when bilateral matching is performed in the target block, the values and directions of the motion information improvement for the first reference block and the motion information improvement for the L1 direction may be the same.
[0900]
[0901] Subblock-based two-sided matching
[0902] In one embodiment, when performing bilateral matching, only motion information derivation for units of sub-blocks may be performed. That is, motion information derivation for units of the entire block may not be performed.
[0903] In performing bilateral matching, an indicator may be signaled / encoded / decoded as to whether motion information derivation based on sub-blocks is performed.
[0904] In performing bilateral matching, whether motion information correction based on a sub-block is performed can be determined based on at least one of a coding parameter of a target block, a size of the target block, motion information of the target block, coding parameters of a surrounding block, and motion information of a surrounding block.
[0905] In one embodiment, when performing bilateral matching, motion information derivation in units of subblocks may be performed only when the larger value among the width W of the target block and the height H of the target block is greater than MIN_SIZE_THRES_FOR_SUB. For example, an indicator may be signaled / encoded / decoded as to whether motion information derivation in units of subblocks is performed only when the larger value among W and H is greater than the first threshold (MIN_SIZE_THRES_FOR_SUB).
[0906] MIN_SIZE_THRES_FOR_SUB can be a predefined value. For example, MIN_SIZE_THRES_FOR_SUB can be 8, 16, 32, 64, 128, or a positive integer.
[0907] As an alternative or additional embodiment, motion information derivation in units of subblocks may be performed only if the larger value of W and H is less than a second threshold (MAX_SIZE_THRES_FOR_SUB). For example, an indicator may be signaled / encoded / decoded as to whether motion information derivation in units of subblocks is performed only if the larger value of W and H is less than MAX_SIZE_THRES_FOR_SUB.
[0908] MAX_SIZE_THRES_FOR_SUB can be a predefined value, for example, 8, 16, 32, 64, 128, or a positive integer.
[0909] In some embodiments, motion information derivation in units of subblocks may be performed only if the smaller value of W and H is greater than MIN_SIZE_THRES_FOR_SUB. For example, an indicator may be signaled / encoded / decoded as to whether motion information derivation in units of subblocks is performed only if the smaller value of W and H is greater than MIN_SIZE_THRES_FOR_SUB.
[0910] As an alternative or additional embodiment, motion information derivation in units of subblocks may be performed only if the smaller value of W and H is less than MAX_SIZE_THRES_FOR_SUB. For example, an indicator of whether motion information derivation in units of subblocks is performed only if the smaller value of W and H is less than MAX_SIZE_THRES_FOR_SUB may be signaled / encoded / decoded.
[0911] In one embodiment, W may be the width of the target block, and H may be the height of the target block. Motion information derivation in units of subblocks may be performed only if the resulting value of WxH (i.e., the area of the target block or the total number of samples within the target block) is greater than a third threshold (MIN_SIZE_AREA_THRES_FOR_SUB).
[0912] For example, an indicator of whether motion information derivation in units of subblocks is performed can be signaled / encoded / decoded only if the resulting value of WxH is greater than MIN_SIZE_AREA_THRES_FOR_SUB.
[0913] MIN_SIZE_AREA_THRES_FOR_SUB can be a predefined value. For example, MIN_SIZE_AREA_THRES_FOR_SUB can be 8, 16, 32, 64, 128, or a positive integer.
[0914] As an alternative or additional embodiment, motion information derivation in units of subblocks may be performed only when the resulting value of WxH is less than a fourth threshold value (MAX_SIZE_AREA_THRES_FOR_SUB).
[0915] For example, an indicator of whether motion information derivation in units of subblocks is performed can be signaled / encoded / decoded only if the resulting value of WxH is less than MAX_SIZE_AREA_THRES_FOR_SUB.
[0916] MAX_SIZE_AREA_THRES_FOR_SUB can be a predefined value, for example, 8, 16, 32, 64, 128, or a positive integer.
[0917] When bidirectional matching is performed on a subblock basis, size information of the subblock may be signaled / encoded / decoded for at least one subblock for which bidirectional matching or motion information derivation is performed.
[0918] Alternatively, at least one of the width and height of the sub-block may be determined based on at least one of the coding parameters of the target block, the size of the target block, the motion information of the target block, the coding parameters of the surrounding blocks, and the motion information of the surrounding blocks.
[0919] In one embodiment, at least one of the width and height of a subblock may be one of the sizes belonging to a given list.
[0920] For example, a given list may be a list of size information.
[0921] For example, a given list can be predefined.
[0922] In one embodiment, motion information derivation or bidirectional matching of units of subblocks where at least one of the width and height of the subblock is a value of SUBBLOCK_SIZE_ALWAYS may be performed one or more times.
[0923] SUBBLOCK_SIZE_ALWAYS can be a predefined value. For example, SUBBLOCK_SIZE_ALWAYS can be 1, 2, 4, 8, 16, 32, 64, 128, or a positive integer.
[0924] Information about SUBBLOCK_SIZE_ALWAYS can be signaled / encoded / decoded.
[0925] In one embodiment, if the width of the target block is greater than a specific threshold width (e.g., SUBBLOCK_SIZE_ALWAYS), motion information derivation of units of subblocks having the specific threshold width may be performed at least once.
[0926] In one embodiment, if the height of the target block is greater than a specific threshold height (e.g., SUBBLOCK_SIZE_ALWAYS), motion information derivation of units of subblocks having the specific threshold height may be performed at least once.
[0927] In one embodiment, if the width of the target block is smaller than a specific threshold width (e.g., SUBBLOCK_SIZE_ALWAYS), motion information derivation in units of subblocks having the same width as the target block may be performed at least once.
[0928] In one embodiment, if the height of the target block is less than a specific threshold height (e.g., SUBBLOCK_SIZE_ALWAYS), motion information derivation of units of subblocks having the same height as the target block may be performed at least once.
[0929] In one embodiment, if the larger value of the width W of the target block and the height H of the target block is greater than MIN_SIZE_THRES_FOR_SUBBLOCK_SIZE, the motion information derivation process in units of subblocks having a size of SUBBLOCK_SIZE1 may be performed at least once.
[0930] For example, information about SUBBLOCK_SIZE1 can be signaled / encoded / decoded. For example, SUBBLOCK_SIZE1 can be 1, 2, 4, 8, 16, 32, 64, 128, or any positive integer.
[0931] MIN_SIZE_THRES_FOR_SUBBLOCK_SIZE can be a predefined value. For example, MIN_SIZE_THRES_FOR_SUBBLOCK_SIZE can be 8, 16, 32, 64, 128, or a positive integer.
[0932] As an additional or alternative embodiment, if the larger value of W and H is less than MAX_SIZE_THRES_FOR_SUBBLOCK_SIZE, the motion information derivation process in units of subblocks having a size of SUBBLOCK_SIZE2 may be performed one or more times.
[0933] For example, information about SUBBLOCK_SIZE2 can be signaled / encoded / decoded.
[0934] For example, SUBBLOCK_SIZE2 can be 1, 2, 4, 8, 16, 32, 64, 128 or a positive integer. The MAX_SIZE_THRES_FOR_SUBBLOCK_SIZE can be a predefined value.
[0935] For example, MAX_SIZE_THRES_FOR_SUBBLOCK_SIZE can be 8, 16, 32, 64, 128, or any positive integer.
[0936] In another embodiment, if the smaller value of W and H is greater than MIN_SIZE_THRES_FOR_SUBBLOCK_SIZE, the motion information derivation process of a unit of a subblock having a size of SUBBLOCK_SIZE1 may be performed more than once.
[0937] As an additional or alternative embodiment, if the smaller value of W and H is less than MAX_SIZE_THRES_FOR_SUBBLOCK_SIZE, the motion information derivation process in units of subblocks having a size of SUBBLOCK_SIZE2 may be performed one or more times.
[0938] In another embodiment, if the resulting value of WxH (i.e., the area of the target block or the total number of samples within the target block) is greater than MIN_SIZE_AREA_THRES_FOR_SUBBLOCK_SIZE, the motion information derivation process in units of subblocks having a size of SUBBLOCK_SIZE3 may be performed one or more times.
[0939] For example, information about SUBBLOCK_SIZE3 can be signaled / encoded / decoded.
[0940] For example, SUBBLOCK_SIZE3 can be 1, 2, 4, 8, 16, 32, 64, 128, or any positive integer.
[0941] MIN_SIZE_AREA_THRES_FOR_SUBBLOCK_SIZE can be a predefined value. For example, MIN_SIZE_AREA_THRES_FOR_SUBBLOCK_SIZE can be 8, 16, 32, 64, 128, or a positive integer.
[0942] As an additional or alternative embodiment, if the resulting value of WxH is greater than MAX_SIZE_AREA_THRES_FOR_SUBBLOCK_SIZE, the motion information derivation step in units of subblocks having a size of SUBBLOCK_SIZE4 may be performed one or more times.
[0943] For example, information about SUBBLOCK_SIZE4 can be signaled / encoded / decoded.
[0944] For example, SUBBLOCK_SIZE4 can be 1, 2, 4, 8, 16, 32, 64, 128, or any positive integer.
[0945] MAX_SIZE_AREA_THRES_FOR_SUBBLOCK_SIZE can be a predefined value. For example, MAX_SIZE_AREA_THRES_FOR_SUBBLOCK_SIZE can be 8, 16, 32, 64, 128, or a positive integer.
[0946]
[0947] Matching of both sides of the entire block
[0948] When performing two-sided matching, it can be predefined whether motion information derivation is performed for the entire block unit.
[0949] For example, when performing bilateral matching, only motion information derivation for units of the entire block can always be performed.
[0950] For example, when performing bilateral matching, an indicator can be signaled / encoded / decoded as to whether motion information derivation is performed for the entire block unit.
[0951] In one embodiment, motion information derivation for the entire block may be performed only if the larger value of the width W of the target block and the height H of the target block is greater than MIN_SIZE_THRES_FOR_WHOLE.
[0952] Alternatively, an indicator may be signaled / encoded / decoded as to whether motion information derivation is performed for the whole block only if the larger value of W and H is greater than MIN_SIZE_THRES_FOR_WHOLE.
[0953] MIN_SIZE_THRES_FOR_ WHOLE can be a predefined value. For example, MIN_SIZE_THRES_FOR_WHOLE can be 8, 16, 32, 64, 128, or a positive integer.
[0954] As an additional or alternative embodiment, motion information derivation for the entire block may be performed only if the larger value of W and H is less than MAX_SIZE_THRES_FOR_WHOLE.
[0955] Alternatively, an indicator may be signaled / encoded / decoded as to whether motion information derivation is performed for units of whole blocks only if the larger of W and H is less than MAX_SIZE_THRES_FOR_WHOLE.
[0956] MAX_SIZE_THRES_FOR_WHOLE can be a predefined value. For example, MAX_SIZE_THRES_FOR_WHOLE can be 8, 16, 32, 64, 128, or a positive integer.
[0957] In one embodiment, motion information derivation for the entire block may be performed only if the smaller value of W and H is greater than MIN_SIZE_THRES_FOR_WHOLE.
[0958] Alternatively, an indicator may be signaled / encoded / decoded as to whether motion information derivation is performed for the whole block only if the smaller of W and H is greater than MIN_SIZE_THRES_FOR_WHOLE.
[0959] MIN_SIZE_THRES_FOR_WHOLE can be a predefined value. For example, MIN_SIZE_THRES_FOR_WHOLE can be 8, 16, 32, 64, 128, or a positive integer.
[0960] As an additional or alternative embodiment, motion information derivation for the entire block may be performed only if the smaller value of W and H is less than MAX_SIZE_THRES_FOR_WHOLE.
[0961] Alternatively, an indicator may be signaled / encoded / decoded as to whether motion information derivation is performed for units of whole blocks only if the smaller of W and H is less than MAX_SIZE_THRES_FOR_WHOLE.
[0962] MAX_SIZE_THRES_FOR_WHOLE can be a predefined value. For example, MAX_SIZE_THRES_FOR_WHOLE can be 8, 16, 32, 64, 128, or a positive integer.
[0963] In one embodiment, motion information derivation for the entire block can be performed only if the resulting value of WxH (i.e., the area of the target block or the total number of samples within the target block) is greater than MIN_SIZE_AREA_THRES_FOR_WHOLE.
[0964] Alternatively, an indicator may be signaled / encoded / decoded as to whether motion information derivation is performed for the entire block only if the resulting value of WxH is greater than MIN_SIZE_AREA_THRES_FOR_WHOLE.
[0965] MIN_SIZE_AREA_THRES_FOR_WHOLE can be a predefined value. For example, MIN_SIZE_AREA_THRES_FOR_WHOLE can be 8, 16, 32, 64, 128, or a positive integer.
[0966] As an additional or alternative embodiment, motion information derivation for the entire block may be performed only if the resulting value of WxH is less than MAX_SIZE_AREA_THRES_FOR_WHOLE.
[0967] Alternatively, an indicator may be signaled / encoded / decoded as to whether motion information derivation is performed for the entire block only if the resulting value of WxH is less than MAX_SIZE_AREA_THRES_FOR_WHOLE.
[0968] MAX_SIZE_AREA_THRES_FOR_SUB can be a predefined value. For example, MAX_SIZE_AREA_THRES_FOR_SUB can be 8, 16, 32, 64, 128, or a positive integer.
[0969] Template matching or two-sided matching of the embodiments may be activated or performed under certain conditions.
[0970] In one embodiment, template matching or bilateral matching may be activated or performed based on the type of the target picture and / or the type of the target slice.
[0971] For example, template matching and / or bilateral matching may be activated or performed only when the target picture is a B-picture or a B-slice.
[0972] As another example, template matching and / or bilateral matching in the intra merge mode described below may be activated or performed only when the target picture is a B-picture or a B-slice.
[0973] As another example, template matching and / or bilateral matching in intra-merge mode may be enabled or performed only when the target picture is an I-picture or an I-slice.
[0974] In one embodiment, whether template matching and / or bilateral matching is enabled or performed may be determined based on at least one of the POC of the reference picture candidates in the reference picture list and the POC of the target picture.
[0975] The reference picture list may include at least one of a reference picture list in the L0 direction and a reference picture list in the L1 direction.
[0976] For example, template matching and / or bilateral matching may be activated or performed in the target block only if the POCs of all reference picture candidates in the reference picture list are smaller than the POC of the target picture.
[0977]
[0978] Intra template matching mode
[0979] The intra prediction mode may include an intra template matching mode.
[0980] In the intra template matching mode, a matching cost can be calculated between a target template composed of restored samples around a target block; and a reference template composed of restored samples within a target picture to which the target block belongs.
[0981] Based on the matching cost, a reference block for generating a prediction block of the target block; and / or a displacement from the target block to the reference block; can be derived. A block vector can represent this displacement.
[0982] Intra template matching can be performed within a predefined search area.
[0983] In some embodiments, an additional search may be performed for a location indicated by a block vector of at least one block to which a block vector-based mode is applied among the restored blocks surrounding the target block, outside of the predefined search area.
[0984] In embodiments, the block vector-based mode may include a mode using block vectors as described in the embodiments, such as the IBC mode and the intra template matching mode.
[0985] By further exploration, the matching cost between the reference template at the location indicated by the block vector of the restored block and the target template can be additionally calculated.
[0986] In intra-template matching mode, at least one block vector can be determined in the order of matching cost. A prediction block of the target block can be generated from the target picture using the at least one block vector.
[0987] In some embodiments, multiple block vectors may be determined in descending order of matching cost. In this case, the predicted block of the target block can be generated by applying weights to each of the predicted blocks generated by the block vectors. In other words, the predicted block of the target block can be a weighted sum of the predicted blocks generated by the block vectors.
[0988] In one embodiment, the weights may be equal.
[0989] Alternatively, weights can be determined based on matching costs. For example, a higher weight can be assigned to a predicted block generated from a block vector with a lower matching cost.
[0990] Information indicating whether the prediction mode of the target block is intra template matching mode can be signaled / encoded / decoded.
[0991] Information required in the intra template matching mode may include mode type information indicating whether the prediction mode is the intra template matching mode, information about a search method, information about subsampling, initial motion information, information for determining the initial motion information, the number of search steps performed, and information about at least one of a cost function.
[0992]
[0993] Intra Block Copy (IBC) mode
[0994] The IBC mode may include multiple modes. For example, the IBC mode may include at least one of the aforementioned IBC merge mode, IBC AMVP mode, and IBC skip mode.
[0995] In IBC mode, an IBC candidate list containing multiple block vector candidates can be constructed.
[0996] The IBC candidate list may include spatial candidates.
[0997] Spatial candidates can be derived based on block vectors of adjacent blocks that are spatially immediately adjacent to the target block and / or block vectors of non-adjacent blocks that are spaced apart from the target block.
[0998] Block vectors can be added to the IBC candidate list in the order of block vectors of adjacent blocks and non-adjacent block vectors.
[0999] Additionally or alternatively, the IBC candidate list may include temporal candidates. For example, a temporal candidate may be added to the IBC candidate list after a spatial candidate.
[1000] A temporal candidate can be derived from a block vector of a call block within a call picture; a block vector of an adjacent block of the call block; or a block vector of a non-adjacent block of the call block. A call picture may be a picture whose encoding or decoding is completed before the target picture containing the target block. A call block may be a block present at the same location within the call picture as the location of the target block.
[1001] As an exemplary embodiment, at least one reference picture among the reference pictures in the reference picture list having the smallest POC difference with the target picture may be selected as the call picture.
[1002] Two call pictures can be selected. For example, the reference picture with the smallest POC difference from the target picture from each of the L0 reference picture list and the L1 reference picture list can be selected as the call picture.
[1003] Once a call picture is determined, multiple sample locations within the call block can be specified, each having the same location as the target block within the call picture. For example, a center sample within the call block and samples at four corner locations can be specified. A temporal candidate can be derived from the block vector at each specified sample location.
[1004] Alternatively, temporal candidates may be derived from block vectors of samples at positions shifted by an offset from the positions of specified samples within the call picture.
[1005] For example, a motion vector of a block among one or more surrounding blocks of the target block that refers to the call picture as a reference picture can be used as an offset for the call picture.
[1006] Additionally or alternatively, an offset can be derived by scaling motion vectors of surrounding blocks of the target block that point to reference pictures other than the call picture.
[1007] Scaling can be performed based on the POC difference between the current picture and the reference pictures of the surrounding blocks; and the POC difference between the current picture and the called picture.
[1008] The scaled motion vector can be used as an offset for the call picture. This can be performed when there is no block among the surrounding blocks of the target block that references the call picture.
[1009] Additionally or alternatively, when two call pictures are used, a motion vector pointing to the other call picture can be derived by mirroring the motion vector of a neighboring block referencing one of the call pictures among the neighboring blocks of the target block, and the derived motion vector can be set as an offset for the other call picture.
[1010] In IBC merge mode or IBC skip mode, the block vector of the target block can be selected from the IBC candidate list. The selection information for this selection can point to one of the block vector candidates in the IBC candidate list.
[1011] Selection information can be signaled from the video encoding device to the video decoding device. The video decoding device can construct an IBC candidate list in the same manner as the video encoding device. The video decoding device can determine the block vector of the target block from the IBC candidate list based on the received selection information.
[1012] In the IBC AMVP mode, a video encoding device can determine a block vector difference (BVD), which is a difference between a block vector of a target block and a block vector candidate selected from an IBC candidate list, and signal the (encoded) BVD to a video decoding device. The video decoding device can derive a block vector of the target block by combining the selected block vector candidate and the BVD based on selection information.
[1013] In one embodiment, the IBC mode may further include a geometric partitioning mode, an intra-template matching mode, and a sub-block-based IBC mode.
[1014] When the prediction mode of the target block is the IBC mode, information for determining one of the above multiple modes related to the IBC mode can be signaled / encoded / decoded.
[1015] In IBC mode, Geometric Partitioning Mode (GPM) can be applied. A target block can be divided into multiple (e.g., two) sub-blocks using a geometric partitioning method. Then, a block vector can be determined for each of the multiple sub-blocks, and multiple prediction blocks can be generated using the determined block vectors. A prediction block for the target block can be generated using a weighted average of the multiple prediction blocks.
[1016] Intra template matching mode can be classified as IBC mode in that it derives the block vector of the target block using template matching.
[1017] If the IBC mode of the target block is a subblock-based IBC mode, the IBC mode can be performed in units of subblocks.
[1018] In one embodiment, a target block may be divided into units of sub-blocks of size NxM, and a block vector may be determined for each sub-block. Then, a prediction block for the target block may be generated by predicting a corresponding sub-block using each block vector.
[1019] In one embodiment, when prediction using a sub-block-based IBC mode is performed for a target block, the target block may be divided into units of sub-blocks of NxM size, and intra prediction may be performed by determining an intra prediction mode in units of sub-blocks.
[1020] In the embodiments, N and M can be 2, 4, 8, 16, 32, 64 or a positive integer. N and M can be predefined values.
[1021] Alternatively, information about at least one of N and M may be signaled / encoded / decoded, and at least one of N and M may be determined based on this information.
[1022] Alternatively, at least one of N and M may be determined based on at least one of a coding parameter of the target block, a size of the target block, a block vector of the target block, and block vector information of the target block.
[1023] Block vector information may include information related to block vectors, such as block vector resolution, number of block vectors, and number of reference blocks generated by the block vectors.
[1024] For example, N or M can be determined based on the size of the block vector of the target block determined through template matching, etc.
[1025] In determining the block vector of each subblock, a block shift may be used.
[1026] A block shift can be derived from at least one of the surrounding blocks of the target block and the intra merge candidate list.
[1027] Alternatively, information to specify the block shift can be signaled / encoded / decoded.
[1028] Alternatively, the block shift may be determined based on at least one of a coding parameter of the target block, intra encoding method information of a neighboring block, a coding parameter of the neighboring block, a neighboring sample of the target block, and a neighboring sample of a reference block of the target block. In addition, when the target block is a chroma component block, a luma component sample of the target block may be additionally considered. The luma component sample may be at least one sample of a luma component block or region corresponding to the target block.
[1029] In embodiments, the intra encoding method information may be information indicating an intra encoding method. The intra encoding method may include an intra prediction mode.
[1030] Alternatively, the block shift may be determined based on the block vector of the target block determined through template matching.
[1031] Once a block shift is determined, a block vector of each sub-block of the target block can be determined based on motion information or block vector information within the block indicated by the block shift within the target picture.
[1032] For example, the block vector of a specific subblock within a target block can be determined based on motion information or block vector information of a position corresponding to the specific subblock within the block indicated by the block shift.
[1033] Alternatively, the intra prediction mode of each subblock of the target block may be determined based on the intra prediction mode within the block indicated by the block shift for the target block.
[1034] For example, the intra prediction mode of a specific subblock within a target block can be determined based on the intra prediction mode of a position corresponding to said specific subblock within the block indicated by the block shift.
[1035] The size of the block indicated by the block shift for the target block may be the same as the size of the target block.
[1036] Information regarding the subblock-based IBC mode for the target block may be signaled / encoded / decoded. For example, an indicator indicating whether the IBC mode is performed for each subblock of the target block may be signaled / encoded / decoded.
[1037] Alternatively, whether a sub-block-based IBC mode is performed in a target block can be determined based on at least one of a coding parameter of the target block, a block vector of the target block, block vector information of the target block, a coding parameter of a neighboring block, a neighboring sample of the target block, and a neighboring sample of a reference block of the target block, without signaling / encoding / decoding information. In addition, when the target block is a chroma component block, a luma component sample of the target block can be additionally considered. The luma component sample can be at least one sample of a luma component block or region corresponding to the target block.
[1038] Information about subblock-based IBC mode can be signaled / encoded / decoded when the prediction mode of the target block is IBC mode.
[1039] Alternatively, information about sub-block-based IBC mode can be signaled / encoded / decoded when the target block is a chroma component block and the prediction mode of the target block is the IBC mode.
[1040] Whether a sub-block-based IBC mode is performed in a target block and / or whether signaling / encoding / decoding of information for the sub-block-based IBC mode is performed can be determined based on at least one of a coding parameter of the target block, a block vector of the target block, block vector information of the target block, a coding parameter of a neighboring block, a neighboring sample of the target block, and a neighboring sample of a reference block of the target block. In addition, when the target block is a chroma component block, a luma component sample of the target block may be additionally considered. The luma component sample may be at least one sample of a luma component block or region corresponding to the target block.
[1041] For example, a subblock-based IBC mode may be available in a target block only if the target block size is greater than or equal to a threshold value, and information about the subblock-based IBC mode may be signaled / encoded / decoded.
[1042] For example, the threshold value can be 4, 8, 16, 32, 64, 128, or any positive integer.
[1043]
[1044] Template-based Intra Mode Derivation (TIMD method)
[1045] A template-based intra mode derivation method can generate a target template composed of reference samples surrounding a target block, generate prediction templates by predicting the target template from reference samples surrounding the target template using predefined intra encoding methods, and derive intra encoding method information for the target block based on a matching cost between the generated prediction templates and the target template.
[1046] Among the predefined intra encoding methods, one or more intra prediction modes in ascending order of cost can be set as at least one intra prediction mode of the target block.
[1047] Mode type information indicating whether a template-based intra mode derivation method is used can be signaled / encoded / decoded.
[1048] The target template can be constructed using reference samples surrounding the target block.
[1049] The target template can be constructed using at least one of the reference samples located at the lower left, left, upper left, top and upper right of the target block.
[1050] The target template can be divided into multiple regions according to their relative orientation from the target block.
[1051] In embodiments, an area belonging to a specific direction of a target block may mean an area located in a specific direction from the target block; or an area adjacent to a face (size) or corner of the target block in a specific direction. If an area is adjacent to a face of the target block, the area may be vertically or horizontally adjacent to the face. If an area is adjacent to a corner of the target block, the area may be diagonally adjacent to the corner.
[1052] For example, a target template can be divided into an area belonging to the lower left or left side of the target block; an area belonging to the upper left; and an area belonging to the upper or upper right.
[1053] As another example, the target template may be divided into an area belonging to one of the lower left, left, and upper left of the target block; and an area belonging to the top or upper right.
[1054] As another example, the target template may be divided into an area belonging to the lower left or left side of the target block; and an area belonging to one of the upper left, top, and upper right.
[1055] When a target template is segmented, each of the multiple regions segmented from the target template can be considered a sub-template. A template-based intra-mode derivation method can be applied to each of the sub-templates. As a result of performing the template-based intra-mode derivation method for each sub-template, one or more intra-coding methods with the lowest cost can be determined as the intra-coding methods of the target block.
[1056] In a template-based intra mode derivation method, a candidate list including information on up to N intra encoding methods to be used for predicting a target template can be constructed.
[1057] In one embodiment, the candidate list to be used in the template-based intra mode derivation method may be constructed in the same manner as the intra merge mode candidate list described in the embodiment.
[1058] For example, the candidate list can be constructed using intra prediction encoding method information of adjacent blocks or non-adjacent blocks of the target block.
[1059] Alternatively, intra encoding method information of a Col Block at the same position as the position of the target block within a reference picture that has already been encoded / decoded, other than the target picture containing the target block; or an adjacent block or non-adjacent block of the Col Block; may be used to construct a candidate list.
[1060] Alternatively, predefined intra encoding method information may be used to construct a candidate list. Here, the predefined intra encoding method information may include at least one of non-directional modes (e.g., PLANAR mode and DC mode).
[1061] In one embodiment, the candidate list used in the template-based intra mode derivation method may be a list consisting of K intra prediction modes. Here, the intra prediction mode may be expressed as a mode number indicating the intra prediction mode.
[1062] The mode numbers of the K intra prediction modes in the candidate list may increase by M. That is, the K intra prediction modes or mode numbers in the candidate list may be selected at intervals of M. In addition, the candidate list may include at least one of a PLANAR mode and a DC mode.
[1063] N, M and K can be positive integers.
[1064] At least one of N, M and K may be determined based on at least one of a coding parameter of the target block, intra coding method information of a neighboring block, a coding parameter of the neighboring block and a neighboring sample of the target block (an adjacent sample or a non-adjacent sample around the target block). When the target block is a chroma component block, a coding parameter of a luma component sample of the target block may be additionally considered. The luma component sample of the target block may be at least one sample within a luma component block or region corresponding to the target block. For example, the coding parameter of the luma component sample may include intra coding method information corresponding to the luma component sample.
[1065] Meanwhile, if K intra prediction modes are used, in which the mode numbers representing the intra prediction modes increase by M, a separate candidate list may not be formed, and intra prediction modes determined such that the mode numbers increase by M, starting from a predefined intra prediction mode, may be applied.
[1066] When multiple intra encoding methods (e.g., intra prediction modes) are derived by a template-based intra mode derivation method for a target block, a weighted sum or weighted average of the prediction blocks predicted by each of the multiple intra encoding methods can be used to generate a prediction block of the target block.
[1067] Here, the weights for the weighted sum or weighted average can be equal.
[1068] Alternatively, the weights can be derived based on the matching costs for the intra prediction modes, respectively.
[1069] For example, a lower matching cost of an intra prediction mode may result in a higher weight being assigned to the intra prediction mode. That is, a higher weight may be assigned to a prediction block derived from an intra prediction mode that generates a prediction template that is more similar to the target template.
[1070] In one embodiment, two intra prediction modes that provide the lowest matching cost may be selected. A prediction block of the target block may be generated by applying weights to each of the prediction blocks predicted by the two selected intra modes.
[1071] The weights can be determined by [Mathematical Formula 6] and [Mathematical Formula 7] below.
[1072] [Equation 6]
[1073] weight1= costMode2 / (costMode1+ costMode2)
[1074] [Equation 7]
[1075] weight2= 1 - weight1
[1076] costMode1 may represent the matching cost of the first intra prediction mode that provides the lowest matching cost. costMode2 may represent the matching cost of the second intra prediction mode that provides the next lowest matching cost.
[1077] weight1 and weight2 may respectively refer to weights applied to a prediction block predicted by the first intra prediction mode and a prediction block predicted by the second intra prediction mode.
[1078] When the condition of the following [Mathematical Formula 8] is satisfied, only the first intra prediction mode with the lowest matching cost can be selected as the intra prediction mode of the target block.
[1079] [Equation 8]
[1080] costMode2<2 * costMode1
[1081] In one embodiment, if the intra prediction modes generated by the template-based intra mode derivation method do not include a non-directional mode (i.e., a PLANAR mode, a DC mode, an IBC mode based on a block vector, or an intra template matching mode), the non-directional mode may be added as an intra prediction mode of the target block.
[1082] For example, if the condition of [Equation 9] is satisfied, a non-directional mode can be added as an intra prediction mode of the target block.
[1083] [Equation 9]
[1084] costMode3< 1.5 * costMode1
[1085] Here, costMode3 may mean the matching cost between the prediction template generated using the non-directional mode and the target template.
[1086] When two intra prediction modes and a non-directional mode generated by a template-based intra mode derivation method are selected as the intra prediction mode of a target block, the weights applied to the prediction blocks generated by these three modes can be determined as in [Mathematical Expressions 10] and [Mathematical Expressions 11] below.
[1087] [Equation 10]
[1088]
[1089] [Equation 11]
[1090]
[1091] Here, i can have one of the values 1, 2, and 3. weight3 can mean a weight applied to a prediction block predicted in a non-directional mode.
[1092] In embodiments, “template-based intra mode derivation information” may mean intra encoding method information related to a template-based intra mode derivation method.
[1093] Template-based intra mode derivation information may include derived intra prediction modes and weights.
[1094] In one embodiment, the template-based intra mode derivation information applied to the target block may be inherited from a surrounding block of the target block to which the template-based intra mode derivation method is applied.
[1095] For example, a candidate list can be generated by using blocks to which a template-based intra mode derivation method is applied among the restored blocks as candidates.
[1096] The candidate list may contain candidates representing blocks.
[1097] The restored block may include one or more of an adjacent block immediately adjacent to the target block and a non-adjacent block spaced apart from the target block by a certain distance. In addition, the restored block may include a call block that exists at the same location as the target block within a reference picture that has already been encoded or decoded, rather than within the target picture that includes the target block, and may include one or more of the adjacent blocks and non-adjacent blocks of the call block.
[1098] Template-based intra mode derivation information of any one candidate among the candidates belonging to the candidate list can be set as template-based intra mode derivation information applied to the target block.
[1099] Selection information for selecting one of the candidates within the candidate list can be signaled from the video encoding device to the video decoding device.
[1100] Alternatively, only some of the candidates within the candidate list may be selected based on their matching costs.
[1101] The matching cost of each candidate can be calculated between the target template of the target block; and the predicted templates of the target template generated based on the template-based intra-derived information of the candidate.
[1102] For example, the matching cost of a specific candidate can be calculated as shown in [Mathematical Formula 12] below.
[1103] [Equation 12]
[1104] Cost = ( SATD ( IPM1) * W1+ SATD ( IPM2) * W2) >> shift
[1105] IMP1 and IMP2 may each represent an intra prediction mode of a specific candidate determined by a template-based intra derivation method.
[1106] W1 and W2 may represent weights corresponding to IMP1 and IMP2, respectively.
[1107] Among some candidates with low matching cost, one can be selected to determine the template-based intra-mode derivation information of the target block.
[1108] Selection information for selecting one of several candidates can be signaled from the video encoding device to the video decoding device.
[1109] Alternatively, the template-based intra mode derivation information of one candidate that provides the lowest matching cost among the candidates within the candidate list may be set as the template-based intra mode derivation information of the target block. In this case, the image decoding device may also determine the template-based intra mode derivation information of the target block using the same method as the image encoding device. Accordingly, signaling of selection information from the image encoding device to the image decoding device may not be required.
[1110]
[1111] Gradient-based Intra Mode Derivation Method
[1112] A gradient-based intra mode derivation method can generate a histogram of gradients (HoG) by calculating a gradient for each sample using at least some of the samples within a restored area, and can derive intra encoding method information for a target block based on the HoG.
[1113] One or more intra prediction modes having the highest magnitude in HoG can be set as intra encoding method information of the target block.
[1114] For example, samples within a restored region may include predicted samples, restored samples, and residual samples.
[1115] Alternatively, the gradient may be computed using at least one of the samples within the target block, in addition to or instead of the samples within the restored region. Here, the samples within the target block may include prediction samples and reference samples.
[1116] Mode type information indicating whether a gradient-based intra mode derivation method is used can be signaled / encoded / decoded.
[1117] Each bin of HOG can be determined based on the available intra prediction modes in intra prediction. For example, each bin of HOG can represent each available intra prediction direction in intra prediction.
[1118] The restored region may be a set of restored samples around the target block.
[1119] For example, the restored region can be determined similarly to the target template described in the aforementioned template-based intra-mode derivation method. For example, similarly to the target template described in the embodiments, the restored region can be constructed using samples from at least one of the lower left, left, upper left, upper, and upper right regions of the target block.
[1120] The restored area can be divided into multiple areas based on their relative positions to the target block.
[1121] For example, the restored area can be divided into an area belonging to the lower left or left side of the target block; an area belonging to the upper left; and an area belonging to the upper or upper right.
[1122] As another example, the restored area may be divided into an area belonging to one of the lower left, left, and upper left of the target block; and an area belonging to the upper or upper right.
[1123] As another example, the restored area may be divided into an area belonging to the lower left or left side of the target block; and an area belonging to one of the upper left, top, and upper right.
[1124] When a restored region is divided, HoGs can be generated for each of the multiple regions divided from the restored region. Then, intra encoding method information of the target block can be determined based on each HoG of the multiple HoGs.
[1125] If the target block is a chroma component block, the restored region may include luma component samples and chroma component samples surrounding the target block. Alternatively, the restored region may include luma component samples within a luma component block or region corresponding to the target block.
[1126] The gradient can be calculated using a Sobel filter. The gradient for a specific sample can be calculated based on the ratio between the horizontal gradient and the vertical gradient for the sample.
[1127] At most N intra encoding method information having the highest degree in HoG can be specified.
[1128] N can be 1, 2, 5, 6, or a positive integer, or it can be a predefined value.
[1129] Alternatively, N may be determined based on at least one of the coding parameters of the target block, the intra encoding method information of the surrounding blocks, the coding parameters of the surrounding blocks, and the surrounding samples of the target block (adjacent samples or non-adjacent samples around the target block).
[1130] If the target block is a chroma component block, the coding parameters of the luma component samples of the target block may be additionally considered. The luma component samples of the target block may be at least one sample within a luma component block or region corresponding to the target block. For example, the coding parameters of the luma component samples may include intra encoding method information corresponding to the luma component samples.
[1131] When multiple intra encoding method information (e.g., intra prediction modes) are specified using HoG, a prediction block of a target block can be generated by weighting or weighting averaging prediction blocks predicted using the intra prediction modes.
[1132] The weights for a weighted sum or weighted average can be equal.
[1133] Alternatively, weights can be derived based on the HoG. For example, a higher weight can be assigned to an intra prediction mode that provides a higher degree. In other words, a predicted block derived using an intra prediction mode that provides a higher degree can be given a higher weight.
[1134] Meanwhile, in addition to the intra prediction directions derived by the gradient-based intra mode derivation method, at least one of the non-directional modes may be further used.
[1135] For example, non-directional modes may include planar mode, DC mode, and block vector-based mode.
[1136] In embodiments, the block vector based mode may include a mode using block vectors as described in the embodiments, such as the IBC mode and the intra template matching mode.
[1137] Among the non-directional modes, a mode that best predicts the restored target template surrounding the target block can be selected. That is, template matching costs using the target template can be calculated for each of the non-directional modes, and at least one mode can be selected among the non-directional modes based on these matching costs.
[1138] If at least one non-directional mode is selected, the weight for the selected non-directional mode may be a predefined fixed value.
[1139] The gradient-based intra mode derivation information may mean intra encoding method information related to the gradient-based intra mode derivation method.
[1140] The gradient-based intra mode derivation information may include derived intra prediction modes and weights.
[1141] In one embodiment, the gradient-based intra mode derivation information applied to the target block can be derived from the HoG of at least one restored block to which the gradient-based intra mode derivation method is applied.
[1142] The restored block may include one or more of an adjacent block immediately adjacent to the target block and a non-adjacent block spaced apart from the target block by a certain distance. In addition, the restored block may include a call block that exists at the same location as the target block within a reference picture that has already been encoded or decoded, rather than within the target picture that includes the target block, and may include one or more of the adjacent blocks and non-adjacent blocks of the call block.
[1143] When multiple reconstructed blocks are used, the HoG of the target block can be derived by averaging the degrees of the HoGs for the intra prediction modes of the reconstructed blocks.
[1144] The gradient-based intra mode derivation method of the embodiments may be considered as a part and / or an embodiment of a decoder-side intra mode derivation (DIMD) method, and may replace DIMD.
[1145] For example, a prediction mode derived by a gradient-based intra mode derivation method can be included in the prediction modes of DIMD and can replace the prediction mode of DIMD.
[1146] Additionally, DIMD may be considered as a part and / or an embodiment of the gradient-based intra mode derivation method of the embodiments, and may replace the gradient-based intra mode derivation method.
[1147] For example, the prediction mode induced by DIMD can be included in the prediction modes of the gradient-based intra mode derivation method, and can replace the prediction mode of the gradient-based intra mode derivation method.
[1148]
[1149] 1st MPM and 2nd MPM
[1150] Figure 12 may represent neighboring blocks adjacent to another coding unit, for example.
[1151] Secondary MPM lists may be introduced.
[1152] The existing Primary MPM (PMPM) list can consist of six entries. The Secondary MPM (SMPM) list can contain 16 entries.
[1153] In embodiments, an entry in the MPM list may be an intra prediction mode.
[1154] A general MPM list with 22 entries can be constructed first, then the first 6 entries in this general MPM list can be included as a PMPM list, and the rest of the entries can form an SMPM list.
[1155] The first entry in the universal MPM list may be the Planar mode. The remaining entries may be composed of intra prediction modes of the Left (L), Above (A), Below-Left (BL), Above-Right (AR), and Above-Left (AL) neighboring blocks, as illustrated in Figure 12, and DIMD modes sorted in ascending order of SAD costs. Up to five modes with the smallest SAD costs may be added.
[1156] The SAD cost can be computed between the predicted samples and the reconstructed samples of the template.
[1157] Sorted directional modes with added offsets can be added into the universal MPM list, and then default modes can be added until a universal MPM list with 22 entries is built.
[1158] If the CU block is vertically oriented, the order of the neighboring blocks can be A, L, BL, AR, AL. Otherwise, the order of the neighboring blocks can be L, A, BL, AR, AL.
[1159] The MPM list can be evenly divided into four groups, and a group index pointing to one of the groups can be signaled / parsed first. Next, a mode index pointing to one of the modes within the group can be further signaled / parsed to indicate which mode is used within the selected group.
[1160]
[1161] Decoder-side Intra Mode Derivation (DIMD)
[1162] When DIMD is applied, up to five intra modes can be derived from the reconstructed neighboring samples. The candidates or predictors of DIMD can be these intra modes.
[1163] These five predictors can be combined with a non-directed predictor (planner or block vector-based predictor) with weights derived from a histogram of gradients.
[1164] Decisions between non-directional modes can be made based on template costs. Specifically, the block vectors of all adjacent merge candidates (coded with IntraTMP or IBC) and non-adjacent merge candidates can be compared with the planner predictions on the reconstructed template.
[1165] Template cost (SATD) can be used to select the best predictor among these candidates.
[1166] The division operation in weight derivation can be performed using the same lookup table (LUT) based integerization scheme used by the cross-component linear model (CCLM).
[1167] For example, the division operation in the orientation calculation according to [Equation 13] below can be calculated according to [Equation 14] to [Equation 17] of the LUT-based system below:
[1168] [Equation 13]
[1169] Orient = G y / G x
[1170] [Equation 14]
[1171] x = Floor( Log2( G x ) )
[1172] [Equation 15]
[1173] normDiff = ( ( Gx << 4 ) >> x ) & 15
[1174] [Equation 16]
[1175] x +=( 3 + ( normDiff != 0 ) ? 1 : 0 )
[1176] [Equation 17]
[1177] Orient = (Gy * ( DivSigTable[normDiff] | 8 ) + ( 1 << ( x - 1 ))) >> x
[1178] DivSigTable can be set as shown in [Mathematical Formula 18] below.
[1179] [Equation 18]
[1180] DivSigTable
[0016] = { 0, 7, 6, 5 ,5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0}
[1181] For a block of size WxH, the weights of each of the five induced modes can be modified if one of the upper histogram magnitudes and the left histogram magnitudes is greater than twice the other.
[1182] In these cases, the weights may depend on location and can be calculated as follows:
[1183] If the upper histogram is twice the size of the left histogram, the weight w is calculated according to [Mathematical Formula 19] below. i (x, y) can be calculated.
[1184] [Equation 19]
[1185]
[1186] If the left histogram is twice the size of the upper histogram, the weight w is calculated according to [Mathematical Formula 20] below. i (x, y) can be calculated.
[1187] [Equation 20]
[1188]
[1189] Here, wDIMD i may be the unmodified uniform weight of the selected DIMD.
[1190] Δ i can be predefined and set to 10.
[1191] The derived intra modes can be included in the primary list of intra MPMs. Therefore, the DIMD process can be performed before the MPM list is constructed.
[1192] The primary derived intra modes of a DIMD block can be stored together with the block and used to build the MPM list of neighboring blocks.
[1193] Finally, the regions of neighboring reconstructed samples used to compute the histogram of gradients can be further modified depending on the availability of reconstructed samples.
[1194] The region of decoded reference samples of the current WxH luma block can be extended toward the upper-right side. Here, the region can be extended by up to W additional rows, if available.
[1195] Additionally, the region of decoded reference samples of the current WxH luma block can be extended toward the lower-left side. Here, the region can be extended by up to H additional rows, if available.
[1196]
[1197] DIMD chroma mode
[1198] Figure 13 illustrates neighboring reconstructed Y samples used for another DIMD chroma mode, for example.
[1199] Figure 14 shows neighboring reconstructed Cb samples used for another DIMD chroma mode as an example.
[1200] Figure 15 shows neighboring reconstructed Cr samples used for another DIMD chroma mode as an example.
[1201] As illustrated in FIG. 15 within FIG. 13, the DIMD chroma mode can derive the chroma intra prediction mode of the current block based on the neighboring reconstructed Y, Cb, and Cr samples in the second neighboring row and the second neighboring column.
[1202] Specifically, to build a Histogram of Gradients (HoG), horizontal gradients and vertical gradients can be computed for each collocated reconstructed luma sample, reconstructed Cb samples, and reconstructed Cr samples of the current chroma block.
[1203] A HoG can be built using the computed horizontal and vertical gradients.
[1204] Next, in the constructed HoG, the intra prediction mode with the maximum histogram amplitude values can be used to perform chroma intra prediction of the current chroma block.
[1205] When the intra prediction mode derived from the DIMD chroma mode is the same as the intra prediction mode derived from the DM mode, the intra prediction mode with the second largest histogram amplitude value can be used as the DIMD chroma mode.
[1206] A CU level flag may be signaled to indicate whether the proposed DIMD chroma mode is applied.
[1207] Finally, the luma domain of the reconstructed samples can be modified to compute a histogram of gradients for the chroma DIMD mode.
[1208] For a WxH pair of chroma CBs to be predicted, to build a HoG associated with the collocated luma CB, pairs of vertical gradients and horizontal gradients can be extracted from the second and third lines within the luma CB, instead of from the regular set of DIMD decoded reference samples around the luma CB.
[1209]
[1210] Weighted sum-based prediction method
[1211] In embodiments, a method, a device, and a recording medium for storing a bitstream using a weighted sum-based prediction method to improve encoding efficiency may be provided.
[1212] A weighted sum-based prediction method may mean a method in which a first prediction sample is derived / updated / improved by a weighted sum with a second prediction sample.
[1213] The first prediction sample may be at least one sample of the target block. A first prediction block including the first prediction sample may be generated by applying a first prediction method, which is one of the prediction methods described in the embodiments, to the target block.
[1214] In embodiments, the first prediction sample may be replaced with a reconstruction sample. That is, a weighted sum-based prediction method may mean a method in which the reconstruction sample is derived / updated / improved by a weighted sum with the second prediction sample.
[1215] A restored block including a restored sample can be generated by applying one of the restoration methods described in the embodiments to the target block.
[1216] The second prediction sample may be a sample predicted by a method other than the method applied to the target block. A second prediction block including the second prediction sample may be generated by applying a second prediction method (different from the first prediction method) among the prediction methods described in the embodiments.
[1217] In a weighted sum-based prediction method, the prediction block of the target block may be a weighted sum of a first prediction block and a second prediction block. The first prediction block and the second prediction block may each be generated by the prediction methods described in the embodiments.
[1218] In embodiments, a peripheral block may represent a block used for weighted summation with a target block. The target block may be updated by the weighted sum of the target block and the peripheral block.
[1219] In the embodiments, the second prediction block described above may be a prediction block generated by predicting a side block. Furthermore, the side block may also refer to the second prediction block. In other words, the side block may represent an area of the second prediction block, or may refer to the second prediction block itself.
[1220] A target block may be updated by a sub-block. In this case, "updating the target block" may mean that the target sample of the target block is changed to have a weighted sum value of the target sample and the sub-sample of the sub-block.
[1221] In embodiments, “update of the target block” may be replaced with “update of the prediction block of the target block” or “update of the restoration block of the target block.”
[1222] In embodiments, “weighted sum with the target block” may be replaced with “weighted sum with the predicted block of the target block” or “weighted sum with the reconstructed block of the target block.”
[1223] Here, the target sample and the collateral sample may correspond to each other. Corresponding between the target sample and the collateral sample may mean that the location of the target sample within the target block and the location of the collateral sample within the collateral block are the same.
[1224] The target sample may be a predicted sample of the target block. Alternatively, the target sample may be a restored sample of the target block.
[1225] In embodiments, "a sub-block area of a specific target or specific area" may refer to an area within the specific target or specific area, which has at least a sub-block. Here, the size of the sub-block may be equal to the size of the specific target or specific area. Alternatively, the size of the sub-block may be smaller than the size of the specific target or specific area.
[1226] Alternatively, in embodiments, the sub-block area may mean an area that includes a portion of the area of the sub-block.
[1227]
[1228] Sub-block
[1229] The target block may be divided into sub-blocks. Here, the width of each sub-block may be PH_BLK_W, and the height may be PH_BLK_H. At least one of the divided sub-blocks may be determined as one of the sub-block areas of the target block.
[1230] Alternatively, the target block may be divided into sub-blocks. Here, the width of each sub-block may be PH_BLK_W and the height may be PH_BLK_H. A contiguous group of the divided sub-blocks may be determined as one of the sub-block regions of the target block. Here, the contiguous group of sub-blocks may be a group of spatially adjacent sub-blocks.
[1231] At this time, a single partitioned sub-block (i.e., a sub-block region) can always contain one sub-block. In this sense, a sub-block can be replaced by a sub-block.
[1232] Alternatively, a single partitioned sub-block may include multiple sub-blocks. In this sense, multiple sub-blocks may be replaced by sub-blocks. A sub-block may be replaced by a portion of a sub-block.
[1233] When a weighted sum-based prediction method is performed on a target block, prediction may be performed on at least one of the sub-blocks of the target block. After such prediction, a sample value of at least one first prediction sample of the target block may be derived / updated / improved through a weighted sum with a sample value of a second prediction sample corresponding to the first prediction sample within a sub-block including the location of the first prediction sample.
[1234]
[1235] When multiple sub-blocks exist
[1236] For a specific sample within a target block, there may always be one sub-block containing the location of the specific sample. Alternatively, for a specific sample within a target block, there may be multiple sub-blocks containing the location of the specific sample.
[1237] For a specific sample within a target block, if there are multiple sub-blocks containing the location of said specific sample, said specific sample can be derived / updated / improved using sample values from all of the multiple sub-blocks.
[1238] For example, the aforementioned second prediction blocks may be plural. The first prediction block may be derived / updated / improved using two or more second prediction blocks.
[1239] Alternatively, for a specific sample within a target block, if there are multiple sub-blocks containing the location of said specific sample, said specific sample may be derived / updated / improved using sample value(s) from some of said multiple sub-blocks.
[1240]
[1241] Size of the sub-block
[1242] Size of subblocks within the same block
[1243] In the target block, all sub-block areas can have the same size of width PH_BLK_W and height PH_BLK_H.
[1244] Alternatively, for all sub-block areas of the target block, the width of each sub-block area may be a multiple of PH_BLK_W, and the height may be a multiple of PH_BLK_H.
[1245] Each of PH_BLK_W and PH_BLK_H can be a positive integer. Each of PH_BLK_W and PH_BLK_H can be 1, 2, 4, 8, 16, 32, or a positive integer.
[1246] PH_BLK_W and PH_BLK_H can be the same value.
[1247] Alternatively, PH_BLK_W and PH_BLK_H may have different values based on the size of the target block. For example, the ratio of PH_BLK_W and PH_BLK_H may be determined based on the ratio of the width and height of the target block.
[1248]
[1249] Adaptive subblock size
[1250] In one embodiment, each of PH_BLK_W and PH_BLK_H may always be set to the same value for all blocks.
[1251] In one embodiment, each of PH_BLK_W and PH_BLK_H may be an adaptively determined value.
[1252] In one embodiment, PH_BLK_W and / or PH_BLK_H may be determined according to predefined rules shared between the video encoding device and the video decoding device.
[1253] For example, the PH_BLK_W and / or PH_BLK_H may be determined based on at least one of a coding parameter of the target block, a size of the target block, motion information of the target block, motion information of a surrounding block of the target block, or a coding parameter of a surrounding block of the target block.
[1254] For example, one or more interval boundary values for length may be defined. PH_BLK_W or PH_BLK_H for a target block may be determined based on which of a plurality of intervals the height or width of the target block falls into, which are distinguished by one or more interval boundary values.
[1255] For example, PH_BLK_W may be determined as a first value when the height of the block is less than the first interval boundary value, may be determined as a second value when the height of the block is not less than the first interval boundary value and less than the second interval boundary value, and in other cases, PH_BLK_W may be determined as a third value.
[1256] For example, PH_BLK_H may be determined as a first value when the width of the block is less than the first interval boundary value, may be determined as a second value when the width of the block is not less than the first interval boundary value and less than the second interval boundary value, and may be determined as a third value in other cases.
[1257] Meanwhile, in one embodiment, an indicator indicating whether the size of the side block is adaptively determined in a weighted sum-based prediction method or an indicator indicating whether information about the size of the side block is signaled may be signaled / encoded / decoded.
[1258] For example, based on the coding parameters of the target block (e.g., the size of the target block), it may be determined whether an indicator indicating whether the size of a sub-block for the target block is adaptively determined is signaled / encoded / decoded.
[1259] When a weighted sum-based prediction method is performed on a target block, information for determining the size of the side block can be signaled / encoded / decoded.
[1260] If these directives indicate that the size of the sub-block is not determined adaptively, the same PH_BLK_W and / or PH_BLK_H values may always be used in the target block. Alternatively, PH_BLK_W and / or PH_BLK_H in the target block may be determined based on predefined rules described in the embodiments.
[1261]
[1262] Signaling related to the size of the subblock
[1263] For example, information about PH_BLK_W and / or PH_BLK_H can be signaled / encoded / decoded.
[1264] For example, information for determining PH_BLK_W and / or PH_BLK_H may be signaled / encoded / decoded in at least one of the units described in the embodiments. For example, the unit may include a VPS, an SPS, a PPS, an APS, a DPS, a picture header, a subpicture header, a slice header, a tile group header, a tile header, a CTU, a CU, a PU, a TU, a CB, a PB, and a TB.
[1265] In one embodiment, information for determining PH_BLK_W and / or PH_BLK_H for a target block in units of CUs may be signaled / encoded / decoded.
[1266] For example, information for specifying the value of PH_BLK_W and / or the value of PH_BLK_H of the target block from multiple candidates for the value of PH_BLK_W and / or the value of PH_BLK_H may be signaled / encoded / decoded. This information may be an indicator or index used to select one of the multiple candidates.
[1267] The number of multiple candidates for values that PH_BLK_W and / or PH_BLK_H can have may be determined based on at least one of a coding parameter of the target block, a size of the target block, motion information of the target block, motion information of a surrounding block of the target block, and a coding parameter of a surrounding block of the target block.
[1268] Additionally, at least one of the plurality of candidates for values that PH_BLK_W and / or PH_BLK_H may have may be determined based on at least one of a coding parameter of the target block, a size of the target block, motion information of the target block, motion information of a surrounding block of the target block, and a coding parameter of a surrounding block of the target block.
[1269]
[1270] Prediction of subsidiary blocks
[1271] A set of subsidiary blocks
[1272] In one embodiment, a plurality of consecutive sub-blocks may be considered as a single sub-block. In other words, a set of sub-blocks may be a plurality of consecutive sub-blocks that are considered as a single sub-block.
[1273] In one embodiment, multiple contiguous and identically predicted sub-blocks may be considered a single contiguous block. In other words, a set of contiguous sub-blocks may be multiple contiguous and identically predicted sub-blocks that are considered a single contiguous block.
[1274] In embodiments, being predicted in the same manner may mean that at least one of the following is the same: the prediction mode; motion information (if the prediction mode is IBC mode or inter prediction); and intra encoding method information (if the prediction mode is IBC mode or intra prediction).
[1275] Prediction for sub-blocks within a sub-block set may also be performed by a single prediction that considers the sub-blocks within the sub-block set as one sub-block.
[1276]
[1277] Prediction method of subsidiary blocks
[1278] In embodiments, the prediction method of the side block may be determined based on at least one of a coding parameter of the target block; motion information of the target block; intra encoding method information of the target block; coding parameters of a neighboring block of the target block; motion information of a neighboring block of the target block; intra encoding method information of a neighboring block of the target block; prediction / reference sample of the target block; residual signal of the target block; and prediction / reconstruction / reference sample of a neighboring block of the target block. For example, the coding parameter may include a prediction mode, etc. The intra encoding method information may include information indicating whether an IBC mode is used and information indicating whether intra template matching is performed, etc. The sample may include a position of the sample and a value of the sample.
[1279] In embodiments, the nearest neighboring block of a sub-block may mean a neighboring block that is closest to the sub-block among the neighboring blocks of the target block.
[1280] For example, a method for predicting a side block can be determined based on at least one of the surrounding blocks of the target block that is closest to the side block.
[1281] For example, the prediction mode and motion information of the side block may be the same as the prediction mode and motion information of at least one of the surrounding blocks of the target block closest to the side block.
[1282] For example, the prediction mode and intra encoding method information of the side block may be identical to the prediction mode and intra encoding method information of at least one of the surrounding blocks of the target block closest to the side block.
[1283] In one embodiment, the prediction method of the sub-block may be determined based on at least one of the surrounding blocks of the target block adjacent to the sub-block.
[1284] For example, if the neighboring block of the target block closest to a specific side block is intra-predicted, the specific side block can be predicted using inter-prediction. In this case, the motion information of the specific side block (e.g., information about a motion vector and a reference picture, etc.) can be determined based on the motion information of at least one of the neighboring blocks of the target block adjacent to the specific side block.
[1285] For example, the motion information of the block most adjacent to the specific sub-block among the inter-predicted surrounding blocks of the target block can be used / determined as the motion information of the specific sub-block.
[1286] For example, if the neighboring block of the target block closest to a specific side block is intra-predicted, the specific side block can be predicted using inter-prediction. In this case, the motion information of the specific side block can be determined based on the motion information of at least two neighboring blocks of the target block adjacent to the specific side block.
[1287] For example, motion information of a specific sub-block can be derived from motion information of a first surrounding block and motion information of a second surrounding block, which are surrounding blocks of a target block adjacent to the specific sub-block.
[1288]
[1289] Determination of the motion vector of the subblock
[1290] A motion vector of a specific subblock can be determined based on the motion vector of the first surrounding block and the motion vector of the second surrounding block.
[1291] For example, the average of the motion vector of the first surrounding block and the motion vector of the second surrounding block can be determined as the motion vector of a specific side block.
[1292] Alternatively, for example, a motion vector of a specific subsidiary block may be determined based on a motion vector of a first surrounding block, a motion vector of a second surrounding block, a position of the first surrounding block, a position of the second surrounding block, and a position of the specific subsidiary block.
[1293] For example, a motion vector of a specific side block can be derived by performing a weighted sum based on the first distance and the second distance for the motion vector of the first surrounding block and the motion vector of the second surrounding block.
[1294] The first distance and the second distance may respectively mean the distance from a specific sub-block to the first sub-block and the distance from a specific sub-block to the second sub-block.
[1295]
[1296] Figure 16 illustrates the distinction between intra prediction blocks and inter prediction blocks according to an example.
[1297] Figure 17 shows blocks related to deriving motion information of a subsidiary block according to an example.
[1298] For example, motion information of a side block can be derived based on a first side block and a second side block predicted by inter prediction among the adjacent side blocks of the side block.
[1299]
[1300] First example of deriving motion information of ...
Claims
Step of determining prediction information; A step of generating a prediction block by performing a prediction on a target block using the above prediction information. A decryption method including: In the first paragraph, The above prediction block is a weighted sum of the first prediction block and the second prediction block, The above second prediction block is a block generated by prediction for a side block, A decryption method wherein the above-mentioned subsidiary block is at least one of a plurality of sub-blocks of the target block. In the second paragraph, A decoding method in which the prediction method of the above-mentioned side block is determined based on at least one of the surrounding blocks of the target block closest to the above-mentioned side block. In the second paragraph, A decoding method in which the motion vector of the above-mentioned subsidiary block is determined based on the motion vector of the first surrounding block of the target block and the motion vector of the second surrounding block of the target block. In the second paragraph, A decryption method in which information of the above-mentioned sub-block is derived based on information of another sub-block of the above-mentioned target block. In paragraph 5, A decryption method in which information of the above-mentioned sub-block is determined based on at least one of a plurality of other sub-blocks adjacent to the above-mentioned sub-block. In the second paragraph, A decoding method in which the prediction method of the above-mentioned subsidiary block is determined based on surrounding samples of the above-mentioned target block. Step of determining prediction information; A step of generating a prediction block by performing a prediction on a target block using the above prediction information. An encoding method including: In paragraph 8, The above prediction block is a weighted sum of the first prediction block and the second prediction block, The above second prediction block is a block generated by prediction for a side block, An encoding method wherein the above-mentioned subsidiary block is at least one of a plurality of sub-blocks of the target block. In paragraph 9, An encoding method in which the prediction method of the above-mentioned side block is determined based on at least one of the surrounding blocks of the target block closest to the above-mentioned side block. In paragraph 9, An encoding method in which the motion vector of the above-mentioned subsidiary block is determined based on the motion vector of the first surrounding block of the target block and the motion vector of the second surrounding block of the target block. In paragraph 9, An encoding method in which information of the above-mentioned sub-block is derived based on information of another sub-block of the above-mentioned target block. In paragraph 9, An encoding method in which information of the above-mentioned sub-block is determined based on at least one of a plurality of other sub-blocks adjacent to the above-mentioned sub-block. In paragraph 9, An encoding method in which the prediction method of the above-mentioned subsidiary block is determined based on surrounding samples of the above-mentioned target block. A computer-readable recording medium storing a bitstream generated by the encoding method of Article 8. A computer-readable recording medium storing a bitstream for video decoding, wherein the bitstream comprises: Forecast information Including, A computer-readable recording medium for generating a prediction block by performing a prediction on a target block using the above prediction information. In Article 16, The above prediction block is a weighted sum of the first prediction block and the second prediction block, The above second prediction block is a block generated by prediction for a side block, A computer-readable recording medium in which the above-mentioned subsidiary block is at least one of a plurality of sub-blocks of the above-mentioned target block. In Article 17, A computer-readable recording medium wherein the method for predicting the above-mentioned subsidiary block is determined based on at least one of the surrounding blocks of the target block closest to the above-mentioned subsidiary block. In Article 17, A computer-readable recording medium in which the motion vector of the above-mentioned subsidiary block is determined based on the motion vector of the first surrounding block of the target block and the motion vector of the second surrounding block of the target block. In Article 17, A computer-readable recording medium in which information of the above-mentioned subsidiary block is derived based on information of another subsidiary block of the above-mentioned target block.
Citation Information
Patent Citations
Video decoding method and video decoding apparatus using merge candidate list
KR1020180085714A
Method for preparing perfluoropropyl vinyl ether with high conversion rate
KR1020220005775A
Quantum dot composition, cured layer and display apparatus
KR1020250170841A
Method and apparatus for encoding / decoding image and recording medium for storing bitstream
KR102619133B1
KR20240064730A