Method for encoding / decoding image and recording medium storing bitstream
By employing multiple intra-screen prediction modes, template-based histograms, and advanced filtering, the method improves prediction accuracy and data efficiency in video encoding/decoding for high-resolution video content.
Patent Information
- Application Number
- PCT/KR2025/004757
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-04
- Filing Date
- 2025-04-08
- Publication Date
- 2025-10-16
AI Technical Summary
Existing video encoding/decoding technologies face challenges in achieving high prediction accuracy and efficient data compression for high-resolution and high-quality video content.
The method involves deriving multiple intra-screen prediction modes for a current block, configuring a restoration area as a template, generating histograms, weighting and combining prediction blocks, and using intra sub-partitioning and extrapolation filters to improve prediction accuracy and reduce data volume.
This approach enhances prediction accuracy and reduces the amount of data to be encoded/decoded by leveraging multiple prediction modes, histograms, and advanced filtering techniques.
Smart Images

Figure KR2025004757_16102025_PF_FP_ABST
Abstract
Description
Method for encoding / decoding video and recording medium for storing bitstream
[0001] The present invention relates to a method, device and recording medium for image encoding / decoding.
[0002] With the continuous development of the information and communication industry, services providing video through broadcasting and the Internet have spread worldwide.
[0003] 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.
[0004] 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.
[0005] The present disclosure aims to provide a method for determining at least one intra-screen prediction mode for intra-screen prediction of a current block.
[0006] The present disclosure aims to provide a method for configuring a restoration area around a current block as a template and deriving a histogram based on the configured template.
[0007] The present disclosure aims to provide a method for deriving an intra-screen prediction mode of a current block based on a histogram of the current block.
[0008] The present disclosure aims to provide a method for obtaining a final prediction block of a current block by weighting a plurality of prediction blocks.
[0009] The present disclosure aims to provide a method for deriving weights for weighted summation in the same manner as in the encoder on the decoder side.
[0010] The present disclosure aims to provide a method for dividing a current block into a plurality of sub-partitions according to an ISP (Intra Sub-Partitioning) mode and deriving a prediction mode and a prediction block of each sub-partition.
[0011] The present disclosure aims to provide a method for obtaining a prediction block of a current block based on an extrapolation filter.
[0012] A video decoding method according to the present disclosure may include: a step of deriving a plurality of intra-screen prediction modes for a current block; a step of obtaining a plurality of prediction blocks for the current block based on the plurality of intra-screen prediction modes; and a step of weighting and combining the plurality of prediction blocks to obtain a final prediction block of the current block.
[0013] A video encoding method according to the present disclosure may include: a step of deriving a plurality of intra-screen prediction modes for a current block; a step of obtaining a plurality of prediction blocks for the current block based on the plurality of intra-screen prediction modes; and a step of weighting and combining the plurality of prediction blocks to obtain a final prediction block of the current block.
[0014] In the image encoding / decoding method according to the present disclosure, the plurality of prediction modes can be selected in the order of increasing amplitude values or occurrence frequency values on the histogram of the current block.
[0015] In the video encoding / decoding method according to the present disclosure, the histogram is a gradient histogram, and the gradient histogram can be generated by accumulating amplitude values of reference samples included in the reference sample line of the current block for each prediction mode within the screen.
[0016] In the video encoding / decoding method according to the present disclosure, the gradient histogram is an occurrence frequency histogram, and the occurrence frequency histogram can be derived by adding up occurrence frequencies of prediction modes within a screen for a plurality of reference blocks.
[0017] In the video encoding / decoding method according to the present disclosure, the occurrence frequency of the prediction mode within the screen of the reference block can be set by the size of the reference block or the number of basic units included in the reference block.
[0018] In the video encoding / decoding method according to the present disclosure, when a reference block has a plurality of intra-screen prediction modes, the occurrence frequency of each of the plurality of intra-screen prediction modes can be determined according to the ratio of amplitude values between the plurality of intra-screen prediction modes.
[0019] In the video encoding / decoding method according to the present disclosure, the final prediction block of the current block can be obtained by weighting and combining the plurality of prediction blocks and an additional prediction block derived based on a non-directional prediction mode.
[0020] In the video encoding / decoding method according to the present disclosure, the non-directional prediction mode is a directional planar mode, and the interpolation direction of the directional planar mode can be determined according to the directionality of an optimal intra-screen prediction mode among the plurality of prediction blocks.
[0021] In the video encoding / decoding method according to the present disclosure, the final prediction block of the current block can be obtained by weighting and combining the additional prediction block derived based on the plurality of prediction blocks and the block vector.
[0022] In the video encoding / decoding method according to the present disclosure, the weight assigned to each of the plurality of prediction blocks may be determined based on the ratio of amplitude values or the ratio of occurrence frequencies of the plurality of prediction blocks.
[0023] In the video encoding / decoding method according to the present disclosure, the plurality of intra-screen prediction modes may be selected from the MPM (Most Probable Mode) list of the current block.
[0024] In the video encoding / decoding method according to the present disclosure, among the intra-screen prediction mode candidates included in the MPM list, the plurality of intra-screen prediction mode candidates may be selected in the order of smallest template matching cost.
[0025] In the video encoding / decoding method according to the present disclosure, the final prediction block of the current block can be obtained by weighting and combining the additional prediction block derived based on the plurality of prediction blocks and the extrapolation filter.
[0026] In the present disclosure, a recording medium for recording a bitstream generated by the image encoding method may be provided.
[0027] According to the present disclosure, prediction accuracy can be improved by performing intra-screen prediction of a current block based on multiple intra-screen prediction modes.
[0028] According to the present disclosure, there is provided a method for deriving a histogram based on a restoration area around a current block and deriving an in-screen prediction mode of the current block based on the histogram, thereby reducing the amount of data to be encoded / decoded.
[0029] According to the present disclosure, prediction accuracy can be improved by weighting multiple prediction blocks to obtain a final prediction block of the current block.
[0030] According to the present disclosure, there is an effect of reducing the amount of data to be encoded / decoded by providing a method for deriving weights for weighted sum in the same manner as the encoder on the decoder side.
[0031] According to the present disclosure, a method of dividing a current block into a plurality of sub-partitions according to an ISP (Intra Sub-Partitioning) mode and deriving a prediction mode and a prediction block of each sub-partition can be provided, thereby improving prediction accuracy.
[0032] According to the present disclosure, prediction accuracy can be improved by providing a method for obtaining a prediction block of a current block based on an extrapolation filter.
[0033] Figure 1 illustrates a system for video coding according to one embodiment.
[0034] Figure 2 shows a segmentation structure of an image according to one embodiment.
[0035] Figure 3 illustrates the structure of intra prediction according to one embodiment.
[0036] Figure 4 shows the structure of inter prediction to explain the inter prediction process according to one embodiment.
[0037] Figure 5 shows the order in which spatial candidates are added to the candidate list according to one embodiment.
[0038] Figure 6 illustrates multiple in-loop filters according to an example.
[0039] Figure 7 shows the structure of entropy encoding and entropy decoding according to an example.
[0040] FIG. 8 is a flowchart of an on-screen prediction method according to one embodiment of the present disclosure.
[0041] Figure 9 illustrates multiple reference sample lines.
[0042] Figure 10 shows an example of the configuration of a template.
[0043] Figure 11 illustrates a collocated block.
[0044] Figure 12 shows an example of deriving a gradient for samples included in a template.
[0045] Figure 13 shows an example of deriving a gradient for multiple lines.
[0046] Figure 14 illustrates blocks in spatially / temporally adjacent / non-adjacent locations.
[0047] Figure 15 shows an example in which the positions of referenceable blocks are adjusted by block vectors / motion vectors derived from collocated blocks.
[0048] Figure 16 shows an example of how a new merge candidate is derived.
[0049] Figure 17 illustrates blocks adjacent to the current block.
[0050] Figures 18 and 19 illustrate examples of configurations of reference templates for deriving prediction templates.
[0051] Figure 20 illustrates the weights applied to two prediction blocks.
[0052] Figure 21 shows an example of a merge list configured for merge prediction in TIMD mode.
[0053] Figure 22 shows the division form of the current block when ISP is applied.
[0054] Figures 23 and 24 illustrate examples of template configurations for each sub-partition when the ISP mode is applied.
[0055] Figure 25 shows an example of how a template for a sub-partition is configured.
[0056] Figure 26 shows the shapes of various extrapolation filters.
[0057] Figure 27 illustrates extrapolation filters having a block shape.
[0058] Figure 28 illustrates a reference area for deriving filter coefficients of an extrapolation filter.
[0059] Figure 29 shows an example of a configuration of a reference area when there is no referential area on the top or left.
[0060] 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.
[0061] 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.
[0062] 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.
[0063] 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.
[0064] 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.
[0065] 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.
[0066] 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.
[0067] 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.
[0068] 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.
[0069] 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.
[0070] 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.
[0071]
[0072] Interchange between terms in the examples
[0073] 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.
[0074] - 'one or more', 'at least one'
[0075] - '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'.)
[0076] - 'Information', 'Signal'
[0077] - 'value', 'predefined value', 'specific value', 'threshold', 'threshold value', 'baseline value', 'reference value'
[0078] - 'statistical value', 'statistics value'
[0079] - 'indicator', 'index', 'index', 'flag', 'information'
[0080] - 'encoder', 'encoding apparatus'
[0081] - 'decoder', 'decoding apparatus'
[0082] - 'Entropy encoding', 'encoding', 'encoding'
[0083] - 'Entropy decryption', 'decoding', 'decoding'
[0084] - 'coding', 'encoding and / or decoding'
[0085] - 'video', 'moving picture', 'image', 'picture', 'frame', 'screen'
[0086] - 'Reference picture', 'Reference video'
[0087] - 'Reference Picture List (RPL),' 'Reference Image List'
[0088] - 'original', 'input', 'source'
[0089] - 'Block', 'Unit', 'Signal'
[0090] - 'square', 'square shape'
[0091] - 'pixel', 'pixels', 'samples', 'pels'
[0092] - 'region', 'area', 'part', 'segment'
[0093] - 'partition', 'split', 'divide'
[0094] - 'quad', 'quarternary'
[0095] - 'luma component', 'luma', 'luminance component', 'luminance', 'Y'
[0096] - 'chroma component', 'chroma', 'chrominance', 'chrominance component', 'Cb and Cr', 'Cb or Cr', 'Cb', 'Cr', 'U and V', 'U or V', 'U', 'V'
[0097] - 'target', 'current' (e.g. target block and current block, or target image and current image)
[0098] - 'neighbor', 'neighboring', 'adjacent', 'neighbor / neighboring' (e.g., neighboring block, adjacent block, and surrounding block)
[0099] - 'collocated', 'collected'
[0100] - 'reconstruction', 'reconstruction', 'decoding'
[0101] - 'reconstructed', 'reconstructed', 'decoded'
[0102] - 'difference', 'difference', 'difference', 'error', 'residual', 'residual'
[0103] - Largest Coding Unit (LCU), Coding Tree Unit (CTU)
[0104] - 'inter', 'inter-screen'
[0105] - 'Inter prediction', 'inter prediction', 'motion compensation'
[0106] - 'Inter mode', 'Inter prediction mode', 'Inter-screen mode', 'Inter-screen prediction mode'
[0107] - 'Motion vector', 'Predicted motion vector', 'Advanced Motion Vector Prediction (AMVP)'
[0108] - 'list', 'candidate list'
[0109] - 'Spatial candidate', 'Spatial merge candidate'
[0110] - 'Temporal candidate', 'Temporal merge candidate'
[0111] - 'Prediction motion vector candidate', 'motion vector predictor'
[0112] - 'Prediction method', 'Prediction mode'
[0113] - 'Intra', 'Intra'
[0114] - 'Intra prediction', 'Intra prediction'
[0115] - 'Intra mode', 'Intra prediction mode'
[0116] - 'Dequantization', 'scaling'
[0117] - 'Quantization matrix', 'Scaling list'
[0118] - 'Quantization matrix coefficients', 'matrix coefficients'
[0119] - 'Transform coefficient level', 'quantized level', 'quantized coefficient', 'quantized transform coefficient', 'quantized transform coefficient level'
[0120] - 'Dequantized coefficient', 'dequantized transform coefficient'
[0121] - 'Scanning type', 'Scanning direction'
[0122] - 'Directional mode', 'Angle mode', 'Angular mode', 'Intra prediction mode'
[0123] - '(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'
[0124] - 'Merge Mode', 'Movement Merge Mode'
[0125] - 'Geometric Partitioning Mode (GPM)', 'Triangle Partitioning Mode'
[0126] 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.
[0127]
[0128] The range of information and values of information described in the examples
[0129] 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'.
[0130] Information can have one of multiple values. 'n-th value' can mean the nth value among multiple values.
[0131] For example, the first value could represent '0' or (logical) false. The second value could represent '1' or (logical) true. Alternatively, the first value could represent '1' or (logical) true. The second value could represent '0' or (logical) false.
[0132] 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.
[0133] 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.
[0134]
[0135] Coding related concepts
[0136] Below, concepts related to coding are described. The descriptions disclosed below can be applied to embodiments.
[0137] Predefined value: A predefined value may refer to a value commonly used in an encoding device and a decoding device. For example, a predefined value may be interpreted as a fixed value. Alternatively, the predefined value may be a value shared by an encoding device and a decoding device through signaling. Alternatively, the predefined value may be a value derived through the same procedure in an encoding device and a decoding device so that the encoding device and the decoding device have a common value. Alternatively, the predefined value may be a common value in an encoding device and a decoding device. The above description of a predefined value may also be applied to predefined information. In the above descriptions, 'value' may be replaced with 'information'.
[0138] 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."
[0139] 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.
[0140] - 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.
[0141] Coding: Coding can mean encoding and / or decoding of images.
[0142] 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.
[0143] 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."
[0144] - A picture can mean the entire picture, or it can mean a part of a picture, such as a block.
[0145] 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.
[0146] Subpicture: A picture can be divided into one or more subpictures.
[0147] - A subpicture may be a square or rectangular area within a picture. A subpicture may contain one or more CTUs.
[0148] - 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.
[0149] - 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.
[0150] 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.
[0151] 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.
[0152] CTU: An image can be divided into multiple coding tree units (CTUs).
[0153] - 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.
[0154] - 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.
[0155] CTB: CTB can refer to one of Y CTB, Cb CTB, and Cr CTB.
[0156] 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.
[0157] - 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.
[0158] - 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.
[0159] - A unit can contain syntax elements. In other words, a block and its syntax elements can be combined to form a unit.
[0160] - 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.
[0161] - 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.
[0162] - 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.
[0163] - 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.
[0164] - Unit information may include unit type, unit size, unit depth, unit encoding order, and unit decoding order.
[0165] 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.
[0166] 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.
[0167] - 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.
[0168] - 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.
[0169] - 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.
[0170] 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.
[0171] 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.
[0172] - 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.
[0173] 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.
[0174] - 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.
[0175] Parameter set: A parameter set may correspond to header information among the structures within a bitstream.
[0176] - 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).
[0177] - 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.
[0178] - 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.
[0179] MPM (Most Probable Mode): MPM can indicate the intra prediction mode that is likely to be used for intra prediction for the target block.
[0180] - 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.
[0181] - 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.
[0182] MPM List: An MPM list may contain one or more MPMs. The number of MPMs in an MPM list may be predefined.
[0183] 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.
[0184] MPM Usage Directive: The MPM usage directive can indicate whether the MPM list is used for prediction on the target block.
[0185] 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.
[0186] Reference image list: The reference image list may be a list containing one or more reference images used for prediction for the target block.
[0187] - There may be multiple reference image lists. Multiple reference image lists may include List 0 (L0), List 1 (L1), etc.
[0188] - 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.
[0189] 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.
[0190] 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.
[0191] 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.
[0192] Reference sample: A reference sample may be a sample that is referenced for encoding / decoding of a target block, such as prediction and filtering.
[0193] 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.
[0194] 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.
[0195] - 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'.
[0196] 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.
[0197] - 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.
[0198] - 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.
[0199] Picture Order Count (POC): The POC of a picture can indicate the display order or output order of the picture.
[0200] Motion information: Motion information may be information used to specify a reference block. Motion information may include information used for inter prediction, such as a motion vector (MV), a reference picture index, a reference picture, an inter prediction indicator, and a prediction list utilization flag. Additionally, motion information may include information used in a specific inter prediction mode, such as an MV candidate, an MV candidate index, a merge candidate, and a merge index.
[0201] - 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.
[0202] 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.
[0203] - 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.
[0204] -The zero vector can be (0, 0) MV.
[0205] 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.
[0206] - 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.
[0207] -The zero vector can be (0, 0) BV.
[0208] 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.
[0209] 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.
[0210] Motion information candidate list: The motion information candidate list may mean a list constructed using one or more motion information candidates.
[0211] 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.
[0212] - 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.
[0213] - 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.
[0214] - 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.
[0215] 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.
[0216] 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.
[0217] - 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.
[0218] Merge Candidate List: A merge candidate list may be a list constructed using one or more merge candidates.
[0219] 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.
[0220] 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.
[0221] Spatial neighboring blocks: Spatial neighboring blocks can be blocks that are spatially adjacent to the target block.
[0222] - The target block and spatial neighboring blocks can be included within the target image.
[0223] - A spatial neighboring block may include a block whose boundary is at least partially adjacent to a boundary of the target block. Alternatively, a spatial neighboring block may include a block whose distance from the target block is less than or equal to a specific value.
[0224] - A spatial neighboring block may include a block diagonally adjacent to a vertex of the target block.
[0225] - 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.
[0226] Temporal neighboring blocks: Temporal neighboring blocks can be blocks that are temporally adjacent to the target block.
[0227] - 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.
[0228] - 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.
[0229] - 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.
[0230] - 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.
[0231] - A temporal neighboring block may be a block that is temporally adjacent to a spatial neighboring block of the target block.
[0232] 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.
[0233] 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.
[0234] Quantized level: A quantized level can be an integer quantity used as input to dequantization.
[0235] 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.
[0236] 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.
[0237] 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.
[0238] 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.
[0239] 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.
[0240] Quantization matrix coefficients: Quantization matrix coefficients can be each element within a quantization matrix.
[0241] 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.
[0242] 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.
[0243] 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.
[0244] 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.
[0245] - 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.
[0246] - 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.
[0247] - 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.
[0248] 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).
[0249] 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.
[0250] 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.
[0251] 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.
[0252] - 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.
[0253] Entropy decoding: Entropy decoding can reverse the processes performed in entropy encoding. Symbols can be generated by entropy decoding a bitstream.
[0254] 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.
[0255] 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.
[0256]
[0257] Coding parameters
[0258] 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.
[0259] 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.
[0260] 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.
[0261] 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.
[0262] 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.
[0263] 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.”
[0264] 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.”
[0265] 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.
[0266] 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."
[0267] 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.”
[0268]
[0269] System for video coding
[0270] Figure 1 illustrates a system for video coding according to one embodiment.
[0271] The system (100) may include at least one of an encoding device (110) and a decoding device (150).
[0272] Each of the encoding device (110) and the decoding device (150) may be a computer or an electronic apparatus.
[0273]
[0274] Structure of the encoding device
[0275] The encoding device (110) may include a processor (120), storage (140), and a communicator (149).
[0276] The processor (120), storage (140), and communication device (149) can be connected via a bus.
[0277] 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.
[0278] 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.
[0279] 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).
[0280] 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).
[0281] 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.
[0282] 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).
[0283] 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).
[0284] 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.
[0285]
[0286] Operation of the encoding device
[0287] The encoding device (110) can sequentially encode one or more images of a video.
[0288] The storage (140) can store the original image. The original image can be used as a target image in the encoding device (110).
[0289] 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).
[0290] The segmenter (122) can determine a target block by performing segmentation on the target image.
[0291] 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.
[0292] 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.
[0293] 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.
[0294] 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.
[0295] 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.
[0296] 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.
[0297] The transformer (125) can perform a transformation on the residual block to generate transformation coefficients.
[0298] The converter (125) can perform the conversion using one of a plurality of conversion methods.
[0299] 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.
[0300] 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.
[0301] 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.
[0302] 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.
[0303] Information for decoding an image may include quantized levels and syntax elements produced by a quantizer (126).
[0304] The probability distribution can be determined based on the quantized levels and coding parameters.
[0305] 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.
[0306] 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.
[0307] The dequantizer (127) can generate dequantized transform coefficients by performing dequantization on the quantized level.
[0308] 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.
[0309] The adder (129) can generate a restored block by combining a predicted block and a restored residual block.
[0310] 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.
[0311] 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.
[0312] 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).
[0313]
[0314] Structure of the decryption device
[0315] The decryption device (150) may include a processor (160), a storage (180), and a communication device (189).
[0316] 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.
[0317] 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).
[0318] The storage (180) may include a reference picture buffer (181).
[0319] 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).
[0320] 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.
[0321]
[0322] Operation of the decryption device
[0323] 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).
[0324] 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).
[0325] The processor (160) can obtain a bitstream from a storage (180) or a computer-readable recording medium.
[0326] A bitstream may contain encoded information.
[0327] 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.
[0328] Information for decoding an image may include quantized levels and syntax elements.
[0329] 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.
[0330] The entropy decoder (161) can provide syntax elements to other components of the processor (160), such as the segmenter (162).
[0331]
[0332] A common description of the relationship between the components of the encoding device and the components of the decoding device.
[0333] 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.
[0334] 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.
[0335] 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).
[0336]
[0337] Division of the units that make up the image
[0338] Figure 2 shows a segmentation structure of an image according to one embodiment.
[0339] Figure 2 can schematically represent an example in which one unit is divided into multiple sub-units.
[0340] 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.
[0341] 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).
[0342] 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.
[0343] 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.
[0344] 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.
[0345] 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.
[0346] 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'.
[0347] 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.
[0348] 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.
[0349] 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.
[0350] 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.
[0351] 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.
[0352] 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.
[0353] 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.
[0354] 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.
[0355] 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.
[0356] 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.
[0357] 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.
[0358] Here, each of the aforementioned split direction information and split type information may be a flag having a specific length (e.g., 1 bit).
[0359] The CU's partition information may also include QT partition information, partition direction information, and partition shape information.
[0360] 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.
[0361] 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.
[0362] 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.
[0363] 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.
[0364] 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.
[0365] 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.
[0366] 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.
[0367] 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.
[0368] 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.
[0369]
[0370] Processing blocks according to their properties
[0371] 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.
[0372] The blocks to which the specific processing described in the examples is applied may have a square shape or a non-square shape.
[0373] 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.
[0374] 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.
[0375] In one embodiment, a minimum block size and / or a maximum block size for a particular process may be predefined.
[0376] 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.
[0377] 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.
[0378] In one embodiment, the processing of the embodiment may be applied / performed only when the block size is a predefined block size.
[0379] 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.
[0380] 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.
[0381] 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.
[0382]
[0383] Predictive information for prediction
[0384] Prediction information can be used to generate a prediction block for the target block.
[0385] 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.
[0386] 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.
[0387]
[0388] Intra prediction
[0389] Figure 3 illustrates the structure of intra prediction according to one embodiment.
[0390] 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.
[0391] 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.
[0392] 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.
[0393] 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.
[0394] 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.
[0395] 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.
[0396] 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.
[0397] 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.
[0398] 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).
[0399] 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.
[0400] 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.
[0401] 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.
[0402] 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.
[0403] 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.
[0404] 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.
[0405] 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.
[0406] 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.
[0407] 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.
[0408] 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.
[0409] 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.
[0410] 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.
[0411] 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.
[0412] 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.
[0413] 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.
[0414] Instead of obtaining samples from the reconstructed neighboring blocks, the samples of segment A and segment F can be derived using padding using the nearest samples of segment B and segment E, respectively.
[0415] 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.
[0416] 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.
[0417] 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.
[0418] 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.
[0419] Once the parameters are derived, a prediction block of a 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.
[0420] 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.
[0421] 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.
[0422] In intra prediction, the sample value of a prediction sample of a prediction block can be determined by the sample value of a reference sample. The position of the reference sample can be specified by the position of the prediction sample and the direction of the intra prediction mode. If the position specified by the position of the prediction sample and the direction of the intra prediction mode is an integer position, the sample value of one reference sample pointed to by the integer position can be used to determine the sample value of the prediction sample of the prediction block. If the position specified by the position of the prediction sample and the direction of the intra prediction mode is not an integer position, an interpolated reference sample can be generated based on two reference samples closest to the specified position. The sample value of the interpolated reference sample can be used to determine the sample value of the prediction sample. That is, when the position specified by the position of the prediction sample and the direction of the intra prediction mode represents a space between two reference samples, an interpolated sample value can be generated based on the sample values of the two samples.
[0423]
[0424]
[0425] Inter prediction
[0426] Figure 4 shows the structure of inter prediction to explain the inter prediction process according to one embodiment.
[0427] The rectangle illustrated in Fig. 4 can represent an image. Additionally, the arrow in Fig. 4 can represent a prediction direction.
[0428] 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.
[0429] 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.
[0430] 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.
[0431] 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.
[0432] 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.
[0433] Below, inter prediction for a target block in inter mode according to an embodiment is specifically described.
[0434] 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.
[0435] 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.
[0436] 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.
[0437] 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.
[0438] 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.
[0439] A spatial candidate may be a restored spatial neighboring block that is spatially adjacent to the target block.
[0440] 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.
[0441] 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.
[0442] A temporal candidate may be a restored temporal neighboring block corresponding to a target block in a restored COL image.
[0443] 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.
[0444] 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.
[0445] A temporal candidate may be a location inside and / or outside a call block within a call image.
[0446] 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.
[0447] 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.
[0448] 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.
[0449] 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.
[0450]
[0451] AMVP mode
[0452] 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.
[0453] 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.
[0454] 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.
[0455] 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.
[0456] 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.
[0457] 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.
[0458] 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.
[0459] 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.
[0460]
[0461] Merge mode
[0462] 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.
[0463] 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.
[0464] 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.
[0465] An average merge candidate may be a merge candidate generated based on the average of two merge candidates in the merge candidate list.
[0466] A zero merge candidate may be zero vector motion information. Zero vector motion information may be motion information whose MV is a zero vector.
[0467] 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.
[0468] 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.
[0469] 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.
[0470] 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.
[0471] 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.
[0472] 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.
[0473] 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.
[0474] 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.
[0475] 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.
[0476] 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.
[0477] 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.
[0478] 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.
[0479] 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.
[0480] 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.
[0481] 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.
[0482] 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.
[0483] 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.
[0484] 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.
[0485] In the aforementioned modes, compensation for prediction samples derived through inter prediction can be performed using optical flow.
[0486]
[0487] Figure 5 shows the order in which spatial candidates are added to the candidate list according to one embodiment.
[0488] In Fig. 5, the locations of spatial candidates are shown.
[0489] The large block in the center can represent the target block. The five smaller blocks adjacent to the target block can represent spatial candidates.
[0490] The coordinates of the target block can be (xP, yP), and the size of the target block can be (nPSW, nPSH).
[0491] 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).
[0492] 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).
[0493] 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).
[0494] 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).
[0495] 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).
[0496] 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.
[0497] 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.
[0498] 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."
[0499] 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.
[0500]
[0501] IBC mode
[0502] 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.
[0503] 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.
[0504] 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.
[0505] 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.
[0506] 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.
[0507] In AMVP mode, BVD can be used. The description of MVD in the embodiments can also be applied to BVD.
[0508] 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.
[0509]
[0510] Transformation and quantization
[0511] 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.
[0512] 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.
[0513] 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.
[0514] 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.
[0515] 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.
[0516] 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.
[0517] 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).
[0518] 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).
[0519] NSPT can be applied to specific block sizes such as 4x4, 4x8, 8x4, 4x16, 16x4, 8x8, 8x16, and 16x8 for intra coding.
[0520] 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.
[0521] 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).
[0522] 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.
[0523] 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.
[0524] 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.
[0525] 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.
[0526] 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.
[0527] 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.
[0528] 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.
[0529] 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.
[0530] 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.
[0531] 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.
[0532] The description of the transformation described above can also be applied to the inverse transformation. In such an application, the reverse processing of the processing described for the transformation can be performed in the inverse transformation. The term "transformation" in the name related to the transformation can be changed to "inverse transformation." Furthermore, the input of the transformation can be considered the output of the inverse transformation. The output of the transformation can be considered the input of the inverse transformation. The decoding device (150) can obtain information related to the transformation, such as transformation selection information, and can perform the reverse processing of the processing related to the transformation indicated by the information related to the transformation using the information related to the transformation.
[0533] 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.
[0534] 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.
[0535] 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.
[0536] 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.
[0537] Scanning for each scanning type can start at a specific starting point and end at a specific ending point.
[0538] 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.
[0539] 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.
[0540] 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.
[0541] 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.
[0542] 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.
[0543]
[0544] Filtering
[0545] To improve the image quality, filtering may be performed on blocks. The values of target samples may be determined or updated through filtering.
[0546] 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.
[0547] 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.
[0548] 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.
[0549] 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.
[0550] 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.
[0551] 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.
[0552] 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.
[0553] The filter coefficients can be coefficients or weights of the input samples.
[0554] 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.
[0555] 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.
[0556] Filtering may include filtering performed by predictor (123) and predictor (163), etc.
[0557] 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.
[0558] 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.
[0559] 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.
[0560] 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.
[0561] 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.
[0562] Filtering may include in-loop filtering performed by filter (130) and filter (170), etc.
[0563]
[0564] Figure 6 illustrates multiple in-loop filters according to an example.
[0565] 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).
[0566] 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.
[0567] 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).
[0568] The target block can represent an image input to the filter. The filtered target block can represent an image output from the filter.
[0569] 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.
[0570] Luma signal mapping can perform codeword redistribution for the luma signal.
[0571] 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.
[0572] Chroma scaling can correct chroma signals based on the correlation between a luma signal and a corresponding chroma signal.
[0573] 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.
[0574] 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.
[0575] 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.
[0576] 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.
[0577] 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.
[0578] 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.
[0579] 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.
[0580] 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.
[0581] 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.
[0582] 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.
[0583] 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.
[0584] 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.
[0585] ALF can compensate for distortion between the restored image and the original image.
[0586] The filter coefficients of ALF can be signaled via the bitstream.
[0587] 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.
[0588] 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.
[0589] 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.
[0590] Information regarding whether ALF applies can be signaled for specific units, such as CTB.
[0591] 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.
[0592]
[0593] Entropy encoding and entropy decoding
[0594] Figure 7 illustrates entropy encoding and entropy decoding according to an example.
[0595] The processes of entropy encoding by the entropy encoder (139) are illustrated at the top of Fig. 7.
[0596] 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.
[0597] 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.
[0598] Information about syntactic elements and bins can be provided from the binarization unit to the context selection unit.
[0599] A context modeler can perform context updates.
[0600] Context can mean occurrence probability information for each bin for syntactic elements that have already been encoded.
[0601] 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.
[0602] 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.
[0603] The updated context can be used for entropy encoding of syntactic elements of the target block.
[0604] 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.
[0605] The processes of entropy decryption by the entropy decoder (161) are shown at the bottom of Fig. 7.
[0606] 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.
[0607] A context modeler can perform context updates.
[0608] Context can mean the occurrence probability information of each bin for syntactic elements that have already been decoded.
[0609] 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.
[0610] 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.
[0611] The updated context can be used for entropy decoding of syntactic elements of the target block.
[0612] 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.
[0613] 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.
[0614] Information about syntactic elements and bins can be provided from the de-binarization unit to the context selection unit.
[0615] A syntax element may be one of the coding parameters described in the embodiments.
[0616]
[0617] In the present disclosure, a decoder-side intra-mode derivation (DIMD) method is described, which adds a prediction mode derived based on the gradient of surrounding pixels to the MPM list. By adding a prediction mode derived based on the gradient of surrounding pixels to the MPM list, prediction efficiency based on the MPM list can be improved during intra-screen prediction.
[0618] When DIMD is applied, the prediction mode derived by calculating the gradient of surrounding pixels can be added to the MPM list on the decoder side, just like on the encoder side.
[0619] In the present disclosure, the intra-template matching method refers to a method of deriving a prediction block for the current block by constructing a template based on surrounding pixels of the current block and searching for an area most similar to the template from a restored area in the current image.
[0620] In the present disclosure, a template-based intra-mode derivation method refers to a method of calculating a matching cost based on a template for each intra-mode prediction mode in an MPM list, and deriving the intra-mode prediction mode of the current block based on the calculated matching cost. Meanwhile, the matching cost may represent SAD, SATD, or MRSAD, among others.
[0621] Hereinafter, the on-screen prediction method according to the present disclosure will be described in detail.
[0622] FIG. 8 is a flowchart of an on-screen prediction method according to one embodiment of the present disclosure.
[0623] Referring to FIG. 8, a method for performing in-screen prediction according to the present disclosure may include an in-screen prediction mode derivation step (S810) and a prediction signal derivation step (S820).
[0624] Meanwhile, this disclosure discloses various methods for in-screen prediction. Below, various methods for performing in-screen prediction will be described in detail based on the flowchart of FIG. 8.
[0625] To obtain a prediction signal for the current block, one of a plurality of reference sample lines can be selected, and a prediction signal can be obtained based on reference samples belonging to the selected reference sample line.
[0626] Figure 9 illustrates multiple reference sample lines.
[0627] For example, if the on-screen prediction mode of the current block is Planar, one of a plurality of reference sample lines can be selected, and a prediction signal can be obtained based on reference samples belonging to the selected reference sample line.
[0628] In the encoder, at least one prediction signal can be generated based on a plurality of reference sample lines, and the prediction signal with the lowest cost in terms of encoding cost can be determined. Thereafter, the reference sample line used to obtain the prediction signal with the lowest cost can be determined as the optimal reference sample line, and information indicating the optimal reference sample line among the plurality of reference sample lines can be encoded and signaled.
[0629] In the decoder, based on the signaled information, one of a plurality of reference sample lines can be selected, and a prediction signal can be obtained based on reference samples belonging to the selected reference sample line.
[0630] Meanwhile, a method of selecting one of multiple reference sample lines can be called MRL (Multiple Reference Lines).
[0631]
[0632] Derivation of predictive signals based on planar mode
[0633] When performing planar-based prediction, the interpolation direction can be set variably.
[0634] For example, a horizontal prediction signal can be obtained using only horizontal interpolation. Mathematical expression 1 illustrates an example of obtaining a horizontal prediction signal.
[0635]
[0636] In mathematical expression 1, W represents the width of the current block. Horizontal interpolation can be obtained by interpolating the left reference sample rec(-1, y) and the upper right reference sample rec(W, -1) of the current block.
[0637] Alternatively, a vertical prediction signal can be obtained using only vertical interpolation. Equation 2 shows an example of obtaining a vertical prediction signal.
[0638]
[0639] In mathematical expression 2, H represents the width of the current block. Horizontal interpolation can be obtained by interpolating the upper reference sample rec(x, -1) and the lower left reference sample rec(-1, H) of the current block.
[0640] A planar mode in which the interpolation direction is limited to the vertical or horizontal direction may be referred to as a directional planar mode. Specifically, a planar mode that uses only horizontal interpolation may be referred to as a horizontal planar mode, and a planar mode that uses only vertical interpolation may be referred to as a vertical planar mode.
[0641] As another example, the average of the horizontal and vertical prediction signals can be set as the final prediction signal for the current block. Planar mode, which utilizes both horizontal and vertical interpolation, can be referred to as the general planar mode.
[0642] Meanwhile, the transformation kernel of the current block can be adaptively determined based on the intra-screen prediction mode of the current block. In this case, if the directional planar mode is used, the transformation kernel of the current block can be derived by considering the intra-prediction mode of the current block as a directional intra-screen prediction mode.
[0643] For example, if the horizontal planar mode is applied to the current block, the transformation kernel of the current block can be derived by assuming that the on-screen prediction mode of the current block is the horizontal mode. In other words, the transformation kernel applied to the current block when the horizontal planar mode is applied and the transformation kernel applied to the current block when the horizontal mode is applied can be identical to each other.
[0644] On the other hand, if the vertical planar mode is applied to the current block, the transformation kernel of the current block can be derived by assuming that the on-screen prediction mode of the current block is the vertical mode. In other words, the transformation kernel applied to the current block when the vertical planar mode is applied and the transformation kernel applied to the current block when the vertical mode is applied can be identical to each other.
[0645] When the directional Planar mode is applied, information indicating the interpolation direction can be encoded and signaled. That is, information indicating either the horizontal Planar mode or the vertical Planar mode can be encoded and signaled.
[0646] Alternatively, the interpolation direction for the directional planar mode may be determined based on the encoding information or prediction information of the neighboring blocks adjacent to the current block. For example, if the within-screen prediction mode of the neighboring block adjacent to the current block is a vertical planar mode or a directional mode close to the vertical mode, the vertical planar mode may be applied to the current block. On the other hand, if the within-screen prediction mode of the neighboring block adjacent to the current block is a horizontal planar mode or a directional mode close to the horizontal mode, the horizontal planar mode may be applied to the current block.
[0647] Directional modes close to the horizontal mode and directional modes close to the vertical mode can be defined as follows:
[0648] Case 1)
[0649] Directional mode close to horizontal mode: 2 or more and less than 34
[0650] Directional mode close to vertical mode: 34 or more and less than 66
[0651] Case 2)
[0652] Directional mode close to horizontal mode: 8 or more and less than 28
[0653] Directional mode close to vertical mode: 40 or more and less than 60
[0654] Case 3)
[0655] Directional mode close to horizontal mode: 13 or more and less than 23
[0656] Directional mode close to vertical mode: 45 or more and less than 55
[0657] If the on-screen prediction mode of the neighboring block does not correspond to a directional mode close to the horizontal mode and a directional mode close to the vertical mode, the general Planar mode can be applied to the current block.
[0658] Meanwhile, in the above-described example, when the on-screen prediction mode of the neighboring block is a directional mode close to the horizontal mode, the horizontal Planar mode is applied to the current block, and when the on-screen prediction mode of the neighboring block is a directional mode close to the vertical mode, the vertical Planar mode is applied to the current block.
[0659] Conversely, when the on-screen prediction mode of the neighboring block is a directional mode close to the horizontal mode, the vertical direction Planar mode may be applied to the current block, and when the on-screen prediction mode of the neighboring block is a directional mode close to the vertical mode, the horizontal direction Planar mode may be applied to the current block.
[0660] The DIMD method can also be used to determine the interpolation direction of directional planar modes. For example, if the mode with the largest amplitude in the gradient histogram of the current block is a vertical mode or a mode close to the vertical direction, the vertical planar mode can be applied to the current block. Conversely, if the mode with the largest amplitude in the gradient histogram of the current block is a horizontal mode or a mode close to the horizontal direction, the horizontal planar mode can be applied to the current block.
[0661] When the interpolation direction for the directional Planar mode is determined based on the neighboring block or DIMD mode, encoding / decoding of information indicating the interpolation direction may be omitted.
[0662] Alternatively, the interpolation direction of the directional planar mode can be determined based on the template cost. For example, predictions can be performed based on the horizontal planar mode and the vertical planar mode, respectively, for templates adjacent to the current block. Then, the matching costs for the horizontal planar mode and the vertical planar mode can be calculated based on the cost between the predicted and reconstructed samples within the template.
[0663] Afterwards, the prediction signal of the current block can be obtained based on the smaller matching cost among the horizontal planar mode and the vertical planar mode.
[0664]
[0665] Derivation of predictive signals based on DIMD mode
[0666] Based on the DIMD method, a prediction signal for the current block can be generated. Specifically, when the DIMD mode is applied to the current block, the prediction signal can be obtained through the following steps, STEP 1 and STEP 2.
[0667] (STEP 1) Step to derive the Histogram of Gradient (HoG) for the current block
[0668] A region containing at least one restoration sample adjacent to a block can be set as a template. Alternatively, a template can be set for each reference sample line, block, or region.
[0669] Figure 10 shows an example of the configuration of a template.
[0670] As in the example illustrated in FIG. 10, the template may include at least one of a top restoration area, a left restoration area, or an upper left restoration area of the block.
[0671] For example, in the example illustrated in Fig. 10, the configuration of the first to seventh templates can be summarized as follows.
[0672] Template 1 (L-shaped template): Consists of the upper left restoration area of the block, the upper restoration area, and the left restoration area.
[0673] Template 2: Consists only of the restoration area in the upper left corner of the block.
[0674] Template 3: Consists of a top left restoration area and a top restoration area of the block.
[0675] Template 4: Consists of a block's upper left restoration area and a left restoration area.
[0676] Template 5: Consists of only the top restoration area of the block.
[0677] Template 6: Consists of only the left restoration area of the block.
[0678] Template 7: Consists of the upper block area and the left restoration area.
[0679] Information related to the configuration of a template may be encoded and signaled. For example, information indicating one of a plurality of template candidates may be encoded and signaled. The plurality of template candidates may include at least one of the first through seventh templates listed in FIG. 10.
[0680] Alternatively, the size and / or shape of the template may be determined based on the encoding / decoding information of the current block or neighboring blocks. Specifically, the size and / or shape of the template may be adaptively determined based on the size of the current block or neighboring blocks.
[0681] For example, if the size of the current block or a neighboring block is smaller than a threshold, the number of lines or samples constituting the template can be reduced compared to the other case.
[0682] For example, if the size of the current block or a neighboring block is smaller than a threshold, the number of lines or samples constituting the template can be increased compared to the case where the size is not smaller than a threshold.
[0683] For example, if the size of the current block or a neighboring block is greater than a threshold, the number of lines or samples constituting the template may be reduced compared to the other case.
[0684] For example, if the size of the current block or a neighboring block is greater than a threshold, the number of lines or samples constituting the template may be increased compared to the case where the size is not greater than a threshold.
[0685] Meanwhile, the block size may represent a statistical value for the width, height, or at least one of the width and height of the block. The statistical value may represent the larger value of the width and height (i.e., max(width, height)), the smaller value of the width and height (i.e., min(width, height)), or the average value of the width and height.
[0686] Based on the block partitioning information, the size of the template may be adaptively determined.
[0687] For example, if the current block is non-square, the template can be configured by setting the size of the restoration area adjacent to the larger side of the top side (i.e., width) and the left side (i.e., height) of the current block to be larger than the restoration area adjacent to the smaller side.
[0688] As another example, a template can be constructed based on the motion vector or block vector of a neighboring block or a collocated block. Meanwhile, a collocated block represents a block in the same location as the current block within the collocated picture.
[0689] Figure 11 illustrates a collocated block.
[0690] For example, a block containing a position corresponding to the center position (C1) of the current block within a collocated picture or a block containing a position corresponding to a position adjacent to the lower right corner (C0) of the current block can be set as a collocated block.
[0691] Once the motion vector or block vector of a neighboring block or a collocated block is determined, a template can be constructed based on the position indicated by the block vector or motion vector.
[0692] Gradient values for samples within a template can be calculated. At this time, gradients for the samples can be calculated for each of the horizontal and vertical directions. Specifically, by moving the filter window within the template, horizontal and vertical gradients can be derived for each of the multiple samples within the template.
[0693] Figure 12 shows an example of deriving a gradient for samples included in a template.
[0694] In the example shown in Fig. 12, it is illustrated that the template consists of three lines, and by applying a 3x3 sized filter, the gradient for samples belonging to the central line is obtained.
[0695] Based on the gradient value, the directionality of the sample or a directionality prediction mode corresponding to the directionality can be derived. For example, the directionality of the sample can be derived according to the following mathematical expression 3.
[0696]
[0697] In mathematical expression 3, Gy represents the vertical gradient, and Gx represents the vertical gradient.
[0698] The on-screen prediction mode of the sample may be set to a directional prediction mode having a directionality identical to or similar to the calculated directionality. To this end, the encoder and decoder may pre-store directionality values corresponding to each directional prediction mode.
[0699] As in the example illustrated in Fig. 12, in deriving a gradient histogram, a gradient can be derived for samples belonging to one line among a plurality of reference sample lines constituting a template.
[0700] Meanwhile, by increasing the number of lines, it is also possible to derive gradients for multiple lines.
[0701] Figure 13 shows an example of deriving a gradient for multiple lines.
[0702] In the example illustrated in Fig. 13, it is illustrated that gradients are obtained for samples belonging to the second line and samples belonging to the fifth line from the left / upper boundary of the current block.
[0703] That is, by applying a 3x3 filter to the samples belonging to the first to third lines, the gradient of the samples belonging to the second line can be calculated, and by applying a 3x3 filter to the samples belonging to the fourth to sixth lines, the gradient of the samples belonging to the fifth line can be calculated.
[0704] Not stopping at the example shown, gradients can also be derived for each line except the first and last lines.
[0705] For each of the multiple lines, a gradient histogram can be derived.
[0706] Alternatively, for each of the multiple lines, a gradient histogram can be derived, and then the derived multiple gradient histograms can be combined into one.
[0707] At this time, a combined gradient histogram (Merged HoG) can be derived by weighting multiple gradient histograms. The weight assigned to each gradient histogram can be determined based on the distance between the current block and the line used to derive the corresponding gradient histogram.
[0708] For example, a weight assigned to a gradient histogram derived from a line whose distance from the current block is the first value may have a greater value than a weight assigned to a gradient histogram derived from a line whose distance from the current block is the second value (wherein the second value is greater than the first value).
[0709] That is, the weights applied to the gradient histogram may be inversely proportional to the distance between the current block and the line used to derive the gradient histogram.
[0710] For example, the weight assigned to the gradient histogram derived from the first line (i.e., the line with index 1) may be 4, the weight assigned to the gradient histogram derived from the second line (i.e., the line with index 2) may be 3, the weight assigned to the gradient histogram derived from the third line (i.e., the line with index 3) may be 2, and the weight assigned to the gradient histogram derived from the fourth line (i.e., the line with index 4) may be 1.
[0711] Alternatively, one could construct a template containing lines, and then determine the weights assigned to the gradient histogram derived from those lines based on the matching cost for the template.
[0712] For example, when weighting gradient histograms derived from two lines, the weight W_L1 assigned to the gradient histogram derived from the first line and the weight W_L2 assigned to the gradient histogram derived from the second line can be derived according to the following mathematical expression 4.
[0713]
[0714] In the above mathematical expression 4, Tmcost_L1 means the matching cost of the template including the first line (i.e., the line with index 1), and Tmcost_L2 means the matching cost of the template including the second line (i.e., the line with index 2).
[0715] A unified gradient histogram can also be derived by integrating only the on-screen prediction modes that are common to multiple gradient histograms.
[0716] When deriving gradient histograms by line or by sample group, the optimal reference line or optimal sample group can be determined based on the template matching cost.
[0717] For example, based on a gradient histogram derived for a line or sample group, an in-screen prediction mode can be derived, and then in-screen prediction for a template can be performed based on the derived in-screen prediction mode. Then, a matching cost for the template can be calculated based on the difference between the restored and predicted samples within the template.
[0718] By repeating the above process for each line or each sample group, the matching cost of the template for each line or each sample group can be calculated.
[0719] Afterwards, by comparing the matching costs for multiple lines or multiple sample groups, the line or sample group with the smallest matching cost can be selected for the current block.
[0720] When deriving gradient histograms by line or sample group, you can select a prediction mode within the screen that appears in multiple gradient histograms. If there are multiple common prediction modes within the screen, you can select one of them.
[0721] The on-screen prediction mode selected according to the above process can be set as the on-screen prediction mode of the current block.
[0722] Based on the MRL method, the line from which the gradient histogram is derived can be determined. Specifically, information indicating one of multiple lines can be encoded / decoded, and a gradient histogram can be derived for the line indicated by the information.
[0723] Alternatively, a gradient histogram may be derived for each of the line indicated by the MRL method and at least one surrounding line. Here, the surrounding line may mean a line whose index difference from the line indicated by the MRL method is smaller than an offset. The offset may be 1, 2, 3, or 4, etc. For example, when the index of the line indicated by the MRL method is L, the at least one surrounding line may include at least one of a line whose index is L-1, a line whose index is L-2, a line whose index is L-3, a line whose index is L-4, a line whose index is L+1, a line whose index is L+2, a line whose index is L+3, or a line whose index is L+4.
[0724] At least one of the number of reference sample lines from which the gradient histogram is derived or the size of pixel groups can be adaptively determined depending on at least one of the block size or shape.
[0725] For example, as the size of the current block increases, the number of lines from which the gradient histogram is derived or the size of the pixel group from which the gradient histogram is derived may increase.
[0726] For example, by comparing the top edge (i.e. width) and the left edge (i.e. height) of the current block, a larger number of lines can be placed on the longer side, or the pixel group on the longer side can be set larger.
[0727] To reduce complexity, the gradient histogram derivation can be performed in a limited manner. For example, the gradient histogram can be derived for the current block only if the block size is greater than a threshold.
[0728] For example, the threshold may be 8x8. Alternatively, the threshold may represent the number of samples in a block and may be 32, 64, or 128.
[0729] Alternatively, a gradient histogram can be derived for the current block only if the DIMD mode is applied to a neighboring block adjacent to the current block or if the within-screen prediction mode of the neighboring block is derived based on the gradient histogram.
[0730] The gradient histograms computed for neighboring blocks may also be inherited by the current block. Specifically, the gradient histograms of at least one of a block spatially adjacent to the current block, a block spatially non-adjacent to the current block, a block temporally adjacent to the current block, a block temporally non-adjacent to the current block, or a collocated block may be used for the current block.
[0731] Figure 14 illustrates blocks in spatially / temporally adjacent / non-adjacent locations.
[0732] In Fig. 14, the locations spatially adjacent to the current block are 1 to 5, and the locations spatially non-adjacent to the current block are 6 to 23.
[0733] Meanwhile, since the reference picture has been encoded / decoded before the current picture, the positions to the right and / or below the current block within the reference picture may also be in a pre-restored state. Accordingly, the temporally adjacent positions may include not only positions 1 to 5, but also positions 24 to 26, which are located to the right and / or below the current block. Furthermore, positions not temporally adjacent to the current block may include not only positions 6 to 23, but also positions 27 to 36.
[0734] Meanwhile, the collocated block (see Fig. 11) can also be used to derive the gradient histogram of the current block.
[0735] Temporal / spatial adjacent / non-adjacent positions can also be adjusted based on block vectors or motion vectors. Once temporal / spatial adjacent / non-adjacent positions are adjusted, the gradient histogram of the current block can be derived based on the gradient histogram of the block containing the adjusted positions. Here, the adjusted positions can represent positions spaced apart from the initial positions by the block vector or motion vector.
[0736] Figure 15 shows an example in which the positions of referenceable blocks are adjusted by block vectors / motion vectors derived from collocated blocks.
[0737] Meanwhile, positions can only be adjusted for blocks within the same picture as the block from which the block vector or motion vector was derived. For example, if the block vector is derived from a block spatially adjacent to the current block, positions can only be adjusted for spatially adjacent / non-adjacent positions, and positions for temporally adjacent / non-adjacent positions can not be adjusted.
[0738] Alternatively, the positions may be adjusted only for blocks within a picture that are different from the block from which the block vector or motion vector was derived.
[0739] Alternatively, all available positions can be adjusted without considering the picture to which the block from which the block vector or motion vector is derived belongs.
[0740] Alternatively, the gradient histogram can be derived for each sub-block within the current block. Specifically, similar to the SbTMVP method, the reference block of the current block can be determined by a block vector or a motion vector. Then, the gradient histogram of a sub-block within the current block can be derived from a sub-block (i.e., a reference sub-block) whose position / size corresponds to a fraudulent sub-block within the reference block.
[0741] A list managed using the FIFO (First Input First Output) method can be defined. This list can store the gradient histograms of blocks encoded / decoded before the current block. That is, gradient histograms can be sequentially inserted into the list according to the encoding / decoding order of the blocks. Such a list can be called a history-based list.
[0742] At least one gradient histogram stored in the history-based list is available for the current block.
[0743] As described above, the gradient histogram of the surrounding blocks can be set to the gradient histogram of the current block.
[0744] Alternatively, one can integrate gradient histograms inherited from surrounding blocks with gradient histograms derived based on the template of the current block.
[0745] Based on the gradient histogram inherited from the surrounding blocks, at least one prediction mode can be derived, and based on the derived at least one prediction mode, a prediction signal for the current block can be obtained.
[0746] Gradient histograms can be inherited and used only from neighboring blocks encoded / decoded with a specific prediction mode. Here, the specific prediction mode may include at least one of DIMD, TIMD, or DIMD Merge.
[0747] For example, gradient histogram information can be inherited from the reference block only when the DIMD mode is applied to the reference block.
[0748] Alternatively, the gradient histogram can be inherited from the reference block only if the DIMD or TIMD mode is applied to the reference block.
[0749] Alternatively, the gradient histogram can be inherited from the reference block only if the reference block has DIMD or DIMD merge mode applied.
[0750] A merge list for gradient histogram inheritance can be constructed, and at least one of the merge candidates included in the merge list can be selected. At this time, information indicating the selected candidate among the candidates included in the merge list can be encoded and signaled.
[0751] The merge list may include at least one of a gradient histogram derived from blocks at spatially / temporally adjacent / non-adjacent locations, a gradient histogram derived from a history-based list, and a gradient histogram derived from blocks at fixed locations.
[0752] Meanwhile, the size of the merge list may be predefined in the encoder and decoder. For example, the number of candidates that can be included in the merge list may be 12.
[0753] Alternatively, information indicating the size of the merge list may be encoded and signaled.
[0754] A unified gradient histogram can also be derived by combining the gradient histograms of multiple surrounding blocks or multiple merge candidates.
[0755] For example, a unified gradient histogram can be derived by combining the gradient histograms of surrounding blocks at a predefined location. For example, the surrounding blocks at the predefined location can include at least one of the blocks adjacent to the current block (e.g., blocks 1 to 5 in FIG. 14).
[0756] For example, the gradient histograms of all blocks adjacent to the current block can be integrated to derive an integrated gradient histogram.
[0757] Alternatively, multiple blocks adjacent to the current block can be selected, and then the gradient histograms of the selected blocks can be integrated to derive an integrated gradient histogram.
[0758] Alternatively, only the blocks adjacent to the current block, either the blocks adjacent to the left of the current block or the blocks adjacent to the top of the current block, can be selected, and then the gradient histograms of the selected blocks can be integrated to derive an integrated gradient histogram.
[0759] Alternatively, the gradient histograms of surrounding blocks encoded / decoded with a specific prediction mode can be integrated to derive an integrated gradient histogram. Here, the specific prediction mode can include at least one of DIMD, TIMD, or DIMD Merge.
[0760] For example, by integrating the gradient histograms of reference blocks to which the DIMD mode is applied, an integrated gradient histogram can be derived.
[0761] For example, the gradient histograms of reference blocks to which the DIMD or TIMD mode is applied can be integrated to derive an integrated gradient histogram.
[0762] For example, the gradient histograms of reference blocks to which DIMD or DIMD merge mode is applied can be integrated to derive an integrated gradient histogram.
[0763] Meanwhile, when generating an integrated gradient histogram, the number of surrounding blocks used to generate the integrated gradient histogram can be limited to a threshold value. For example, the maximum number of surrounding blocks used to generate the integrated gradient histogram can be 12.
[0764] Predicting blocks using integrated gradient histograms can be called integrated gradient-based merge prediction. However, integrated gradient-based merge prediction may be permitted only in limited circumstances.
[0765] For example, the allowability of integrated gradient-based merge prediction may be determined based on the block size. For example, if the block size is 4x4, integrated gradient-based merge prediction may not be available.
[0766] Alternatively, whether integrated gradient-based merge prediction is applicable to the current block can be determined based on the prediction mode of the surrounding blocks. For example, integrated gradient-based merge prediction can be applied to the current block only if DIMD is applied to the surrounding blocks or if the within-screen prediction mode of the surrounding blocks is obtained based on the gradient histogram.
[0767] Generating a unified gradient histogram may be allowed to some extent.
[0768] For example, whether or not to generate an integrated gradient histogram can be determined based on the block size. Specifically, to reduce complexity, generating an integrated gradient histogram can be allowed only when the block size is equal to or greater than a threshold. For example, an integrated gradient histogram can be derived / used for the current block only if the current block size is 8x8 or larger.
[0769] Alternatively, a unified gradient histogram can be derived only when the number of candidates included in the merge list does not reach the maximum number. In this case, the unified gradient histogram can be inserted into the merge list as a new candidate.
[0770] Gradient histogram information derived based on the template of the current block can be stored and used. Here, the gradient histogram information can include at least one of a gradient histogram value or template information from which the gradient value is derived. Here, the gradient histogram value can represent a cumulative amplitude value (Amplitude or Magnitude) for each directional element or each directional prediction mode.
[0771] Meanwhile, the embodiments of the present disclosure that utilize a gradient histogram can be equally applied even when an occurrence frequency histogram is utilized. That is, the embodiments described in the present disclosure can be replaced by utilizing the occurrence frequency values of the occurrence frequency histogram instead of the amplitude values of the gradient histogram.
[0772] In the present disclosure, 'histogram' may represent a gradient histogram or an occurrence frequency histogram.
[0773] A detailed description of the occurrence frequency histogram will be provided later.
[0774] Meanwhile, depending on the type (or form) of the template used to calculate the gradient value or the location of the template, the gradient value may be stored separately.
[0775] For example, if multiple gradient histograms are derived based on a template consisting of only the upper restoration region, a template consisting of only the left restoration region, and an L-shaped template, respectively, the multiple gradient histograms can be stored separately.
[0776] Meanwhile, if the upper or left restoration area is unavailable, the gradient histogram of the neighboring block in that direction can be set as the gradient histogram for that direction. For example, if the left restoration area of the current block is unavailable, the template cannot be constructed using only the left restoration area. In this case, instead of deriving the gradient histogram based on the left template, the gradient histogram of the left neighboring block of the current block can be inherited.
[0777] When storing gradient histogram information, the gradient histogram value may be stored together with a directional element or a directional prediction mode corresponding to the gradient histogram value. That is, the gradient histogram value may represent a pair of a directional element and an amplitude value or a pair of a directional prediction mode and an amplitude value. For example, the gradient histogram value may represent a pair of an index of a directional prediction mode and an amplitude value of the corresponding directional prediction mode.
[0778] In addition, when storing occurrence frequency histogram information, occurrence frequency histogram values may be stored together with directional elements or directional prediction modes corresponding to the occurrence frequency histogram values. That is, occurrence frequency histogram values may represent pairs of directional elements and occurrence frequency values or pairs of directional prediction modes and occurrence frequency values. For example, occurrence frequency histogram values may represent pairs of indexes of directional prediction modes and occurrence frequency values of the corresponding directional prediction modes.
[0779] Meanwhile, the occurrence frequency on the occurrence frequency histogram can be converted into the amplitude value of the gradient histogram, or the amplitude on the gradient histogram can be converted into the occurrence frequency on the occurrence frequency histogram. In other words, if different types of histograms exist, they can be converted into a single type.
[0780] The directional elements or directional prediction modes to be stored can be selected based on the amplitude values or occurrence frequencies of the directional elements or directional prediction modes.
[0781] For example, directional elements or directional prediction modes can be sorted in descending order of amplitude value or frequency of occurrence, and then N directional elements or N directional prediction modes with high amplitude value or frequency of occurrence can be stored. In this case, N can be a value predefined in the encoder and decoder. Alternatively, information indicating N can be encoded and signaled to the decoder.
[0782] Alternatively, directional elements or directional prediction modes whose amplitude or frequency of occurrence is greater than a threshold may be stored, while those that are not may be discarded without being stored. The threshold may have a value predefined in the encoder and decoder. Alternatively, information indicating the threshold may be encoded and signaled to the decoder.
[0783] The amplitude values or occurrence frequencies can be stored in units of blocks of a predetermined size, or in units of CTU, picture, tile, or slice.
[0784] For example, when amplitude values or occurrence frequencies are stored in units of CTUs, gradient histograms calculated for sub-partitions within a CTU can be summed, or, on gradient histograms calculated for sub-partitions within a CTU, amplitude values or occurrence frequencies for a specific directional element (or a specific directional mode) can be summed and stored.
[0785] Alternatively, amplitude values or occurrence frequencies may be stored in MxN block units, where M and N may be preset values in the encoder / decoder. Alternatively, information for determining M and N may be signaled from the encoder to the decoder.
[0786] Alternatively, amplitude values or occurrence frequencies may be stored in units of minimum block size. For example, the minimum block size may be 4x4.
[0787] Alternatively, amplitude values or occurrence frequencies may be stored in units of maximum block size. For example, the maximum block size may be 256x256.
[0788] Meanwhile, when storing the amplitude value or occurrence frequency for a directional element or directional mode, the maximum value or maximum accumulation number of the maximum amplitude value of the directional element or directional mode (i.e., the maximum value of the occurrence frequency) may be limited. Here, the maximum value or maximum accumulation number of the amplitude value may be M, and for example, M may be 32, 64, 128, or 256.
[0789] The value of M may be predefined in the encoder and decoder. Alternatively, information indicating M may be encoded and signaled.
[0790] When storing gradient histogram information, the size of the sum of the amplitude values or occurrence frequencies of the directional elements (or directional modes) extracted from the entire gradient histograms can be limited.
[0791] In storing the amplitude value or occurrence frequency for a directional element or directional mode, the amplitude value or the cumulative number (i.e., occurrence frequency) of the directional element or directional mode may also be scaled.
[0792] In the present disclosure, scaling may include at least one of adding an offset to a target value (e.g., an amplitude value or a frequency of occurrence), subtracting an offset, multiplying by a weight, or dividing by a weight.
[0793] For example, the amplitude value of each directional element (each directional mode) or the accumulated number of times divided by N can be stored. N can be 2.
[0794] For example, the amplitude value of each directional element (each directional mode) or the accumulated number multiplied by M can be stored. M can be 0.5.
[0795] For example, the offset may be stored as a difference value in the amplitude value or cumulative count of each directional element (each directional mode). Here, the offset may be the average value of the amplitude values or cumulative counts of the directional elements (directional modes) in the histogram. Alternatively, the offset may be the average value of the amplitude values or cumulative counts of the corresponding directional elements (directional modes) in multiple histograms. Here, the histogram may represent a gradient histogram or an occurrence frequency histogram.
[0796] (STEP 2) A step of deriving a prediction mode based on a gradient histogram and generating a prediction block based on the prediction mode.
[0797] At least one directional prediction mode can be derived based on a gradient histogram or an occurrence frequency histogram, and a prediction block of the current block can be obtained based on the derived directional prediction mode. Encoding / decoding of the current block can be performed based on the obtained prediction block.
[0798] Multiple prediction modes can be derived based on a gradient histogram or occurrence frequency histogram. Based on these multiple prediction modes, multiple prediction blocks can be derived, and a prediction block (signal) for the current block can be generated through a weighted sum, fusion, or blending of the multiple prediction blocks.
[0799] For example, multiple prediction modes can be selected based on the amplitude value or cumulative count (or occurrence frequency) of each directional mode on the histogram. For example, N prediction modes within the screen with large amplitude values or cumulative counts can be selected. Here, N can be a value preset in the encoder and decoder. Alternatively, information representing N can be encoded and signaled.
[0800] Alternatively, directional prediction modes (or directional elements) with amplitude values or cumulative counts greater than a threshold value can be selected. Here, the threshold value may be a value predefined in the encoder and decoder. Alternatively, information indicating the threshold value may be encoded and signaled.
[0801] Alternatively, prediction modes can be selected based on encoding cost.
[0802] Here, the encoding cost refers to the cost calculated for encoding the residual signal generated based on the difference between the original block (signal) and the predicted block (signal) or the predicted signal. For example, the encoding cost may represent one of the SAD, SSE, SATD, which represent the error value between the two signals, or the rate-distortion cost, which is the cost required to encode the residual signal plus the error value. Meanwhile, the predicted block may be generated using a directional prediction mode selected through a gradient histogram (HoG).
[0803] Specifically, a prediction block can be generated based on each of a plurality of prediction modes selected from a gradient histogram or an occurrence frequency histogram. Thereafter, the encoding cost for each prediction mode can be calculated based on the prediction block derived based on the prediction mode.
[0804] Once the prediction costs for multiple prediction modes are calculated, the multiple prediction modes can be sorted in descending order of encoding cost. Then, N prediction modes with the lowest encoding cost can be selected.
[0805] Alternatively, only directional prediction modes (or directional elements) with an encoding cost less than a threshold can be selected among multiple prediction modes.
[0806] Alternatively, information indicating the selected prediction mode may be encoded and signaled.
[0807] Weighting multiple prediction blocks can be performed conditionally.
[0808] For example, for a luma component block, obtaining a prediction block based on a weighted sum of multiple prediction blocks may be permitted. On the other hand, for a chrominance component block, obtaining a prediction block by weighting multiple prediction blocks may not be permitted. That is, for a chrominance component block, only one directional prediction mode may be selected.
[0809] Alternatively, information indicating whether to obtain a prediction block by weighting multiple prediction blocks can be encoded and signaled. In the encoder, from the perspective of rate-distortion optimization, the optimal method can be determined between a method of obtaining a prediction block using weighted summation and a method of obtaining a prediction block without weighted summation. If it is determined not to use weighted summation, only one directional prediction mode is selected from the histogram, whereas if it is determined to use weighted summation, multiple directional prediction modes can be selected from the histogram. Here, the histogram can represent a gradient histogram or an occurrence frequency histogram.
[0810] As another example, based on multiple prediction modes, multiple prediction blocks can be derived, and based on the difference between the prediction blocks, the prediction mode to be used for the weighted sum can be selected.
[0811] For example, assume that five prediction modes are selected through a histogram. In this case, five prediction blocks can be obtained based on each of the five prediction modes. Thereafter, the error values (i.e., SAD, SSE, or SATD) between each prediction block can be derived. For example, if the five prediction blocks are referred to as the first to fifth prediction blocks, ten error values can be calculated for the five prediction blocks as follows.
[0812] First prediction block - second prediction block, first prediction block - third prediction block, first prediction block - fourth prediction block, first prediction block - fifth prediction block, second prediction block - third prediction block, second prediction block - fourth prediction block, second prediction block - fifth prediction block, third prediction block - fourth prediction block, third prediction block - fifth prediction block, fourth prediction block - fifth prediction block
[0813] After selecting at least one pair in order of the smallest error value, the prediction blocks included in the selected pair are weighted and combined to obtain the prediction block of the current block.
[0814] Alternatively, at least one pair having an error value smaller than a threshold can be selected, and then the prediction blocks included in the selected pair can be weighted to obtain the prediction block of the current block.
[0815] Alternatively, at least one pair with an error value greater than a threshold can be removed. Then, the predicted blocks included in the remaining pairs can be weighted to obtain the predicted block of the current block.
[0816] Meanwhile, a prediction block of the current block can also be derived by weighting a prediction block obtained based on a gradient histogram or an occurrence frequency histogram (i.e., a prediction block obtained based on the DIMD mode) and a prediction block obtained by another prediction method.
[0817] Here, the prediction method may include at least one of inter-screen prediction, intra-screen template matching (IntraTMP), intra-block copy (IBC) prediction, matrix-weighted intra-prediction (MIP), or non-directional prediction (e.g., DC or Planar). For chrominance components, the prediction mode may further include inter-component prediction (e.g., CCLM, GLM, CCCM, etc.).
[0818] For example, a prediction block of the current block can be obtained by combining multiple directional prediction modes obtained based on the DIMD mode, IntraTMP, or non-directional prediction modes (e.g., DC or Planar).
[0819] For example, if N prediction modes are derived based on the DIMD mode, at least one of the N prediction modes and the non-directional prediction mode can be selected based on the matching cost. If the number of selected prediction modes is multiple, multiple prediction blocks can be derived based on each of the multiple prediction modes, and the multiple prediction blocks can be weighted and combined to derive the prediction block of the current block. Here, the non-directional prediction mode can be DC or Planar.
[0820] For example, assume that five directional prediction modes are derived based on the DIMD mode. Furthermore, assume that two directional prediction modes and a non-directional prediction mode are selected from the five directional prediction modes and the non-directional prediction mode. In this case, three prediction blocks can be obtained based on each of the two directional prediction modes and the non-directional prediction mode. Thereafter, the prediction block of the current block can be obtained by weighting and combining the three prediction blocks.
[0821] In the above embodiment, the non-directional prediction mode may be replaced with a prediction mode of a reference block indicated by a block vector. Here, the block vector may be derived via IBC or IntraTMP.
[0822] Alternatively, instead of deriving a prediction block based on a non-directional prediction mode, a reference block pointed to by a block vector may be set as the prediction block.
[0823] Alternatively, in the above embodiment, the non-directional prediction mode may be replaced with a prediction mode of a reference block indicated by a motion vector. Here, the motion vector may be derived from a neighboring block or derived based on information encoded / decoded for the current block.
[0824] As another example, the prediction block of the current block can be obtained by weighting a prediction block obtained by a block vector or a motion vector and a prediction block derived based on a non-directional prediction mode. For example, the prediction block of the current block can be obtained by weighting a prediction block obtained by the above weighted sum operation and at least one prediction block derived based on a DIMD mode.
[0825] Alternatively, a plurality of prediction blocks may be derived based on a directional prediction mode and a non-directional prediction mode derived based on the DIMD mode, and a prediction block of the current block may be derived by weighting the plurality of prediction blocks and a prediction block obtained by a block vector or a motion vector.
[0826] Meanwhile, when deriving a prediction block through weighted summation, if a non-directional prediction mode is used and the non-directional prediction mode is Planar, a directional Planar mode may be set to be used instead of the general Planar mode. In this case, whether to use the directional Planar mode or at least one of the interpolation directions of the directional Planar mode may be determined according to the directional prediction mode based on the DIMD mode.
[0827] For example, if the directional prediction mode derived based on the DIMD mode is a directional mode closer to the vertical mode, the vertical planar mode may be used. Conversely, if the directional prediction mode derived based on the DIMD mode is a directional mode closer to the horizontal mode, the horizontal planar mode may be used.
[0828] The directional mode close to the horizontal mode and the directional mode close to the vertical mode can be defined as in the examples of Case 1) to Case 3) described above.
[0829] Meanwhile, if the directional prediction mode derived based on the DIMD mode does not correspond to a directional mode close to the horizontal direction mode and a directional mode close to the vertical direction mode, a general Planar mode can be used.
[0830] A weighted sum of prediction blocks derived based on the vertical Planar mode and prediction blocks derived based on the horizontal Planar mode may also be used. As an example, Equation 5 illustrates an example of weighting a prediction block derived based on the vertical Planar mode and a prediction block derived based on the horizontal Planar mode.
[0831]
[0832] In Equation 5, vertical_planar represents a prediction block derived based on a vertical direction Planar mode (hereinafter referred to as a vertical direction prediction block), and horizontal_planar represents a prediction block derived based on a horizontal direction Planar mode (hereinafter referred to as a horizontal direction prediction block). In addition, w1 represents a weight assigned to a vertical direction prediction block, and w2 represents a weight assigned to a horizontal direction prediction block.
[0833] Meanwhile, deriving a prediction block by weighting vertical direction prediction blocks and horizontal direction prediction blocks can be called a blended planar mode.
[0834] A prediction block obtained by the mixed planar mode can be set as the prediction block of the current block. Alternatively, a prediction block of the current block can be derived by weighting a prediction block obtained by the mixed planar mode and a prediction block derived based on another prediction mode.
[0835] The weights assigned to each of the vertical direction prediction block and the horizontal direction prediction block can be determined based on a directional prediction mode derived based on the DIMD mode.
[0836] For example, if the directional prediction mode derived based on the DIMD mode is close to the horizontal mode, the weight assigned to the horizontal prediction block can be set to a value greater than the weight assigned to the vertical prediction block. For example, in Equation 5, w1 can be set to 1 and w2 can be set to 3.
[0837] For example, if the directional prediction mode derived based on the DIMD mode is closer to the vertical direction mode, the weight assigned to the vertical direction prediction block can be set to a larger value than that assigned to the horizontal direction prediction block. For example, in Equation 5, w1 can be set to 3 and w2 can be set to 1.
[0838] Meanwhile, if the directional prediction mode derived based on the DIMD mode is determined to be not close to both the vertical direction mode and the horizontal direction mode, the weight assigned to the vertical direction prediction block and the weight assigned to the horizontal direction prediction block can be set to be the same.
[0839] The non-directional prediction mode used together with the directional prediction mode derived based on the DIMD mode may include at least one of a general planar mode, a DC, a prediction mode derived based on block vectors, a directional planar mode, or a mixed planar mode. That is, at least one of the listed non-directional prediction mode candidates may be used to derive a prediction block of the current block together with the directional prediction mode derived based on the DIMD mode.
[0840] Information indicating one of the non-directional prediction mode candidates may be encoded and signaled.
[0841] Alternatively, a template matching cost may be calculated for each of the non-directional prediction mode candidates, and the non-directional prediction mode candidate with the smallest template matching cost may be selected.
[0842] Meanwhile, depending on the directional prediction mode derived based on the DIMD mode, the composition of non-directional prediction mode candidates may be different.
[0843] For example, if the directional prediction mode derived based on the DIMD mode is close to the vertical direction mode, the non-directional prediction mode candidates may include at least one of the following:
[0844] Candidate 1: DC
[0845] Candidate 2: Prediction mode derived based on block vectors
[0846] Candidate 3: General Planar Mode
[0847] Candidate 4: Vertical planar mode
[0848] Candidate 5: Mixed planar mode (w1 > w2)
[0849] For example, if the directional prediction mode derived based on the DIMD mode is close to the horizontal mode, the non-directional prediction mode candidates may include at least one of the following:
[0850] Candidate 1: DC
[0851] Candidate 2: Prediction mode derived based on block vectors
[0852] Candidate 3: General Planar Mode
[0853] Candidate 4: Horizontal planar mode
[0854] Candidate 5: Mixed planar mode (w1 < w2)
[0855] Meanwhile, in all prediction methods where the Planar mode is utilized, the general Planar mode can be replaced with a directional Planar mode or a mixed Planar mode.
[0856] For example, when TIMD fusion is applied, the prediction signal of the current block can be obtained by weighting and adding the prediction signal derived through the TIMD mode and the prediction signal obtained through the prediction based on the planar mode. At this time, the prediction based on the planar mode can be a general planar mode, a directional planar mode (vertical planar mode or horizontal planar mode), or a mixed planar mode.
[0857] Meanwhile, the interpolation direction of the directional planar mode or the weight for the mixed planar mode can be determined by considering the directionality of at least one of the best mode or the secondary mode derived based on the TIMD mode.
[0858] For example, if at least one of the best mode or the next-best mode is close to the vertical mode, the vertical planar mode may be used, or a mixed planar mode in which the weight assigned to the vertical prediction block is greater than the weight assigned to the horizontal prediction block may be used.
[0859] For example, if at least one of the best mode or the next-best mode is close to the horizontal mode, the horizontal planar mode may be used, or a mixed planar mode in which the weight assigned to the horizontal prediction block is greater than the weight assigned to the vertical prediction block may be used.
[0860]
[0861] When weighting multiple prediction blocks, the weights for the prediction blocks can be equal. Alternatively, the weights for the prediction blocks can be set differentially.
[0862] Meanwhile, weights for predicted blocks can be derived based on one of multiple weight set candidates. The multiple weight set candidates may be predefined in the encoder and decoder.
[0863] For example, in an encoder and decoder, the optimal weight set in terms of encoding can be determined from among multiple weight set candidates. Thereafter, the encoder can encode and signal information (e.g., a set index) indicating the optimal weight set from among the multiple weight set candidates.
[0864] For example, let us assume that the weights assigned to each of two prediction blocks are w0 and w1. Then, the weight set candidates for the pair w0 and w1 may include at least one of the following.
[0865] Index 0 : {w0,w1}={1 / 4, 3 / 4},
[0866] Index 1: {w0,w1}={3 / 4, 1 / 4},
[0867] Index 2: {w0,w1}={1 / 2, 1 / 2}
[0868] Alternatively, one of multiple weight set candidates may be selected based on prediction mode information of surrounding blocks.
[0869] For example, if both the left neighboring block and the top neighboring block are encoded in the inter-component prediction mode, the first weight set candidate (i.e., Index 0) can be selected.
[0870] For example, if both the left neighboring block and the top neighboring block are not encoded in the inter-component prediction mode, the second weight set candidate (i.e., Index 1) can be selected.
[0871] As another example, a weight set candidate can be selected based on the amplitude value or occurrence frequency for each directional element on the histogram or for each directional prediction mode.
[0872] For example, a weight assigned to a prediction block generated based on a prediction mode with a high amplitude value or high frequency of occurrence may be set to a higher value than a weight assigned to a prediction block generated based on a prediction mode with a low amplitude value or low frequency of occurrence.
[0873] For example, let the amplitude value or occurrence frequency of the first prediction mode be amplitude(pred1), and let the amplitude value or occurrence frequency of the second prediction mode 2 be amplitude(pred2). In this case, the weight w1 assigned to the first prediction block obtained based on the first prediction mode and the weight w2 assigned to the second prediction block obtained based on the second prediction mode can be derived according to the following mathematical expression 6.
[0874]
[0875] Meanwhile, the weights assigned to at least one prediction block derived based on the DIMD mode (i.e., gradient histogram) and the weights assigned to prediction blocks derived based on other prediction modes may be different from each other.
[0876] At this time, the weight assigned to the prediction block derived based on the other prediction mode is set to a fixed value, and the weight assigned to the prediction block derived based on the DIMD mode can be derived based on the amplitude value or occurrence frequency of the corresponding prediction mode on the histogram. Here, the weight assigned to the prediction block derived based on the other prediction mode can be 1 / N, and N can represent the total number of prediction blocks.
[0877] For example, let's assume that three prediction blocks are derived based on two directional prediction modes obtained based on the DIMD mode and the Planar mode. In this case, a weight of 1 / 3 may be assigned to the prediction block derived based on the Planar mode. On the other hand, the weights assigned to the prediction blocks derived based on the two directional prediction modes may be determined based on the amplitude value or occurrence frequency of the directional prediction mode on the histogram. For example, according to the example of Equation 6, a weight w1 assigned to a first prediction block derived based on the first directional prediction mode and a weight w2 assigned to a second prediction block derived based on the second directional prediction mode may be determined.
[0878] Weights can also be determined based on the magnitudes (or ratios) of the prediction modes within a histogram (i.e., gradient histogram or frequency histogram). For example, the weight Wi(x, y) applied to a prediction sample at location (x, y) derived based on prediction mode i can be derived according to the following mathematical expressions 7 or 8.
[0879]
[0880]
[0881] In Equations 7 and 8, wDIMD i represents a weight assigned to the prediction mode whose index is i, and can be determined based on the amplitude value or occurrence frequency of the prediction mode i on a histogram (i.e., a gradient histogram or an occurrence frequency histogram).
[0882] For example, it is assumed that the two directional prediction modes induced under the DIMD mode are Mode 1 and Mode 2, and the amplitude values for each mode are 20 and 10, respectively.
[0883] At this time, the weights for the two directional modes and the weights for the non-directional mode can be derived as follows.
[0884] wDIMD1= 2 / 3 * amplitude(mode1) / (amplitude(mode1) + amplitude(mode2)) = 2 / 3 * 20 / (20+10) = 2 / 3 * 2 / 3 = 4 / 9
[0885] wDIMD2= 2 / 3 * amplitude(mode1) / (amplitude(mode1) + amplitude(mode2)) = 2 / 3 * 10 / (20+10) = 2 / 3 * 1 / 3 = 2 / 9
[0886] wnonangular= 1 / 3
[0887] In the above example, wnonangular represents the weight applied to the predicted block derived by the non-directional prediction mode.
[0888] In the above example, when a gradient histogram is used, the amplitude value of the directional prediction mode can be used, and when an occurrence frequency histogram is used, the cumulative number of occurrences of the directional prediction mode can be used instead of the amplitude value.
[0889] Meanwhile, the sum of the weights can have a predefined integer value.
[0890] For example, wDIMD1, wDIMD2, and w nonauglar The sum of can be 1.
[0891] H represents the height of the current block, and W represents the width of the current block.
[0892] a i represents a constant value. For example, a i It can be 10 days.
[0893] Alternatively, depending on the block size or the number of samples contained in the block, a iThe value of can be determined adaptively. For example, if the number of samples contained in the current block is greater than 128, a i can be set to a value less than the default value (e.g., 10).
[0894] In determining the weight of a sample located at the (x, y) coordinate within a prediction block based on the directional prediction mode i, one of Equation 7 and Equation 8 may be selectively used. Specifically, Equation 7 indicates that the farther away from the upper boundary of the current block, the greater the weight w. i It shows how the weight w decreases, and Equation 8 shows that the farther away from the left boundary of the current block, the greater the weight w i It shows how to get smaller.
[0895] At this time, the method by which the weights are derived can be determined based on the values or ratios of the gradient histogram for each template.
[0896] For example, if the value of directional prediction mode i on the gradient histogram derived from the upper template of the current block is greater than the value of directional prediction mode i on the gradient histogram derived from the left template, or is N times greater, the weight can be determined based on Equation 7. In this case, N can be 2.
[0897] On the other hand, if the value of the directional prediction mode i on the gradient histogram derived from the left template of the current block is greater than the value of the directional prediction mode i on the gradient histogram derived from the upper template, or is N times greater, the weight can be determined based on Equation 8. In this case, N can be 2.
[0898] Alternatively, if only the top restoration region is available (i.e., only the top template exists), the pixel-wise weights can be derived based on Equation 7.
[0899] On the other hand, if only the left restoration region is available (i.e., only the left template exists), the pixel-wise weights can be derived based on Equation 8.
[0900] As another example, a method can be used to assign greater weights to pixels closer to the template used to derive the directional prediction mode used to generate the prediction signal. For example, if the directional prediction mode is derived based on the upper template, weights for each pixel can be derived based on Equation 7.
[0901] On the other hand, if the directional prediction mode is derived based on the left template, the weights per pixel can be derived based on mathematical expression 8.
[0902] When determining weights, the directionality of the directional prediction mode can be considered.
[0903] For example, if the directional prediction mode is a vertical mode or a mode close to a vertical mode, a weight per pixel can be derived based on Equation 7.
[0904] On the other hand, if the directional prediction mode is a horizontal mode or a mode close to a horizontal mode, the weights per pixel can be derived based on Equation 8.
[0905] As with the luminance signal, a prediction mode can be derived for the chrominance signal based on a gradient histogram (HoG) derived from a template. The prediction mode for the chrominance signal can be referred to as the chrominance prediction mode.
[0906] At this time, a prediction signal (block) for a chrominance signal block can be generated using at least one prediction mode derived through a gradient histogram (HoG).
[0907] Alternatively, a plurality of prediction signals (blocks) may be derived based on a plurality of prediction modes, and then the plurality of prediction signals (blocks) may be weighted and combined to generate a prediction signal (block) for a chrominance signal block.
[0908] If the chrominance prediction mode derived through the histogram (i.e., gradient histogram or occurrence frequency histogram) is the same as the chrominance prediction mode derived by applying the integrated mode (DM: Direct Mode) to the chrominance signal, the prediction mode having the next-highest amplitude value or occurrence frequency on the gradient histogram (HoG) can be used as a candidate mode for chrominance prediction.
[0909] A prediction block of a chrominance component block can also be obtained by combining a prediction mode derived through a histogram and a prediction block derived through inter-component prediction (e.g., CCLM, GLM, or CCCM). For example, a prediction block of a chrominance component block can be obtained by weighting and combining a prediction block derived based on a prediction mode derived through a histogram and a prediction block derived through inter-component prediction.
[0910] Even in a method of generating a prediction signal by mixing multiple prediction modes, at least one prediction mode can be derived based on a histogram derived from a template. Here, the method of generating a prediction signal by mixing multiple prediction modes can include at least one of a geometric partitioning mode (GPM), a combined inter-intra prediction mode (CIIP), or an intra-fusion mode.
[0911] For example, when the GPM mode is applied, a coding block is divided into two partitions (or blocks). A histogram for each partition can be derived based on the restored reference region adjacent to the current block. The histogram for each partition can be derived by setting the restored region adjacent to the partition as a template. Using the gradient histogram for each partition, a prediction mode for the partition can be derived.
[0912] For example, when the GPM mode is applied, at least one prediction mode can be derived based on the histogram. Then, the derived at least one prediction mode can be set as the prediction mode for each partition.
[0913] For example, when the GPM mode is applied, the prediction mode with the largest size and the next highest prediction mode on the histogram can be set as the prediction mode of the split blocks.
[0914] When the DIMD mode is applied, a gradient histogram can be derived based on multiple templates. Specifically, steps STEP 1 and STEP 2 can be performed for each template, thereby obtaining a predicted block for each template.
[0915] For each prediction block, prediction encoding can be performed. Then, based on the encoding cost, the optimal prediction block (i.e., the optimal template) can be determined. The encoder can encode and signal information about the optimal template.
[0916] The decoder decrypts information about the optimal template and constructs a template based on this information. Based on the constructed template, the decoder performs Steps 1 and 2 to obtain a predicted block for the current block.
[0917] Alternatively, one can derive a gradient histogram per template, and derive prediction modes from each gradient histogram.
[0918] For example, four intra-screen prediction modes can be derived from a first gradient histogram derived based on a template configured to include an upper restoration region and a left restoration region. Furthermore, two intra-screen prediction modes can be derived from a second gradient histogram derived based on a template configured to include only an upper restoration region, and two intra-screen prediction modes can be derived from a third gradient histogram derived based on a template configured to include only a left restoration region.
[0919] According to the above method, when multiple (up to 8) intra-screen prediction modes are derived, the template matching cost of each of the 8 intra-screen prediction modes can be calculated. Thereafter, the intra-screen prediction mode with the smallest template matching cost can be set as the intra-screen prediction mode of the current block, or information indicating whether the intra-screen prediction mode with the smallest template matching cost is set as the intra-screen prediction mode of the current block can be encoded and signaled.
[0920] When DIMD mode is applied, merge prediction can be performed on gradient histograms.
[0921] Specifically, the gradient histogram of a block position that can inherit the gradient histogram can be inserted into the merge list as one candidate.
[0922] The directional prediction mode (angular mode) can be derived through the gradient histogram in the merge list, and the predicted block (signal) can be generated using the derived prediction mode.
[0923] At this time, the prediction block can be generated using a single prediction mode. Alternatively, the prediction block can be generated by weighting prediction blocks generated using multiple prediction modes.
[0924] If the merge list contains multiple gradient histograms, one of the multiple gradient histograms can be selected.
[0925] Alternatively, multiple gradient histograms can be selected from the merge list, and the selected multiple gradient histograms can be combined to derive a merged gradient histogram (Merged HoG: MHoG). From the merged gradient histogram, at least one directional prediction mode can be derived for the current block.
[0926] As another example, a directional prediction mode derived based on a gradient histogram may be used as a merge candidate. Specifically, a single merge candidate may be configured to include N directional prediction modes selected from a corresponding gradient histogram, where N may be a natural number greater than or equal to 1. Selecting at least one directional prediction mode from the gradient histogram may follow the above-described embodiment.
[0927] For example, at least one directional prediction mode can be derived from a combined gradient histogram derived by combining multiple gradient histograms, and the derived directional prediction mode can be used as a merge candidate.
[0928] Predictive encoding can be performed based on prediction blocks generated through prediction modes set as merge candidates, and encoding costs for the merge candidates can be calculated. If the merge candidate consists of multiple prediction modes, a prediction block can be generated through a weighted sum of the multiple prediction blocks.
[0929] By comparing the encoding costs of merge candidates, the optimal candidate within the merge list can be determined. In the example described above, the merge candidate is illustrated as having gradient histogram information. For example, the merge candidate may include information about amplitude values for each prediction mode.
[0930] Beyond the examples described above, merge candidates may also include occurrence frequency histogram information. For example, merge candidates may include information on occurrence frequency values for each prediction mode.
[0931] The encoder can signal by encoding the index of the lowest candidate in the merge list.
[0932] When constructing a merge list, if there is a block vector that can be referenced in a surrounding block of the current block, information (e.g., HoG information) of a block located at a location that is the same distance as the block vector from the location of the surrounding block may be added to the merge list.
[0933] Alternatively, if the surrounding blocks have motion vectors, information (e.g., HoG information) of blocks located at a distance from the surrounding blocks in the reference picture by the motion vector may be added to the merge list.
[0934] As above, the method of deriving candidates by referring to reference blocks specified based on block vectors or motion vectors can be applied equally to other merge methods as well as DIMD merge.
[0935] In performing DIMD merge prediction, not only gradient histogram information of the surrounding blocks but also prediction mode information of the surrounding blocks can be used.
[0936] Meanwhile, the gradient histogram of the surrounding blocks located in at least one of the following may be inserted into the merge list.
[0937] spatial adjacent / non-adjacent locations
[0938] Temporal adjacent / non-adjacent locations
[0939] Collocated location
[0940] History-based location
[0941] Temporal / spatial adjacent / non-adjacent positions adjusted using block vectors / motion vectors
[0942] If the neighboring block to be referenced is encoded with IntraTMP or IBC, the prediction mode of the reference block located at a position separated by a block vector from the neighboring block can be used as the prediction mode for merge prediction. In this case, the prediction mode of the reference block may be derived through a gradient histogram for the reference block.
[0943] If the prediction mode of the surrounding block to be referenced is a mode that performs prediction encoding by mixing multiple prediction modes (e.g., Intra fusion, DIMD, TIMD, CIIP, or GPM), at least one of the multiple prediction modes of the reference block can be used as the prediction mode for the current block.
[0944] The number of merge lists for the current block can be 1.
[0945] Alternatively, multiple merge lists can be derived for the current block. If multiple merge lists exist, the candidates included in each merge list can be derived as follows.
[0946] First merge list: Blocks encoded with DIMD and their encoding information.
[0947] Second merge list: Blocks encoded with TIMD and their encoding information
[0948] Third Merge List: Blocks encoded with IntraTMP / IBC and their encoding information.
[0949] Merge List 4: Other On-Screen Prediction Modes
[0950] A merge list can also be constructed by distinguishing between prediction methods with a single prediction mode and prediction methods with multiple prediction modes.
[0951] Candidates within a merge list can be sorted based on template matching. If multiple merge lists exist, each list can be sorted by template matching cost, and the top N candidates (i.e., the N candidates with the lowest template matching cost) can be selected from each list. A new merge list can then be created that includes the candidates selected from the multiple merge lists.
[0952] In constructing a merge list, both the prediction mode derived using gradient histogram information and the prediction mode derived from surrounding blocks can be included in one merge list.
[0953] As another example, there may be separate merge lists into which prediction modes derived using gradient histogram information are inserted and merge lists into which prediction modes derived (inherited) from surrounding blocks are inserted.
[0954] At this time, information indicating whether each merge list is to be used can be encoded and signaled.
[0955] To perform merge prediction, at least one of a plurality of merge lists, a merge list index, or a merge candidate index within a merge list may be encoded and signaled to the decoder.
[0956] Next, we will explain in detail the process of constructing an occurrence frequency histogram.
[0957] When performing predictions based on prediction mode information inherited from neighboring blocks, the prediction mode information inherited from neighboring blocks may be scaled and used and / or stored in the current block. For example, the prediction mode information inherited from neighboring blocks may be scaled, and the scaled inherited prediction mode information may be converted into a prediction mode occurrence frequency and used and / or stored in the current block.
[0958] At this time, the inherited prediction mode information can be scaled or normalized based on the size of the surrounding blocks. For example, assume that the referenced surrounding block is 32x32 in size and that one prediction mode is stored in the surrounding block. Furthermore, assume that the prediction modes are stored / processed in 4x4 units.
[0959] The frequency of occurrence of the prediction mode stored in the 4x4 area surrounding the current block can be adjusted according to the size of the surrounding blocks. For example, a block of size 32x32 is composed of 64 4x4 areas, so the frequency of occurrence of the prediction mode inherited from the surrounding blocks can be set to 64.
[0960] Alternatively, the inherited prediction mode information can be scaled or normalized based on the number of pixels contained in the surrounding block. For example, if the size of the surrounding block to be referenced is 32x32, the occurrence frequency of the prediction mode inherited from the surrounding block can be set to 1024 (i.e., the number of samples in the surrounding block).
[0961] That is, the occurrence frequency of the prediction mode can be determined based on the size of the surrounding block or the number of samples within the surrounding block.
[0962] If a surrounding block has multiple prediction modes, the occurrence frequency can be calculated for each prediction mode. The occurrence frequency can be derived by assigning equal or different weights to each prediction mode.
[0963] For example, the size of the reference block is 32x32, and it is assumed that the reference block is encoded using the TIMD Fusion mode based on two prediction modes. In addition, it is assumed that the fusion weights (i.e., the weights assigned to the two prediction modes) used to obtain the prediction block of the surrounding block have a ratio of 0.75:0.25 (i.e., 3:1).
[0964] Assuming that the occurrence frequency is calculated on a pixel-by-pixel basis, the total sum of the occurrence frequencies within a 32x32 block is 1024 (i.e., the total number of samples).
[0965] Based on the combined weights, the occurrence frequencies of the best mode and the secondary mode of the surrounding blocks can be determined. For example, since the combined weights of the best mode and the secondary mode have a ratio of 3:1, the occurrence frequency of the best mode can be set to 768 (i.e., (3 / 4) * 1024), and the occurrence frequency of the secondary mode can be set to 256 (i.e., (1 / 4) * 1024).
[0966] Alternatively, when calculating the occurrence frequency of the prediction mode, the weight of the prediction mode can be determined using a histogram derived from the surrounding blocks (i.e., a gradient histogram or an occurrence frequency histogram).
[0967] For example, it is assumed that the size of the surrounding block is 32x32 and that the DIMD mode or the OBIC mode is applied to the surrounding block. In addition, it is assumed that the surrounding block is predicted using five prediction modes, and the ratio of the amplitude values or occurrence frequencies of the five prediction modes on the gradient histogram is as follows.
[0968] Best mode: 2 nd mode: 3 rd mode: 4 th mode: 5 thmode = 12: 8: 6: 5: 1 (total: 32)
[0969] Assuming that the occurrence frequency is calculated on a pixel-by-pixel basis, the total sum of the occurrence frequencies within a 32x32 block is 1024 (i.e., the total number of samples). In this case, the occurrence frequency of each of the five prediction modes can be calculated as follows.
[0970] Best mode: = 384 (=12x32)
[0971] 2 nd mode = 256 (=8x32)
[0972] 3 rd mode = 192 (=6x32)
[0973] 4 th mode = 160 (=5x32)
[0974] 5 th mode = 32 (=1x32)
[0975] In the above example, the sum of the occurrence frequencies of the prediction modes can be equal to 1024 (i.e., the total number of samples).
[0976] When calculating the occurrence frequency by prediction mode, the weight assigned to the reference block may differ depending on the location of the surrounding reference block.
[0977] For example, the weight assigned to a reference block adjacent to the current block may have a higher value than the weight assigned to a reference block that is not adjacent to the current block.
[0978] For example, a weight assigned to a reference block that belongs to the same picture as the current block may have a higher value than a weight assigned to a reference block that does not belong to the same picture.
[0979] Alternatively, the greater the number of prediction modes, the greater the weight assigned to the reference block may be.
[0980] Alternatively, the weight assigned to the reference block may be different based on the distance between the current block and the reference block.
[0981] For example, a higher weight can be assigned to a reference block that is closer to the current block.
[0982] By setting different weights for each reference block, the occurrence frequency for each prediction mode can be calculated. These can then be combined to derive a histogram of occurrence frequencies (HoC, Histogram of Occurrence), which records the occurrence frequency for each prediction mode for the current block.
[0983] Based on the prediction mode information (or prediction mode occurrence frequency) inherited from neighboring blocks, the cumulative occurrence count for the inherited prediction modes can be calculated. Based on this, a histogram (HoC) of the occurrence frequency for each prediction mode can be generated.
[0984] Based on the occurrence frequency histogram, at least one prediction mode for intra-screen prediction or intra-screen prediction merge of the current block can be determined. Determining the prediction mode based on the occurrence frequency histogram may also be referred to as occurrence-based intra-screen prediction (OBIC).
[0985] From at least one referenceable neighboring block surrounding the current block, an occurrence frequency value for each prediction mode can be derived. Thereafter, by summing the occurrence frequency values for each prediction mode of multiple neighboring blocks, a prediction mode occurrence frequency within an occurrence frequency histogram can be derived according to Equation 9.
[0986]
[0987] Mathematical expression 9 illustrates an example of generating an occurrence frequency histogram when the occurrence frequency of a surrounding block is determined to be equal to the number of samples contained in the surrounding block. In Mathematical expression 9, Width and Height represent the width and height of the surrounding block, respectively.
[0988] The sum of the occurrence frequencies of multiple surrounding blocks by prediction mode can be derived in the same form as the merged gradient histogram (Merged HoG) in the previous example.
[0989] The number of occurrences of prediction modes inherited from the surroundings is accumulated and stored for each prediction mode, and the prediction mode with the highest accumulated number of occurrences can be used as the prediction mode for the current block.
[0990] Alternatively, the number of occurrences of inherited prediction modes can be accumulated and stored for each prediction mode, and N prediction modes with a high accumulated number of occurrences can be used as the prediction mode for the current block.
[0991] Based on each of the N prediction modes, a prediction for the current block can be performed to obtain N prediction blocks. Thereafter, a prediction block for the current block can be obtained by weighting and combining multiple prediction blocks.
[0992] At this time, as in DIMD mode, up to five prediction modes can be selected.
[0993] Alternatively, as in TIMD mode, up to two prediction modes can be selected.
[0994] When weighting multiple prediction blocks, weights can be determined in a manner similar to DIMD mode. For example, under DIMD mode, the embodiment of determining weights for prediction blocks based on the amplitude of the gradient histogram can be changed to determining weights based on the frequency of occurrence in the frequency histogram.
[0995] Additionally, in addition to the prediction modes selected based on the occurrence frequency, a non-directional prediction mode can be additionally used to obtain a prediction block of the current block.
[0996] Alternatively, instead of a prediction block derived based on a non-directional prediction mode, a prediction block derived based on a block vector may be additionally used to obtain a prediction block of the current block.
[0997] Merge prediction can be performed using the occurrence frequency histogram for each prediction mode inherited from the surrounding blocks.
[0998] For example, the prediction mode with the highest occurrence frequency in the occurrence frequency histogram can be added to the merge list of the current block as a merge candidate.
[0999] For example, N prediction modes can be selected in order of occurrence frequency from the occurrence frequency histogram, and the selected N prediction modes can be added to the merge list of the current block.
[1000] For example, prediction modes whose occurrence frequency is greater than or equal to a threshold can be selected from the occurrence frequency histogram, and the selected prediction modes can be added to the merge list of the current block.
[1001] Based on the inherited occurrence frequency information for each prediction mode, gradient histogram information can be derived. The gradient histogram information derived through the occurrence frequency of each prediction mode can be used to generate an integrated gradient histogram.
[1002] Conversely, we can also generate a frequency histogram based on the gradient histogram inherited from the surrounding blocks.
[1003] When deriving a gradient histogram based on prediction mode information or prediction mode information inherited from neighboring blocks (or the occurrence frequency for each prediction mode derived therefrom), a separate operation (e.g., gradient filtering) may not be performed. That is, the gradient histogram can be reconstructed using only the prediction mode information stored in neighboring blocks, without applying a filter. This reduces the complexity of gradient histogram calculation.
[1004] At this time, when DIMD merge prediction is applied to the current block, the candidate prediction mode of the current block can be derived using the prediction mode information within the surrounding blocks instead of the gradient histogram of the surrounding blocks. Accordingly, for blocks for which encoding / decoding is complete, the prediction mode information within the surrounding blocks can be stored instead of the gradient histogram. This can reduce the amount of data stored (i.e., storage space).
[1005] At this time, if the surrounding blocks do not have intra-screen prediction mode information stored (e.g., if the surrounding blocks are encoded in inter-screen prediction mode), the occurrence frequency for each prediction mode can be derived by calculating the gradient histogram for the surrounding blocks.
[1006] The merge prediction method that utilizes the prediction mode information (the occurrence frequency of the prediction mode) of the surrounding blocks may be a DIMD sub-mode that is activated when the DIMD prediction mode is applied to the current block. That is, when the DIMD flag of the current block is true, whether to apply the DIMD sub-mode (i.e., the merge prediction method that utilizes the prediction mode information of the surrounding blocks) may be additionally determined.
[1007] At this time, when determining a candidate prediction mode to be used in the on-screen prediction mode decision method (OBIC) based on occurrence frequency, at least one of the prediction modes used in DIMD may be excluded.
[1008] An intra-picture prediction method (OBIC) based on prediction mode information (prediction mode occurrence frequency) of surrounding blocks, or an intra-picture merge prediction method using the same, can be defined as an independent intra-picture prediction mode. For example, an encoder can determine an optimal prediction mode among intra-picture prediction methods such as TIMD and DIMD, and OBIC or a merge prediction method using OBIC.
[1009] Information indicating whether the DIMD method is performed may be encoded and signaled. When the DIMD mode is applied, information indicating whether merge prediction is performed under the DIMD method may be additionally encoded and signaled.
[1010] Instead of deriving a prediction mode based on gradient histogram information, merge prediction can be performed using a prediction mode derived based on occurrence frequency information of the prediction mode inherited from surrounding blocks.
[1011] At this time, the encoder can encode and signal information indicating whether to use an on-screen prediction method based on occurrence frequency (OBIC).
[1012] Specifically, based on prediction mode information inherited from neighboring blocks, the occurrence frequency of each prediction mode can be calculated. Thereafter, at least one prediction mode with a high frequency can be selected, and a prediction signal for the current block can be generated based on the selected at least one prediction mode.
[1013] For example, up to two or five prediction modes can be selected in descending order of frequency of occurrence. Multiple prediction blocks can be obtained based on multiple prediction modes, and then the multiple prediction blocks can be weighted and combined to derive the prediction block for the current block.
[1014] The determination of the weighted sum method (e.g., the number of prediction modes used for the weighted sum and / or the weights for the weighted sum) can be determined according to the DIMD method or TIMD method described above.
[1015] Even during transformation prediction, the frequency-based prediction method used in the on-screen prediction method can be used. Specifically, when determining the transformation information for the current block, the occurrence frequency of transformation information for surrounding blocks can be considered. Here, the transformation information can include at least one of the following: a transformation type, DCT, DST, LFNST, or NSPT.
[1016] For example, when context coding for a transformation type, the occurrence frequency of transformation information can be used.
[1017] For example, when context encoding for the kernel index of LFNST or the kernel index of NSPT, the occurrence frequency of transformation information can be utilized.
[1018] At this time, the probability table for the context can be rearranged using the occurrence frequency of the transformation information.
[1019] Alternatively, the transformation candidate table (or index within the table) can be reordered using the occurrence frequency of the transformation information.
[1020] When a prediction method that induces multiple intra-screen prediction modes is applied, one of the multiple intra-screen prediction modes can be selected and used as the final prediction mode of the current block. Here, the prediction method that induces multiple intra-screen prediction modes can include at least one of DIMD, OBIC, or TIMD.
[1021] Choosing one of the multiple prediction modes can be based on the template matching cost.
[1022] For example, when the TIMD mode is applied, if the template cost of the best mode is below a threshold, only the best mode can be used when predicting within the screen of the current block.
[1023] For example, when comparing template matching of the optimal mode and the secondary mode, if the template matching cost of the secondary mode is N times or more than the template matching cost of the optimal mode, only the optimal mode can be used when predicting within the screen of the current block. Here, N can have a value greater than or equal to 1.
[1024] For example, if the difference in the intra-screen prediction mode index values between the optimal mode and the next-highest-ranked mode is below a threshold, only the optimal mode can be used for intra-screen prediction of the current block. Here, a difference in the intra-screen prediction mode index values between the optimal mode and the next-highest-ranked mode being below a threshold may indicate that the two modes have similar directionality.
[1025] Alternatively, selecting one of multiple prediction modes can be based on a gradient histogram.
[1026] For example, in-screen prediction for the current block can be performed using only the prediction mode with the largest amplitude value on the gradient histogram.
[1027] For example, if the amplitude value of the prediction mode with the largest amplitude value on the gradient histogram is greater than or equal to a threshold, then only that prediction mode can be used to perform on-screen prediction for the current block.
[1028] Alternatively, selecting one of multiple prediction modes may be based on the frequency of occurrence for each prediction mode.
[1029] For example, in OBIC, in-screen prediction for the current block can be performed using only the prediction mode with the highest occurrence frequency.
[1030] For example, if the occurrence frequency of the prediction mode with the highest occurrence frequency is greater than a threshold, on-screen prediction for the current block can be performed using only that prediction mode.
[1031] Alternatively, selecting one of the multiple prediction modes may be based on the number (i.e., area) of samples encoded by that prediction mode.
[1032] For example, when SGPM is applied to a surrounding block, in-screen prediction for the current block can be performed based on the prediction mode applied to a partition with a larger area among the surrounding blocks.
[1033] For example, if the area of a large partition is greater than a threshold, an in-screen prediction for the current block can be performed based on the prediction mode applied to the partition.
[1034] Information indicating whether to select one of multiple prediction modes may be encoded and signaled.
[1035] When multiple prediction modes are derived for the current block, at least one of a method of utilizing all of the multiple prediction modes and a method of selecting one of the multiple prediction modes may be used.
[1036] Meanwhile, the method of selecting one of multiple prediction modes can also be applied when composing a merge list during merge prediction.
[1037] For example, if a reference block is encoded in TIMD mode, two prediction modes can be derived from the reference block. Then, only one of the two prediction modes can be selected, and only the selected prediction mode can be added to the merge list. For example, among the two prediction modes, only the prediction mode with a lower template matching cost or the prediction mode with a template matching cost lower than a threshold can be added to the merge list.
[1038] In performing merge prediction based on DIMD, the prediction mode of the current block can be derived based on the candidates in the merge list.
[1039] Meanwhile, multiple candidates within a merge list can be used to generate new candidates. Specifically, multiple candidates can be weighted and combined to derive a new candidate.
[1040] For example, two candidates can be selected from the top of the merge list. The top two candidates in the merge list can refer to the two candidates with the smallest indices. The selected candidates can then be weighted and added to the merge list.
[1041] For example, suppose the two candidates are as follows:
[1042] Candidate 1: Prediction Mode Index 8
[1043] Candidate 2: Prediction Mode Index 4
[1044] If the weights assigned to the first and second candidates are 3 and 1, respectively, the result of the weighted sum of the above two modes (i.e., ((8*3 + 4*1) / 4 = 7)) can be added to the merge list as a new candidate.
[1045] Alternatively, multiple candidates can be selected from the merge list, and a prediction signal for the current block can be generated based on the selected multiple candidates. For example, multiple prediction blocks can be obtained based on the selected multiple candidates, and the multiple prediction blocks can be weighted and combined to obtain the prediction block for the current block.
[1046] For example, two candidates can be selected from the top of the merge list. Then, based on each candidate, a prediction can be made for the current block, resulting in two predicted blocks. The two predicted blocks can then be weighted and combined to obtain the predicted block for the current block.
[1047] New merge candidates can be derived based on the amplitude or occurrence frequency values of merge candidates in the merge list.
[1048] Figure 16 shows an example of how a new merge candidate is derived.
[1049] In the example of Fig. 16, it is assumed that the initial merge list contains three merge candidates (indexes 1 to 3). Based on the amplitude value or occurrence frequency value of each candidate in the merge list, the sum of the amplitude or the sum of the occurrence frequency for each prediction mode can be derived.
[1050] Afterwards, S prediction modes are selected in the order of the sum of amplitudes or the sum of occurrence frequencies, and the selected prediction modes can be inserted into the merge candidate list as a single merge candidate.
[1051] Alternatively, each of the selected prediction modes can be set as an individual merge candidate and inserted into the merge candidate list.
[1052] Alternatively, instead of adding the selected prediction modes as new candidates to the merge list, the selected prediction modes can be set as the final prediction modes for the current block. In this case, encoding / decoding of the index indicating one of the merge candidates can be omitted.
[1053]
[1054] Derivation of predictive signals based on TIMD mode
[1055] Based on the TIMD method, a prediction signal for the current block can be generated. Specifically, when the TIMD mode is applied to the current block, the prediction signal can be obtained through the following steps: STEP 1, STEP 2, and STEP 3.
[1056] (STEP 1) Step to construct the MPM (most probable mode) list for the current block (or target block)
[1057] To construct an MPM list, intra-prediction mode (IPM) information can be inherited from blocks previously decoded / encoded prior to the current block. The blocks previously decoded / encoded prior to the current block may correspond to at least one of the following:
[1058] (1) Spatial adjacent location
[1059] (2) Spatial non-adjacent locations
[1060] (3) Temporal adjacent / non-adjacent locations
[1061] (4) Collocated location
[1062] (5) History-based candidates
[1063] (6) Temporal / spatial adjacent / non-adjacent positions adjusted using block vectors / motion vectors
[1064] Here, the history-based candidate may be stored in a list managed in a FIFO manner. Prediction mode information may be inserted / stored in the list according to the order in which the blocks were encoded / decoded.
[1065] Temporal / spatial adjacent / non-adjacent positions can also be adjusted based on block vectors or motion vectors. When temporal / spatial adjacent / non-adjacent positions are adjusted, prediction mode information within the screen can be inherited from the block containing the adjusted position. Here, the adjusted position can represent a position separated by a block vector or motion vector from the initial position.
[1066] Meanwhile, positions can only be adjusted for blocks within the same picture as the block from which the block vector or motion vector was derived. For example, if the block vector is derived from a block spatially adjacent to the current block, positions can only be adjusted for spatially adjacent / non-adjacent positions, and positions for temporally adjacent / non-adjacent positions can not be adjusted.
[1067] Alternatively, the positions may be adjusted only for blocks within a picture that are different from the block from which the block vector or motion vector was derived.
[1068] Alternatively, all available positions can be adjusted without considering the picture to which the block from which the block vector or motion vector is derived belongs.
[1069] A block containing a temporal location may be included within a reference picture for inter-screen prediction.
[1070] The MPM list of the current block can be constructed by inheriting the on-screen prediction mode from at least one of the listed blocks.
[1071] For example, the MPM list of the current block can be generated / configured according to the following examples.
[1072] (1) A Planar can be added to the MPM list. At this time, the Planar can be added to the top of the MPM list. Here, the top represents the position with the smallest index (i.e., index = 0) (i.e., (1) MPM_LIST[0] = PLANAR_IDX).
[1073] (2) The optimal prediction mode (Best mode) stored in the adjacent block, specifically, the spatially adjacent location, can be inserted into the MPM list. Meanwhile, MPM candidates can be derived by sequentially searching the spatially adjacent blocks. For example, the search order of the spatially adjacent blocks may be the left adjacent block, the top adjacent block, the bottom left adjacent block, the top right adjacent block, and the top left adjacent block.
[1074] (3) The prediction mode derived by applying the DIMD mode to the current block can be added to the MPM list. If multiple prediction modes are derived according to the DIMD mode, at least one of the multiple prediction modes can be added to the MPM list. For example, the best mode or the secondary mode can be added to the MPM list.
[1075] (4) A prediction mode derived (or inherited) from a spatial non-adjacent block can be inserted into the MPM list.
[1076] (5) A prediction mode derived (or inherited) from a temporal adjacent block can be inserted into the MPM list.
[1077] (6) A prediction mode derived (or inherited) from a collocated block can be inserted into the MPM list.
[1078] (7) History-based prediction mode can be inserted into the MPM list.
[1079] (8) A prediction mode derived (or inherited) from a block at a position adjusted based on a block vector / motion vector can be inserted into the MPM list. Position adjustment can be performed using a temporally / spatially adjacent / non-adjacent position as the initial position.
[1080] (9) A prediction mode derived by adding / differentiating an offset to a prediction mode candidate included in the MPM list can be added to the MPM list. The offset can have a value from -4 to +4. For example, if the second candidate in the MPM list (i.e., index == 1) is prediction mode 6, at least one prediction mode among {2, 3, 4, 5, 7, 8, 9, 10} can be added to the MPM list.
[1081] (10) A predefined prediction mode can be added to the MPM list. The predefined prediction mode can include at least one of the following:
[1082] { DC_IDX, VER_IDX, HOR_IDX, VER_IDX - 4, VER_IDX + 4, 14, 22, 42, 58, 10, 26, 38, 62, 6, 30, 34, 66, 2, 48, 52, 16}
[1083] Here, -4 and +4 are written as indicating that the maximum value of the absolute value of the offset is 4. That is, VER_IDX - 4 may include four modes derived by adding -4, -3, -2, -1 from VER_IDX, and VER_IDX + 4 may include four modes derived by adding +1, +2, +3, +4 to VER_IDX.
[1084] The MPM list may be constructed in the order of (1) to (10). Alternatively, the MPM list may be constructed in a different order than listed.
[1085] After adding candidates to the MPM list, the candidates can be sorted using the template matching cost. Reordering can be performed after all candidates have been added to the MPM list, or, at a predetermined stage, reordering can be performed on the candidates added to the MPM list. For example, candidates from (1) to (8) can be added to the MPM list, and then reordered. Alternatively, candidates from (1) to (4) can be added to the MPM list, and then reordered.
[1086] (1), instead of the Planar mode, a prediction mode derived based on block vectors can also be used. For example, instead of the Planar mode, a prediction mode of a reference block indicated by a block vector inherited from a neighboring block or a collocated block can be added to the MPM retrace.
[1087] Instead of adding a prediction mode directly to the MPM list, it can be added to the Reserved List. The Reserved List may contain at least one prediction mode candidate that is not currently added to the MPM list, but will be added to the MPM list in the future.
[1088] For example, let's assume that the on-screen prediction mode to be added to the MPM list is pred_mode_idx. If the on-screen prediction mode pred_mode_idx satisfies a certain condition, the on-screen prediction mode can be added to the MPM list. Otherwise, the on-screen prediction mode can be added to the reservation list.
[1089] The given condition can be defined as in the following mathematical expression 10.
[1090]
[1091] In the above example, the variable nbRemovedFirst for determining the lower bound can be determined based on at least one of the size of the current block or the ratio between the width and height of the current block. For example, the variable deltaSize can be derived based on the width and height of the current block, and the variable nbRemovedFirst can be derived based on the derived variable deltaSize. The variable deltaSize can be derived as in the following mathematical expression 11.
[1092]
[1093] If the adjacent block is not available, the value of the variable nbRemovedFirst may be determined differently depending on the location of the adjacent block.
[1094] Figure 17 illustrates blocks adjacent to the current block.
[1095] In Figure 17, each adjacent block can be identified by a different index.
[1096] If the upper-right neighbor block (i.e., the neighbor block with index 3) is not available, the variable nbRemovedLast can be derived as follows.
[1097] If the width and height of the current block are the same (height = width),
[1098] nbRemovedLast = nbRemovedLast + 5
[1099] If the width of the current block is greater than the height (height < width) and the value of deltaSize is 1,
[1100] nbRemovedLast = nbRemovedLast + 6
[1101] If the width of the current block is greater than its height (height < width) and the value of deltaSize is 2,
[1102] nbRemovedLast = nbRemovedLast + 10
[1103] If the width of the current block is greater than its height (height < width) and the value of deltaSize is greater than 2,
[1104] nbRemovedLast = nbRemovedLast + 12
[1105] If the lower left neighbor block (i.e., the neighbor block with index 2) is not available, the variable nbRemovedLast can be derived as follows.
[1106] If the width and height of the current block are the same (height = width),
[1107] nbRemovedLast = nbRemovedLast + 5
[1108] If the height of the current block is greater than the width (height > width) and the value of deltaSize is 1,
[1109] nbRemovedLast = nbRemovedLast + 6
[1110] If the height of the current block is greater than the width (height > width) and the value of deltaSize is 2,
[1111] nbRemovedLast = nbRemovedLast + 10
[1112] If the height of the current block is greater than the width (height > width) and the value of deltaSize is greater than 2,
[1113] nbRemovedLast = nbRemovedLast + 12
[1114] The above process has the effect of changing the insertion order of the prediction modes to be inserted into the MPM list. Therefore, the above process can be referred to as "partial MPM reordering."
[1115] For at least one of the prediction modes according to the above-described items (1) to (10), it is possible to determine whether to add the corresponding prediction mode to the MPM list or the reservation list.
[1116] Alternatively, it may be possible to determine whether to apply the reservation list only to predefined items. For example, the reservation list may be permitted to be used only for prediction modes according to items (1) through (4).
[1117] Meanwhile, the prediction modes included in the reservation list can be added to the MPM list after the MPM list is constructed according to at least one of items (1) to (10). For example, after the MPM list is constructed according to items (1) to (4), the prediction modes included in the reservation list can be added to the MPM list.
[1118] Meanwhile, after deriving prediction modes according to at least one of items (1) to (10), only some of the derived prediction modes may be added to the MPM list.
[1119] For example, if 30 prediction mode candidates are derived through items (1) to (7), these candidates can be added to a temporary list. Then, through template matching cost-based reordering, up to N candidates can be selected in descending order of cost. The selected N candidates can then be added to the MPM list. For example, N can be 5 or 6.
[1120] (1) When adding prediction modes derived according to at least one of items (10) to the MPM list, the template cost for each prediction mode can be calculated, and the insertion order of the prediction modes can be determined according to the template matching cost. For example, the prediction modes can be sorted in ascending order of the template cost, and the prediction modes can be added to the MPM list according to the sorted order (i.e., in ascending order of the template cost).
[1121] Sorting the prediction modes in order of template matching cost can be performed for at least one of items (1) to (10). For example, if multiple prediction modes are derived according to item (2), the multiple prediction modes can be sorted in order of template matching cost, and the order in which the multiple prediction modes are inserted into the MPM list can be determined.
[1122] In addition, according to item (3), when multiple prediction modes are induced, a method of determining the MPM list insertion order according to template matching cost can be used.
[1123] That is, the composition of the MPM list can follow the following order.
[1124] (1) Depending on the item, add a prediction mode candidate to the MPM list - (2) Depending on the item, derive multiple prediction mode candidates - (2) Sort the prediction mode candidates derived from the item, and add them to the MPM list in the sorted order - (3) Depending on the item, derive multiple prediction mode candidates - (3) Sort the prediction mode candidates derived from the item, and add them to the MPM list in the sorted order...
[1125] Alternatively, a method of aligning template matching cost-based prediction modes may be applied only for items (2) to (4).
[1126] Alternatively, instead of applying a method of sorting prediction modes based on template matching costs for each item, a method of deriving multiple prediction modes based on multiple items (e.g., (2) to (4)) and then sorting the prediction modes based on template matching costs for the multiple prediction modes derived based on multiple items may be applied.
[1127] Meanwhile, when the prediction modes are sorted based on the template matching cost, instead of inserting all of the sorted prediction modes into the MPM list, only some of the sorted prediction modes with lower costs may be inserted into the MPM list.
[1128] For example, after sorting prediction modes by template matching cost, N prediction modes can be selected in descending order of cost. The N selected prediction mode candidates can then be added to the MPM list. For example, N can be 12.
[1129] After constructing the MPM list, the MPM list can be updated based on the template matching cost of the prediction mode candidates included in the MPM list.
[1130] For example, after calculating the template matching cost for each prediction mode candidate included in the MPM list, the MPM list can be updated so that only N prediction mode candidates with low costs are kept in the MPM list, and the remaining prediction mode candidates are removed from the MPM list.
[1131] Meanwhile, according to items (1) to (10), prediction mode candidates are derived, but if the number of candidates included in the MPM list reaches the maximum number (i.e., the size of the MPM list), the derivation of additional prediction mode candidates may be omitted. Thereafter, the prediction mode candidates included in the MPM list may be reordered according to template costs.
[1132] When constructing an MPM list, a prediction mode for constructing an MPM list can be derived based on gradient histogram information or prediction mode occurrence frequency information inherited from surrounding blocks.
[1133] For example, an integrated gradient histogram can be derived based on gradient histogram information inherited from at least one neighboring block. Subsequently, at least one directional prediction mode can be derived from the integrated gradient histogram, and the derived directional prediction mode can be added to the MPM list.
[1134] For example, in a histogram (i.e., a gradient histogram or a frequency histogram), the prediction mode with the largest size can be added to the MPM list. If the MPM list already contains the same prediction mode, the prediction mode with the next largest size can be added to the MPM list.
[1135] For example, in a histogram (i.e., a gradient histogram or an occurrence frequency histogram), N prediction modes can be selected in ascending order of size, and the selected N prediction modes can be added to the MPM list. For example, N can be 5. In this case, any of the N prediction modes that already exist in the MPM list can be excluded.
[1136] Instead of size, you can also choose which prediction modes to add to the MPM list based on their frequency of occurrence.
[1137] (STEP 2) Create a prediction template based on the MPM list and determine the prediction mode.
[1138] Based on the prediction mode information included in the MPM list, a prediction template can be generated. The prediction template represents the results of the prediction performed on the template of the current block.
[1139] Figures 18 and 19 illustrate examples of configurations of reference templates for deriving prediction templates.
[1140] In the example illustrated in Fig. 18, it is illustrated that the reference template is configured to include a restoration region of a template adjacent to the current block. That is, reference samples for performing prediction on the template can be derived from restoration samples adjacent to the template.
[1141] In the example illustrated in Fig. 19, it is exemplified that the reference template is configured to include a restoration area adjacent to the current block. That is, the reference samples for performing prediction on the template can be derived from restoration samples adjacent to the current block.
[1142] A reference template may consist of at least one restoration sample line.
[1143] At this time, the MRL method may be used to determine the restoration sample lines that constitute the reference template. That is, at least one of the multiple reference sample line candidates can be selected, and the reference template can be configured to include the selected reference sample line. To this end, index information indicating at least one of the multiple restoration sample lines can be encoded and signaled.
[1144] Multiple reference sample line candidates may be determined based on the position of the current block, or may be determined based on the position of the template of the current block. That is, N restoration sample lines adjacent to the current block may be set as reference sample line candidates, or N restoration sample lines adjacent to the template may be set as reference sample line candidates.
[1145] A prediction template can be generated using prediction mode information within the MPM list and samples included in the reference template. Specifically, based on the prediction mode (e.g., directional prediction mode) included in the MPM list, a prediction template can be generated by performing on-screen prediction on the template of the current block.
[1146] For each prediction mode included in the MPM list, a prediction template can be derived. Then, for each prediction template, the template matching cost with the template of the current block can be calculated.
[1147] Afterwards, the prediction mode candidates included in the MPM list can be sorted in ascending order of template matching cost. Then, the top N prediction modes in the MPM list can be selected, and the selected N prediction modes can be set as candidate prediction modes for TIMD prediction. Here, the top N prediction modes can be selected in descending order of their indices in the MPM list.
[1148] Alternatively, the mode with the lowest template matching cost can be set as the best mode (or primary mode), and the mode with the second lowest template matching cost can be set as the secondary mode.
[1149] At least one of the optimal mode or the next-best mode can be set as a candidate prediction mode for TIMD prediction.
[1150] Alternatively, information for determining a candidate prediction mode can be encoded in the encoder and signaled to the decoder. Alternatively, the candidate prediction mode can be derived based on surrounding templates.
[1151] The template matching cost may mean the SAD, SATD, SSE or MRSAD between the predicted samples in the predicted template and the restored samples in the template of the current block.
[1152] Template matching can also be performed using multiple template matching cost calculation methods (metrics or measures). When multiple template matching cost calculation methods are used, the template matching cost can be calculated based on each calculation method. Then, for each calculation method, the final encoding cost (e.g., rate-distortion cost) of the prediction mode candidate with the lowest template matching cost can be calculated. The calculation method used to derive the prediction mode candidate with the lower final encoding cost can then be determined as the final template matching calculation method.
[1153] In the encoder, an optimal template matching cost calculation method can be determined, and information indicating the determined template matching cost calculation method can be encoded and signaled.
[1154] The use of multiple template matching cost calculation methods can also be applied to other methods that use template matching methods.
[1155] (STEP 3) Create prediction blocks based on prediction mode information
[1156] Using the prediction mode and reference samples derived through STEP 2, a prediction block for the current block can be generated.
[1157] In the encoder, information indicating whether to use template-based intra mode derivation (TIMD) can be encoded and signaled to the decoder.
[1158] In STEP 2, if multiple prediction modes are derived, the current block can be predicted based on each of the multiple prediction modes, thereby generating multiple prediction blocks. At this time, the encoding cost for each of the multiple prediction blocks can be calculated, and the prediction mode used to derive the prediction block with the lowest encoding cost can be determined as the optimal prediction mode.
[1159] Once the optimal prediction mode is determined, the encoder can encode and signal information indicating the optimal prediction mode among the plurality of prediction modes.
[1160] Alternatively, the prediction block of the current block can be derived through a weighted sum, fusion, or blending of multiple prediction blocks.
[1161] Specifically, multiple prediction modes can be selected from the MPM list. For example, the prediction mode candidates included in the MPM list can be sorted by template matching cost, and then the optimal mode and the next-highest mode can be selected.
[1162] Thereafter, the current block can be predicted based on the optimal mode and the next-priority mode, respectively, to generate two predicted blocks. The two predicted blocks can then be weighted and combined to obtain the final predicted block for the current block.
[1163] Information indicating whether to generate a prediction block of the current block through weighted sum, synthesis, or mixing of multiple prediction blocks can be encoded and signaled.
[1164] Alternatively, the decoder may determine whether to generate the prediction block of the current block through weighted sum, synthesis, or mixing of multiple prediction blocks under the same conditions as the encoder. For example, when the template matching cost of the next-order mode is less than twice the template matching cost of the optimal mode (the template cost of the optimal prediction mode), the prediction block of the current block may be generated through weighted sum, synthesis, or mixing of multiple prediction blocks.
[1165] Meanwhile, in addition to the prediction modes derived through TIMD (i.e., the optimal mode and the next-ranked mode), a non-directional prediction mode can also be additionally utilized to obtain a prediction block of the current block. That is, a prediction block of the current block can be obtained by weighting at least one prediction block obtained based on at least one prediction mode derived through TIMD and a prediction block obtained based on a non-directional prediction mode. Here, the non-directional prediction mode can include at least one of DC, Planar, or a prediction mode of a reference block indicated by a block vector.
[1166] Based on the template matching cost, one of multiple non-directional prediction modes can be selected. That is, the prediction mode of the reference block indicated by the block vector, DC, Planar, or the prediction mode with the lowest value can be selected.
[1167] In the above embodiment, the block vector may be derived via IBC or IntraTMP.
[1168] Alternatively, instead of deriving a prediction block based on a non-directional prediction mode, a reference block pointed to by a block vector may be set as the prediction block.
[1169] Alternatively, in the above emb...
Claims
1. A step of deriving multiple on-screen prediction modes for the current block; A step of obtaining a plurality of prediction blocks for the current block based on the plurality of screen prediction modes; and An image decoding method, comprising a step of obtaining a final prediction block of the current block by weighting and combining the plurality of prediction blocks.
2. In paragraph 1, An image decoding method, characterized in that the above plurality of prediction modes are selected in the order of increasing amplitude values or occurrence frequency values on the histogram of the current block.
3. In paragraph 2, The above histogram is a gradient histogram, An image decoding method, characterized in that the gradient histogram is generated by accumulating the amplitude values of reference samples included in the reference sample line of the current block by prediction mode within the screen.
4. In paragraph 2, The above gradient histogram is an occurrence frequency histogram, A video decoding method, characterized in that the above occurrence frequency histogram is derived by summing the occurrence frequencies of prediction modes within a screen for a plurality of reference blocks.
5. In paragraph 4, A video decoding method, characterized in that the occurrence frequency of an on-screen prediction mode of a reference block is set to the size of the reference block or the number of basic units included in the reference block.
6. In paragraph 4, A video decoding method, characterized in that, when a reference block has multiple intra-screen prediction modes, the occurrence frequency of each of the multiple intra-screen prediction modes is determined according to a ratio of amplitude values between the multiple intra-screen prediction modes.
7. In paragraph 1, A video decoding method, characterized in that the final prediction block of the current block is obtained by weighting and combining the additional prediction block derived based on the plurality of prediction blocks and the non-directional prediction mode.
8. In paragraph 7, The above non-directional prediction mode is a directional planner mode, An image decoding method, characterized in that the interpolation direction of the directional planar mode is determined according to the directionality of the optimal screen prediction mode among the plurality of prediction blocks.
9. In paragraph 1, An image decoding method, characterized in that the final prediction block of the current block is obtained by weighting and combining an additional prediction block derived based on the plurality of prediction blocks and block vectors.
10. In paragraph 1, A video decoding method, characterized in that the weight assigned to each of the plurality of prediction blocks is determined according to the ratio of amplitude values or the ratio of occurrence frequencies of the plurality of prediction blocks.
11. In paragraph 1, A video decoding method, characterized in that the above multiple screen prediction modes are selected from the MPM (Most Probable Mode) list of the current block.
12. In paragraph 11, A video decoding method, characterized in that the plurality of intra-screen prediction mode candidates are selected in the order of smallest template matching cost among the intra-screen prediction mode candidates included in the above MPM list.
13. In paragraph 1, An image decoding method, characterized in that the final prediction block of the current block is obtained by weighting and combining an additional prediction block derived based on the plurality of prediction blocks and an extrapolation filter.
14. A step of deriving multiple on-screen prediction modes for the current block; A step of obtaining a plurality of prediction blocks for the current block based on the plurality of screen prediction modes; and An image encoding method, comprising a step of obtaining a final prediction block of the current block by weighting and combining the plurality of prediction blocks.
15. A step of deriving multiple on-screen prediction modes for the current block; A step of obtaining a plurality of prediction blocks for the current block based on the plurality of screen prediction modes; and A computer-readable recording medium storing a bitstream generated by a video encoding method, the method comprising the step of weighting and combining the plurality of prediction blocks to obtain a final prediction block of the current block.
Citation Information
Patent Citations
Energy saving system and method for Cargo Hold within ventilation system
KR1020240045630A
Method and device for exchanging secret keys based on reconfigurable and unclonable cryptographic component
KR1020250052002A
Method of grouping 3D shapes and constructing standard shapes
KR1020250079575A
Method, device and recording medium for image encoding / decoding
WO2023200228A1
Image encoding / decoding method and apparatus, and recording medium having bitstream stored therein
WO2024010356A1