Method, apparatus, and recording medium for encoding / decoding image
By constructing and reordering merge candidate lists with AR-BVP and CMVP candidates based on template costs, the method addresses inefficiencies in existing video encoding and decoding technologies, enhancing their performance in high-resolution video formats.
Patent Information
- Application Number
- PCT/KR2025/004103
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-09
- Filing Date
- 2025-03-28
- Publication Date
- 2025-10-02
AI Technical Summary
Existing video encoding and decoding technologies face inefficiencies in handling high-resolution video formats, particularly in constructing and managing candidate lists for pixel prediction, which affects the overall encoding and decoding efficiency.
The proposed method involves constructing an initial merge candidate list that includes spatial and Auto Relocated Block Vector Prediction (AR-BVP) candidates, and Chained MV Prediction (CMVP) candidates, which are reordered based on template costs to improve prediction efficiency.
This approach enhances the efficiency of video encoding and decoding by optimizing the candidate list construction and prediction processes, leading to improved performance in handling high-resolution video formats.
Smart Images

Figure KR2025004103_02102025_PF_FP_ABST
Abstract
Description
Method, device and recording medium for video encoding / decoding
[0001] The present disclosure can be utilized in the fields of methods, devices, and recording media for image encoding / decoding.
[0002] The continuous development of the information and communications industry has led to the global spread of broadcasting services featuring HD (High Definition) resolution. This proliferation has led many users to become accustomed to high-resolution, high-quality images and / or video.
[0003] To meet consumer demand for higher image quality, many organizations are accelerating the development of next-generation video devices. Consumer interest is growing not only in High Definition TV (HDTV) and Full HD (FHD) TV, but also in Ultra High Definition (UHD) TV, which offers resolution four times higher than FHD TV. This growing interest is driving the demand for video encoding and decoding technologies capable of delivering higher resolution and image quality.
[0004] As a video compression technology, there are various technologies such as inter prediction technology, intra prediction technology, transformation and quantization technology, and entropy encoding technology.
[0005] Inter prediction technology predicts the values of pixels within the current picture using the previous and / or subsequent pictures of the current picture. Intra prediction technology predicts the values of pixels within the current picture using information about pixels within the current picture. Transformation and quantization technology compresses the energy of residual images. Entropy coding technology assigns short codes to values with high frequency of occurrence and long codes to values with low frequency of occurrence.
[0006] Using these image compression technologies, data about images can be effectively compressed, transmitted, and stored.
[0007] The purpose of the present disclosure is to improve the efficiency of encoding and decoding images by constructing a candidate list and reordering the candidates.
[0008] The video encoding / decoding method, device, and recording medium of the present disclosure may include the steps of: obtaining an initial merge candidate list of a current block; reordering the initial merge candidate list to obtain a reordered merge candidate list of the current block; determining one candidate of the current block among the candidates of the reordered merge candidate list; and performing prediction of the current block based on the determined candidate.
[0009] In the video encoding / decoding method, device and recording medium of the present disclosure, the initial merge candidate list includes at least one spatial candidate, wherein the spatial candidate can be obtained based on a block adjacent to the current block or a non-adjacent block.
[0010] In the video encoding / decoding method, device, and recording medium of the present disclosure, the initial merge candidate list may include an Auto Relocated Block Vector Prediction (AR-BVP) candidate.
[0011] In the video encoding / decoding method, device, and recording medium of the present disclosure, the AR-BVP candidate can be derived based on a block vector at the upper left, upper right, center, lower left, or lower right position of a reference block of the current block.
[0012] In the video encoding / decoding method, device and recording medium of the present disclosure, the initial merge candidate list may include at least one Chained MV Prediction (CMVP) candidate.
[0013] In the video encoding / decoding method, device, and recording medium of the present disclosure, the CMVP candidate can be derived based on the Temporal MV Predictor (TMVP) candidate of the initial merge candidate list.
[0014] In the video encoding / decoding method, device and recording medium of the present disclosure, the CMVP candidate can be derived based on the accumulation of MVs and BVs that are recursively tracked based on the pre-derived motion vectors of the initial merge candidate list.
[0015] In the video encoding / decoding method, device and recording medium of the present disclosure, in response to the initial merge candidate list including a plurality of CMVP candidates, the plurality of CMVP candidates can be reordered based on a template cost.
[0016] In the video encoding / decoding method, device, and recording medium of the present disclosure, the template cost can be calculated based on the difference between the template of the block pointed to by the CMVP candidate and the template of the current block.
[0017] In the video encoding / decoding method, device, and recording medium of the present disclosure, the rearranged merge candidate list may include only some of the rearranged plurality of CMVP candidates.
[0018] The efficiency of video encoding and decoding can be improved by utilizing the methods of constructing a candidate list of the present disclosure and rearranging the candidates.
[0019] FIG. 1 is a block diagram showing a configuration according to one embodiment of an encoding device to which the present disclosure is applied.
[0020] FIG. 2 is a block diagram showing a configuration according to one embodiment of a decryption device to which the present disclosure is applied.
[0021] Figure 3 is a diagram schematically showing the division structure of an image when encoding and decoding an image.
[0022] Figure 4 is a diagram illustrating the form of a prediction unit that a coding unit can include.
[0023] Figure 5 is a diagram illustrating the form of a transformation unit that can be included in a coding unit.
[0024] Figure 6 illustrates the division of blocks according to an example.
[0025] Figure 7 is a diagram for explaining an embodiment of an intra prediction process.
[0026] Figure 8 is a diagram for explaining reference samples used in the intra prediction process.
[0027] Figure 9 is a diagram for explaining an embodiment of an inter prediction process.
[0028] Figure 10 shows spatial candidates according to an example.
[0029] Figure 11 shows the order of adding motion information of spatial candidates to the merge list according to an example.
[0030] Figure 12 illustrates the process of transformation and quantization according to an example.
[0031] Figure 13 illustrates diagonal scanning according to an example.
[0032] Figure 14 illustrates horizontal scanning according to an example.
[0033] Figure 15 illustrates vertical scanning according to an example.
[0034] Fig. 16 is a structural diagram of an encoding device according to one embodiment.
[0035] Fig. 17 is a structural diagram of a decryption device according to one embodiment.
[0036] Figure 18 illustrates the shape of a filter template.
[0037] Figure 19 illustrates the shape of a FIBC filter.
[0038] FIG. 20 illustrates one embodiment of IBC prediction signal filtering of the present disclosure.
[0039] Figure 21 illustrates one embodiment of Dbv prediction signal filtering.
[0040] Figure 22 illustrates a block diagram of an IBC prediction signal filtering process according to the value of ibc_filtering_flag.
[0041] Figure 23 illustrates an example in which a 1x1 rectangular filter is used when the ibc_filter_shape syntax element is the first value, and a 3x3 cross filter is used when the ibc_filter_shape syntax element is the second value.
[0042] Figure 24 illustrates an example of a case where a 3x3 square filter is used when the ibc_filter_shape syntax element is the first value, and a 3x3 cross filter is used when the ibc_filter_shape syntax element is the second value.
[0043] Figure 25 illustrates an example of an IBC filter mode information signaling block diagram.
[0044] Figure 26 illustrates an example of an IBC filter mode information signaling block diagram.
[0045] Figure 27 illustrates an example of using all or only part of the block of the Diff calculation.
[0046] Figure 28 illustrates an example of Intra Block Copy (IBC).
[0047] Figure 29 shows an example of Dbv prediction signal generation.
[0048] Figure 30 shows an example of a 1x1 rectangular filter.
[0049] Figure 31 shows an example of a 3x3 rectangular filter.
[0050] Figure 32 shows an example of a 3x3 cross filter.
[0051] Figure 33 shows an example of a 1x1 rectangular filter.
[0052] Figure 34 shows an example of a 3x3 rectangular filter.
[0053] Figure 35 shows an example of a 3x3 cross filter.
[0054] Figure 36 is a flowchart of an example of deriving a motion vector based on a merge candidate.
[0055] Figure 37 illustrates an example of the Merge candidate configuration order.
[0056] Figure 38 shows an example of AR-BVP induction.
[0057] Figure 39 is reference block B n It shows five locations: top left, top right, center, bottom left, and bottom right.
[0058] Figure 40 illustrates an example of CMVP candidate derivation.
[0059] Figure 41 illustrates the ARMC basic operation flow diagram.
[0060] Figure 42 illustrates an example of a non-adjacent space candidate.
[0061] Figure 43 shows an example of deriving AR-BVP using scaled BV obtained using two MVs.
[0062] Figure 44 shows an example of deriving AR-BVP using a scaled BV obtained using one MV.
[0063] Figure 45 shows an example of a shift NA spatial candidate.
[0064] Figure 46 shows an example of AR-BVP induction using TBVP.
[0065] Figure 47 shows an example of CMVP derivation using TMVP.
[0066] Figure 48 shows an example of TM refinement for CMVP.
[0067] This disclosure may be subject to various modifications and various embodiments. Specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the disclosure to specific embodiments, but rather to encompass all modifications, equivalents, and alternatives falling within the spirit and technical scope of the disclosure.
[0068] The detailed description of the exemplary embodiments described below refers to the accompanying drawings, which illustrate specific embodiments by way of example. These embodiments are described in sufficient detail to enable those skilled in the art to practice the embodiments. It should be understood that the various embodiments, while different from each other, are not necessarily mutually exclusive. For example, specific shapes, structures, and characteristics described herein may be implemented in other embodiments without departing from the spirit and scope of the present disclosure. Furthermore, it should be understood that the positions or arrangements of individual components within each disclosed embodiment may be modified without departing from the spirit and scope of the embodiment. Accordingly, the following detailed description is not intended to be limiting, and the scope of the exemplary embodiments, if properly described, is defined only by the appended claims, along with the full scope of equivalents to which such claims are entitled.
[0069] Similar reference numerals in the drawings indicate identical or similar functions throughout. The shapes and sizes of elements in the drawings may be exaggerated for clarity.
[0070] Although terms such as "first" and "second" may be used to describe various components in this disclosure, these components should not be limited by these terms. These terms are used solely to distinguish one component from another. For example, without departing from the scope of the present disclosure, a first component could be referred to as a "second component," and similarly, a second component could also be referred to as a "first component." The term "and / or" may encompass any combination of multiple related items described herein or any one of multiple related items described herein.
[0071] When a component is referred to as being "connected" or "connected" to another component, it should be understood that the two components may be directly connected or connected to each other, but that there may be another component between the two components. Conversely, when a component is referred to as being "directly connected" or "directly connected" to another component, it should be understood that no other component exists between the two components.
[0072] The components shown in the embodiments are depicted independently to represent different characteristic functions, and do not imply that each component is composed of separate hardware or a single software configuration unit. That is, each component is listed and included as a separate component for convenience of explanation, and at least two components among each component may be combined to form a single component, or a single component may be divided into multiple components to perform a function, and integrated and separate embodiments of each of these components are also included in the scope of the present disclosure as long as they do not deviate from the essence of the present disclosure.
[0073] The terms used in the embodiments are used only to describe specific embodiments and are not intended to limit the present disclosure. The singular expression includes the plural expression unless the context clearly indicates otherwise. In the embodiments, it should be understood that the terms "comprises" or "has" indicate the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, but do not exclude in advance the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof. In other words, the description in the embodiments as "comprising" a specific configuration does not exclude configurations other than the specified configuration, and means that additional configurations may also be included in the scope of the implementation of the present disclosure or the technical idea of the present disclosure.
[0074] In the embodiments, the term "at least one" may mean one of a number greater than or equal to 1, such as 1, 2, 3, and 4. In the embodiments, the term "a plurality of" may mean one of a number greater than or equal to 2, such as 2, 3, and 4.
[0075] Some components of the embodiments may not be essential components that perform essential functions of the present disclosure, but may be optional components merely for performance enhancement. The embodiments may be implemented by including only essential components necessary to realize the essence of the embodiments, excluding components solely used for performance enhancement. A structure that includes only essential components, excluding optional components solely used for performance enhancement, is also within the scope of the embodiments.
[0076] Hereinafter, embodiments are described in detail with reference to the attached drawings to enable those skilled in the art to easily implement the embodiments. In describing the embodiments, detailed descriptions of related known structures or functions will be omitted if they are judged to obscure the gist of the present specification. In addition, identical components in the drawings are designated by the same reference numerals, and redundant descriptions of identical components are omitted.
[0077]
[0078] Hereinafter, an image may mean a single picture constituting a video, or may represent the video itself. For example, "encoding and / or decoding of an image" may mean "encoding and / or decoding of a video," or may mean "encoding and / or decoding of one of the images constituting the video."
[0079] Hereinafter, the terms “video” and “motion picture(s)” may be used interchangeably and have the same meaning.
[0080] Hereinafter, the target image may be an encoding target image, which is a target of encoding, and / or a decoding target image, which is a target of decoding. In addition, the target image may be an input image input to an encoding device, or an input image input to a decoding device. In addition, the target image may be a current image, which is a target of current encoding and / or decoding. For example, the terms "target image" and "current image" may be used interchangeably and have the same meaning.
[0081] Hereinafter, the terms “image”, “picture”, “frame” and “screen” may be used interchangeably and have the same meaning.
[0082] Hereinafter, the target block may be an encoding target block that is a target of encoding and / or a decoding target block that is a target of decoding. In addition, the target block may be a current block that is a target of current encoding and / or decoding. For example, the terms "target block" and "current block" may be used with the same meaning and may be used interchangeably. The current block may mean an encoding target block that is a target of encoding during encoding and / or a decoding target block that is a target of decoding during decoding. In addition, the current block may be at least one of a coding block, a prediction block, a residual block, and a transform block.
[0083] Hereinafter, the terms "block" and "unit" may be used interchangeably and have the same meaning. Alternatively, "block" may refer to a specific unit.
[0084] Hereinafter, the terms “region” and “segment” may be used interchangeably.
[0085] In the embodiments, each of the specified information, data, flags, indices, elements, attributes, etc., can have a value. The value "0" of the information, data, flags, indices, elements, attributes, etc., can represent false, logical false, or a first predefined value. That is, the values "0", false, logical false, and the first predefined value can be used interchangeably with each other. The value "1" of the information, data, flags, indices, elements, attributes, etc., can represent true, logical true, or a second predefined value. That is, the values "1", true, logical true, and the second predefined value can be used interchangeably with each other.
[0086] When a variable such as i or j is used to represent a row, column, or index, the value of i can be an integer greater than or equal to 0, or an integer greater than or equal to 1. That is, in the embodiments, rows, columns, and indices can be counted from 0, or can be counted from 1.
[0087] In the embodiments, the term "one or more" or the term "at least one" may mean the term "plurality." "One or more" or "at least one" may be used interchangeably with "plurality."
[0088] Below, the terms used in the examples are explained.
[0089] Encoder: An encoder can refer to a device that performs encoding. In other words, an encoder can refer to an encoding device.
[0090] Decoder: A decoder can refer to a device that performs decoding. In other words, a decoder can refer to a decoding device.
[0091] Unit: A unit may represent a unit of image encoding and / or decoding. The terms "unit" and "block" may be used interchangeably and have the same meaning.
[0092] - A unit can be an MxN array of samples. M and N can each be positive integers. A unit can often mean an array of samples in a two-dimensional form.
[0093] - In video encoding and decoding, a unit may be a region created by segmenting an image. In other words, a unit may be a specific region within an image. An image may be segmented into multiple units. Alternatively, a unit may refer to a segmented portion of an image when segmenting the segmented portion into segments and encoding or decoding the segmented portion.
[0094] - In encoding and decoding of images, predefined processing can be performed on units depending on the type of unit.
[0095] - Depending on the function, the type of the unit can be classified into a macro unit, a coding unit (CU), a prediction unit (PU), a residual unit, and a transform unit (TU). Alternatively, depending on the function, the unit can mean a block, a macroblock, a coding tree unit, a coding tree block, a coding unit, a coding block, a prediction unit, a prediction block, a residual unit, a residual block, a transform unit, and a transform block. For example, the target unit can be at least one of a CU, a PU, a residual unit, and a TU that are targets of encoding and / or decoding.
[0096] - A unit may mean information including a luma component block and a corresponding chroma component block, and a syntax element for each block, in order to distinguish it from a block.
[0097] - Units may vary in size and shape. Furthermore, units may have various sizes and shapes. Specifically, the unit's shape may include geometric shapes that can be expressed in two dimensions, such as squares, rectangles, trapezoids, triangles, and pentagons.
[0098] - In addition, the unit information may include at least one of the unit type, the unit size, the unit depth, the unit encoding order, and the unit decoding order. For example, the unit type may indicate one of CU, PU, residual unit, and TU.
[0099] - A unit can be further divided into sub-units of smaller size compared to the unit.
[0100] Depth: Depth can refer to the degree to which a unit is divided. Additionally, the depth of a unit can indicate the level at which a unit exists when represented as a tree structure.
[0101] - Unit split information may include depth information regarding the depth of the unit. The depth may indicate the number of times and / or degree to which the unit is split.
[0102] - In a tree structure, the root node can be considered as the shallowest node, and the leaf node can be considered as the deepest node. The root node can be the highest node. The leaf node can be the lowest node.
[0103] - A unit can be hierarchically divided into multiple sub-units with depth information based on a tree structure. In other words, a unit and a sub-unit generated by division of the unit can correspond to a node and a child node of the node, respectively. Each divided sub-unit can have a depth. Since the depth indicates the number of times and / or degree to which a unit has been divided, the division information of a sub-unit may also include information regarding the size of the sub-unit.
[0104] In a tree structure, the top node may correspond to the first undivided unit. This top node may be called the root node. Furthermore, the top node may have a minimum depth value. In this case, the top node may have a depth of level 0.
[0105] - A node with a depth of level 1 can represent a unit created when the initial unit is split once. A node with a depth of level 2 can represent a unit created when the initial unit is split twice.
[0106] - A node with a depth of level n can represent a unit generated as the initial unit is split n times.
[0107] A leaf node can be the lowest node and cannot be further divided. The depth of a leaf node can be the maximum level. For example, the predefined maximum level value can be 3.
[0108] - QT depth can represent the depth for quad partitioning. BT depth can represent the depth for binary partitioning. TT depth can represent the depth for ternary partitioning.
[0109] Sample: A sample can be the base unit that constitutes a block. A sample is numbered from 0 to 2 depending on the bit depth (Bd). Bd It can be expressed as values up to -1.
[0110] - Samples can be pixels or pixel values.
[0111] - Hereinafter, the terms “pixel”, “pixels” and “samples” may be used interchangeably and have the same meaning.
[0112] Coding Tree Unit (CTU): A CTU may consist of one luma component (Y) coding tree block and two chroma component (Cb, Cr) coding tree blocks related to the luma component coding tree block. A CTU may also mean a block including the above blocks and syntax elements for each block of the above blocks.
[0113] - Each coding tree unit can be partitioned using one or more partitioning methods, such as a quad tree (QT), a binary tree (BT), and a ternary tree (TT), to form subunits such as a coding unit, a prediction unit, and a transformation unit. A quad tree may mean a quarternary tree. In addition, each coding tree unit can be partitioned using a multi-type tree (MTT) that uses one or more partitioning methods.
[0114] - CTU can be used as a term to refer to a pixel block, which is a processing unit in the process of decoding and encoding an image, as in the segmentation of an input image.
[0115] Coding Tree Block (CTB): Coding Tree Block may be used as a term to refer to any one of a Y coding tree block, a Cb coding tree block, and a Cr coding tree block.
[0116] Neighbor block: A neighbor block can refer to a block adjacent to the target block. A neighbor block can also refer to a rebuilt neighbor block.
[0117] - Hereinafter, the terms “neighboring block” and “adjacent block” may be used interchangeably and have the same meaning.
[0118] - A neighbor block may also mean a reconstructed neighbor block.
[0119] Spatial neighbor block: A spatial neighbor block may be a block spatially adjacent to the target block. A neighboring block may include a spatial neighbor block.
[0120] - The target block and spatial neighboring blocks can be included within the target picture.
[0121] - A spatial neighboring block may mean a block whose boundary is adjacent to the target block or a block located within a certain distance from the target block.
[0122] - A spatial neighboring block may refer to a block adjacent to a vertex of a target block. Here, a block adjacent to a vertex of a target block may be a block vertically adjacent to a neighboring block horizontally adjacent to the target block, or a block horizontally adjacent to a neighboring block vertically adjacent to the target block.
[0123] Temporal neighbor block: A temporal neighbor block may be a block temporally adjacent to the target block. A neighboring block may include a temporal neighboring block.
[0124] - Temporal neighboring blocks may contain co-located blocks (col blocks).
[0125] - A call block may be a block within a co-located picture (col picture) that has already been reconstructed. The location of the call block within the co-located picture may correspond to the location of the target block within the target picture. Alternatively, the location of the call block within the co-located picture may be identical to the location of the target block within the target picture. The call picture may be a picture included in a reference picture list.
[0126] - A temporal neighboring block may be a block that is temporally adjacent to a spatial neighboring block of the target block.
[0127] Prediction mode: The prediction mode can be information indicating the mode used for intra prediction or the mode used for inter prediction.
[0128] Prediction unit: A prediction unit can refer to a basic unit for prediction, such as inter prediction, intra prediction, inter compensation, intra compensation, and motion compensation.
[0129] - A prediction unit may be divided into multiple partitions or sub-prediction units of smaller sizes. Multiple partitions may also serve as the basis for performing prediction or compensation. Partitions generated by dividing a prediction unit may also be prediction units.
[0130] Prediction unit partition: Prediction unit partition can mean the form in which a prediction unit is divided.
[0131] Reconstructed neighboring unit: A reconstructed neighboring unit may be a unit that has already been decrypted and reconstructed as a neighbor of the target unit.
[0132] - The reconstructed neighboring unit can be a spatial neighboring unit or a temporal neighboring unit to the target unit.
[0133] - The reconstructed spatial neighboring unit may be a unit within the target picture that has already been reconstructed through encoding and / or decoding.
[0134] - The reconstructed temporal neighboring unit may be a unit within a reference image that has already been reconstructed through encoding and / or decoding. The position of the reconstructed temporal neighboring unit within the reference image may be the same as the position of the target unit within the target picture, or may correspond to the position of the target unit within the target picture. Alternatively, the reconstructed temporal neighboring unit may be a neighboring block of a corresponding block within the reference image. Here, the position of the corresponding block within the reference image may correspond to the position of the target block within the target image. Here, the correspondence of the positions of the blocks may mean that the positions of the blocks are the same, may mean that one block is included in another block, or may mean that one block occupies a specific position of another block.
[0135] Sub-picture: A picture can be divided into one or more sub-pictures. A sub-picture can consist of one or more rows of tiles and one or more columns of tiles.
[0136] - A sub-picture may be a region within a picture that has a square shape or a rectangular (i.e., non-square) shape. In addition, a sub-picture may include one or more CTUs.
[0137] - A sub-picture can be a rectangular area of one or more slices within a picture.
[0138] - A sub-picture may contain one or more tiles, one or more bricks, and / or one or more slices.
[0139] Tile: A tile can be a square or rectangular (i.e. non-square) area within a picture.
[0140] - A tile may contain one or more CTUs.
[0141] - A tile can be split into one or more bricks.
[0142] Brick: A brick can represent one or more rows of CTUs within a tile.
[0143] - A tile can be divided into one or more bricks. Each brick can contain one or more CTU rows.
[0144] - A tile that cannot be divided into two or more pieces can also mean a brick.
[0145] Slice: A slice may contain one or more tiles within a picture. Alternatively, a slice may contain one or more bricks within a tile.
[0146] - A sub-picture may include one or more slices that collectively cover a rectangular area within the picture. Accordingly, each sub-picture boundary may always be a slice boundary. Additionally, each vertical sub-picture boundary may always be a vertical tile boundary.
[0147] Parameter set: A parameter set may correspond to header information among the structures within a bitstream.
[0148] - 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).
[0149] 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.
[0150] A parameter set can reference a higher-level parameter set. For example, a PPS can reference an SPS, which can reference a VPS.
[0151] - In addition, the parameter set may include a tile group, slice header information, and tile header information. A tile group may mean a group including multiple tiles. In addition, the meaning of a tile group may be identical to the meaning of a slice.
[0152] Rate-distortion optimization: An encoder can use rate-distortion optimization to provide high encoding efficiency by using a combination of coding unit size, prediction mode, prediction unit size, motion information, and transform unit size.
[0153] - The rate-distortion optimization method can calculate the rate-distortion cost of each combination to select the optimal combination among the above combinations. The rate-distortion cost can be calculated using the formula "D+λ*R". In general, the combination that minimizes the rate-distortion cost according to the formula "D+λ*R" can be selected as the optimal combination in the rate-distortion optimization method.
[0154] - D can represent distortion. D can be the mean square error of the squares of the differences between the original transform coefficients and the reconstructed transform coefficients within the transform unit.
[0155] - R can represent the rate. R can represent the bit rate using related context information.
[0156] - λ can represent a Lagrangian multiplier. R can include bits generated by encoding transform coefficients as well as coding parameter information such as prediction mode, motion information, and coded block flag.
[0157] - The encoding device may perform processes such as inter prediction, intra prediction, transformation, quantization, entropy encoding, inverse quantization, and / or inverse transformation to calculate accurate D and R. These processes may significantly increase the complexity in the encoding device.
[0158] Bitstream: A bitstream can mean a string of bits containing encoded image information.
[0159] Parsing: Parsing can mean entropy decoding a bitstream to determine the values of syntax elements. Alternatively, parsing can mean entropy decoding itself.
[0160] Symbol: may mean at least one of a syntax element, a coding parameter, and a transform coefficient of a unit to be encoded and / or a unit to be decoded. In addition, a symbol may mean a target of entropy encoding or a result of entropy decoding.
[0161] Reference picture: A reference picture may refer to an image referenced by a unit for inter prediction or motion compensation. Alternatively, the reference picture may be an image including a reference unit referenced by a target unit for inter prediction or motion compensation.
[0162] Hereinafter, the terms “reference picture” and “reference image” may be used interchangeably and have the same meaning.
[0163] Reference picture list: A reference picture list may be a list containing one or more reference pictures used for inter prediction or motion compensation.
[0164] - The types of reference picture lists can include List Combined (LC), List 0 (L0), List 1 (L1), List 2 (L2), and List 3 (L3).
[0165] - One or more reference picture lists can be used for inter prediction.
[0166] Inter-prediction indicator: The inter-prediction indicator can indicate the direction of inter-prediction for the target unit. Inter-prediction can be either unidirectional prediction or bidirectional prediction. Alternatively, the inter-prediction indicator can indicate the number of reference pictures used when generating the prediction unit of the target unit. Alternatively, the inter-prediction indicator can indicate the number of prediction blocks used for inter-prediction or motion compensation for the target unit.
[0167] Prediction list utilization flag: The prediction list utilization flag can indicate whether to generate a prediction unit using at least one reference picture within a specific reference picture list.
[0168] - An inter prediction indicator can be derived using the prediction list utilization flag. Conversely, a prediction list utilization flag can be derived using the inter prediction indicator. For example, when the prediction list utilization flag indicates a first value of 0, it can indicate that, for the target unit, a prediction block is not generated using a reference picture in the reference picture list. When the prediction list utilization flag indicates a second value of 1, it can indicate that, for the target unit, a prediction unit is generated using the reference picture list.
[0169] Reference picture index: A reference picture index may be an index indicating a specific reference picture in a reference picture list.
[0170] Picture Order Count (POC): The POC of a picture can indicate the display order of the picture.
[0171] Motion Vector (MV): A motion vector can be a two-dimensional vector used in inter prediction or motion compensation. A motion vector can indicate the offset between a target image and a reference image.
[0172] - 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.
[0173] Search range: The search range can be a two-dimensional region where MVs are searched during inter prediction. For example, the size of the search range can be MxN, where M and N can each be positive integers.
[0174] Motion vector candidate: A motion vector candidate can mean a block that is a prediction candidate or a motion vector of a block that is a prediction candidate when predicting a motion vector.
[0175] - Motion vector candidates can be included in the motion vector candidate list.
[0176] Motion vector candidate list: A motion vector candidate list may mean a list constructed using one or more motion vector candidates.
[0177] Motion vector candidate index: The motion vector candidate index may refer to an indicator pointing to a motion vector candidate within a motion vector candidate list. Alternatively, the motion vector candidate index may be an index of a motion vector predictor.
[0178] Motion information: Motion information may mean information including at least one of a motion vector, a reference picture index, and an inter prediction indicator, as well as reference picture list information, a reference image, a motion vector candidate, a motion vector candidate index, a merge candidate, and a merge index.
[0179] Merge candidate list: A merge candidate list may refer to a list constructed using one or more merge candidates.
[0180] Merge candidate: A merge candidate may refer to a spatial merge candidate, a temporal merge candidate, a combined merge candidate, a combined bi-prediction merge candidate, a history-based candidate, a candidate based on the average of two candidates, and a zero-merge candidate. A merge candidate may include an inter-prediction indicator, and may include motion information such as a reference picture index, a motion vector, a prediction list utilization flag, and an inter-prediction indicator for each list.
[0181] Merge index: A merge index can be an indicator pointing to a merge candidate within the merge candidate list.
[0182] - The merge index can indicate a reconstructed unit that is spatially adjacent to the target unit and a reconstructed unit that is temporally adjacent to the target unit, which is a merge candidate.
[0183] - The merge index can indicate at least one of the movement information of the merge candidate.
[0184] Transform unit: A transform unit may be a basic unit in residual signal encoding and / or residual signal decoding, such as transform, inverse transform, quantization, inverse quantization, transform coefficient encoding, and transform coefficient decoding. One transform unit may be divided into a plurality of sub-transform units having smaller sizes. Here, the transform may include one or more of a primary transform and a secondary transform, and the inverse transform may include one or more of a primary inverse transform and a secondary inverse transform.
[0185] Scaling: Scaling can mean the process of multiplying the transform coefficient levels by a factor.
[0186] - As a result of scaling on the transform coefficient level, transform coefficients can be generated. Scaling may also be referred to as dequantization.
[0187] Quantization Parameter (QP): The quantization parameter may refer to a value used to generate transform coefficient levels for transform coefficients in quantization. Alternatively, the quantization parameter may refer to a value used to generate transform coefficients by scaling transform coefficient levels in dequantization. Alternatively, the quantization parameter may be a value mapped to a quantization step size.
[0188] Delta quantization parameter: The delta quantization parameter may mean the difference value between the predicted quantization parameter and the quantization parameter of the target unit.
[0189] Scan: Scan can refer to a method for arranging the order of coefficients within a unit, block, or matrix. For example, arranging a two-dimensional array into a one-dimensional array can be called a scan. Alternatively, arranging a one-dimensional array into a two-dimensional array can also be called a scan or inverse scan.
[0190] Transform coefficient: The transform coefficient may be a coefficient value generated by performing a transform in an encoding device. Alternatively, the transform coefficient may be a coefficient value generated by performing at least one of entropy decoding and dequantization in a decoding device.
[0191] - The quantized level or quantized transform coefficient level generated by applying quantization to the transform coefficient or residual signal can also be included in the meaning of the transform coefficient.
[0192] Quantized Level: A quantized level may refer to a value generated by performing quantization on a transform coefficient or residual signal in an encoding device. Alternatively, a quantized level may refer to a value that is the target of dequantization when performing dequantization in a decoding device.
[0193] - The quantized transform coefficient level, which is the result of transformation and quantization, can also be included in the meaning of the quantized level.
[0194] Non-zero transform coefficient: A non-zero transform coefficient can mean a transform coefficient with a non-zero value or a transform coefficient level with a non-zero value. Alternatively, a non-zero transform coefficient can mean a transform coefficient whose magnitude is not zero or a transform coefficient level whose magnitude is not zero.
[0195] Quantization matrix: A quantization matrix can refer to a matrix used in the quantization or dequantization process to improve the subjective or objective image quality. A quantization matrix can also be referred to as a scaling list.
[0196] Quantization matrix coefficient: Quantization matrix coefficient can mean each element in the quantization matrix. Quantization matrix coefficient can also be called matrix coefficient.
[0197] Default matrix: The default matrix may be a quantization matrix predefined in the encoder and decoder.
[0198] Non-default matrix: A non-default matrix may be a quantization matrix that is not predefined in the encoder or decoder. A non-default matrix may refer to a quantization matrix that is signaled by the user from the encoder to the decoder.
[0199] Most Probable Mode (MPM): MPM can indicate the intra prediction mode that is likely to be used for intra prediction of the target block.
[0200] - The encoding device and the decoding device can determine one or more MPMs based on coding parameters related to the target block and properties of objects related to the target block.
[0201] - The encoding device and the decoding device can determine one or more MPMs based on the intra prediction mode of the reference block. There may be multiple reference blocks. The multiple reference blocks may include a spatial neighboring block adjacent to the left of the target block and a spatial neighboring block adjacent to the top of the target block. In other words, one or more different MPMs may be determined depending on which intra prediction modes are used for the reference blocks.
[0202] - One or more MPMs can be determined in the same manner in the encoding device and the decoding device. In other words, the encoding device and the decoding device can share an MPM list containing the same one or more MPMs.
[0203] MPM List: An MPM list may contain one or more MPMs. The number of MPMs in an MPM list may be predefined.
[0204] MPM Indicator: The MPM indicator can indicate which MPM among one or more MPMs in the MPM list is used for intra prediction of the target block. For example, the MPM indicator can be an index into the MPM list.
[0205] - Since the MPM list is determined in the same way in the encoding device and the decoding device, the MPM list itself may not need to be transmitted from the encoding device to the decoding device.
[0206] - The MPM indicator can be signaled from the encoding device to the decoding device. As the MPM indicator is signaled, the decoding device can determine which MPM among the MPMs in the MPM list will be used for intra prediction for the target block.
[0207] MPM Usage Indicator: The MPM usage indicator can indicate whether the MPM usage mode will be used for prediction of the target block. The MPM usage mode can be a mode that uses an MPM list to determine the MPM to be used for intra prediction of the target block.
[0208] - MPM usage indicators can be signaled from the encoding device to the decoding device.
[0209] Signaling: Signaling may refer to the transmission of information from an encoding device to a decoding device. Alternatively, signaling may refer to an encoding device including information within a bitstream or recording medium. Information signaled by an encoding device may be used by a decoding device.
[0210] - The encoding device can perform encoding on the signaled information to generate encoded information. The encoded information can be transmitted from the encoding device to a decoding device. The decoding device can obtain information by decoding the transmitted encoded information. Here, the encoding can be entropy encoding, and the decoding can be entropy decoding.
[0211] Selective signaling: Information can be selectively signaled. Selective signaling of information can mean that an encoding device selectively includes information (under certain conditions) in a bitstream or recording medium. Selective signaling of information can mean that a decoding device selectively extracts information (under certain conditions) from a bitstream.
[0212] Omission of signaling: Signaling for information may be omitted. Omission of signaling for information may mean that the encoding device (under certain conditions) does not include the information in the bitstream or recording medium. Omission of signaling for information may mean that the decoding device (under certain conditions) does not extract the information from the bitstream.
[0213] Statistical value: Variables, coding parameters, and constants can have values that can be operated on. A statistical value can be a value generated by an operation on the values of these specific objects. For example, a statistical value can be one or more of the following values: an average, a weighted average, a weighted sum, a minimum, a maximum, a mode, a median, and an interpolation value for the values of a specific variable, a specific coding parameter, and a specific constant.
[0214]
[0215] FIG. 1 is a block diagram showing a configuration according to one embodiment of an encoding device to which the present disclosure is applied.
[0216] The encoding device (100) may be an encoder, a video encoding device, or an image encoding device. The video may include one or more images. The encoding device (100) may sequentially encode one or more images of the video.
[0217] Referring to FIG. 1, the encoding device (100) may include an inter prediction unit (110), an intra prediction unit (120), a switch (115), a subtractor (125), a transform unit (130), a quantization unit (140), an entropy encoding unit (150), an inverse quantization unit (160), an inverse transform unit (170), an adder (175), a filter unit (180), and a reference picture buffer (190).
[0218] The encoding device (100) can perform encoding on a target image using an intra mode and / or an inter mode. In other words, the prediction mode for the target block can be one of the intra mode and the inter mode.
[0219] Hereinafter, the terms “intra mode”, “intra prediction mode”, “intra-screen mode” and “intra-screen prediction mode” may be used interchangeably and have the same meaning.
[0220] Hereinafter, the terms “inter mode”, “inter prediction mode”, “inter-screen mode” and “inter-screen prediction mode” may be used interchangeably and have the same meaning.
[0221] Hereinafter, the term "image" may refer to only a portion of an image, or may refer to a block. Furthermore, processing an "image" may refer to sequential processing of multiple blocks.
[0222] Additionally, the encoding device (100) can generate a bitstream including encoded information through encoding of a target image, and can output and store the generated bitstream. The generated bitstream can be stored in a computer-readable recording medium and can be streamed via wired and / or wireless transmission media.
[0223] As a prediction mode, when the intra mode is used, the switch (115) can be switched to intra. As a prediction mode, when the inter mode is used, the switch (115) can be switched to inter.
[0224] The encoding device (100) can generate a prediction block for a target block. In addition, after the prediction block is generated, the encoding device (100) can encode a residual block for the target block using the residual of the target block and the prediction block.
[0225] When the prediction mode is intra mode, the intra prediction unit (120) can use pixels of blocks adjacent to the target block that have already been encoded and / or decoded as reference samples. The intra prediction unit (120) can perform spatial prediction on the target block using the reference samples, and can generate prediction samples for the target block through spatial prediction. The prediction samples can refer to samples within the prediction block.
[0226] The inter prediction unit (110) may include a motion prediction unit and a motion compensation unit.
[0227] When the prediction mode is inter mode, the motion prediction unit can search for an area from the reference image that best matches the target block during the motion prediction process, and can use the searched area to derive a motion vector for the target block and the searched area. In this case, the motion prediction unit can use a search area as the area to be searched.
[0228] The reference image may be stored in a reference picture buffer (190), and when encoding and / or decoding for the reference image is processed, the encoded and / or decoded reference image may be stored in the reference picture buffer (190).
[0229] As the decoded picture is stored, the reference picture buffer (190) may be a decoded picture buffer (DPB).
[0230] The motion compensation unit can generate a prediction block for a target block by performing motion compensation using a motion vector. Here, the motion vector may be a two-dimensional vector used for inter prediction. The motion vector may also indicate an offset between the target image and the reference image.
[0231] The motion prediction unit and the motion compensation unit can generate a prediction block by applying an interpolation filter to some areas within a reference image when a motion vector has a non-integer value. In order to perform inter prediction or motion compensation, it can be determined based on the CU whether the method of motion prediction and motion compensation of a PU included in the CU is skip mode, merge mode, Advanced Motion Vector Prediction (AMVP) mode, and current picture reference mode, and inter prediction or motion compensation can be performed according to each mode.
[0232] The subtractor (125) can generate a residual block, which is the difference between the target block and the predicted block. The residual block may also be referred to as a residual signal.
[0233] A residual signal may represent the difference between the original signal and the predicted signal. Alternatively, the residual signal may be a signal generated by transforming, quantizing, or transforming and quantizing the difference between the original signal and the predicted signal. A residual block may be a residual signal for a block unit.
[0234] The transformation unit (130) can generate a transformation coefficient by performing a transformation on the residual block and output the generated transformation coefficient. Here, the transformation coefficient may be a coefficient value generated by performing a transformation on the residual block.
[0235] The conversion unit (130) can use one of a plurality of predefined conversion methods to perform the conversion.
[0236] The predefined multiple transform methods may include transforms based on the Discrete Cosine Transform (DCT), the Discrete Sine Transform (DST), and the Karhunen-Loeve Transform (KLT).
[0237] The transformation method used for transforming the residual block may be determined based on at least one of the coding parameters for the target block and / or neighboring blocks. For example, the transformation method may be determined based on at least one of the inter-prediction mode for the PU, the intra-prediction mode for the PU, the size of the TU, and the shape of the TU. Alternatively, transformation information indicating the transformation method may be signaled from the encoding device (100) to the decoding device (200).
[0238] When the transform skip mode is applied, the transform unit (130) may omit the transformation for the residual block.
[0239] By applying quantization to a transform coefficient, a quantized transform coefficient level or a quantized level can be generated. In the following embodiments, a quantized transform coefficient level and a quantized level may also be referred to as a transform coefficient.
[0240] The quantization unit (140) can generate a quantized transform coefficient level (i.e., a quantized level or quantized coefficient) by quantizing the transform coefficient according to a quantization parameter. The quantization unit (140) can output the generated quantized transform coefficient level. At this time, the quantization unit (140) can quantize the transform coefficient using a quantization matrix.
[0241] The entropy encoding unit (150) can generate a bitstream by performing entropy encoding according to a probability distribution based on values produced by the quantization unit (140) and / or coding parameter values produced during the encoding process. The entropy encoding unit (150) can output the generated bitstream.
[0242] The entropy encoding unit (150) can perform entropy encoding on information about pixels of an image and information for decoding the image. For example, the information for decoding the image may include syntax elements, etc.
[0243] When entropy coding is applied, a small number of bits can be allocated to symbols with a high probability of occurrence, while a large number of bits can be allocated to symbols with a low probability of occurrence. As symbols are represented through this allocation, the size of the bitstring for the symbols being encoded can be reduced. Therefore, entropy coding can improve the compression performance of image encoding.
[0244] In addition, the entropy encoding unit (150) can use encoding methods such as exponential golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC) for entropy encoding. For example, the entropy encoding unit (150) can perform entropy encoding using a variable length coding (Variable Length Coding / Code; VLC) table. For example, the entropy encoding unit (150) can derive a binarization method for a target symbol. In addition, the entropy encoding unit (150) can derive a probability model of a target symbol / bin. The entropy encoding unit (150) may also perform arithmetic encoding using the derived binarization method, probability model, and context model.
[0245] The entropy encoding unit (150) can change the coefficients of a two-dimensional block form into a one-dimensional vector form through a transform coefficient scanning method to encode a quantized transform coefficient level.
[0246] Coding parameters may be information required for encoding and / or decoding. Coding parameters may include information encoded by the encoding device (100) and transmitted from the encoding device (100) to the decoding device, and may include information that may be derived during the encoding or decoding process. For example, syntax elements may be included as information transmitted to the decoding device.
[0247] Coding parameters may include information (or flags and indices, etc.) encoded in an encoding device and signaled from the encoding device to the decoding device, such as syntax elements, as well as information derived during the encoding or decoding process. In addition, coding parameters may include information required for encoding or decoding an image. For example, the size of the unit / block, the shape of the unit / block, the depth of the unit / block, the partition information of the unit / block, the partition structure of the unit / block, information indicating whether the unit / block is partitioned in the form of a quad tree, information indicating whether the unit / block is partitioned in the form of a binary tree, the partition direction (horizontal direction or vertical direction) of the binary tree, the partition type (symmetric partition or asymmetric partition) of the binary tree, information indicating whether the unit / block is partitioned in the form of a ternary tree, the partition direction (horizontal direction or vertical direction) of the ternary tree, the partition type (symmetric partition or asymmetric partition, etc.) of the ternary tree, information indicating whether the unit / block is partitioned in the form of a multi-type tree, the combination and direction (horizontal direction or vertical direction, etc.) of the partition of the multi-type tree, the partition type (symmetric partition or asymmetric partition), the partition tree of the multi-type tree (binary tree or ternary tree), the type of the prediction mode (intra prediction or inter prediction), the intra prediction mode / direction, the intra luma prediction mode / direction, the intra chroma prediction mode / direction, the intra Segmentation information, inter-segmentation information, coding block segmentation flag, prediction block segmentation flag, transform block segmentation flag, reference sample filtering method, reference sample filter tap, reference sample filter coefficient, prediction block filtering method, prediction block filter tap, prediction block filter coefficient, prediction block boundary filtering method, prediction block boundary filter tap, prediction block boundary filter coefficient, inter-prediction mode, motion information, motion vector, motion vector difference, reference picture index,Inter prediction direction, inter prediction indicator, prediction list utilization flag, reference picture list, reference video, POC, motion vector predictor, motion vector prediction index, motion vector prediction candidate, motion vector candidate list, information indicating whether to use merge mode, merge index, merge candidate, merge candidate list, information indicating whether to use skip mode, type of interpolation filter, filter tap of interpolation filter, filter coefficient of interpolation filter, motion vector magnitude, motion vector representation accuracy, transform type, transform magnitude, information indicating whether to use primary transform, information indicating whether to use additional (secondary) transform, primary transform selection information (or primary transform index), secondary transform selection information (or secondary transform index), information indicating whether to use residual signal, coded block pattern, coded block flag, quantization parameter, residual quantization parameter, quantization matrix, information about intra-loop filter, information indicating whether to apply intra-loop filter, intra-loop Coefficients of the filter, filter taps of the intra-loop filter, shape / form of the intra-loop filter, information indicating whether a deblocking filter is applied, coefficients of the deblocking filter, filter taps of the deblocking filter, strength of the deblocking filter, shape / form of the deblocking filter, information indicating whether an adaptive sample offset is applied, adaptive sample offset value, adaptive sample offset category, adaptive sample offset type, information indicating whether an adaptive in-loop filter is applied, coefficients of the adaptive in-loop filter, filter taps of the adaptive in-loop filter, shape / form of the adaptive in-loop filter, binarization / debinarization method, context model, context model determination method, context model update method, information indicating whether a regular mode is performed, information indicating whether a bypass mode is performed,Significant coefficient flag, last significant coefficient flag, coefficient group unit coding flag, last significant coefficient position, flag indicating whether the coefficient value is greater than 1, flag indicating whether the coefficient value is greater than 2, flag indicating whether the coefficient value is greater than 3, remaining coefficient value information, sign information, reconstructed luma sample, reconstructed chroma sample, context bin, bypass bin, residual luma sample, residual chroma sample, transform coefficient, luma transform coefficient, chroma transform coefficient, quantized level, luma quantized level, chroma quantized level, transform coefficient level, luma transform coefficient level, chroma transform coefficient level, transform coefficient level scanning method, size of motion vector search region on the side of decoding device, shape of motion vector search region on the side of decoding device, number of motion vector searches on the side of decoding device, CTU size, minimum block size, maximum block size, maximum block depth, minimum block depth, display / output order of image, slice identification information, slice type, slice partitioning information, tile group identification information, tile group The coding parameters may include a type, tile group partition information, tile identification information, tile type, tile partition information, picture type, bit depth, input sample bit depth, reconstructed sample bit depth, residual sample bit depth, transform coefficient bit depth, quantized level bit depth, information about a luma signal, information about a chroma signal, a value of at least one of a color space of a target block and a color space of a residual block, a combined shape, or statistics. In addition, information related to the above-described coding parameters may also be included in the coding parameters. Information used to calculate and / or derive the above-described coding parameters may also be included in the coding parameters. Information calculated or derived using the above-described coding parameters may also be included in the coding parameters.
[0248] The primary transformation selection information can indicate the primary transformation applied to the target block.
[0249] Secondary transformation selection information can indicate a secondary transformation to be applied to the target block.
[0250] A residual signal may represent the difference between the original signal and the predicted signal. Alternatively, the residual signal may be a signal generated by transforming the difference between the original signal and the predicted signal. Alternatively, the residual signal may be a signal generated by transforming and quantizing the difference between the original signal and the predicted signal. A residual block may be a residual signal for a block.
[0251] Here, signaling information may mean including entropy-encoded information generated by performing entropy encoding on a flag or index in an encoding device (100) into a bitstream, and may mean obtaining information by performing entropy decoding on entropy-encoded information extracted from a bitstream in a decoding device (200). Here, the information may include flags, indices, etc.
[0252] A signal may refer to information being signaled. Hereinafter, information about an image and a block may be referred to as a signal. Furthermore, the terms "information" and "signal" may be used interchangeably and have the same meaning herein. For example, a specific signal may be a signal representing a specific block. An original signal may be a signal representing a target block. A prediction signal may be a signal representing a prediction block. A residual signal may be a signal representing a residual block.
[0253] A bitstream may contain information according to a specific syntax. An encoding device (100) may generate a bitstream containing information according to a specific syntax. An encoding device (200) may obtain information from a bitstream according to a specific syntax.
[0254] Since encoding is performed through inter prediction by the encoding device (100), the encoded target image can be used as a reference image for other image(s) to be processed later. Accordingly, the encoding device (100) can reconstruct or decode the encoded target image again and store the reconstructed or decoded image as a reference image in the reference picture buffer (190). Inverse quantization and inverse transformation can be processed for the encoded target image for decoding.
[0255] The quantized level can be inversely quantized in the inverse quantization unit (160) and inversely transformed in the inverse transformation unit (170). The inverse quantization unit (160) can generate inversely quantized coefficients by performing inverse quantization on the quantized level. The inverse transformation unit (170) can generate inversely quantized and inversely transformed coefficients by performing inverse transformation on the inverse quantized coefficients.
[0256] The dequantized and inversely transformed coefficients can be combined with the prediction block through an adder (175), and a reconstructed block can be generated by combining the dequantized and inversely transformed coefficients with the prediction block. Here, the dequantized and / or inversely transformed coefficients may mean coefficients on which at least one of dequantization and inverse transformation has been performed, and may mean a reconstructed residual block. Here, the reconstructed block may mean a recovered block or a decoded block.
[0257] The reconstructed block may pass through a filter unit (180). The filter unit (180) may apply at least one of a deblocking filter, a sample adaptive offset (SAO), an adaptive loop filter (ALF), and a non-local filter (NLF) to the reconstructed sample, the reconstructed block, or the reconstructed picture. The filter unit (180) may also be referred to as an in-loop filter.
[0258] A deblocking filter can remove block distortion that occurs at the boundaries between blocks within a reconstructed picture. To determine whether to apply a deblocking filter to a target block, the decision can be made based on the pixel(s) contained in a number of columns or rows within the block.
[0259] When applying a deblocking filter to a target block, the applied filter may vary depending on the strength of the required deblocking filtering. In other words, among different filters, a filter determined based on the strength of the deblocking filtering may be applied to the target block. When applying a deblocking filter to a target block, one or more of a long-tap filter, a strong filter, a weak filter, and a Gaussian filter may be applied to the target block, depending on the strength of the required deblocking filtering.
[0260] Additionally, when vertical filtering and horizontal filtering are performed on the target block, the horizontal filtering and vertical filtering can be processed in parallel.
[0261] SAO can add an appropriate offset to the pixel value of a pixel to compensate for coding errors. SAO can perform compensation using an offset for the difference between the original image and the deblocked image on a pixel-by-pixel basis for an image to which deblocking has been applied. To perform offset compensation on an image, a method can be used in which the pixels included in the image are divided into a certain number of regions, and then the regions to which the offset is to be performed are determined among the divided regions, and the offset is applied to the determined regions. Alternatively, a method can be used in which the offset is applied by considering the edge information of each pixel of the image.
[0262] ALF can perform filtering based on the values compared between the reconstructed image and the original image. After dividing the pixels contained in the image into predetermined groups, the filter to be applied to each divided group can be determined, and filtering can be performed differentially for each group. Information regarding whether to apply an adaptive loop filter can be signaled for each CU. This information can be signaled in the luma signal. The shape and filter coefficients of the ALF to be applied to each block can vary for each block. Alternatively, a fixed form of ALF can be applied to a block regardless of the characteristics of the block.
[0263] A non-local filter can perform filtering based on reconstructed blocks similar to the target block. Regions similar to the target block can be selected from the reconstructed image, and filtering of the target block can be performed using statistical properties of the selected similar regions. Information regarding whether to apply a non-local filter can be signaled to the CU. Furthermore, the shapes and filter coefficients of the non-local filter applied to the blocks can vary depending on the block.
[0264] A reconstructed block or reconstructed image that has passed through the filter unit (180) may be stored as a reference picture in a reference picture buffer (190). The reconstructed block that has passed through the filter unit (180) may be a part of a reference picture. In other words, the reference picture may be a reconstructed picture composed of reconstructed blocks that have passed through the filter unit (180). The stored reference picture may then be used for inter prediction or motion compensation.
[0265]
[0266] FIG. 2 is a block diagram showing a configuration according to one embodiment of a decryption device to which the present disclosure is applied.
[0267] The decoding device (200) may be a decoder, a video decoding device, or an image decoding device.
[0268] Referring to FIG. 2, the decoding device (200) may include an entropy decoding unit (210), an inverse quantization unit (220), an inverse transformation unit (230), an intra prediction unit (240), an inter prediction unit (250), a switch (245), an adder (255), a filter unit (260), and a reference picture buffer (270).
[0269] The decoding device (200) can receive a bitstream output from the encoding device (100). The decoding device (200) can receive a bitstream stored in a computer-readable recording medium, and can receive a bitstream streamed through a wired / wireless transmission medium.
[0270] The decoding device (200) can perform intra-mode and / or inter-mode decoding on the bitstream. In addition, the decoding device (200) can generate a reconstructed image or a decoded image through decoding, and output the generated reconstructed image or the decoded image.
[0271] For example, switching between intra mode and inter mode depending on the prediction mode used for decoding can be performed by a switch (245). If the prediction mode used for decoding is intra mode, the switch (245) can be switched to intra. If the prediction mode used for decoding is inter mode, the switch (245) can be switched to inter.
[0272] The decoding device (200) can obtain a reconstructed residual block by decoding the input bitstream and can generate a prediction block. Once the reconstructed residual block and prediction block are obtained, the decoding device (200) can generate a reconstructed block to be decoded by combining the reconstructed residual block and prediction block.
[0273] The entropy decoding unit (210) can generate symbols by performing entropy decoding on the bitstream based on a probability distribution for the bitstream. The generated symbols can include symbols in the form of quantized transform coefficient levels (i.e., quantized levels or quantized coefficients). Here, the entropy decoding method can be similar to the entropy encoding method described above. For example, the entropy decoding method can be a reverse process of the entropy encoding method described above.
[0274] The entropy decoding unit (210) can change a coefficient in the form of a one-dimensional vector into the form of a two-dimensional block through a transform coefficient scanning method in order to decode a quantized transform coefficient level.
[0275] For example, coefficients can be converted into a two-dimensional block shape by scanning the coefficients of a block using the upper right diagonal scan. Alternatively, depending on the block size and / or intra prediction mode, which scan among the upper right diagonal scan, vertical scan, and horizontal scan is used can be determined.
[0276] The quantized coefficients can be dequantized in the dequantization unit (220). The dequantization unit (220) can generate dequantized coefficients by performing dequantization on the quantized coefficients. In addition, the dequantized coefficients can be inversely transformed in the inverse transformation unit (230). The inverse transformation unit (230) can generate a reconstructed residual block by performing inverse transformation on the dequantized coefficients. As a result of performing inverse quantization and inverse transformation on the quantized coefficients, a reconstructed residual block can be generated. At this time, the inverse quantization unit (220) can apply a quantization matrix to the quantized coefficients when generating the reconstructed residual block.
[0277] When the intra mode is used, the intra prediction unit (240) can generate a prediction block by performing spatial prediction on the target block using pixel values of already decoded blocks neighboring the target block.
[0278] The inter prediction unit (250) may include a motion compensation unit. Alternatively, the inter prediction unit (250) may be referred to as a motion compensation unit.
[0279] When the inter mode is used, the motion compensation unit can generate a prediction block by performing motion compensation on the target block using a motion vector and a reference image stored in the reference picture buffer (270).
[0280] The motion compensation unit may apply an interpolation filter to a portion of a reference image when a motion vector has a non-integer value, and may generate a prediction block using the reference image to which the interpolation filter has been applied. In order to perform motion compensation, the motion compensation unit may determine which mode among skip mode, merge mode, AMVP mode, and current picture reference mode is the motion compensation method used for the PU included in the CU based on the CU, and may perform motion compensation according to the determined mode.
[0281] The reconstructed residual block and prediction block can be added through an adder (255). The adder (255) can generate a reconstructed block by adding the reconstructed residual block and prediction block.
[0282] The reconstructed block may pass through a filter unit (260). The filter unit (260) may apply at least one of a deblocking filter, SAO, ALF, and a non-local filter to the reconstructed block or the reconstructed image. The reconstructed image may be a picture including the reconstructed block.
[0283] The filter unit (260) can output a reconstructed image.
[0284] The reconstructed block and / or reconstructed image that has passed through the filter unit (260) may be stored as a reference picture in the reference picture buffer (270). The reconstructed block that has passed through the filter unit (260) may be a part of a reference picture. In other words, the reference picture may be a reconstructed image composed of the reconstructed blocks that have passed through the filter unit (260). The stored reference picture may be used for subsequent inter prediction and / or motion compensation.
[0285]
[0286] Figure 3 is a diagram schematically showing the division structure of an image when encoding and decoding an image.
[0287] Figure 3 can schematically represent an example in which one unit is divided into multiple sub-units.
[0288] To efficiently segment images, coding units (CUs) may be used during encoding and decoding. A unit may be a term referring to 1) a block containing image samples and 2) a syntax element. For example, "segmentation of a unit" may mean "segmentation of a block corresponding to a unit."
[0289] A CU can be used as a basic unit for image encoding and / or decoding. Furthermore, a CU can be used as a unit to which a selected mode, either intra-mode or inter-mode, is applied during image encoding and / or decoding. In other words, during image encoding and / or decoding, it can be determined which mode, either intra-mode or inter-mode, will be applied to each CU.
[0290] Additionally, a CU can be a basis unit for prediction, transformation, quantization, inverse transformation, inverse quantization, and encoding and / or decoding of transform coefficients.
[0291] Referring to FIG. 3, an image (300) can be sequentially divided into units of Largest Coding Units (LCUs). For each LCU, a division structure can be determined. Here, LCU can be used in the same sense as Coding Tree Units (CTUs).
[0292] Partitioning a unit may refer to the division of a block corresponding to the unit. Block partitioning information may include depth information regarding the depth of the unit. Depth information may indicate the number of times and / or degree to which the unit is partitioned. A single unit may be hierarchically divided into multiple subunits based on depth information based on a tree structure.
[0293] Each partitioned sub-unit can have depth information. The depth information can be information indicating the size of the CU. Depth information can be stored for each CU.
[0294] Each CU can have depth information. When a CU is split, the CUs generated by the split can have a depth that is 1 more than the depth of the split CU.
[0295] The partition structure may refer to the distribution of CUs within an LCU (310) for efficiently encoding an image. This distribution may be determined based on whether a single CU is partitioned into multiple CUs. The number of partitioned CUs may be a positive integer greater than or equal to 2, including 2, 4, 8, and 16.
[0296] The horizontal and vertical dimensions of a CU generated by a partition may be smaller than the horizontal and vertical dimensions of the CU before the partition, depending on the number of CUs generated by the partition. For example, the horizontal and vertical dimensions of a CU generated by a partition may be half the horizontal and half the vertical dimensions of the CU before the partition.
[0297] The partitioned CU can be recursively partitioned into multiple CUs in the same manner. By recursively partitioning, at least one of the horizontal size and the vertical size of the partitioned CU can be reduced compared to at least one of the horizontal size and the vertical size of the CU before partitioning.
[0298] The partitioning of a CU can be done recursively up to a predefined depth or a predefined size.
[0299] For example, the depth of a CU can have a value from 0 to 3. The size of a CU can range from 64x64 to 8x8 depending on the depth of the CU.
[0300] For example, the depth of the LCU (310) may be 0, and the depth of the smallest coding unit (SCU) may be a predefined maximum depth. Here, the LCU may be a CU having the largest coding unit size as described above, and the SCU may be a CU having the smallest coding unit size.
[0301] Splitting can start from LCU (310), and each time the horizontal size and / or vertical size of the CU is reduced by the splitting, the depth of the CU can increase by 1.
[0302] For example, for each depth, a CU that is not split may have a size of 2Nx2N. Furthermore, for a CU that is split, a CU of size 2Nx2N may be split into four CUs of size NxN. The size of N may be halved each time the depth increases by 1.
[0303] Referring to FIG. 3, an LCU with depth 0 can be 64x64 pixels or a 64x64 block. 0 can be the minimum depth. An SCU with depth 3 can be 8x8 pixels or an 8x8 block. 3 can be the maximum depth. In this case, a CU of a 64x64 block, which is an LCU, can be represented by depth 0. A CU of a 32x32 block can be represented by depth 1. A CU of a 16x16 block can be represented by depth 2. A CU of an 8x8 block, which is an SCU, can be represented by depth 3.
[0304] Information about whether a CU is split can be expressed through the CU's split information. The split information can be 1-bit information. All CUs except SCUs can include split information. For example, the value of the split information of a CU that is not split can be a first value, and the value of the split information of a CU that is split can be a second value. If the split information indicates whether the CU is split, the first value can be 0, and the second value can be 1.
[0305] For example, when one CU is partitioned into four CUs, the width and height of each CU of the four CUs generated by the partitioning may be half the width and half the height of the CU before the partitioning, respectively. When a CU of size 32x32 is partitioned into four CUs, the sizes of the four partitioned CUs may be 16x16. When one CU is partitioned into four CUs, it can be said that the CU is partitioned in a quad-tree form. In other words, it can be seen that a quad-tree partition is applied to the CU.
[0306] For example, when one CU is split into two CUs, the width or height of each CU of the two CUs created by the split may be half the width or half the height of the CU before the split, respectively. When a CU of size 32x32 is split vertically into two CUs, the sizes of the two split CUs may be 16x32. When a CU of size 32x32 is split horizontally into two CUs, the sizes of the two split CUs may be 32x16. When one CU is split into two CUs, it can be said that the CU is split in the form of a binary tree. In other words, it can be seen that a binary tree partition is applied to the CU.
[0307] For example, when one CU is split into three CUs, three split CUs can be created by splitting the width or height of the CU before splitting in a ratio of 1:2:1. For example, when a CU of size 16x32 is split into three CUs horizontally, the three split CUs can have sizes of 16x8, 16x16, and 16x8 from the top, respectively. For example, when a CU of size 32x32 is split into three CUs vertically, the three split CUs can have sizes of 8x32, 16x32, and 8x32 from the left, respectively. When one CU is split into three CUs, it can be said that the CU is split in a ternary-tree form. In other words, it can be seen that a ternary-tree partition is applied to the CU.
[0308] In the LCU (310) of Fig. 3, both quad-tree type division and binary-tree type division were applied.
[0309] In the encoding device (100), a coding tree unit (CTU) of 64x64 size can be divided into a plurality of smaller CUs by a recursive quad-tree structure. One CU can be divided into four CUs of the same size. The CU can be divided recursively, and each CU can have a quad-tree structure.
[0310] Through recursive partitioning of CU, the optimal partitioning method that produces the minimum rate-distortion ratio can be selected.
[0311] CTU (320) of Fig. 3 is an example of a CTU to which quad tree partitioning, binary tree partitioning, and ternary tree partitioning are all applied.
[0312] As described above, to partition a CTU, at least one of a quad tree partition, a binary tree partition, and a ternary tree partition may be applied to the CTU. The partitions may be applied based on a specified priority.
[0313] For example, a quad-tree partitioning may be preferentially applied to a CTU. A CU that cannot be further partitioned into a quad-tree may correspond to a leaf node of the quad-tree. A CU corresponding to a leaf node of the quad-tree may become a root node of a binary tree and / or a ternary tree. That is, a CU corresponding to a leaf node of the quad-tree may be partitioned into a binary tree or a ternary tree, or may not be partitioned any further. In this case, by preventing quad-tree partitioning from being applied again to a CU generated by applying binary tree partitioning or ternary tree partitioning to a CU corresponding to a leaf node of the quad-tree, partitioning of the block and / or signaling of block partitioning information may be effectively performed.
[0314] The partitioning of a CU corresponding to each node of a quad tree can be signaled using quad partitioning information. Quad partitioning information having a first value (e.g., "1") can indicate that the CU is partitioned into a quad tree shape. Quad partitioning information having a second value (e.g., "0") can indicate that the CU is not partitioned into a quad tree shape. The quad partitioning information can be a flag having a specified length (e.g., 1 bit).
[0315] There may be no priority between binary tree partitioning and ternary tree partitioning. That is, a CU corresponding to a leaf node of a quadtree may be partitioned into either a binary tree or a ternary tree. Furthermore, a CU generated by binary tree partitioning or ternary tree partitioning may be partitioned again into a binary tree or a ternary tree, or may not be partitioned any further.
[0316] A partition in which there is no priority between a binary tree partition and a ternary tree partition may be referred to as a multi-type tree partition. That is, a CU corresponding to a leaf node of a quad tree may become a root node of a multi-type tree. For the partition of a CU corresponding to each node of a multi-type tree, at least one of information indicating whether the multi-type tree is partitioned, information on the direction of the partition, and information on the partition tree may be signaled. For the partition of a CU corresponding to each node of a multi-type tree, information indicating whether the multi-type tree is partitioned, information on the direction of the partition, and information on the partition tree may be sequentially signaled.
[0317] For example, information indicating whether a multi-type tree having a first value (e.g., "1") is split may indicate that the corresponding CU is split into a multi-type tree form. Information indicating whether a multi-type tree having a second value (e.g., "0") is split may indicate that the corresponding CU is not split into a multi-type tree form.
[0318] When a CU corresponding to each node of a multi-type tree is split into a multi-type tree, the CU may further include split direction information.
[0319] Split direction information can indicate the split direction of a multi-type tree split. Split direction information having a first value (e.g., "1") can indicate that the corresponding CU is split in the vertical direction. Split direction information having a second value (e.g., "0") can indicate that the corresponding CU is split in the horizontal direction.
[0320] When a CU corresponding to each node of a multi-type tree is split into a multi-type tree, the CU may further include split tree information. The split tree information may indicate a tree used for splitting the multi-type tree.
[0321] For example, partition tree information having a first value (e.g., "1") may indicate that the corresponding CU is partitioned into a binary tree. Partition tree information having a second value (e.g., "0") may indicate that the corresponding CU is partitioned into a ternary tree.
[0322] Here, each of the information indicating whether to split, split tree information, and split direction information described above may be a flag having a specific length (e.g., 1 bit).
[0323] At least one of the quad partition information described above, information indicating whether a multi-type tree is partitioned, partition direction information, and partition tree information may be entropy encoded and / or entropy decoded. For entropy encoding / decoding of such information, information of neighboring CUs adjacent to the target CU may be utilized.
[0324] For example, it can be considered that the partitioning shapes (i.e., whether to partition, partitioning tree, and / or partitioning direction) of the left CU and / or the upper CU and the partitioning shape of the target CU are likely to be similar to each other. Therefore, based on the information of the neighboring CU, context information for entropy encoding and / or entropy decoding of the information of the target CU can be derived. At this time, the information of the neighboring CU can include at least one of 1) quad partitioning information of the neighboring CU, 2) information indicating whether to partition a multi-type tree, 3) partitioning direction information, and 4) partitioning tree information.
[0325] In another embodiment, among binary tree partitioning and ternary tree partitioning, binary tree partitioning may be performed preferentially. That is, binary tree partitioning may be applied first, and a CU corresponding to a leaf node of the binary tree may be set as the root node of the ternary tree. In this case, quad tree partitioning and binary tree partitioning may not be performed on a CU corresponding to a node of the ternary tree.
[0326] A CU that cannot be further split by quad-tree splitting, binary tree splitting, and / or ternary tree splitting can become a unit of encoding, prediction, and / or transformation. That is, a CU may not be further split for prediction and / or transformation. Accordingly, a split structure and split information for splitting a CU into prediction units and / or transformation units may not exist in the bitstream.
[0327] However, if the size of the CU that is the unit of division is larger than the size of the largest transform block, the CU can be recursively divided until the size of the CU becomes smaller than or equal to the size of the largest transform block. For example, if the size of the CU is 64x64 and the size of the largest transform block is 32x32, the CU can be divided into four 32x32 blocks for transformation. For example, if the size of the CU is 32x64 and the size of the largest transform block is 32x32, the CU can be divided into two 32x32 blocks for transformation.
[0328] In such cases, information about whether a CU is split for transformation may not be separately signaled. Without signaling, whether a CU is split may be determined by comparing the horizontal size (and / or vertical size) of the CU with the horizontal size (and / or vertical size) of the largest transform block. For example, if the horizontal size of the CU is greater than the horizontal size of the largest transform block, the CU may be split into two vertically. Additionally, if the vertical size of the CU is greater than the vertical size of the largest transform block, the CU may be split into two horizontally.
[0329] Information about the maximum size and / or minimum size of a CU, and information about the maximum size and / or minimum size of a transform block can be signaled or determined at a higher level for the CU. For example, the higher level can be a sequence level, a picture level, a tile level, a tile group level, a slice level, etc. For example, the minimum size of a CU can be determined as 4x4. For example, the maximum size of a transform block can be determined as 64x64. For example, the minimum size of a transform block can be determined as 4x4.
[0330] Information about the minimum size of a CU corresponding to a leaf node of a quad tree (i.e., quad tree minimum size) and / or information about the maximum depth of a path from a root node to a leaf node of a multi-type tree (i.e., multi-type tree maximum depth) can be signaled or determined at a higher level for the CU. For example, the higher level can be a sequence level, a picture level, a slice level, a tile group level, a tile level, etc. Information about the quad tree minimum size and / or information about the multi-type tree maximum depth can be signaled or determined separately for each of an intra slice and an inter slice.
[0331] The differential information about the size of a CTU and the maximum size of a transform block can be signaled or determined at a higher level for the CU. For example, the higher level can be a sequence level, a picture level, a slice level, a tile group level, and a tile level. Information about the maximum size of a CU corresponding to each node of a binary tree (i.e., the maximum size of a binary tree) can be determined based on the size and differential information of the CTU. The maximum size of a CU corresponding to each node of a ternary tree (i.e., the maximum size of a ternary tree) can have different values depending on the type of the slice. For example, within an intra slice, the maximum size of a ternary tree can be 32x32. Also, for example, within an inter slice, the maximum size of a ternary tree can be 128x128. For example, the minimum size of a CU corresponding to each node of a binary tree (i.e., the minimum size of a binary tree) and / or the minimum size of a CU corresponding to each node of a ternary tree (i.e., the minimum size of a ternary tree) can be set to the minimum size of the CU.
[0332] As another example, the binary tree maximum size and / or the ternary tree maximum size may be signaled or determined at the slice level. Additionally, the binary tree minimum size and / or the ternary tree minimum size may be signaled or determined at the slice level.
[0333] Based on the various block sizes and depths described above, quad partitioning information, information indicating whether a multi-type tree is partitioned, partitioning tree information, and / or partitioning direction information may or may not be present in the bitstream.
[0334] For example, if the size of the CU is not larger than the quad tree minimum size, the CU may not contain quad partition information, and the quad partition information for the CU may be inferred as the second value.
[0335] For example, if the size (width and height) of a CU corresponding to a node of a multi-type tree is greater than the maximum size (width and height) of a binary tree and / or the maximum size (width and height) of a ternary tree, the CU may not be split into a binary tree and / or a ternary tree. Depending on this decision method, information indicating whether a multi-type tree is split may not be signaled and may be inferred as a second value.
[0336] Alternatively, if the size (width and height) of the CU corresponding to the node of the multi-type tree is equal to the minimum size (width and height) of the binary tree, or the size (width and height) of the CU is equal to twice the minimum size (width and height) of the ternary tree, the CU may not be split into a binary tree form and / or a ternary tree form. Depending on this decision method, the information indicating whether the multi-type tree is split may not be signaled and may be inferred as a second value. This is because splitting the CU into a binary tree form and / or a ternary tree form generates a CU smaller than the minimum size of the binary tree and / or the minimum size of the ternary tree.
[0337] Alternatively, the binary tree split or ternary tree split may be limited based on the size of the virtual pipeline data unit (i.e., the pipeline buffer size). For example, if the binary tree split or ternary tree split would split the CU into sub-CUs that do not fit within the pipeline buffer size, the binary tree split or ternary tree split may be limited. The pipeline buffer size may be equal to the size of the largest transform block (e.g., 64X64).
[0338] For example, when the pipeline buffer size is 64X64, the following partitions may be limited.
[0339] - Ternary tree partitioning for NxM (N and / or M are 128) CUs
[0340] - Horizontal binary tree partitioning for 128xN (N <= 64) CUs
[0341] - Vertical binary tree partitioning for Nx128 (N <= 64) CUs
[0342] Alternatively, if the depth of the multi-type tree of the CU corresponding to the node of the multi-type tree is equal to the maximum depth of the multi-type tree, the CU may not be split into a binary tree and / or a ternary tree. Depending on this decision method, information indicating whether the multi-type tree is split may not be signaled and may be inferred as a second value.
[0343] Alternatively, for a CU corresponding to a node of a multi-type tree, information indicating whether the multi-type tree is split may be signaled only if at least one of a vertical binary tree split, a horizontal binary tree split, a vertical ternary tree split, and a horizontal ternary tree split is possible. Otherwise, the CU may not be split into a binary tree form and / or a ternary tree form. Depending on this decision method, information indicating whether the multi-type tree is split may not be signaled and may be inferred as a second value.
[0344] Alternatively, the split direction information may be signaled only if both vertical binary tree splitting and horizontal binary tree splitting are possible for the CU corresponding to the node of the multi-type tree, or if both vertical ternary tree splitting and horizontal ternary tree splitting are possible. Otherwise, the split direction information may not be signaled and may be inferred as a value indicating the direction in which the CU can be split.
[0345] Alternatively, the split tree information may be signaled only if both vertical binary tree splitting and vertical ternary tree splitting are possible for the CU corresponding to a node of the multi-type tree, or if both horizontal binary tree splitting and horizontal ternary tree splitting are possible. Otherwise, the split tree information may not be signaled and may be inferred as a value indicating a tree applicable to the split of the CU.
[0346]
[0347] Figure 4 is a diagram illustrating the form of a prediction unit that a coding unit can include.
[0348] Among the CUs split from the LCU, a CU that is no longer split can be split into one or more prediction units (PUs).
[0349] A PU can be the basic unit for prediction. A PU can be encoded and decoded in any of skip mode, inter mode, and intra mode. A PU can be segmented into various forms depending on each mode. For example, the target block described above with reference to FIG. 1 and the target block described above with reference to FIG. 2 can be PUs.
[0350] A CU may not be partitioned into PUs. If a CU is not partitioned into PUs, the size of the CU and the size of the PUs may be the same.
[0351] In skip mode, there may be no partitioning within a CU. In skip mode, a 2Nx2N mode (410) in which the sizes of PUs and CUs are the same without partitioning may be supported.
[0352] In inter mode, eight types of partitioned shapes can be supported within the CU. For example, in inter mode, 2Nx2N mode (410), 2NxN mode (415), Nx2N mode (420), NxN mode (425), 2NxnU mode (430), 2NxnD mode (435), nLx2N mode (440), and nRx2N mode (445) can be supported.
[0353] In intra mode, 2Nx2N mode (410) and NxN mode (425) can be supported.
[0354] In the 2Nx2N mode (410), a PU of size 2Nx2N can be encoded. A PU of size 2Nx2N can mean a PU of the same size as the size of a CU. For example, a PU of size 2Nx2N can have a size of 64x64, 32x32, 16x16, or 8x8.
[0355] In NxN mode (425), a PU of size NxN can be encoded.
[0356] For example, in intra prediction, when the size of the PU is 8x8, four split PUs can be encoded. The size of the split PUs can be 4x4.
[0357] When a PU is encoded using an intra mode, the PU may be encoded using one of a plurality of intra prediction modes. For example, High Efficiency Video Coding (HEVC) technology may provide 35 intra prediction modes, and the PU may be encoded using one of the 35 intra prediction modes.
[0358] Whether a PU will be encoded in 2Nx2N mode (410) or NxN mode (425) can be determined by the rate-distortion cost.
[0359] The encoding device (100) can perform an encoding operation on a PU having a size of 2Nx2N. Here, the encoding operation may be encoding the PU in each of a plurality of intra prediction modes that the encoding device (100) can use. Through the encoding operation, an optimal intra prediction mode for the PU having a size of 2Nx2N can be derived. The optimal intra prediction mode may be an intra prediction mode that generates the minimum rate-distortion cost for encoding a PU having a size of 2Nx2N among a plurality of intra prediction modes that the encoding device (100) can use.
[0360] In addition, the encoding device (100) can sequentially perform an encoding operation on each PU of the PUs divided into NxN. Here, the encoding operation may be encoding the PU in each of a plurality of intra prediction modes that the encoding device (100) can use. Through the encoding operation, an optimal intra prediction mode for a PU of size NxN can be derived. The optimal intra prediction mode may be an intra prediction mode that generates the minimum rate-distortion cost for encoding a PU of size NxN among a plurality of intra prediction modes that the encoding device (100) can use.
[0361] The encoding device (100) can determine which of the PUs of size 2Nx2N and the PUs of size NxN to encode based on a comparison of the rate-distortion cost of the PUs of size 2Nx2N and the rate-distortion costs of the PUs of size NxN.
[0362] A CU can be divided into one or more PUs, and a PU can also be divided into multiple PUs.
[0363] For example, when one PU is split into four PUs, the width and height of each PU of the four PUs generated by the split may be half the width and half the height of the PU before the split, respectively. When a PU of size 32x32 is split into four PUs, the sizes of the four split PUs may be 16x16. When one PU is split into four PUs, it can be said that the PU is split into a quad-tree shape.
[0364] For example, when one PU is split into two PUs, the horizontal size or vertical size of each PU of the two PUs created by the split may be half the horizontal size or half the vertical size of the PU before the split, respectively. When a PU of size 32x32 is split vertically into two PUs, the sizes of the two split PUs may be 16x32. When a PU of size 32x32 is split horizontally into two PUs, the sizes of the two split PUs may be 32x16. When one PU is split into two PUs, it can be said that the PU is split in a binary-tree form.
[0365]
[0366] Figure 5 is a diagram illustrating the form of a transformation unit that can be included in a coding unit.
[0367] A transform unit (TU) may be a basic unit used for the processes of transformation, quantization, inverse transformation, inverse quantization, entropy encoding, and entropy decoding within a CU.
[0368] A TU may have a square or rectangular shape. The shape of a TU may be determined based on the size and / or shape of a CU.
[0369] Among the CUs split from an LCU, a CU that is no longer split into CUs may be split into one or more TUs. In this case, the TU split structure may be a quad-tree structure. For example, as illustrated in FIG. 5, a single CU (510) may be split one or more times according to a quad-tree structure. Through splitting, a single CU (510) may be composed of TUs of various sizes.
[0370] When a CU is split more than once, the CU can be considered to be split recursively. Through splitting, a CU can be composed of TUs of various sizes.
[0371] Alternatively, a CU may be divided into one or more TUs based on the number of vertical and / or horizontal lines that divide the CU.
[0372] A CU can be divided into symmetric TUs or asymmetric TUs. For division into asymmetric TUs, information about the size and / or shape of the TU can be signaled from the encoding device (100) to the decoding device (200). Alternatively, the size and / or shape of the TU can be derived from information about the size and / or shape of the CU.
[0373] A CU may not be split into TUs. If a CU is not split into TUs, the size of the CU and the size of the TU may be the same.
[0374] A CU can be divided into one or more TUs, and a TU can also be divided into multiple TUs.
[0375] For example, when a TU is split into four TUs, the width and height of each TU of the four TUs generated by the split may be half the width and half the height of the TU before the split, respectively. When a TU of size 32x32 is split into four TUs, the sizes of the four split TUs may be 16x16. When a TU is split into four TUs, it can be said that the TU is split into a quad-tree shape.
[0376] For example, when a TU is split into two TUs, the width or height of each TU of the two TUs generated by the split may be half the width or half the height of the TU before the split, respectively. When a TU of size 32x32 is split vertically into two TUs, the sizes of the two split TUs may be 16x32. When a TU of size 32x32 is split horizontally into two TUs, the sizes of the two split TUs may be 32x16. When a TU is split into two TUs, it can be said that the TU is split in a binary-tree form.
[0377] The CU may be partitioned in other ways than those shown in Figure 5.
[0378] For example, one CU can be split into three CUs. The horizontal or vertical sizes of the three split CUs can be 1 / 4, 1 / 2, and 1 / 4 of the horizontal or vertical size of the CU before splitting, respectively.
[0379] For example, if a CU of size 32x32 is vertically divided into three CUs, the sizes of the three divided CUs may be 8x32, 16x32, and 8x32, respectively. In this way, if one CU is divided into three CUs, the CU can be viewed as being divided in the form of a ternary tree.
[0380] Any of the partitioning methods in the form of a quad tree, a binary tree, or a ternary tree can be applied to partition a CU, and multiple partitioning methods can also be combined and used to partition a CU. In this case, when multiple partitioning methods are combined and used, it can be referred to as partitioning in the form of a composite tree.
[0381]
[0382] Figure 6 illustrates the division of blocks according to an example.
[0383] During the process of encoding and / or decoding an image, a target block may be divided as shown in Fig. 6. For example, the target block may be a CU.
[0384] For segmentation of a target block, an indicator indicating segmentation information may be signaled from an encoding device (100) to a decoding device (200). The segmentation information may be information indicating how the target block is segmented.
[0385] The split information may be one or more of a split flag (hereinafter referred to as “split_flag”), a quad-binary flag (hereinafter referred to as “QB_flag”), a quad tree flag (hereinafter referred to as “quadtree_flag”), a binary tree flag (hereinafter referred to as “binarytree_flag”), and a binary type flag (hereinafter referred to as “Btype_flag”).
[0386] split_flag can be a flag indicating whether a block is split. For example, a split_flag value of 1 can indicate that the block is split. A split_flag value of 0 can indicate that the block is not split.
[0387] QB_flag may be a flag indicating whether the block is partitioned into a quad tree or a binary tree. For example, a value of 0 for QB_flag may indicate that the block is partitioned into a quad tree. A value of 1 for QB_flag may indicate that the block is partitioned into a binary tree. Alternatively, a value of 0 for QB_flag may indicate that the block is partitioned into a binary tree. A value of 1 for QB_flag may indicate that the block is partitioned into a quad tree.
[0388] quadtree_flag can be a flag indicating whether the block is partitioned into a quadtree shape. For example, a value of 1 for quadtree_flag can indicate that the block is partitioned into a quadtree shape. A value of 0 for quadtree_flag can indicate that the block is not partitioned into a quadtree shape.
[0389] binarytree_flag can be a flag indicating whether the block is partitioned into a binary tree. For example, a value of 1 for binarytree_flag can indicate that the block is partitioned into a binary tree. A value of 0 for binarytree_flag can indicate that the block is not partitioned into a binary tree.
[0390] Btype_flag can be a flag indicating whether the block is partitioned vertically or horizontally when partitioned in the form of a binary tree. For example, a value of 0 for Btype_flag can indicate that the block is partitioned horizontally. A value of 1 for Btype_flag can indicate that the block is partitioned vertically. Alternatively, a value of 0 for Btype_flag can indicate that the block is partitioned vertically. A value of 1 for Btype_flag can indicate that the block is partitioned horizontally.
[0391] For example, the partitioning information for the block in FIG. 6 can be derived by signaling at least one of quadtree_flag, binarytree_flag, and Btype_flag as shown in Table 1 below.
[0392] quadtree_flagbinarytree_flagBtype_flag1011001010000000000101100000
[0393] For example, the split information for the block in FIG. 6 can be derived by signaling at least one of split_flag, QB_flag, and Btype_flag as shown in Table 2 below.
[0394] split_flagQB_flagBtype_flag10111001011000000110110000
[0395] The splitting method may be limited to a quad tree or a binary tree, depending on the size and / or shape of the block. If such a limitation applies, split_flag may be a flag indicating whether to split in a quad tree shape or a flag indicating whether to split in a binary tree shape. The size and shape of the block may be derived based on the depth information of the block, and the depth information may be signaled from the encoding device (100) to the decoding device (200).
[0396] If the block size falls within a specified range, only quad-tree-type partitioning may be possible. For example, the specified range may be defined by at least one of the maximum block size and the minimum block size, for which only quad-tree-type partitioning is possible.
[0397] Information indicating the maximum block size and / or minimum block size that can only be split in the form of a quat tree can be signaled from the encoding device (100) to the decoding device (200) via a bitstream. In addition, such information can be signaled for at least one unit among a video, a sequence, a picture, a parameter, a tile group, and a slice (or segment).
[0398] Alternatively, the maximum block size and / or minimum block size may be fixed sizes predefined in the encoding device (100) and the decoding device (200). For example, if the block size is greater than or equal to 64x64 and less than or equal to 256x256, only quad-tree-type splitting may be possible. In this case, split_flag may be a flag indicating whether to split in quad-tree form.
[0399] If the block size is larger than the maximum transform block size, only a quad-tree-type split may be possible. In this case, the split block may be at least one of a CU and a TU.
[0400] In this case, split_flag can be a flag indicating whether to split into a quad tree form.
[0401] If the block size falls within a specified range, only binary tree-type or ternary tree-type partitioning may be possible. Here, for example, the specified range may be defined by at least one of a maximum block size and a minimum block size within which only binary tree-type or ternary tree-type partitioning is possible.
[0402] Information indicating the maximum block size and / or minimum block size that can only be divided into binary tree-type or ternary tree-type divisions can be signaled from the encoding device (100) to the decoding device (200) via a bitstream. In addition, such information can be signaled for at least one unit among a sequence, a picture, and a slice (or a segment).
[0403] Alternatively, the maximum block size and / or minimum block size may be fixed sizes predefined in the encoding device (100) and the decoding device (200). For example, if the block size is greater than or equal to 8x8 and less than or equal to 16x16, only binary tree-type splitting may be possible. In this case, split_flag may be a flag indicating whether to split in binary tree form or ternary tree form.
[0404] The description of partitioning in the quad tree form described above can be equally applied to partitioning in the binary tree form and / or ternary tree form.
[0405] The division of a block may be restricted by previous divisions. For example, if a block is divided into a specific binary tree shape, generating multiple divided blocks, each divided block can only be further divided into a specific tree shape. Here, the specific tree shape may be at least one of a binary tree shape, a ternary tree shape, and a quad tree shape.
[0406] The above-mentioned indicator may not be signaled if the width or height of the split block is such that it cannot be split any further.
[0407]
[0408] Figure 7 is a diagram for explaining an embodiment of an intra prediction process.
[0409] The arrows extending from the center to the periphery of the graph in Fig. 7 may represent the prediction directions of directional intra prediction modes. Additionally, the numbers displayed close to the arrows may represent examples of mode values assigned to intra prediction modes or prediction directions of intra prediction modes.
[0410] In Fig. 7, the number 0 may represent the Planar mode, which is a non-directional intra prediction mode. The number 1 may represent the DC mode, which is a non-directional intra prediction mode.
[0411] Intra encoding and / or decoding may be performed using reference samples of neighboring blocks of the target block. The neighboring blocks may be reconstructed neighboring blocks. The reference samples may refer to neighboring samples.
[0412] For example, intra encoding and / or decoding can be performed using values or coding parameters of reference samples contained in reconstructed neighboring blocks.
[0413] The encoding device (100) and / or the decoding device (200) can generate a prediction block by performing intra prediction on a target block based on information of a sample in a target image. When performing intra prediction, the encoding device (100) and / or the decoding device (200) can generate a prediction block on the target block by performing intra prediction based on information of a sample in the target image. When performing intra prediction, the encoding device (100) and / or the decoding device (200) can perform directional prediction and / or non-directional prediction based on at least one reconstructed reference sample.
[0414] A prediction block may refer to a block generated as a result of performing intra prediction. A prediction block may correspond to at least one of a CU, PU, and TU.
[0415] A unit of a prediction block can be at least one of the sizes of CU, PU, and TU. A prediction block can have a square shape with a size of 2Nx2N or a size of NxN. The size of NxN can include 4x4, 8x8, 16x16, 32x32, and 64x64, etc.
[0416] Alternatively, the prediction block may be a square block having a size such as 2x2, 4x4, 8x8, 16x16, 32x32 or 64x64, or a rectangular block having a size such as 2x8, 4x8, 2x16, 4x16 and 8x16.
[0417] Intra prediction can be performed based on the intra prediction mode for the target block. The number of intra prediction modes that the target block can have can be a predefined fixed value, or can be determined differently depending on the properties of the prediction block. For example, the properties of the prediction block can include the size of the prediction block and the type of the prediction block. Additionally, the properties of the prediction block can indicate coding parameters for the prediction block.
[0418] For example, the number of intra prediction modes can be fixed to N regardless of the size of the prediction block. Alternatively, for example, the number of intra prediction modes can be 3, 5, 9, 17, 34, 35, 36, 65, 67, or 95.
[0419] The intra prediction mode can be non-directional or directional.
[0420] For example, the intra prediction mode may include two non-directional modes and 65 directional modes, corresponding to numbers 0 to 66 shown in FIG. 7.
[0421] For example, when a specific intra prediction method is used, the intra prediction mode may include two non-directional modes and 93 directional modes, corresponding to numbers -14 to 80 shown in FIG. 7.
[0422] The two non-directional modes may include DC mode and Planar mode.
[0423] A directional mode can be a prediction mode with a specific direction or a specific angle. A directional mode may also be referred to as an argular mode.
[0424] An intra prediction mode can be expressed by at least one of a mode number, a mode value, a mode angle, and a mode direction. That is, the terms "(mode) number of an intra prediction mode," "(mode) value of an intra prediction mode," "(mode) angle of an intra prediction mode," and "(mode) direction of an intra prediction mode" can be used with the same meaning and can be used interchangeably.
[0425] The number of intra prediction modes can be M. M can be greater than or equal to 1. That is, the intra prediction modes can be M, including the number of non-directional modes and the number of directional modes.
[0426] The number of intra prediction modes can be fixed to M regardless of the block size and / or color components. For example, the number of intra prediction modes can be fixed to either 35 or 67, regardless of the block size.
[0427] Alternatively, the number of intra prediction modes may vary depending on the shape, size and / or type of color components of the block.
[0428] For example, in Fig. 7, the directional prediction modes shown by the dotted lines can only be applied to predictions for non-square blocks.
[0429] For example, as the block size increases, the number of intra prediction modes may increase. Alternatively, as the block size increases, the number of intra prediction modes may decrease. When the block size is 4x4 or 8x8, the number of intra prediction modes may be 67. When the block size is 16x16, the number of intra prediction modes may be 35. When the block size is 32x32, the number of intra prediction modes may be 19. When the block size is 64x64, the number of intra prediction modes may be 7.
[0430] For example, the number of intra prediction modes may differ depending on whether the color component is a luma signal or a chroma signal. Alternatively, the number of intra prediction modes of a luma component block may be greater than the number of intra prediction modes of a chroma component block.
[0431] For example, in the vertical mode with a mode value of 50, prediction can be performed in the vertical direction based on the pixel values of the reference sample. For example, in the horizontal mode with a mode value of 18, prediction can be performed in the horizontal direction based on the pixel values of the reference sample.
[0432] Even in a directional mode other than the aforementioned mode, the encoding device (100) and the decoding device (200) can perform intra prediction for the target unit using a reference sample according to an angle corresponding to the directional mode.
[0433] An intra prediction mode located to the right of a vertical mode may be named a vertical-right mode. An intra prediction mode located below a horizontal mode may be named a horizontal-below mode. For example, in FIG. 7, intra prediction modes whose mode values are one of 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, and 66 may be vertical-right modes. Intra prediction modes whose mode values are one of 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, and 17 may be horizontal-below modes.
[0434] Non-directional modes may include direct current (DC) mode and planar mode. For example, the mode value of direct current (DC) mode may be 1. The mode value of planar mode may be 0.
[0435] The directional mode may include an angular mode. Among the multiple intra prediction modes, any mode other than the DC mode and the planar mode may be a directional mode.
[0436] When the intra prediction mode is DC mode, a prediction block may be generated based on an average of pixel values of multiple reference samples. For example, a pixel value of a prediction block may be determined based on an average of pixel values of multiple reference samples.
[0437] The number of intra prediction modes and the mode values of each intra prediction mode described above may be merely exemplary. The number of intra prediction modes and the mode values of each intra prediction mode described above may be defined differently depending on the embodiment, implementation, and / or needs.
[0438] A step of checking whether samples included in a reconstructed neighboring block can be used as reference samples of the target block to perform intra prediction on the target block may be performed. If there is a sample among the samples of the neighboring block that cannot be used as a reference sample of the target block, a value generated by copying and / or interpolating using a sample value of at least one of the samples included in the reconstructed neighboring block may be replaced with the sample value of the sample that cannot be used as a reference sample. If the value generated by copying and / or interpolating is replaced with the sample value of the sample, the sample can be used as a reference sample of the target block.
[0439] When intra prediction is used, a filter may be applied to at least one of the reference sample or the prediction sample based on at least one of the intra prediction mode and the size of the target block.
[0440] The type of filter applied to at least one of the reference sample or the predicted sample may vary depending on at least one of the intra prediction mode of the target block, the size of the target block, and the shape of the target block. The type of filter may be classified according to one or more of the length of the filter tap, the value of the filter coefficient, and the filter strength. The length of the filter tap may refer to the number of filter taps. In addition, the number of filter taps may refer to the length of the filter.
[0441] When the intra prediction mode is the planar mode, when generating a prediction block of a target block, a sample value of a prediction target sample can be generated using a weighted sum of an upper reference sample of the target sample, a left reference sample of the target sample, an upper-right reference sample of the target block, and a lower-left reference sample of the target block, depending on the position of the prediction target sample within the prediction block.
[0442] When the intra prediction mode is DC mode, the average value of the upper reference samples and the left reference samples of the target block may be used to generate a prediction block of the target block. In addition, filtering using the values of the reference samples may be performed for specific rows or specific columns within the target block. The specific rows may be one or more upper rows adjacent to the reference sample. The specific columns may be one or more left columns adjacent to the reference sample.
[0443] 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.
[0444] Real-valued interpolation may also be performed to generate the aforementioned prediction samples.
[0445] The intra prediction mode of the target block can be predicted from the intra prediction mode of the neighboring block of the target block, and the information used for prediction can be entropy encoded / decoded.
[0446] For example, if the intra prediction modes of the target block and the neighboring blocks are the same, a predefined flag can be used to signal that the intra prediction modes of the target block and the neighboring blocks are the same.
[0447] 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.
[0448] If the intra prediction modes of the target block and the neighboring blocks are different, information of the intra prediction mode of the target block can be encoded and / or decoded using entropy encoding and / or decoding.
[0449]
[0450] Figure 8 is a diagram for explaining reference samples used in the intra prediction process.
[0451] The reconstructed reference samples used for intra prediction of the target block may include below-left reference samples, left reference samples, above-left corner reference samples, above reference samples, and above-right reference samples.
[0452] For example, left reference samples may refer to reconstructed reference pixels adjacent to the left side of the target block. Top reference samples may refer to reconstructed reference pixels adjacent to the top side of the target block. Top left corner reference samples may refer to reconstructed reference pixels located at the top left corner of the target block. In addition, bottom left reference samples may refer to reference samples located at the bottom of the left sample line among samples located on the same line as the left sample line composed of the left reference samples. Top right reference samples may refer to reference samples located at the right side of the top pixel line among samples located on the same line as the top sample line composed of the top reference samples.
[0453] When the size of the target block is NxN, the number of lower left reference samples, left reference samples, upper reference samples, and upper right reference samples can each be N.
[0454] A prediction block can be generated through intra prediction for a target block. Generating the prediction block may include determining the values of pixels in the prediction block. The target block and the prediction block may be of the same size.
[0455] Reference samples used for intra prediction of a target block may vary depending on the intra prediction mode of the target block. The direction of the intra prediction mode may indicate a dependency relationship between reference samples and pixels of the prediction block. For example, the value of a specified reference sample may be used as the value of one or more specified pixels of the prediction block. In this case, the specified reference sample and the one or more specified pixels of the prediction block may be samples and pixels specified in a straight line in the direction of the intra prediction mode. In other words, the value of the specified reference sample may be copied as the value of a pixel located in the reverse direction of the direction of the intra prediction mode. Alternatively, the value of a pixel of the prediction block may be the value of a reference sample located in the direction of the intra prediction mode based on the position of the pixel.
[0456] For example, if the intra prediction mode of the target block is vertical mode, the upper reference samples can be used for intra prediction. If the intra prediction mode is vertical mode, the value of a pixel of the prediction block may be the value of a reference sample located vertically above the position of the pixel. Therefore, the upper reference samples adjacent to the upper part of the target block can be used for intra prediction. In addition, the values of pixels in one row of the prediction block may be identical to the values of the upper reference samples.
[0457] For example, if the intra prediction mode of the target block is horizontal mode, the left reference samples can be used for intra prediction. If the intra prediction mode is horizontal mode, the value of a pixel of the prediction block may be the value of a reference sample located horizontally to the left of the pixel. Therefore, the left reference samples adjacent to the left of the target block can be used for intra prediction. In addition, the values of pixels in one column of the prediction block may be identical to the values of the left reference samples.
[0458] For example, if the mode value of the intra prediction mode of the target block is 34, at least a portion of the left reference samples, the upper left corner reference samples, and at least a portion of the upper reference samples may be used for intra prediction. If the mode value of the intra prediction mode is 34, the value of a pixel of the prediction block may be the value of a reference sample located diagonally to the upper left with respect to the pixel.
[0459] Additionally, when an intra prediction mode is used where the mode value is one of 52 to 66, at least some of the upper right reference samples may be used for intra prediction.
[0460] Additionally, when an intra prediction mode is used where the mode value is one of 2 to 17, at least some of the lower left reference samples may be used for intra prediction.
[0461] Additionally, when an intra prediction mode is used where the mode value is one of 19 to 49, the upper left corner reference sample can be used for intra prediction.
[0462] The number of reference samples used to determine the pixel value of one pixel of a prediction block may be one or more.
[0463] As described above, the pixel value of a pixel of a prediction block can be determined based on the position of the reference sample indicated by the position of the pixel and the direction of the intra prediction mode. If the position of the reference sample indicated by the position of the pixel and the direction of the intra prediction mode is an integer position, the value of one reference sample indicated by the integer position can be used to determine the pixel value of the pixel of the prediction block.
[0464] When the position of the reference sample pointed to by the position of the pixel and the direction of the intra prediction mode is not an integer position, an interpolated reference sample can be generated based on two reference samples closest to the position of the reference sample. The value of the interpolated reference sample can be used to determine the pixel value of the pixel of the prediction block. That is to say, when the position of the reference sample pointed to by the position of the pixel of the prediction block and the direction of the intra prediction mode represents a space between two reference samples, an interpolated value can be generated based on the values of the two samples.
[0465] The predicted block generated by prediction may not be identical to the original target block. In other words, there may be a prediction error, which is the difference between the target block and the predicted block, and there may also be a prediction error between the pixels of the target block and the pixels of the predicted block.
[0466] Hereinafter, the terms "difference", "error" and "residual" may be used interchangeably and with the same meaning.
[0467] For example, in directional intra prediction, a greater distance between pixels in a predicted block and reference samples can result in a larger prediction error. This prediction error can lead to discontinuities between the predicted block and neighboring blocks.
[0468] Filtering can be used on predicted blocks to reduce prediction errors. Filtering can adaptively apply filters to regions within a predicted block that are considered to have high prediction errors. For example, the regions considered to have high prediction errors may be the boundaries of the predicted blocks. Furthermore, depending on the intra-prediction mode, the regions considered to have high prediction errors within a predicted block may vary, and the characteristics of the filters may vary.
[0469] As illustrated in FIG. 8, for intra prediction of a target block, at least one of reference lines 0 to 3 may be used.
[0470] Each reference line in FIG. 8 may represent a reference sample line including one or more reference samples. A smaller reference line number may indicate a line of reference samples closer to the target block.
[0471] Instead of being obtained from reconstructed neighboring blocks, samples of segment A and segment F can be obtained through padding using the nearest samples of segment B and segment E, respectively.
[0472] Index information indicating a reference sample line to be used for intra prediction of a target block may be signaled. The index information may indicate a reference sample line among a plurality of reference sample lines used for intra prediction of the target block. For example, the index information may have a value of one of 0 to 3.
[0473] If the upper boundary of the target block is the boundary of the CTU, only reference sample line 0 may be available. Therefore, in this case, index information may not be signaled. If a reference sample line other than reference sample line 0 is used, filtering for the prediction block described below may not be performed.
[0474] In the case of inter-color intra prediction, a prediction block for a target block of a second color component can be generated based on a corresponding reconstructed block of a first color component.
[0475] For example, the first color component may be a luma component, and the second color component may be a chroma component.
[0476] For intra prediction between color components, parameters of a linear model between the first color component and the second color component can be derived based on a template.
[0477] The template may include a top reference sample and / or a left reference sample of the target block, and may include a top reference sample and / or a left reference sample of the reconstructed block of the first color component corresponding to these reference samples.
[0478] For example, the parameters of the linear model can be derived using 1) the value of the sample of the first color component having the maximum value among the samples in the template, 2) the value of the sample of the second color component corresponding to the sample of the first color component, 3) the value of the sample of the first color component having the minimum value among the samples in the template, and 4) the value of the sample of the second color component corresponding to the sample of the first color component.
[0479] Once the parameters of the linear model are derived, a prediction block for the target block can be generated by applying the corresponding reconstructed block to the linear model.
[0480] Depending on the image format, subsampling may be performed on the surrounding samples of the reconstructed block of the first color component and the corresponding reconstructed block. For example, if one sample of the second color component corresponds to four samples of the first color component, one corresponding sample may be calculated by subsampling the four samples of the first color component. When subsampling is performed, derivation of the parameters of the linear model and intra prediction between the color components may be performed based on the subsampled corresponding samples.
[0481] Whether intra prediction is performed between color components and / or the range of templates can be signaled as an intra prediction mode.
[0482] The target block can be divided into two or four sub-blocks in the horizontal and / or vertical directions.
[0483] The split sub-blocks can be sequentially reconstructed. That is, as intra prediction is performed on a sub-block, a sub-prediction block for the sub-block can be generated. Furthermore, as inverse quantization and / or inverse transformation are performed on the sub-block, a sub-residual block for the sub-block can be generated. A reconstructed sub-block can be generated by adding the sub-prediction block to the sub-residual block. The reconstructed sub-block can be used as a reference sample for intra prediction of a subsequent sub-block.
[0484] A sub-block may be a block containing more than a specified number of samples (e.g., 16). Therefore, for example, if the target block is an 8x4 block or a 4x8 block, the target block may be divided into two sub-blocks. Furthermore, if the target block is a 4x4 block, the target block cannot be divided into sub-blocks. If the target block has any other size, the target block may be divided into four sub-blocks.
[0485] Information regarding whether intra prediction is performed based on these sub-blocks and / or the segmentation direction (horizontal or vertical) may be signaled.
[0486] Such sub-block-based intra prediction may be restricted to be performed only when using reference sample line 0. When sub-block-based intra prediction is performed, filtering on the prediction block described below may not be performed.
[0487] A final prediction block can be generated by performing filtering on the prediction block generated by intra prediction.
[0488] Filtering can be performed by applying specific weights to the filtering target sample, the left reference sample, the top reference sample, and / or the top left reference sample.
[0489] The weights and / or reference samples (or the range of the reference samples or the location of the reference samples, etc.) used for filtering may be determined based on at least one of the block size, the intra prediction mode, and the location of the filtering target sample within the prediction block.
[0490] For example, filtering may be performed only for specific intra prediction modes (e.g., DC mode, planar mode, vertical mode, horizontal mode, diagonal mode, and / or adjacent diagonal mode).
[0491] An adjacent diagonal mode can be a mode whose number is the number of the diagonal mode plus k, or a mode whose number is the number of the diagonal mode minus k. In other words, the number of the adjacent diagonal mode can be the sum of the number of the diagonal mode plus k, or the difference between the number of the diagonal mode plus k. For example, k can be a positive integer less than or equal to 8.
[0492] The intra prediction mode of the target block can be derived using the intra prediction modes of neighboring blocks existing around the target block, and the derived intra prediction mode can be entropy encoded and / or entropy decoded.
[0493] For example, if the intra prediction mode of the target block and the intra prediction mode of the neighboring block are the same, information that the intra prediction mode of the target block and the intra prediction mode of the neighboring block are the same can be signaled using specified flag information.
[0494] Additionally, for example, indicator information for a neighboring block having an intra prediction mode identical to the intra prediction mode of the target block among intra prediction modes of a plurality of neighboring blocks can be signaled.
[0495] For example, if the intra prediction mode of the target block and the intra prediction mode of the neighboring block are different from each other, entropy encoding and / or entropy decoding of information about the intra prediction mode of the target block can be performed by performing entropy encoding and / or entropy decoding based on the intra prediction mode of the neighboring block.
[0496]
[0497] Figure 9 is a diagram for explaining an embodiment of an inter prediction process.
[0498] The rectangles illustrated in FIG. 9 may represent images (or pictures). Furthermore, arrows in FIG. 9 may represent prediction directions. An arrow from a first picture to a second picture may indicate that the second picture references the first picture. That is, images may be encoded and / or decoded according to the prediction direction.
[0499] Each picture can be classified into an I picture (Intra Picture), a P picture (Uni-prediction Picture), and a B picture (Bi-prediction Picture) according to its encoding type. Each picture can be encoded and / or decoded according to its encoding type.
[0500] When the target image to be encoded is an I-picture, the target image can be encoded using data within the image itself without inter-prediction that refers to other images. For example, an I-picture can be encoded only with intra-prediction.
[0501] If the target image is a P picture, the target image can be encoded through inter prediction using only reference pictures existing in one direction. Here, the one direction can be forward or backward.
[0502] When the target image is a B picture, the target image can be encoded through inter prediction using reference pictures existing in both directions or inter prediction using reference pictures existing in one of the forward and backward directions. Here, the bidirectional directions can be forward and backward.
[0503] P pictures and B pictures that are encoded and / or decoded using reference pictures can be considered as images in which inter prediction is used.
[0504] Below, inter prediction in inter mode according to an embodiment is specifically described.
[0505] Inter prediction or motion compensation can be performed using reference images and motion information.
[0506] In inter mode, the encoding device (100) can perform inter prediction and / or motion compensation on the target block. The decoding device (200) can perform inter prediction and / or motion compensation corresponding to the inter prediction and / or motion compensation in the encoding device (100) on the target block.
[0507] Motion information for a target block can be derived during inter prediction by each of the encoding device (100) and the decoding device (200). The motion information can be derived using motion information of a reconstructed neighboring block, motion information of a call block, and / or motion information of a block adjacent to a call block.
[0508] For example, the encoding device (100) or the decoding device (200) can perform prediction and / or motion compensation by using motion information of a spatial candidate and / or a temporal candidate as motion information of a target block. The target block may mean a PU and / or a PU partition.
[0509] A spatial candidate may be a reconstructed block that is spatially adjacent to the target block.
[0510] A temporal candidate may be a reconstructed block corresponding to a target block within an already reconstructed collocated picture (col picture).
[0511] In inter prediction, the encoding device (100) and the decoding device (200) can improve encoding efficiency and decoding efficiency by utilizing motion information of spatial candidates and / or temporal candidates. Motion information of spatial candidates may be referred to as spatial motion information. Motion information of temporal candidates may be referred to as temporal motion information.
[0512] Hereinafter, the motion information of a spatial candidate may be motion information of a PU including the spatial candidate. The motion information of a temporal candidate may be motion information of a PU including the temporal candidate. The motion information of a candidate block may be motion information of a PU including the candidate block.
[0513] Inter prediction can be performed using reference pictures.
[0514] A reference picture may be at least one of a previous picture of the target picture or a subsequent picture of the target picture. A reference picture may refer to an image used for predicting the target block.
[0515] In inter prediction, an area within a reference picture can be specified by using a reference picture index (or refIdx) indicating the reference picture and a motion vector (to be described later). Here, the specified area within the reference picture can indicate a reference block.
[0516] Inter prediction can select a reference picture and select a reference block corresponding to the target block within the reference picture. Additionally, inter prediction can generate a prediction block for the target block using the selected reference block.
[0517] Motion information can be derived during inter prediction by each of the encoding device (100) and the decoding device (200).
[0518] A spatial candidate may be a block that 1) exists within the target picture, 2) has already been reconstructed through encoding and / or decoding, and 3) is adjacent to the target block or is located at a corner of the target block. Here, a block located at a corner of the target block may be a block that is vertically adjacent to a neighboring block that is horizontally adjacent to the target block, or a block that is horizontally adjacent to a neighboring block that is vertically adjacent to the target block. "A block located at a corner of the target block" may have the same meaning as "a block adjacent to a corner of the target block." "A block located at a corner of the target block" may be included in "a block adjacent to the target block."
[0519] For example, a spatial candidate may be a reconstructed block located to the left of the target block, a reconstructed block located above the target block, a reconstructed block located at the lower left corner of the target block, a reconstructed block located at the upper right corner of the target block, or a reconstructed block located at the upper left corner of the target block.
[0520] Each of the encoding device (100) and the decoding device (200) can identify a block existing at a location spatially corresponding to a target block within a call picture. The location of the target block within the target picture and the location of the identified block within the call picture may correspond to each other.
[0521] Each of the encoding device (100) and the decoding device (200) can determine a call block existing at a predetermined relative position with respect to the identified block as a temporal candidate. The predetermined relative position may be a position inside and / or outside the identified block.
[0522] For example, a call block may include a first call block and a second call block. When the coordinates of the identified block are (xP, yP) and the size of the identified block is (nPSW, nPSH), the first call block may be a block located at coordinates (xP + nPSW, yP + nPSH). The second call block may be a block located at coordinates (xP + (nPSW >> 1), yP + (nPSH >> 1)). The second call block may be optionally used when the first call block is unavailable.
[0523] The motion vector of the target block can be determined based on the motion vector of the call block. Each of the encoding device (100) and the decoding device (200) can scale the motion vector of the call block. The scaled motion vector of the call block can be used as the motion vector of the target block. In addition, the motion vector of the motion information of the temporal candidates stored in the list can be a scaled motion vector.
[0524] The ratio of the motion vector of the target block to the motion vector of the called block may be equal to the ratio of the first temporal distance and the second temporal distance. The first temporal distance may be the distance between the reference picture of the target block and the target picture. The second temporal distance may be the distance between the reference picture of the called block and the called picture.
[0525] The method of deriving motion information may vary depending on the inter prediction mode of the target block. For example, inter prediction modes applied for inter prediction may include Advanced Motion Vector Predictor (AMVP) mode, merge mode, skip mode, merge mode with motion vector difference, sub-block merge mode, triangulation mode, inter-intra joint prediction mode, affine inter mode, and current picture reference mode. The merge mode may also be referred to as motion merge mode. Below, each of the modes is described in detail.
[0526] 1) AMVP mode
[0527] When AMVP mode is used, the encoding device (100) can search for similar blocks in the neighborhood of the target block. The encoding device (100) can obtain a predicted block by performing prediction on the target block using motion information of the searched similar blocks. The encoding device (100) can encode a residual block, which is the difference between the target block and the predicted block.
[0528] 1-1) Creating a list of predicted motion vector candidates
[0529] When the AMVP mode is used as the prediction mode, each of the encoding device (100) and the decoding device (200) can generate a prediction motion vector candidate list using the motion vector of the spatial candidate, the motion vector of the temporal candidate, and the zero vector. The prediction motion vector candidate list can include one or more prediction motion vector candidates. At least one of the motion vector of the spatial candidate, the motion vector of the temporal candidate, and the zero vector can be determined and used as the prediction motion vector candidate.
[0530] Hereinafter, the terms "predicted motion vector (candidate)" and "motion vector (candidate)" may be used interchangeably and have the same meaning.
[0531] Hereinafter, the terms “predicted motion vector candidate” and “AMVP candidate” may be used interchangeably and have the same meaning.
[0532] Hereinafter, the terms “predicted motion vector candidate list” and “AMVP candidate list” may be used interchangeably and have the same meaning.
[0533] A spatial candidate may include a reconstructed spatial neighboring block. In other words, the motion vector of the reconstructed neighboring block may be referred to as a spatial prediction motion vector candidate.
[0534] A temporal candidate may include a call block and blocks adjacent to the call block. In other words, the motion vector of a call block or the motion vector of a block adjacent to the call block may be referred to as a temporal prediction motion vector candidate.
[0535] The zero vector can be a (0, 0) motion vector.
[0536] The predicted motion vector candidate may be a motion vector predictor for predicting a motion vector. Additionally, in the encoding device (100), the predicted motion vector candidate may be an initial search position for a motion vector.
[0537] 1-2) Motion vector search using the predicted motion vector candidate list
[0538] The encoding device (100) can use the predicted motion vector candidate list to determine a motion vector to be used for encoding a target block within a search range. In addition, the encoding device (100) can determine a predicted motion vector candidate to be used as a predicted motion vector of the target block among the predicted motion vector candidates in the predicted motion vector candidate list.
[0539] The motion vector to be used for encoding the target block may be a motion vector that can be encoded at the minimum cost.
[0540] Additionally, the encoding device (100) can determine whether to use the AMVP mode in encoding the target block.
[0541] 1-3) Transmission of inter prediction information
[0542] The encoding device (100) can generate a bitstream including inter prediction information required for inter prediction. The decoding device (200) can perform inter prediction on a target block using the inter prediction information of the bitstream.
[0543] Inter prediction information may include 1) mode information indicating whether AMVP mode is used, 2) predicted motion vector index, 3) motion vector difference (MVD), 4) reference direction, and 5) reference picture index.
[0544] Hereinafter, the terms “predicted motion vector index” and “AMVP index” may be used interchangeably and have the same meaning.
[0545] Additionally, the inter prediction information may include residual signals.
[0546] The decoding device (200) can obtain a predicted motion vector index, a motion vector difference, a reference direction, and a reference picture index from the bitstream through entropy decoding when the mode information indicates that the AMVP mode is used.
[0547] The predicted motion vector index may point to a predicted motion vector candidate used for prediction of a target block among predicted motion vector candidates included in the predicted motion vector candidate list.
[0548] 1-4) Inter prediction in AMVP mode using inter prediction information
[0549] The decoding device (200) can derive a predicted motion vector candidate using a predicted motion vector candidate list, and can determine motion information of a target block based on the derived predicted motion vector candidate.
[0550] The decoding device (200) can determine a motion vector candidate for the target block from among the predicted motion vector candidates included in the predicted motion vector candidate list using the predicted motion vector index. The decoding device (200) can select a predicted motion vector candidate indicated by the predicted motion vector index from among the predicted motion vector candidates included in the predicted motion vector candidate list as the predicted motion vector of the target block.
[0551] The encoding device (100) can generate an entropy-encoded predicted motion vector index by applying entropy encoding to the predicted motion vector index, and can generate a bitstream including the entropy-encoded predicted motion vector index. The entropy-encoded predicted motion vector index can be signaled from the encoding device (100) to the decoding device (200) through the bitstream. The decoding device (200) can extract the entropy-encoded predicted motion vector index from the bitstream, and can obtain the predicted motion vector index by applying entropy decoding to the entropy-encoded predicted motion vector index.
[0552] The motion vector actually used for inter prediction of the target block may not match the predicted motion vector. An MVD may be used to represent the difference between the motion vector actually used for inter prediction of the target block and the predicted motion vector. The encoding device (100) may derive a predicted motion vector similar to the motion vector actually used for inter prediction of the target block in order to use an MVD with a size as small as possible.
[0553] The MVD may be the difference between the motion vector of the target block and the predicted motion vector. The encoding device (100) may calculate the MVD and generate an entropy-encoded MVD by applying entropy encoding to the MVD. The encoding device (100) may generate a bitstream including the entropy-encoded MDV.
[0554] The MVD can be transmitted from the encoding device (100) to the decoding device (200) via a bitstream. The decoding device (200) can extract an entropy-encoded MVD from the bitstream and obtain the MVD by applying entropy decoding to the entropy-encoded MVD.
[0555] The decoding device (200) can derive the motion vector of the target block by combining the MVD and the predicted motion vector. In other words, the motion vector of the target block derived from the decoding device (200) can be the sum of the MVD and the motion vector candidate.
[0556] In addition, the encoding device (100) can generate entropy-encoded MVD resolution information by applying entropy encoding to the calculated MVD resolution information, and can generate a bitstream including the entropy-encoded MVD resolution information. The decoding device (200) can extract entropy-encoded MVD resolution information from the bitstream, and can obtain MVD resolution information by applying entropy decoding to the entropy-encoded MVD resolution information. The decoding device (200) can adjust the resolution of the MVD using the MVD resolution information.
[0557] Meanwhile, the encoding device (100) can calculate the MVD based on the affine model. The decoding device (200) can derive the affine control motion vector of the target block through the sum of the MVD and the affine control motion vector candidates, and can derive the motion vector for the sub-block using the affine control motion vector.
[0558] The reference direction may point to a reference picture list used for prediction of the target block. For example, the reference direction may point to one of the reference picture list L0 and the reference picture list L1.
[0559] The reference direction may not indicate that the directions of the reference pictures are limited to the forward direction or the backward direction, but only indicates the reference picture list used for prediction of the target block. In other words, each of the reference picture list L0 and the reference picture list L1 may include pictures in the forward direction and / or the backward direction.
[0560] A unidirectional reference direction may mean that a single reference picture list is used. A bidirectional reference direction may mean that two reference picture lists are used. In other words, the reference direction may indicate that only the reference picture list L0 is used, that only the reference picture list L1 is used, or that one of the two reference picture lists is used.
[0561] A reference picture index may indicate a reference picture used for prediction of a target block among reference pictures in a reference picture list. The encoding device (100) may generate an entropy-encoded reference picture index by applying entropy encoding to the reference picture index, and may generate a bitstream including the entropy-encoded reference picture index. The entropy-encoded reference picture index may be signaled from the encoding device (100) to the decoding device (200) through a bitstream. The decoding device (200) may extract an entropy-encoded reference picture index from the bitstream, and may obtain a reference picture index by applying entropy decoding to the entropy-encoded reference picture index.
[0562] When two reference picture lists are used to predict a target block, one reference picture index and one motion vector can be used for each reference picture list. Furthermore, when two reference picture lists are used to predict a target block, two prediction blocks can be specified for the target block. For example, the (final) prediction block of the target block can be generated through the average or weighted sum of the two prediction blocks for the target block.
[0563] The motion vector of the target block can be derived by the predicted motion vector index, MVD, reference direction, and reference picture index.
[0564] The decoding device (200) can generate a prediction block for the target block based on the derived motion vector and the reference picture index. For example, the prediction block may be a reference block pointed to by the derived motion vector within the reference picture pointed to by the reference picture index.
[0565] By encoding the predicted motion vector index and MVD without encoding the motion vector itself of the target block, the amount of bits transmitted from the encoding device (100) to the decoding device (200) can be reduced, and encoding efficiency can be improved.
[0566] Motion information of reconstructed neighboring blocks may be used for the target block. In a specific inter prediction mode, the encoding device (100) may not separately encode the motion information for the target block itself. Instead of encoding the motion information of the target block, other information that can derive the motion information of the target block through the motion information of the reconstructed neighboring blocks may be encoded instead. As other information is encoded instead, the amount of bits transmitted to the decoding device (200) may be reduced, and encoding efficiency may be improved.
[0567] For example, as an inter prediction mode in which the motion information of the target block is not directly encoded, there may be a skip mode and / or a merge mode, etc. In this case, the encoding device (100) and the decoding device (200) may use an identifier and / or an index that indicates which unit's motion information among the reconstructed neighboring units is used as the motion information of the target unit.
[0568] 2) Merge mode
[0569] One method for deriving motion information for a target block is merge. Merge can refer to the merging of motions across multiple blocks. Merge can also refer to applying motion information from one block to another. In other words, merge mode can refer to a mode in which the motion information for a target block is derived from the motion information of neighboring blocks.
[0570] When the merge mode is used, the encoding device (100) can perform prediction of motion information of the target block using motion information of the spatial candidate and / or motion information of the temporal candidate. The spatial candidate may include a reconstructed spatial neighboring block that is spatially adjacent to the target block. The spatial neighboring block may include a left neighboring block and an upper neighboring block. The temporal candidate may include a call block. The terms "spatial candidate" and "spatial merge candidate" may be used interchangeably and have the same meaning. The terms "temporal candidate" and "temporal merge candidate" may be used interchangeably and have the same meaning.
[0571] The encoding device (100) can obtain a prediction block through prediction. The encoding device (100) can encode a residual block, which is the difference between the target block and the prediction block.
[0572] 2-1) Creating a merge candidate list
[0573] When merge mode is used, each of the encoding device (100) and the decoding device (200) can generate a merge candidate list using motion information of spatial candidates and / or motion information of temporal candidates. The motion information can include 1) a motion vector, 2) a reference picture index, and 3) a reference direction. The reference direction can be unidirectional or bidirectional. The reference direction can mean an inter prediction indicator.
[0574] The merge candidate list may contain merge candidates. The merge candidates may be motion information. In other words, the merge candidate list may be a list containing motion information.
[0575] Merge candidates may be motion information such as temporal candidates and / or spatial candidates. In other words, the merge candidate list may include motion information such as temporal candidates and / or spatial candidates.
[0576] Additionally, the merge candidate list may include new merge candidates generated by combining merge candidates already present in the merge candidate list. In other words, the merge candidate list may include new motion information generated by combining motion information already present in the merge candidate list.
[0577] Additionally, the merge candidate list may include a history-based merge candidate. The history-based merge candidate may be motion information of a block encoded and / or decoded before the target block.
[0578] Additionally, the merge candidate list may include a merge candidate based on the average of two merge candidates.
[0579] Merge candidates may be specific modes that derive inter-prediction information. The merge candidate may be information indicating a specific mode that derives inter-prediction information. Inter-prediction information of the target block may be derived according to the specific mode indicated by the merge candidate. In this case, the specific mode may include a process for deriving a series of inter-prediction information. This specific mode may be an inter-prediction information derivation mode or a motion information derivation mode.
[0580] Inter prediction information of a target block can be derived according to the mode indicated by a merge candidate selected by a merge index among the merge candidates in the merge candidate list.
[0581] For example, the motion information derivation modes in the merge candidate list may be at least one of 1) a sub-block unit motion information derivation mode and 2) an affine motion information derivation mode.
[0582] Additionally, the merge candidate list may include motion information of the zero vector. The zero vector may also be referred to as a zero merge candidate.
[0583] In other words, the motion information in the merge candidate list can be at least one of: 1) motion information of a spatial candidate, 2) motion information of a temporal candidate, 3) motion information generated by a combination of motion information already existing in the merge candidate list, and 4) a zero vector.
[0584] Motion information may include 1) a motion vector, 2) a reference picture index, and 3) a reference direction. The reference direction may also be referred to as an inter prediction indicator. The reference direction may be unidirectional or bidirectional. A unidirectional reference direction may indicate L0 prediction or L1 prediction.
[0585] The merge candidate list can be generated before prediction by merge mode is performed.
[0586] The number of merge candidates in the merge candidate list can be predefined. The encoding device (100) and the decoding device (200) can add merge candidates to the merge candidate list according to a predefined method and a predefined order so that the merge candidate list has a predefined number of merge candidates. Through the predefined method and the predefined order, the merge candidate list of the encoding device (100) and the merge candidate list of the decoding device (200) can be identical.
[0587] Merge can be applied on a CU or PU basis. When merging is performed on a CU or PU basis, the encoding device (100) can transmit a bitstream including predefined information to the decoding device (200). For example, the predefined information can include 1) information indicating whether merging is to be performed for each block partition, and 2) information regarding which block among the blocks that are spatial candidates and / or temporal candidates for the target block will be merged.
[0588] 2-2) Searching for motion vectors using the merge candidate list
[0589] The encoding device (100) can determine a merge candidate to be used for encoding a target block. For example, the encoding device (100) can perform predictions for the target block using merge candidates in a merge candidate list and generate residual blocks for the merge candidates. The encoding device (100) can use a merge candidate that requires the least cost for prediction and encoding of the residual block for encoding the target block.
[0590] Additionally, the encoding device (100) can determine whether to use merge mode in encoding the target block.
[0591] 2-3) Transmission of inter prediction information
[0592] The encoding device (100) can generate a bitstream including inter prediction information required for inter prediction. The encoding device (100) can perform entropy encoding on the inter prediction information to generate entropy-encoded inter prediction information, and can transmit the bitstream including the entropy-encoded inter prediction information to the decoding device (200). Through the bitstream, the entropy-encoded inter prediction information can be signaled from the encoding device (100) to the decoding device (200). The decoding device (200) can extract the entropy-encoded inter prediction information from the bitstream, and can obtain the inter prediction information by performing entropy decoding on the entropy-encoded inter prediction information.
[0593] The decoding device (200) can perform inter prediction on a target block using inter prediction information of a bitstream.
[0594] Inter prediction information may include 1) mode information indicating whether merge mode is used, 2) merge index, and 3) correction information.
[0595] Additionally, the inter prediction information may include residual signals.
[0596] The decryption device (200) can obtain the merge index from the bitstream only when the mode information indicates that the merge mode is used.
[0597] Mode information can be a merge flag. The unit of mode information can be a block. Information about a block can include mode information, and the mode information can indicate whether merge mode is applied to the block.
[0598] A merge index may indicate a merge candidate among the merge candidates included in the merge candidate list, which is used to predict the target block. Alternatively, the merge index may indicate which block among the neighboring blocks spatially or temporally adjacent to the target block is being merged.
[0599] The encoding device (100) can select a merge candidate with the highest encoding performance among the merge candidates included in the merge candidate list, and can set the value of the merge index to point to the selected merge candidate.
[0600] The correction information may be information used to correct a motion vector. The encoding device (100) may generate the correction information. The decoding device (200) may correct the motion vector of a merge candidate selected by a merge index based on the correction information.
[0601] The correction information may include at least one of information indicating whether correction has been performed, correction direction information, and correction size information. A prediction mode that corrects a motion vector based on the signaled correction information may be referred to as a merge mode with motion vector difference.
[0602] 2-4) Inter prediction in merge mode using inter prediction information
[0603] The decryption device (200) can perform prediction on a target block using a merge candidate indicated by a merge index among the merge candidates included in the merge candidate list.
[0604] The motion vector of the target block can be specified by the motion vector of the merge candidate pointed to by the merge index, the reference picture index, and the reference direction.
[0605] 3) Skip mode
[0606] Skip mode can be a mode that directly applies the motion information of spatial or temporal candidates to the target block. Furthermore, skip mode can be a mode that does not use residual signals. In other words, when skip mode is used, the reconstructed block can be identical to the predicted block.
[0607] The difference between merge mode and skip mode may lie in the transmission or use of residual signals. In other words, skip mode may be similar to merge mode, except that residual signals are not transmitted or used.
[0608] When skip mode is used, the encoding device (100) can transmit information indicating which block's motion information among the blocks that are spatial candidates or temporal candidates is used as the motion information of the target block to the decoding device (200) through a bitstream. The encoding device (100) can perform entropy encoding on this information to generate entropy-encoded information, and signal the entropy-encoded information to the decoding device (200) through a bitstream. The decoding device (200) can extract the entropy-encoded information from the bitstream, and obtain the information by performing entropy decoding on the entropy-encoded information.
[0609] Additionally, when skip mode is used, the encoding device (100) may not transmit other syntax element information, such as MVD, to the decoding device (200). For example, when skip mode is used, the encoding device (100) may not signal syntax elements regarding at least one of MVD, coded block flag, and transform coefficient level to the decoding device (200).
[0610] 3-1) Creating a list of merge candidates
[0611] Skip mode can also use a merge candidate list. In other words, a merge candidate list can be used in both merge and skip modes. In this regard, the merge candidate list may also be referred to as a "skip candidate list" or a "merge / skip candidate list."
[0612] Alternatively, skip mode may use a separate candidate list from merge mode. In such cases, the merge candidate list and merge candidates in the description below may be replaced with skip candidate list and skip candidates, respectively.
[0613] The merge candidate list can be generated before prediction is performed in skip mode.
[0614] 3-2) Searching for motion vectors using the merge candidate list
[0615] The encoding device (100) can determine a merge candidate to be used for encoding a target block. For example, the encoding device (100) can perform predictions for the target block using merge candidates in a merge candidate list. The encoding device (100) can use a merge candidate that requires the least cost for prediction to encode the target block.
[0616] Additionally, the encoding device (100) can determine whether to use skip mode in encoding the target block.
[0617] 3-3) Transmission of inter prediction information
[0618] The encoding device (100) can generate a bitstream including inter prediction information required for inter prediction. The decoding device (200) can perform inter prediction on a target block using the inter prediction information of the bitstream.
[0619] Inter prediction information may include 1) mode information indicating whether skip mode is used and 2) a skip index.
[0620] The skip index may be identical to the merge index described above.
[0621] When skip mode is used, the target block can be encoded without residual signals. The inter-prediction information may not include residual signals. Alternatively, the bitstream may not include residual signals.
[0622] The decoding device (200) can obtain a skip index from the bitstream only if the mode information indicates that the skip mode is used. As described above, the merge index and the skip index may be the same. The decoding device (200) can obtain a skip index from the bitstream only if the mode information indicates that the merge mode or the skip mode is used.
[0623] A skip index may point to a merge candidate among the merge candidates included in the merge candidate list that is used to predict the target block.
[0624] 3-4) Inter prediction in skip mode using inter prediction information
[0625] The decryption device (200) can perform prediction on a target block using a merge candidate indicated by a skip index among the merge candidates included in the merge candidate list.
[0626] The motion vector of the target block can be specified by the motion vector of the merge candidate pointed to by the skip index, the reference picture index, and the reference direction.
[0627] 4) Current picture reference mode
[0628] The current picture reference mode may mean a prediction mode that uses a pre-reconstructed region within the target picture to which the target block belongs.
[0629] Motion vectors can be used to specify the reconstructed region. Whether the target block is encoded in the current picture reference mode can be determined using the reference picture index of the target block.
[0630] A flag or index indicating whether the target block is a block encoded in the current picture reference mode may be signaled from the encoding device (100) to the decoding device (200). Alternatively, whether the target block is a block encoded in the current picture reference mode may be inferred through the reference picture index of the target block.
[0631] If the target block is encoded in the current picture reference mode, the target picture may be present at a fixed or arbitrary position within the reference picture list for the target block.
[0632] For example, the fixed position can be the position where the reference picture index value is 0 or the last position.
[0633] If the target picture exists at any location within the reference picture list, a separate reference picture index indicating this arbitrary location may be signaled from the encoding device (100) to the decoding device (200).
[0634] 5) Subblock merge mode
[0635] Sub-block merge mode may refer to a mode that derives motion information for a sub-block of a CU.
[0636] When the sub-block merge mode is applied, a sub-block merge candidate list can be generated using motion information of a call sub-block of a target sub-block in a reference image (i.e., a sub-block based temporal merge candidate) and / or an affine control point motion vector merge candidate.
[0637] 6) Triangle partition mode
[0638] In triangulation mode, target blocks can be generated by diagonally dividing a target block. For each divided target block, motion information of each divided target block can be derived, and prediction samples for each divided target block can be derived using the derived motion information. The prediction sample of the target block can be derived through a weighted sum of the prediction samples of the divided target blocks.
[0639] 7) Inter-intra joint prediction mode
[0640] The inter-intra combined prediction mode may be a mode that derives a prediction sample of a target block using a weighted sum of prediction samples generated by inter prediction and prediction samples generated by intra prediction.
[0641] In the aforementioned modes, the decoding device (200) can perform its own correction on the derived motion information. For example, the decoding device (200) can search for motion information having the minimum sum of absolute differences (SAD) by searching a specified area based on a reference block indicated by the derived motion information, and can derive the searched motion information as corrected motion information.
[0642] In the aforementioned modes, the decoding device (200) can perform compensation for prediction samples derived through inter prediction using optical flow.
[0643] In the aforementioned AMVP mode, merge mode, and skip mode, motion information to be used for prediction of a target block among motion information within the list can be specified through an index to the list.
[0644] To improve encoding efficiency, the encoding device (100) may signal only the index of the element that causes the least cost in inter prediction of the target block among the elements of the list. The encoding device (100) may encode the index and signal the encoded index.
[0645] Therefore, the aforementioned lists (i.e., the predicted motion vector candidate list and the merge candidate list) may need to be derived in the same manner based on the same data in the encoding device (100) and the decoding device (200). Here, the same data may include a reconstructed picture and a reconstructed block. Furthermore, in order to specify an element by index, the order of the elements within the list may need to be constant.
[0646]
[0647] Figure 10 shows spatial candidates according to an example.
[0648] In Fig. 10, the locations of spatial candidates are shown.
[0649] The large block in the middle can represent the target block. The five smaller blocks can represent spatial candidates.
[0650] The coordinates of the target block can be (xP, yP), and the size of the target block can be (nPSW, nPSH).
[0651] A spatial candidate A0 may be a block adjacent to the lower left corner of the target block. A0 may be a block occupying pixels at coordinates (xP - 1, yP + nPSH).
[0652] A spatial candidate A1 may be a block adjacent to the left of the target block. A1 may be the bottommost block among the blocks adjacent to the left of the target block. Alternatively, A1 may be a block adjacent to the top of A0. A1 may be a block occupying a pixel at coordinates (xP - 1, yP + nPSH - 1).
[0653] A spatial candidate B0 may be a block adjacent to the upper right corner of the target block. B0 may be a block occupying pixels at coordinates (xP + nPSW, yP - 1).
[0654] A spatial candidate B1 may be a block adjacent to the top of the target block. B1 may be the rightmost block among the blocks adjacent to the top of the target block. Alternatively, B1 may be a block adjacent to the left of B0. B1 may be a block occupying a pixel at coordinates (xP + nPSW - 1, yP - 1).
[0655] A spatial candidate B2 may be a block adjacent to the upper left corner of the target block. B2 may be a block occupying a pixel at coordinates (xP - 1, yP - 1).
[0656]
[0657] Determination of availability of spatial and temporal candidates
[0658] In order to include motion information of a spatial candidate or motion information of a temporal candidate in the list, it must be determined whether motion information of a spatial candidate or motion information of a temporal candidate is available.
[0659] Hereinafter, the candidate block may include spatial candidates and temporal candidates.
[0660] For example, the above judgment can be made by sequentially applying steps 1) to 4) below.
[0661] Step 1) If the PU containing the candidate block is outside the bounds of the picture, the availability of the candidate block may be set to false. "Availability is set to false" may mean the same thing as "is set to unavailable."
[0662] Step 2) If the PU containing the candidate block is outside the boundary of the slice, the availability of the candidate block may be set to false. If the target block and the candidate block are located in different slices, the availability of the candidate block may be set to false.
[0663] Step 3) If the PU containing the candidate block is outside the tile boundary, the availability of the candidate block may be set to false. If the target block and the candidate block are located within different tiles, the availability of the candidate block may be set to false.
[0664] Step 4) If the prediction mode of the PU containing the candidate block is intra prediction mode, the availability of the candidate block may be set to false. If the PU containing the candidate block does not use inter prediction, the availability of the candidate block may be set to false.
[0665]
[0666] Figure 11 shows the order of adding motion information of spatial candidates to the merge list according to an example.
[0667] As illustrated in Fig. 11, when adding motion information of spatial candidates to a merge list, the order of A1, B1, B0, A0, and B2 can be used. That is, motion information of available spatial candidates can be added to the merge list in the order of A1, B1, B0, A0, and B2.
[0668]
[0669] How to derive a merge list in merge mode and skip mode
[0670] As described above, the maximum number of merge candidates in the merge list can be set. The set maximum number is represented as N. The set number can be transmitted from the encoding device (100) to the decoding device (200). The slice header of the slice can include N. In other words, the maximum number of merge candidates in the merge list for the target block of the slice can be set by the slice header. For example, the value of N can be 5 by default.
[0671] Motion information (i.e., merge candidates) can be added to the merge list in the order of steps 1) to 4) below.
[0672] Step 1) Available spatial candidates among the spatial candidates can be added to the merge list. The motion information of the available spatial candidates can be added to the merge list in the order shown in Fig. 10. At this time, if the motion information of an available spatial candidate overlaps with other motion information already existing in the merge list, the motion information may not be added to the merge list. Checking whether it overlaps with other motion information existing in the list can be abbreviated as a "duplication check."
[0673] The number of additional movement information can be up to N.
[0674] Step 2) If the number of motion information items in the merge list is less than N and a temporal candidate is available, the motion information of the temporal candidate may be added to the merge list. At this time, if the motion information of the available temporal candidate overlaps with other motion information already existing in the merge list, the motion information may not be added to the merge list.
[0675] Step 3) If the number of motion information in the merge list is less than N and the type of the target slice is "B", combined motion information generated by combined bi-prediction can be added to the merge list.
[0676] The target slice may be a slice that contains the target block.
[0677] The combined motion information may be a combination of L0 motion information and L1 motion information. The L0 motion information may be motion information that only refers to the reference picture list L0. The L1 motion information may be motion information that only refers to the reference picture list L1.
[0678] Within a merge list, there may be one or more pieces of L0 motion information. Additionally, within a merge list, there may be one or more pieces of L1 motion information.
[0679] There may be one or more pieces of combined motion information. When generating the combined motion information, it may be predetermined which L0 motion information and which L1 motion information are to be used among one or more pieces of L0 motion information and one or more pieces of L1 motion information. The one or more pieces of combined motion information may be generated in a predetermined order by combined bidirectional prediction using pairs of different motion information in the merge list. One of the pairs of different motion information may be L0 motion information and the other may be L1 motion information.
[0680] For example, the combined motion information that is added with the highest priority may be a combination of L0 motion information with a merge index of 0 and L1 motion information with a merge index of 1. If the motion information with a merge index of 0 is not L0 motion information or if the motion information with a merge index of 1 is not L1 motion information, the combined motion information may not be generated and added. The motion information that is added next may be a combination of L0 motion information with a merge index of 1 and L1 motion information with a merge index of 0. The specific combinations below may follow other combinations in the field of video encoding / decoding.
[0681] At this time, if the combined motion information overlaps with other motion information already existing in the merge list, the combined motion information may not be added to the merge list.
[0682] Step 4) If the number of motion information in the merge list is less than N, zero vector motion information can be added to the merge list.
[0683] Zero vector motion information may be motion information whose motion vector is a zero vector.
[0684] There may be more than one zero vector motion information. The reference picture indices of one or more zero vector motion information may be different from each other. For example, the reference picture index value of the first zero vector motion information may be 0. The reference picture index value of the second zero vector motion information may be 1.
[0685] The number of zero vector motion information may be equal to the number of reference pictures in the reference picture list.
[0686] The reference direction of the zero vector motion information can be bidirectional. Both motion vectors can be zero vectors. The number of zero vector motion information can be the smaller of the number of reference pictures in the reference picture list L0 and the number of reference pictures in the reference picture list L1. Alternatively, when the number of reference pictures in the reference picture list L0 and the number of reference pictures in the reference picture list L1 are different from each other, a unidirectional reference direction can be used for a reference picture index that can be applied to only one reference picture list.
[0687] The encoding device (100) and / or the decoding device (200) can sequentially add zero vector motion information to the merge list while changing the reference picture index.
[0688] If the zero vector motion information overlaps with other motion information already existing in the merge list, the zero vector motion information may not be added to the merge list.
[0689] The order of steps 1) through 4) described above is merely exemplary, and the order of the steps may be changed. Furthermore, some of the steps may be omitted depending on predefined conditions.
[0690]
[0691] A method for deriving a list of predicted motion vector candidates in AMVP mode
[0692] The maximum number of predicted motion vector candidates in the predicted motion vector candidate list can be predefined. The predefined maximum number is denoted as N. For example, the predefined maximum number can be 2.
[0693] Motion information (i.e., predicted motion vector candidates) can be added to the predicted motion vector candidate list in the order of steps 1) to 3) below.
[0694] Step 1) Available spatial candidates can be added to the list of predicted motion vector candidates. The spatial candidates may include a first spatial candidate and a second spatial candidate.
[0695] The first spatial candidate may be one of A0, A1, scaled A0, and scaled A1. The second spatial candidate may be one of B0, B1, B2, scaled B0, scaled B1, and scaled B2.
[0696] The motion information of the available spatial candidates can be added to the predicted motion vector candidate list in the order of the first spatial candidate and the second spatial candidate. At this time, if the motion information of the available spatial candidate overlaps with other motion information already existing in the predicted motion vector candidate list, the motion information may not be added to the predicted motion vector candidate list. In other words, if the value of N is 2, and the motion information of the second spatial candidate is identical to the motion information of the first spatial candidate, the motion information of the second spatial candidate may not be added to the predicted motion vector candidate list.
[0697] The number of additional movement information can be up to N.
[0698] Step 2) If the number of motion information items in the predicted motion vector candidate list is less than N and a temporal candidate is available, the motion information of the temporal candidate may be added to the predicted motion vector candidate list. In this case, if the motion information of the available temporal candidate overlaps with other motion information already existing in the predicted motion vector candidate list, the motion information may not be added to the predicted motion vector candidate list.
[0699] Step 3) If the number of motion information in the predicted motion vector candidate list is less than N, zero vector motion information can be added to the predicted motion vector candidate list.
[0700] There may be more than one zero vector motion information. The reference picture indices of one or more zero vector motion information may be different from each other.
[0701] The encoding device (100) and / or the decoding device (200) can sequentially add zero vector motion information to the predicted motion vector candidate list while changing the reference picture index.
[0702] If the zero vector motion information overlaps with other motion information already existing in the predicted motion vector candidate list, the zero vector motion information may not be added to the predicted motion vector candidate list.
[0703] The description of zero vector motion information described above for merge lists can also be applied to zero vector motion information. Duplicate descriptions are omitted.
[0704] The order of steps 1) through 3) described above is merely exemplary, and the order of the steps may be interchanged. Furthermore, some of the steps may be omitted depending on predefined conditions.
[0705]
[0706] Figure 12 illustrates the process of transformation and quantization according to an example.
[0707] As illustrated in Fig. 12, a quantized level can be generated by performing a transformation and / or quantization process on the residual signal.
[0708] The residual signal can be generated as the difference between the original block and the predicted block. Here, the predicted block can be a block generated by intra-prediction or inter-prediction.
[0709] The residual signal can be converted to the frequency domain through a transform process that is part of the quantization process.
[0710] The transform kernel used for the transformation may include various DCT kernels such as Discrete Cosine Transform (DCT) type 2 (DCT-II) and Discrete Sine Transform (DST) kernels.
[0711] These transform kernels can perform a separable transform or a 2-dimensional (2D) non-separable transform on the residual signal. A separable transform can be a transform that performs a 1-dimensional (1D) transform on the residual signal in each of the horizontal and vertical directions.
[0712] The DCT types and DST types adaptively used for 1D transformation may include DCT-V, DCT-VIII, DST-I, and DST-VII in addition to DCT-II, as shown in Tables 3 and 4 below, respectively.
[0713] Transformation set Transformation candidates 0 DST-VII, DCT-VIII 1 DST-VII, DST-I 2 DST-VII, DCT-V
[0714] Transformation set Transformation candidates 0 DST-VII, DCT-VIII, DST-I 1 DST-VII, DST-I, DCT-VIII 2 DST-VII, DCT-V, DST-I
[0715] As shown in Tables 3 and 4, a transform set can be used to derive the DCT type or DST type to be used for the transformation. Each transform set can include multiple transform candidates. Each transform candidate can be of the DCT type or the DST type, etc.
[0716] Table 5 below shows an example of a set of transformations applied in the horizontal direction and a set of transformations applied in the vertical direction depending on the intra prediction mode.
[0717] Intra prediction mode 0123456789Vertical direction transformation set 2101010101Horizontal direction transformation set 2101010101Intra prediction mode 10111213141516171819Vertical direction transformation set 0101000000Horizontal direction transformation set 0101222222Intra prediction mode 20212223242526272829Vertical direction transformation set 0001010101Horizontal direction transformation set 2221010101Intra prediction mode 30313233343536373839Vertical direction transformation set 0101010101Horizontal direction transformation set 0101010101Intra prediction mode 40414243444546474849Vertical direction transformation Set 0101012222Horizontal transformation Set 0101010000Intra prediction mode 50515253545556575859Vertical transformation Set 2222210101Horizontal transformation Set 0000010101Intra prediction mode 60616263646566Vertical transformation Set 0101010Horizontal transformation Set 0101010
[0718] In Table 5, the number of vertical direction transformation sets and the number of horizontal direction transformation sets applied to the horizontal direction of the residual signal according to the intra prediction mode of the target block are indicated.
[0719] As illustrated in Table 5, transform sets applied in the horizontal and vertical directions may be predefined according to the intra prediction mode of the target block. The encoding device (100) may perform transform and inverse transform on the residual signal using the transform included in the transform set corresponding to the intra prediction mode of the target block. In addition, the decoding device (200) may perform inverse transform on the residual signal using the transform included in the transform set corresponding to the intra prediction mode of the target block.
[0720] In these transformations and inverse transformations, the transformation set applied to the residual signal may be determined as exemplified in Tables 3, 4, and 5, and may not be signaled. Transformation indication information may be signaled from the encoding device (100) to the decoding device (200). The transformation indication information may be information indicating which transformation candidate among a plurality of transformation candidates included in the transformation set applied to the residual signal is used.
[0721] For example, if the target block size is 64x64 or less, a total of three transform sets can be configured depending on the intra prediction mode. An optimal transform method can be selected from a total of nine multi-transform methods resulting from a combination of three transforms in the horizontal direction and three transforms in the vertical direction. Encoding efficiency can be improved by encoding and / or decoding the residual signal using this optimal transform method.
[0722] At this time, for at least one of the vertical and horizontal transformations, information regarding which transformation among the transformations belonging to the transformation set was used can be entropy encoded and / or decoded. Truncated unary binarization can be used to encode and / or decode this information.
[0723] The method using various transformations as described above can be applied to residual signals generated by intra prediction or inter prediction.
[0724] The transform may include at least one of a first transform and a second transform. Transform coefficients may be generated by performing a first transform on the residual signal, and second transform coefficients may be generated by performing a second transform on the transform coefficients.
[0725] The primary transformation may be referred to as the primary transformation. Furthermore, the primary transformation may be referred to as the Adaptive Multiple Transform (AMT). As previously mentioned, AMT may imply that different transformations are applied to each of the 1D directions (i.e., the vertical and horizontal directions).
[0726] A secondary transform may be a transform intended to improve the energy concentration of the transform coefficients generated by the primary transform. Like the primary transform, the secondary transform may be a separable or non-separable transform. A non-separable transform may be a non-separable secondary transform (NSST).
[0727] The primary transformation may be performed using at least one of a plurality of predefined transformation methods. For example, the plurality of predefined transformation methods may include a Discrete Cosine Transform (DCT), a Discrete Sine Transform (DST), and a Karhunen-Loeve Transform (KLT)-based transformation.
[0728] Additionally, the primary transform can be a transform with various transform types depending on the kernel function defining the DCT or DST.
[0729] For example, the transformation type may be determined based on at least one of 1) a prediction mode of the target block (e.g., one of intra prediction and inter prediction), 2) a size of the target block, 3) a shape of the target block, 4) an intra prediction mode of the target block, 5) a component of the target block (e.g., one of a luma component and a chroma component), and 6) a partitioning type applied to the target block (e.g., one of a quad tree (QT), a binary tree (BT), and a ternary tree (TT)).
[0730] For example, the first transform may include transforms such as DCT-2, DCT-5, DCT-7, DST-7, DST-1, DST-8, and DCT-8 according to the transform kernels presented in Table 6 below. Table 6 illustrates various transform types and transform kernel functions for Multiple Transform Selection (MTS).
[0731] MTS may mean that a combination of one or more DCT and / or DST transform kernels is selected for transforming the residual signal in the horizontal and / or vertical directions.
[0732] Conversion type conversion kernel function DCT-2 DST-7 DCT-5 DCT-8 DST-1
[0733] In Table 6, i and j can be integer values greater than or equal to 0 and less than or equal to N-1.
[0734] A secondary transform can be performed on the transform coefficients generated by performing the primary transform.
[0735] 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 a set of transformations as described above can be applied to both the first-order transformation and the second-order transformation.
[0736] Primary and secondary transformations can be determined for a given target.
[0737] For example, the first transform and the second transform may be applied to one or more signal components of the luma component and the chroma component. Whether the first transform and / or the second transform are applied may be determined based on at least one of the coding parameters for the target block and / or the neighboring blocks. For example, whether the first transform and / or the second transform are applied may be determined based on the size and / or shape of the target block.
[0738] In the encoding device (100) and the decoding device (200), the transformation information indicating the transformation method used for the target can be derived by using specific information.
[0739] For example, the transformation information may include an index of a transformation to be used for the primary transformation and / or the secondary transformation. Alternatively, the transformation information may indicate that the primary transformation and / or the secondary transformation are not used.
[0740] For example, when the target of the first transformation and the second transformation is a target block, the transformation method(s) applied to the first transformation and / or the second transformation indicated by the transformation information may be determined according to at least one of the coding parameters for the target block and / or the neighboring block.
[0741] Alternatively, conversion information indicating a conversion method for a specific target may be signaled from the encoding device (100) to the decoding device (200).
[0742] For example, for one CU, whether a primary transformation is used, an index indicating the primary transformation, whether a secondary transformation is used, and an index indicating the secondary transformation, etc. may be derived as transformation information in the decoding device (200). Alternatively, for one CU, transformation information indicating whether a primary transformation is used, an index indicating the primary transformation, whether a secondary transformation is used, and an index indicating the secondary transformation, etc. may be signaled.
[0743] Quantized transform coefficients (i.e., quantized levels) can be generated by performing quantization on the result or residual signal generated by performing the first transform and / or the second transform.
[0744]
[0745] Figure 13 illustrates diagonal scanning according to an example.
[0746] Figure 14 illustrates horizontal scanning according to an example.
[0747] Figure 15 illustrates vertical scanning according to an example.
[0748] The quantized transform coefficients may be scanned according to at least one of an intra prediction mode, a block size, and a block shape, and according to at least one of diagonal scanning (upper-right), vertical scanning, and horizontal scanning. A block may be a transform unit.
[0749] Each scan can start at a specific starting point and end at a specific ending point.
[0750] For example, the quantized transform coefficients can be converted into a one-dimensional vector form by scanning the coefficients of a block using the diagonal scanning of FIG. 13. Alternatively, depending on the block size and / or intra prediction mode, the horizontal scanning of FIG. 14 or the vertical scanning of FIG. 15 can be used instead of the diagonal scanning.
[0751] Vertical scanning may be scanning a two-dimensional block-shaped coefficient in the column direction. Horizontal scanning may be scanning a two-dimensional block-shaped coefficient in the row direction.
[0752] In other words, depending on the block size and / or inter prediction mode, it can be determined which scanning among diagonal scanning, vertical scanning and horizontal scanning will be used.
[0753] As illustrated in FIGS. 13, 14 and 15, the quantized transform coefficients can be scanned along the diagonal, horizontal or vertical directions.
[0754] Quantized transform coefficients can be expressed in block form. A block can include multiple sub-blocks. Each sub-block can be defined according to a minimum block size or minimum block shape.
[0755] In scanning, a scanning order based on the type or direction of scanning may be applied to sub-blocks first. Additionally, a scanning order based on the direction of scanning may be applied to quantized transform coefficients within a sub-block.
[0756] For example, as illustrated in FIGS. 13, 14, and 15, when the size of the target block is 8x8, quantized transform coefficients can be generated by a first transform, a second transform, and quantization for the residual signal of the target block. Thereafter, one of three scanning orders can be applied to four 4x4 sub-blocks, and quantized transform coefficients can be scanned according to the scanning order for each 4x4 sub-block.
[0757] The encoding device (100) can generate entropy-encoded quantized transform coefficients by performing entropy encoding on scanned quantized transform coefficients, and can generate a bitstream including the entropy-encoded quantized transform coefficients.
[0758] The decoding device (200) can extract entropy-encoded quantized transform coefficients from a bitstream, and can generate quantized transform coefficients by performing entropy decoding on the entropy-encoded quantized transform coefficients. The quantized transform coefficients can be aligned into a two-dimensional block shape through inverse scanning. At this time, as a method of inverse scanning, at least one of a diagonal scan (upper right), a vertical scan, and a horizontal scan can be performed.
[0759] In the decoding device (200), inverse quantization can be performed on quantized transform coefficients. Depending on whether a second inverse transform is performed, a second inverse transform can be performed on the result generated by performing inverse quantization. In addition, depending on whether a first inverse transform is performed, a first inverse transform can be performed on the result generated by performing the second inverse transform. By performing a first inverse transform on the result generated by performing the second inverse transform, a reconstructed residual signal can be generated.
[0760] For the luma component reconstructed via intra prediction or inter prediction, inverse mapping of the dynamic range can be performed before in-loop filtering.
[0761] The dynamic range can be divided into 16 equal pieces, and a mapping function can be signaled for each piece. The mapping function can be signaled at the slice level or the tile group level.
[0762] A reverse mapping function for performing reverse mapping can be derived based on the mapping function.
[0763] In-loop filtering, storage of reference pictures and motion compensation can be performed in the reverse mapped area.
[0764] A prediction block generated through inter prediction can be converted into a mapped region by mapping using a mapping function, and the converted prediction block can be used to generate a reconstructed block. However, since intra prediction is performed in a mapped region, a prediction block generated through intra prediction can be used to generate a reconstructed block without mapping and / or demapping.
[0765] For example, if the target block is a residual block of a chroma component, the residual block can be converted into a reverse mapped region by performing scaling on the chroma component of the mapped region.
[0766] Whether scaling is available can be signaled at the slice level or the tile group level.
[0767] For example, scaling can only be applied if a mapping to the luma component is available and if the partitioning of the luma component and the partitioning of the chroma components follow the same tree structure.
[0768] Scaling may be performed based on the average of the values of the samples of the luma prediction block corresponding to the chroma prediction block. In this case, if the target block uses inter prediction, the luma prediction block may refer to the mapped luma prediction block.
[0769] The values required for scaling can be derived by referencing a look-up table using the index of the piece to which the average of the values of the samples of the luma prediction block belongs.
[0770] Finally, by performing scaling on the residual block using the derived values, the residual block can be converted into a demapped region. Subsequently, reconstruction, intra-prediction, inter-prediction, in-loop filtering, and storage of reference pictures for the chroma component blocks can be performed in the demapped region.
[0771] For example, information indicating whether mapping and / or demapping of these luma and chroma components is available can be signaled via a set of sequence parameters.
[0772] A prediction block of a target block can be generated based on a block vector. The block vector can indicate displacement between the target block and a reference block. The reference block can be a block within the target image.
[0773] In this way, a prediction mode that generates a prediction block by referring to a target image can be called an intra block copy (IBC) mode.
[0774] IBC mode can be applied to CUs of a specific size. For example, IBC mode can be applied to an MxN CU, where M and N can be 64 or less.
[0775] IBC mode may include skip mode, merge mode, and AMVP mode. In skip mode or merge mode, a merge candidate list may be constructed, and a merge index may be signaled to specify one merge candidate among the merge candidates in the merge candidate list. The block vector of the specified merge candidate may be used as the block vector of the target block.
[0776] In AMVP mode, a differential block vector can be signaled. Furthermore, the predicted block vector can be derived from the left and top neighboring blocks of the target block. Additionally, an index indicating which neighboring block will be used can be signaled.
[0777] The prediction block of the IBC mode can be included in the target CTU or the left CTU, and can be limited to blocks within the reconstructed region. For example, the value of the block vector can be limited so that the prediction block of the target block is located within a specified region. The specified region can be an region of three 64x64 blocks that are encoded and / or decoded before the 64x64 block that includes the target block. By limiting the value of the block vector in this way, the memory consumption and device complexity associated with the implementation of the IBC mode can be reduced.
[0778]
[0779] Fig. 16 is a structural diagram of an encoding device according to one embodiment.
[0780] The encoding device (1600) may correspond to the encoding device (100) described above.
[0781] The encoding device (1600) may include a processing unit (1610), a memory (1630), a user interface (UI) input device (1650), a UI output device (1660), and storage (1640) that communicate with each other via a bus (1690). In addition, the encoding device (1600) may further include a communication unit (1620) connected to a network (1699).
[0782] The processing unit (1610) may be a semiconductor device that executes processing instructions stored in a central processing unit (CPU), memory (1630), or storage (1640). The processing unit (1610) may be at least one hardware processor.
[0783] The processing unit (1610) can perform generation and processing of signals, data, or information input to the encoding device (1600), output from the encoding device (1600), or used within the encoding device (1600), and can perform inspection, comparison, and judgment related to the signals, data, or information. That is, in the embodiment, generation and processing of data or information, and inspection, comparison, and judgment related to data or information can be performed by the processing unit (1610).
[0784] The processing unit (1610) may include an inter prediction unit (110), an intra prediction unit (120), a switch (115), a subtractor (125), a transformation unit (130), a quantization unit (140), an entropy encoding unit (150), an inverse quantization unit (160), an inverse transformation unit (170), an adder (175), a filter unit (180), and a reference picture buffer (190).
[0785] At least some of the inter prediction unit (110), intra prediction unit (120), switch (115), subtractor (125), transform unit (130), quantization unit (140), entropy encoding unit (150), inverse quantization unit (160), inverse transformation unit (170), adder (175), filter unit (180), and reference picture buffer (190) may be program modules and may communicate with an external device or system. The program modules may be included in the encoding device (1600) in the form of an operating system, application program modules, and other program modules.
[0786] The program modules may be physically stored on various known memory devices. Additionally, at least some of these program modules may be stored on a remote memory device that is capable of communicating with the encoding device (1600).
[0787] Program modules may include, but are not limited to, routines, subroutines, programs, objects, components, and data structures that perform functions or operations according to one embodiment, or implement abstract data types according to one embodiment.
[0788] The program modules may be composed of instructions or codes that are executed by at least one processor of the encoding device (1600).
[0789] The processing unit (1610) can execute commands or codes of the inter prediction unit (110), intra prediction unit (120), switch (115), subtractor (125), transform unit (130), quantization unit (140), entropy encoding unit (150), inverse quantization unit (160), inverse transformation unit (170), adder (175), filter unit (180), and reference picture buffer (190).
[0790] The storage unit may represent memory (1630) and / or storage (1640). The memory (1630) and storage (1640) may be various types of volatile or non-volatile storage media. For example, the memory (1630) may include at least one of read-only memory (ROM) (1631) and random access memory (RAM) (1632).
[0791] The storage unit may store data or information used for the operation of the encoding device (1600). In an embodiment, data or information possessed by the encoding device (1600) may be stored in the storage unit.
[0792] For example, the storage unit can store pictures, blocks, lists, motion information, inter prediction information, and bitstreams.
[0793] The encoding device (1600) can be implemented in a computer system including a recording medium that can be read by a computer.
[0794] The recording medium can store at least one module required for the encoding device (1600) to operate. The memory (1630) can store at least one module, and at least one module can be configured to be executed by the processing unit (1610).
[0795] Functions related to communication of data or information of the encoding device (1600) can be performed through the communication unit (1620).
[0796] For example, the communication unit (1620) can transmit the bitstream to a decryption device (1700) to be described later.
[0797]
[0798] Fig. 17 is a structural diagram of a decryption device according to one embodiment.
[0799] The decryption device (1700) can correspond to the decryption device (200) described above.
[0800] The decryption device (1700) may include a processing unit (1710), a memory (1730), a user interface (UI) input device (1750), a UI output device (1760), and storage (1740) that communicate with each other via a bus (1790). In addition, the decryption device (1700) may further include a communication unit (1720) connected to a network (1799).
[0801] The processing unit (1710) may be a semiconductor device that executes processing instructions stored in a central processing unit (CPU), memory (1730), or storage (1740). The processing unit (1710) may be at least one hardware processor.
[0802] The processing unit (1710) can perform generation and processing of signals, data, or information input to the decryption device (1700), output from the decryption device (1700), or used within the decryption device (1700), and can perform inspection, comparison, and judgment related to the signals, data, or information. That is, in the embodiment, generation and processing of data or information, and inspection, comparison, and judgment related to data or information can be performed by the processing unit (1710).
[0803] The processing unit (1710) may include an entropy decoding unit (210), an inverse quantization unit (220), an inverse transformation unit (230), an intra prediction unit (240), an inter prediction unit (250), a switch (245), an adder (255), a filter unit (260), and a reference picture buffer (270).
[0804] At least some of the entropy decoding unit (210), inverse quantization unit (220), inverse transformation unit (230), intra prediction unit (240), inter prediction unit (250), switch (245), adder (255), filter unit (260), and reference picture buffer (270) may be program modules and may communicate with external devices or systems. The program modules may be included in the decoding device (1700) in the form of an operating system, application program modules, and other program modules.
[0805] The program modules may be physically stored on various known memory devices. Additionally, at least some of these program modules may be stored on a remote memory device that can communicate with the decryption device (1700).
[0806] Program modules may include, but are not limited to, routines, subroutines, programs, objects, components, and data structures that perform functions or operations according to one embodiment, or implement abstract data types according to one embodiment.
[0807] The program modules may be composed of instructions or codes that are executed by at least one processor of the decryption device (1700).
[0808] The processing unit (1710) can execute commands or codes of the entropy decoding unit (210), the inverse quantization unit (220), the inverse transformation unit (230), the intra prediction unit (240), the inter prediction unit (250), the switch (245), the adder (255), the filter unit (260), and the reference picture buffer (270).
[0809] The storage unit may represent memory (1730) and / or storage (1740). The memory (1730) and storage (1740) may be various types of volatile or non-volatile storage media. For example, the memory (1730) may include at least one of read-only memory (ROM) (1731) and random access memory (RAM) (1732).
[0810] The storage unit may store data or information used for the operation of the decryption device (1700). In an embodiment, data or information possessed by the decryption device (1700) may be stored in the storage unit.
[0811] For example, the storage unit can store pictures, blocks, lists, motion information, inter prediction information, and bitstreams.
[0812] The decryption device (1700) can be implemented in a computer system including a recording medium that can be read by a computer.
[0813] The recording medium can store at least one module required for the decryption device (1700) to operate. The memory (1730) can store at least one module, and at least one module can be configured to be executed by the processing unit (1710).
[0814] Functions related to communication of data or information of the decryption device (1700) can be performed through the communication unit (1720).
[0815] For example, the communication unit (1720) can receive a bitstream from the encoding device (1600).
[0816] Hereinafter, the processing unit may represent the processing unit (1610) of the encoding device (1600) and / or the processing unit (1710) of the decoding device (1700). For example, in the function related to prediction, the processing unit may represent the switch (115) and / or the switch (245). In the function related to inter prediction, the processing unit may represent the inter prediction unit (110), the subtractor (125), and the adder (175), and may represent the inter prediction unit (250) and the adder (255). In the function related to intra prediction, the processing unit may represent the intra prediction unit (120), the subtractor (125), and the adder (175), and may represent the intra prediction unit (240) and the adder (255). In the function related to transformation, the processing unit may represent a transformation unit (130) and an inverse transformation unit (170), and may represent an inverse transformation unit (230). In the function related to quantization, the processing unit may represent a quantization unit (140) and an inverse quantization unit (160), and may represent an inverse quantization unit (220). In the function related to entropy encoding and / or decoding, the processing unit may represent an entropy encoding unit (150) and / or an entropy decoding unit (210). In the function related to filtering, the processing unit may represent a filter unit (180) and / or a filter unit (260). In the function related to a reference picture, the processing unit may represent a reference picture buffer (190) and / or a reference picture buffer (270).
[0817]
[0818] The above embodiments can be performed in the same and / or corresponding manner in the encoding device (1600) and the decoding device (1700). In addition, a combination of one or more of the above embodiments can be used in encoding and / or decoding an image.
[0819] The order in which the above embodiments are applied may be different in the encoding device (1600) and the decoding device (1700). Alternatively, the order in which the above embodiments are applied may be (at least partially) the same in the encoding device (1600) and the decoding device (1700).
[0820] The above embodiments can be performed for each of the luma signal and the chroma signal. The above embodiments can be performed equally for the luma signal and the chroma signal.
[0821] The shape of the block to which the above embodiments are applied may have a square shape or a non-square shape.
[0822] The above embodiments may be applied depending on the size of at least one of a target block, a coding block, a prediction block, a transform block, a block, a current block, a coding unit, a prediction unit, a transform unit, a unit, and a current unit. Here, the size may be defined as a minimum size and / or a maximum size for the above embodiments to be applied, or may be defined as a fixed size for which the above embodiments are applied. In addition, in the above embodiments, the first embodiment may be applied to the first size, and the second embodiment may be applied to the second size. In other words, the above embodiments may be applied in a complex manner depending on the size. In addition, the above embodiments may be applied only when the size is greater than or equal to the minimum size and less than or equal to the maximum size. In other words, the above embodiments may be applied only when the block size is within a certain range.
[0823] Whether or not at least one of the above embodiments is applied and / or performed may be determined based on a condition regarding the block size. In other words, at least one of the above embodiments may be applied and / or performed when a condition regarding the block size is satisfied. The condition may include a minimum block size and a maximum block size. The block may be one of the blocks described above in the embodiments and one of the units described above in the embodiments. The block to which the minimum block size is applied and the block to which the maximum block size is applied may be different from each other.
[0824] For example, the above-described embodiments may be applied and / or performed when the block size is greater than or equal to the minimum size and / or when the block size is less than or equal to the maximum size. The above-described embodiments may be applied and / or performed when the block size is greater than the minimum size and / or when the block size is less than or equal to the maximum size.
[0825] For example, the above-described embodiment can be applied only when the block size is a predefined block size. The predefined block size can be 2x2, 4x4, 8x8, 16x16, 32x32, 64x64 or 128x128. The predefined block size is (2*SIZE X )x(2*SIZE Y ) may be. SIZE X can be one of the integers greater than or equal to 1. SIZE Y can be one of the integers greater than or equal to 1.
[0826] For example, the above-described embodiment can be applied only when the size of the block is greater than or equal to the block minimum size. The above-described embodiment can be applied only when the size of the block is greater than the block minimum size. The block minimum size can be 2x2, 4x4, 8x8, 16x16, 32x32, 64x64 or 128x128. Alternatively, the block minimum size can be (2*SIZE MIN_X )x(2*SIZE MIN_Y) may be. SIZE MIN_X can be one of the integers greater than or equal to 1. SIZE MIN_Y can be one of the integers greater than or equal to 1.
[0827] For example, the above-described embodiment can be applied only when the block size is less than or equal to the maximum block size. The above-described embodiment can be applied only when the block size is smaller than the maximum block size. The maximum block size can be 2x2, 4x4, 8x8, 16x16, 32x32, 64x64 or 128x128. Alternatively, the block maximum size can be (2*SIZE MAX_X )x(2*SIZE MAX_Y ) may be. SIZE MAX_X can be one of the integers greater than or equal to 1. SIZE MAX_Y can be one of the integers greater than or equal to 1.
[0828] For example, the above-described embodiment may be applied only when the block size is greater than or equal to the minimum block size and less than or equal to the maximum block size. The above-described embodiment may be applied only when the block size is greater than or equal to the minimum block size and less than or equal to the maximum block size. The above-described embodiment may be applied only when the block size is greater than or equal to the minimum block size and less than or equal to the maximum block size. The above-described embodiment may be applied only when the block size is greater than or equal to the minimum block size and less than or equal to the maximum block size.
[0829] In the embodiments described above, the size of a block may refer to the horizontal size of the block or the vertical size of the block. The size of a block may refer to both the horizontal size of the block and the vertical size of the block. In addition, the size of a block may refer to the area of the block. Each of the area, the minimum block size, and the maximum block size may be one of integers greater than or equal to 1. In addition, the size of a block may refer to the result (or value) of a known formula using the horizontal size and the vertical size of the block or the result (or value) of a formula of the embodiment.
[0830] Additionally, in the above embodiments, the first embodiment may be applied to the first size, and the second embodiment may be applied to the second size.
[0831] The above embodiments can be applied according to temporal layers. A separate identifier can be signaled to identify the temporal layer to which the above embodiments are applicable, and the above embodiments can be applied to the temporal layer specified by the identifier. The identifier here can be defined as the lowest layer and / or the highest layer to which the above embodiments are applicable, or can be defined to indicate a specific layer to which the above embodiments are applicable. In addition, a fixed temporal layer to which the above embodiments are applicable can be defined.
[0832] For example, the above embodiments may be applied only when the temporal layer of the target image is the lowest layer. For example, the above embodiments may be applied only when the temporal layer identifier of the target image is 1 or greater. For example, the above embodiments may be applied only when the temporal layer of the target image is the highest layer.
[0833] A slice type or tile group type to which the above embodiments are applied can be defined, and the above embodiments can be applied according to the slice type or tile group type.
[0834]
[0835] Definitions of terms in this disclosure may be as follows.
[0836] A block vector can be a vector that specifies the location of a reference block in Intra Block Copy (IBC) mode.
[0837] Pairwise average can represent pairwise average or combined bi-predictive.
[0838] SKIP mode may be a mode that uses block vectors of surrounding blocks and does not transmit residual image signals.
[0839] MERGE mode can be a mode that uses block vectors of surrounding blocks and transmits residual image signals.
[0840] Merge mode can include SKIP mode, MERGE mode, or both SKIP and MERGE modes.
[0841] The merge candidate list can be the merge candidate list used by skip or merge mode.
[0842] The predicted block vector can be a motion vector of a temporal or spatial neighboring block of the target block.
[0843] The residual block vector may be a difference vector between the predicted block vector and the target block vector.
[0844] Block vector information may be information composed of a predicted block vector and a residual block vector.
[0845] A reference image index can indicate the image (or slice, tile) referenced by the target block. If the reference image index indicates an image that includes the target block, the encoding mode of the target block can be indicated as block vector prediction mode. If the reference image index indicates an image that does not include the target block, the encoding mode can be indicated as inter-frame prediction mode.
[0846] In the present disclosure, the target block may represent the current block.
[0847]
[0848] A motion vector can be expressed as a motion vector or MV.
[0849] The list of reference images can be expressed as a Reference Picture List.
[0850] The reference picture list L0 can be expressed as Reference Picture List 0 or RefPicL0.
[0851] The reference picture list L1 can be expressed as Reference Picture List 1 or RefPicL1.
[0852] A motion vector using the reference image list L0 can be expressed as MVL0.
[0853] A motion vector using the reference image list L1 can be expressed as MVL1.
[0854] The MV Predictor of non-adjacent space candidates can be expressed as NA-MVP.
[0855] The BV Predictor of a non-adjacent space candidate can be expressed as NA-BVP.
[0856] The scaled non-adjacent spatial candidate can be expressed as a Shifted non-adjacent spatial candidate or sNASP.
[0857] The MV Predictor of the scaled non-adjacent space candidate can be expressed as sNA-MVP.
[0858] The BV Predictor of the scaled non-adjacent space candidate can be expressed as sNA-BVP.
[0859]
[0860] IBC-LIC (IBC-Local Illumination Compensation) may be a technique that applies linear filtering to the IBC prediction signal. The formula for linear filtering is composed of P'(x,y)=aP(x,y)+b, and the target block (P t ) and IBC reference block (P ref ) adjacent restored pixels of the filter template (T t , Tref ) can be used to derive filter coefficients from the corresponding filter templates. Here, P(x,y) is an IBC prediction signal before filtering of the (x,y) coordinate pixel is applied, P'(x,y) is a prediction signal to which filtering of the (x,y) coordinate pixel is applied, and a and b can represent filtering coefficients.
[0861] Figure 18 illustrates the shape of a filter template.
[0862] As shown in Figure 18, the filter template size (size T ) can mean the size of the template to be used to derive the filter coefficients. For example, size T =4 may be.
[0863]
[0864] IBC-LIC Extension is an extension mode of IBC-LIC technology that can add multi-direction and multi-model modes to IBC-LIC.
[0865] IBC-LIC multi-direction may be one of the IBC-LIC extension modes that derives filter coefficients by selecting one of the template shapes of the block's L-shape template (TL-shape), top template (TTop), and left template (TLeft). TL-shape may refer to the top and left restoration pixels adjacent to the block, as shown in (A) of Fig. 18. TTop may refer to the top restoration pixel adjacent to the block, as shown in (B) of Fig. 18. TLeft may refer to the left restoration pixel adjacent to the block, as shown in (C) of Fig. 18.
[0866] The IBC-LIC multi-model can be one of the IBC-LIC extension modes that supports deriving a threshold based on a target block filter template value and using two sets of filter coefficients based on that threshold.
[0867]
[0868] FIBC (Filtered IBC) may be a technique that applies 7-tap filtering to the IBC prediction signal.
[0869] Figure 19 illustrates the shape of a FIBC filter.
[0870] The formula for FIBC filtering is P'(x,y) = a0·C + a1·N + a2·S + a3·W + a4·E + a5·P + a5·β, and the target block (P t ) and IBC reference block (P ref ) adjacent restored pixels of the filter template (T t , T ref ) can be specified to derive filter coefficients from the corresponding filter templates. Here, C means the prediction signal P(x,y) of the (x,y) coordinate pixel before filtering is applied, and N, S, W, and E including C may correspond to pixels at the positions indicated in Fig. 19, respectively. N is the prediction signal P(x,y-1) of the (x,y-1) coordinate pixel before filtering is applied, S is the prediction signal P(x,y+1) of the (x,y+1) coordinate pixel before filtering is applied, W is the prediction signal P(x-1,y) of the (x-1,y) coordinate pixel before filtering is applied, and E may be the prediction signal P(x+1,y) of the (x+1,y) coordinate pixel before filtering is applied. P may be P(x,y) 2 can mean. Also, a i represents each ith filter coefficient, and β can represent a bias value.
[0871] As shown in Figure 19, a 7-tap filter can perform filtering using a total of 7 values, including a pixel (C) to which filtering is to be applied, 4 adjacent pixels above (N), below (S), left (W), and right (E) of the pixel, a nonlinear term (P), and a bias value.
[0872]
[0873] FIG. 20 illustrates one embodiment of IBC prediction signal filtering of the present disclosure.
[0874] Figure 21 illustrates one embodiment of Dbv prediction signal filtering.
[0875] [D1] In the IBC prediction signal filtering information acquisition section, a template (T) of a target block t ), ibc_filtering_flag, ibc_filter_shape, ibc_filter_tpl_shape, ibc_filter_set_num, pred_mode_ibc_flag, general_merge_flag, merge_idx, Dbv mode, block vector BV (BV x , BV y ), ibc_lic_efibc_idx, ibc_filter_tpl_shape1, ibc_filter_tpl_shape2, the mean of the IBC prediction signal, the mean of the filter template of the target block, the histogram distribution of the IBC prediction signal, or the histogram distribution of the filter template of the target block may be used to determine at least one of whether to perform IBC filtering, the IBC filter shape, the shape of the IBC filter template, the number of IBC filter coefficient sets, the IBC filter model, the IBC filter mode, or the Dbv prediction signal filtering information.
[0876] [D2] In generating the IBC prediction signal, the block vector (BV) x , BV y ), target block position (x t_lf , y t_lf ), IBC Reference Block Blk ref , the location of the IBC reference block (x ref_lf , y ref_lf ), IBC prediction signal P for the target block according to at least one of target block width xCbW, target block height xCbH, or Dbv mode. t , or a chroma prediction signal P for the target block. c_t At least one of them can be created.
[0877] [D3-1] In the IBC filter model specification, IBC prediction signal filtering information, IBC prediction pixel, P t , the filter model can be specified based on at least one of the surrounding pixels of the IBC prediction pixel, the bias, the filter coefficients, the filter shape, ibc_filter_shape, or the IBC filter mode.
[0878] [D3-2] In obtaining IBC prediction signal filtering coefficients, ibc_filter_shape, ibc_filter_set_num, template of target block, T t , template of the IBC reference block, T ref , or a filter model and a set of filter coefficients (FilterSet) can be obtained according to at least one of the IBC filter models.
[0879] [D3-3] In performing IBC prediction signal filtering, filter coefficient set FitlerSet, ibc_filter_set_num, IBC prediction signal, P t , or an IBC prediction signal P' filtered according to at least one of the filter models. t You can get it.
[0880] [D4-1] In the specific Dbv filter model, Dbv mode, Dbv prediction pixel, P c_t , the Dbv filter model can be specified based on at least one of the Dbv prediction signal filtering information, bias, surrounding pixels of the Dbv prediction pixel, filter shape, ibc_filter_shape, filter coefficients, or filter mode of the corresponding luma block.
[0881] [D4-2] In obtaining the Dbv prediction signal filtering coefficients, the ibc_filter_shape of the corresponding luma block, the ibc_filter_set_num of the corresponding luma block, the template of the Dbv target block, T c_t , template of the Dbv reference block, T c_ref , or Dbv A filter model and a set of filter coefficients (FilterSet) can be obtained based on at least one of the filter models.
[0882] [D4-3] In performing Dbv prediction signal filtering, the filter coefficient set, FitlerSet, ibc_filter_set_num of the corresponding luma block, Dbv prediction signal, P c_t , or an IBC prediction signal P' filtered according to one of the Dbv filter models. c_t You can get it.
[0883]
[0884] In the present disclosure, a filter template refers to a template used to derive filter coefficients for IBC prediction signal filtering, and the filter template can represent adjacent restored pixels of a target block and an IBC reference block. As shown in Fig. 18, the size of the template T can be set to a certain value.
[0885] In the present disclosure, the filter shape may refer to pixels used for filtering. The filter shape may be a square of a predetermined size or a cross of a predetermined size. For example, the filter shape may be a 1x1 square, a 3x3 cross, or a 3x3 square.
[0886] In the present disclosure, the template shape may mean the shape of a filter template. Referring to FIG. 18, the left template (T) of the block Left ), the top template of the block (T Top ), and an L-shape template (T) that uses templates on both the left and top of the block. L-shape ) is being shown. T Left , T Top , or T L-shape Filtering can be performed using at least one of the following.
[0887] In the present disclosure, a filter coefficient set may refer to a set of filter coefficients used in a filter model. The number of filter coefficient sets may be at least one. When performing filtering on a signal predicted by the IBC of a target block, one or more filter coefficient sets may be used.
[0888] In the present disclosure, a filter model means a formula used to perform IBC prediction signal filtering, and the formula can be configured using at least one of an IBC prediction pixel to be filtered, a surrounding pixel of the IBC prediction pixel, a bias, or a filter coefficient.
[0889] For example, the filter model could be P'(x,y)=aP(x,y)+b.
[0890] For example, the filter model can be P'(x,y) = a0·C + a1·N + a2·S + a3·W + a4·E + a5·P + a5·β.
[0891] For example, the filter model is P'(x,y) = a0·C + a1·N + a2·S + a3·W + a4·E + a0·C 2 + It can be a5·β.
[0892]
[0893] [D1] In the IBC prediction signal filtering information acquisition unit, information on whether filtering of the IBC prediction signal is performed can be acquired.
[0894] The ibc_filtering_flag syntax element can indicate whether filtering should be performed. If ibc_filtering_flag is the first value, filtering is performed on the IBC prediction block, and if it is the second value, filtering may not be performed.
[0895]
[0896] Figure 22 illustrates a block diagram of an IBC prediction signal filtering process according to the value of ibc_filtering_flag.
[0897] In one embodiment, when ibc_filtering_flag is the first value, as in FIG. 22(A), filtering may be performed on the IBC prediction block, and when ibc_filtering_flag is the second value, as in FIG. 22(B), filtering may not be performed. For example, the first value may be 1, and the second value may be 0. Or, for example, the first value may be 0, and the second value may be 1.
[0898]
[0899] Figure 23 illustrates an example in which a 1x1 rectangular filter is used when the ibc_filter_shape syntax element is the first value, and a 3x3 cross filter is used when the ibc_filter_shape syntax element is the second value.
[0900] Figure 24 illustrates an example of a case where a 3x3 square filter is used when the ibc_filter_shape syntax element is the first value, and a 3x3 cross filter is used when the ibc_filter_shape syntax element is the second value.
[0901] Information about the filter shape for IBC prediction signal filtering can be obtained. The ibc_filter_shape syntax element can indicate the filter shape. The filter shape can be either a rectangular filter of a given size or a cross-shaped filter of a given size.
[0902] For example, if ibc_filter_shape is not signaled, the filter shape can be determined as a square shape. As another example, if ibc_filter_shape is not signaled, the filter shape can be determined as a cross shape.
[0903] In one embodiment, the ibc_filter_shape syntax element may indicate a filter shape. When the ibc_filter_shape syntax element is the first value, IBC prediction signal filtering may be applied using a 1x1 square filter, and when the ibc_filter_shape syntax element is the second value, a 3x3 cross filter may be used. That is, when the ibc_filter_shape syntax element is the first value, filtering may be performed using the p0 pixel value when filtering at the p0 pixel, as shown in FIG. 23(A). That is, when the ibc_filter_shape syntax element is the second value, filtering may be performed using pixels p0 to p4 together when filtering at the p0 pixel, as shown in FIG. 23(B). For example, the first value may be 1, and the second value may be 0. Alternatively, the first value may be 0, and the second value may be 1.
[0904]
[0905] Information about the shape of the filter template for IBC prediction signal filtering can be obtained.
[0906] The ibc_filter_tpl_shape syntax element can indicate the shape of a filter template. As shown in Figure 18, the filter template shape is T L-shape , T Top , or T Left It could be one of them.
[0907] In one embodiment, if ibc_filter_tpl_shape is the first value, the filter template shape is an L-shape template T. L-shape can be used. If ibc_filter_tpl_shape is the second value, the top template T of the block as the filter template shape Top can be used. If ibc_filter_tpl_shape is the third value, the left template T of the block is used as the filter template shape. Left can be used.
[0908] For example, the first value may be 0, the second value may be 1, and the third value may be 2.
[0909] If ibc_filter_tpl_shape is not signaled, a predefined template shape can be used. For example, a predefined template shape is T L-shape It can be. Or, a predefined template shape is T Top It can be. Or, a predefined template shape is T Left It could be.
[0910]
[0911] Information about the number of filter coefficient sets for IBC prediction signal filtering can be obtained.
[0912] The ibc_filter_set_num syntax element can indicate the number of filter coefficient sets.
[0913] If ibc_filter_set_num is the first value, it can be instructed to use one filter coefficient set, and if ibc_filter_set_num is the i-th value, it can be instructed to use i (i=2, 3,...) filter coefficient sets.
[0914] For example, the first value can be 0. The i-th value can be i-1.
[0915] If ibc_filter_set_num is the first value, it can indicate the use of one filter coefficient set, and if ibc_filter_set_num is the second value, it can indicate the use of multiple filter coefficient sets. For example, the first value can be 0. The second value can be 1.
[0916] If ibc_filter_set_num is not signaled, a predefined number of filter coefficient sets can be used.
[0917] For example, one set of filter coefficients can be used for filtering an IBC prediction signal, i.e., it can be derived as ibc_filter_set_num = 1.
[0918] Alternatively, two sets of filter coefficients can be used for filtering the IBC prediction signal, i.e., ibc_filter_set_num = 2.
[0919] Alternatively, three sets of filter coefficients can be used for IBC prediction signal filtering, i.e., ibc_filter_set_num = 3.
[0920]
[0921] P t '(x,y) = F(P t For (x,y), FilterSet), P t (x,y) means the IBC prediction signal pixel value at the (x,y) coordinate, and P t '(x,y) is P t It can mean the pixel value with filtering applied to (x,y).
[0922] F(P t (x,y), FilterSet) uses FilterSet to transform pixels P t This may mean applying filtering to (x,y).
[0923]
[0924] In one embodiment, if ibc_filter_set_num is the first value, it may indicate the use of one filter coefficient set, and if ibc_filter_set_num is the second value, it may indicate the use of two filter coefficient sets.
[0925] When using one set of filter coefficients, P with one set of filter coefficients t (x,y) can be filtered.
[0926] If ibc_filter_set_num is the first value, P t '(x,y) = F(Pt (x,y), FilterSet)
[0927] When using two sets of filter coefficients, the filter coefficient set can be selected and used based on the average value Thres of the pixels belonging to the filter template. That is, P t If the (x,y) value is less than or equal to Thres, the first filter coefficient set FilterSet1 is used, and if it is greater than Thres, the second filter coefficient set FilterSet2 can be used.
[0928] If ibc_filter_set_num is the second value,
[0929] P t '(x,y) = F(P t (x,y), FilterSet1) if, P t (x,y) ≤ Thres
[0930] P t '(x,y) = F(P t (x,y), FilterSet2) if, P t (x,y) > Thres
[0931]
[0932] In one embodiment, if ibc_filter_set_num is the first value, it may indicate the use of one filter coefficient set, and if ibc_filter_set_num is the second value, it may indicate the use of three filter coefficient sets.
[0933] When using one set of filter coefficients, P with one set of filter coefficients t (x,y) can be filtered.
[0934] If ibc_filter_set_num is the first value, P t '(x,y) = F(P t (x,y), FilterSet)
[0935] When using three sets of filter coefficients, the filter coefficient sets can be selected and used based on two threshold values Thres0, Thres1 (Thres0< Thres1). That is, P t If the (x,y) value is less than or equal to Thres0, the first filter coefficient set FilterSet0 is used. If it is greater than Thres0 and less than or equal to Thres1, the second filter coefficient set FilterSet1 can be used. If it is greater than Thres1, the third filter coefficient set FilterSet2 can be used.
[0936] Thres0 can mean the first threshold value, Thres1 can mean the second threshold value. (Thres0 <Thres1). 필터 템플릿에 속한 화소들이 총 N개 라 할 때, 화소값 크기를 기준으로 필터 템플릿에 속한 화소들을 오름 정렬한 후 N / 3 번째 크기의 화소의 값 Thres0으로 설정할 수 있다. 그리고 2N / 3 번째 크기의 화소의 값 Thres1으로 설정할 수 있다.
[0937] If ibc_filter_set_num is the second value,
[0938] P t '(x,y) = F(P t (x,y), FilterSet1) if, P t (x,y) ≤ Thres0
[0939] P t '(x,y) = F(P t (x,y), FilterSet2) if, Thres0< P t (x,y) ≤ Thres1
[0940] P t '(x,y) = F(P t (x,y), FilterSet2) if, P t (x,y) > Thres1
[0941]
[0942] In one embodiment, if ibc_filter_set_num is the first value, it may indicate the use of one filter coefficient set, if it is the second value, it may indicate the use of two filter coefficient sets, and if it is the third value, it may indicate the use of three filter coefficient sets.
[0943] When using one set of filter coefficients, P with one set of filter coefficients t (x,y) can be filtered.
[0944] If ibc_filter_set_num is the first value, P t '(x,y) = F(P t (x,y), FilterSet)
[0945] When using two sets of filter coefficients, the filter coefficient set can be selected and used based on the average value Thres of the pixels belonging to the filter template. That is, P t If the (x,y) value is less than or equal to Thres, the first filter coefficient set FilterSet1 is used, and if it is greater than Thres, the second filter coefficient set FilterSet2 can be used.
[0946] If ibc_filter_set_num is the second value,
[0947] P t '(x,y) = F(P t (x,y), FilterSet1) if, P t (x,y) ≤ Thres
[0948] P t '(x,y) = F(P t (x,y), FilterSet2) if, P t (x,y) > Thres
[0949] When using three sets of filter coefficients, two thresholds Thres0Thres1(Thres0 <Thres1)에 따라 필터 계수 세트를 선택하여 사용할 수 있다. 즉 P tIf the (x,y) value is less than or equal to Thres0, the first filter coefficient set FilterSet1 is used. If it is greater than Thres0 and less than or equal to Thres1, the second filter coefficient set FilterSet2 can be used. If it is greater than Thres1, the third filter coefficient set FilterSet3 can be used.
[0950] Thres0 can mean the first threshold value, Thres1 can mean the second threshold value. (Thres0 <Thres1). 필터 템플릿에 속한 화소들이 총 N개라 할 때, 화소값 크기를 기준으로 필터 템플릿에 속한 화소들을 오름 정렬한 후 N / 3 번째 크기의 화소의 값 Thres0으로 설정할 수 있다. 그리고 2N / 3 번째 크기의 화소의 값 Thres1으로 설정할 수 있다.
[0951] If ibc_filter_set_num is a third value,
[0952] P t '(x,y) = F(P t (x,y), FilterSet1) if, P t (x,y) ≤ Thres0
[0953] P t '(x,y) = F(P t (x,y), FilterSet2) if, Thres0< P t (x,y) ≤ Thres1
[0954] P t '(x,y) = F(P t (x,y), FilterSet2) if, P t (x,y) > Thres1
[0955]
[0956] An IBC filter mode can be defined by at least one of whether filtering is performed, filter shape, filter template shape, and number of filter coefficient sets.
[0957] In one embodiment, the IBC filter mode may be defined by at least one of the signaled syntax elements ibc_filter_flag, ibc_filter_shape, ibc_filter_tpl_shape, or ibc_filter_set_num.
[0958] In one embodiment, the IBC filter mode may be defined by a signaled syntax element to signal the IBC filter mode.
[0959] In one embodiment, the IBC filter mode may be defined by at least one of the signaled ibc_filter_flag, ibc_filter_shape, ibc_filter_tpl_shape1, ibc_filter_tpl_shape2, or ibc_filter_set_num syntax elements.
[0960] IBC filter modes can be defined in nine modes as follows:
[0961] 1. Not IBC-LIC mode may be a mode that does not apply filtering.
[0962] 2. L-shaped IBC-LIC mode is T L-shape , a rectangular filter, and a mode that applies filtering with a set of filters.
[0963] 3. Multi-model IBC-LIC mode is T L-shape , a rectangular filter, and a mode that applies filtering with multiple sets of filters, where the multiple can be 2.
[0964] 4. Top-only IBC-LIC mode is T top , a rectangular filter, and a mode that applies filtering with a set of filters.
[0965] 5. Left-only IBC-LIC mode is T Left , a rectangular filter, and a mode that applies filtering with a set of filters.
[0966] 6. L-shaped FIBC mode is T L-shape , a cross filter, and a mode that applies filtering with one set of filters.
[0967] 7. Multi-model FIBC mode is T L-shape , a cross filter, and a mode that applies filtering with multiple sets of filters, where the multiple can be 2.
[0968] 8. Top-only FIBC mode is T top , a cross filter, and a mode that applies filtering with one set of filters.
[0969] 9. Left-only FIBC mode is T Left , a cross filter, and a mode that applies filtering with one set of filters.
[0970]
[0971] In one embodiment, the IBC filter mode may be determined by at least one of the signaled ibc_filter_flag, ibc_filter_shape, ibc_filter_tpl_shape, or ibc_filter_set_num.
[0972] If ibc_filter_shape is the first value (1x1 rectangular filter) and ibc_filter_flag is the first value, you can specify Not IBC-LIC. As another example, if ibc_filter_flag is the second value, you can specify that at least one of IBC-LIC and FIBC filtering is performed.
[0973] ibc_filter_shape is the first value (1x1 rectangular filter), ibc_filter_flag is the second value, and ibc_filter_tpl_shape is the first value (T L-shape ), if ibc_filter_set_numㅁ has the first value (1 filter coefficient set), an L-shaped IBC-LIC can be specified.
[0974] ibc_filter_shape is the first value (1x1 rectangular filter), ibc_filter_flag is the second value, and ibc_filter_tpl_shape is the first value (T L-shape ), if ibc_filter_set_num has a second value (multiple sets of filter coefficients), Multi-model IBC-LIC can be specified. Here, the plurality can be 2.
[0975] ibc_filter_shape is the first value (1x1 rectangular filter), ibc_filter_flag is the second value, and ibc_filter_tpl_shape is the second value (T top ), if ibc_filter_set_num has the first value (1 filter coefficient set), Top-only IBC-LIC can be specified.
[0976] ibc_filter_shape is the first value (1x1 rectangular filter), ibc_filter_flag is the second value, and ibc_filter_tpl_shape is the third value (T Left ), Left-only IBC-LIC can be specified when ibc_filter_set_num has the first value (1 filter coefficient set).
[0977] ibc_filter_shape is the second value (3x3 cross filter), ibc_filter_tpl_shape is the first value (T L-shape ), if ibc_filter_set_num has the first value (one filter coefficient set), an L-shaped FIBC can be specified.
[0978] ibc_filter_shape is the second value (3x3 cross filter), ibc_filter_tpl_shape is the first value (T L-shape), if ibc_filter_set_num has a second value (multiple sets of filter coefficients), a Multi-model FIBC can be specified. Here, the plurality can be 2.
[0979] ibc_filter_shape is the second value (3x3 cross filter), ibc_filter_tpl_shape is the second value (T top ), if ibc_filter_set_num has the first value (1 filter coefficient set), Top-only FIBC can be specified.
[0980] ibc_filter_shape is the second value (3x3 cross filter), ibc_filter_tpl_shape is the third value (T Left ), if ibc_filter_set_num has the first value (1 filter coefficient set), Left-only FIBC can be specified.
[0981]
[0982] In one embodiment, the IBC filter mode may be defined by a signaled syntax element to signal the IBC filter mode.
[0983] For the first value, you can specify Not IBC-LIC. For the second value, you can specify L-shaped IBC-LIC. For the third value, you can specify Multi-model IBC-LIC (L-shape). For the fourth value, you can specify L-shaped IBC-LIC.
[0984] For the fifth value, Left IBC-LIC can be specified. For the sixth value, L-shaped FIBC can be specified. For the seventh value, Multi-model FIBC (L-shape) can be specified. For the eighth value, L-shaped FIBC is indicated. For the ninth value, Left FIBC can be specified.
[0985] ibc_lic_efibc_index can be binarized as shown in the table below.
[0986] (As shown in Table 7), the first value can be binarized as 00, the second value as 0100, the third value as 0101, the fourth value as 0110, the fifth value as 0111, the sixth value as 100, the seventh value as 101, the eighth value as 110, and the ninth value as 111.
[0987] ibc_lic_efibc _idxbinarizationMode100Not IBC-LIC20100L-shaped IBC-LIC30101Multi-model IBC-LIC40110Top-only IBC-LIC50111Left-only IBC-LIC6100L-shaped FIBC7101Multi-model FIBC8110Top-only FIBC9111Left-only FIBC
[0988] (As shown in Table 8), the first value can be binarized as 00, the second value as 010, the third value as 0110, the fourth value as 01110, the fifth value as 01111, the sixth value as 10, the seventh value as 110, the eighth value as 1110, and the ninth value as 1111.
[0989] ibc_lic_efibc _idxbinarizationMode100Not IBC-LIC2010L-shaped IBC-LIC30110Multi-model IBC-LIC401110Top-only IBC-LIC501111Left-only IBC-LIC610L-shaped FIBC7110Multi-model FIBC81110Top-only FIBC91111Left-only FIBC
[0990] (As shown in Table 9), the first value can be binarized as 00, the second value as 010, the third value as 011, the fourth value as 110, the fifth value as 101, the sixth value as 1100, the seventh value as 1101, the eighth value as 1110, and the ninth value as 1111.
[0991] ibc_lic_efibc _idxbinarizationMode100Not IBC-LIC2010L-shaped IBC-LIC3011Multi-model IBC-LIC4100Top-only IBC-LIC5101Left-only IBC-LIC61100L-shaped FIBC71101Multi-model FIBC81110Top-only FIBC91111Left-only FIBC
[0992]
[0993] In one embodiment, as shown in Table 10, by signaling ibc_filter_flag, ibc_lic flag, and ibc_lic_filter_index, at least one of L-shape IBC-LIC, Multi-model IBC-LIC, Top-only IBC-LIC, Left-only IBC-LIC, L-shape IBC-LIC, Multi-model FIBC, Top-only FIBC, or Left-only FIBC may be indicated.
[0994] If ibc_filter_flag is the first value (1x1 rectangular filter), you can specify Not IBC-LIC when ibc_lic flag is the first value. As another example, if ibc_filter_flag is the second value, you can specify that at least one of IBC-LIC and FIBC filtering is performed.
[0995] If ibc_filter_flag has the first value (1x1 rectangular filter), ibc_lic flag has the second value (perform filtering), and ibc_lic_filter_index has the first value, L-shaped IBC-LIC can be specified as the IBC filter mode.
[0996] If ibc_filter_flag has the first value (1x1 rectangular filter), ibc_lic flag has the second value (perform filtering), and ibc_lic_filter_index has the second value, then Multi-model IBC-LIC can be specified as the IBC filter mode.
[0997] If ibc_filter_flag has the first value (1x1 rectangular filter), ibc_lic flag has the second value (perform filtering), and ibc_lic_filter_index has the third value, Top-only IBC-LIC can be specified as the IBC filter mode.
[0998] If ibc_filter_flag has the first value (1x1 rectangular filter), ibc_lic flag has the second value (perform filtering), and ibc_lic_filter_index has the fourth value, Left-only IBC-LIC can be specified as the IBC filter mode.
[0999] An L-shaped FIBC can be specified when ibc_filter_flag has the second value (3x3 cross-shaped filter), ibc_lic flag has the first value (performs filtering), and ibc_lic_filter_index has the first value.
[1000] Multi-model FIBC can be specified when ibc_filter_flag has a second value (3x3 cross filter), ibc_lic flag has a first value (performs filtering), and ibc_lic_filter_index has a second value.
[1001] Top-only FIBC can be specified when ibc_filter_flag has a second value (3x3 cross filter), ibc_lic flag has a second value (perform filtering), and ibc_lic_filter_index has a third value.
[1002] Left-only FIBC can be specified when ibc_filter_flag has the second value (3x3 cross filter), ibc_lic flag has the second value (perform filtering), and ibc_lic_filter_index has the fourth value.
[1003] ibc_filter_flagibc_lic_flagibc_lic_filter_indexbinarizationMode00-00Not IBC-LIC0110100L-shaped IBC-LIC0120101Multi-model IBC-LIC0130110Top-only IBC-LIC0140111Left-only IBC-LIC1-1100L-shaped FIBC1-2101Multi-model FIBC1-3110Top-only FIBC1-4110Left-only FIBC
[1004]
[1005] Figure 25 illustrates an example of an IBC filter mode information signaling block diagram.
[1006] In one embodiment, as shown in FIG. 25, the IBC filter mode may be defined by at least one of the signaled ibc_filter_flag, ibc_filter_shape, ibc_filter_tpl_shape1, ibc_filter_tpl_shape2, or ibc_filter_set_num syntax elements.
[1007] If ibc_filter_tpl_shape1 is the first value, the filter template shape is T L-shape , and if it is the second value, the filter template shape is T Top , TLeft It indicates that it is one of them.
[1008] If ibc_filter_tpl_shape2 is the first value, the filter template shape is T Top , and if it is the second value, the filter template shape is T Left It directs to be.
[1009] You can specify Not IBC-LIC when ibc_filter_shape is the first value and ibc_filter_flag is the first value. As another example, use Not IBC-LIC when ibc_filter_flag is the first value.
[1010] If ibc_filter_shape has the first value, ibc_filter_flag has the second value, ibc_filter_tpl_shape1 has the first value, and ibc_filter_set_num has the first value, an L-shaped IBC-LIC can be specified.
[1011] Multi-model IBC-LIC can be specified when ibc_filter_shape has the first value, ibc_filter_flag has the second value, ibc_filter_tpl_shape1 has the first value, and ibc_filter_set_num has the second value.
[1012] Top-only IBC-LIC can be specified when ibc_filter_shape has the first value, ibc_filter_flag has the second value, ibc_filter_tpl_shape1 has the second value, and ibc_filter_tpl_shape2 has the first value.
[1013] Left-only IBC-LIC can be specified when ibc_filter_shape has the first value, ibc_filter_flag has the second value, ibc_filter_tpl_shape1 has the second value, and ibc_filter_tpl_shape2 has the second value.
[1014] An L-shaped FIBC can be specified when ibc_filter_shape has the second value, ibc_filter_tpl_shape1 has the first value, and ibc_filter_set_num has the first value.
[1015] Multi-model FIBC can be specified when ibc_filter_shape has a second value, ibc_filter_tpl_shape1 has a first value, and ibc_filter_set_num has a second value.
[1016] Top-only FIBC can be specified when ibc_filter_shape has a second value, ibc_filter_tpl_shape1 has a second value, and ibc_filter_tpl_shape2 has a first value.
[1017] Left-only FIBC can be specified when ibc_filter_shape has a second value, ibc_filter_tpl_shape1 has a second value, and ibc_filter_tpl_shape2 has a second value.
[1018]
[1019] Figure 26 illustrates an example of an IBC filter mode information signaling block diagram.
[1020] In one embodiment, as shown in FIG. 26, the IBC filter mode may be defined by at least one of the signaled ibc_filter_flag, ibc_filter_shape, ibc_filter_tpl_shape1, ibc_filter_tpl_shape2, or ibc_filter_set_num syntax elements.
[1021] If ibc_filter_tpl_shape1 is the first value, the filter template shape is T L-shape , and indicates that one set of filter coefficients is used, and if the second value is T, multiple models are used, or the filter template shape is T Top , T Left It can be indicated as one of the following.
[1022] If ibc_filter_tpl_shape2 is the first value, the filter template shape is T Top , and if it is the second value, the filter template shape is T Left can be directed.
[1023] If ibc_filter_shape is the first value and ibc_filter_flag is the first value, Not IBC-LIC is used. As another example, if ibc_filter_flag is the first value, Not IBC-LIC can be used.
[1024] If ibc_filter_shape has the first value, ibc_filter_flag has the second value, and ibc_filter_tpl_shape1 has the first value, an L-shaped IBC-LIC can be used.
[1025] Multi-model IBC-LIC can be specified when ibc_filter_shape has the first value, ibc_filter_flag has the second value, ibc_filter_tpl_shape1 has the first value, and ibc_filter_set_num has the second value.
[1026] Top-only IBC-LIC can be specified when ibc_filter_shape has the first value, ibc_filter_flag has the second value, ibc_filter_tpl_shape1 has the second value, and ibc_filter_tpl_shape2 has the first value.
[1027] Left-only IBC-LIC can be specified when ibc_filter_shape has the first value, ibc_filter_flag has the second value, ibc_filter_tpl_shape1 has the second value, and ibc_filter_tpl_shape2 has the second value.
[1028] An L-shaped FIBC can be specified when ibc_filter_shape has the second value, ibc_filter_tpl_shape1 has the first value, and ibc_filter_set_num has the first value.
[1029] Multi-model FIBC can be specified when ibc_filter_shape has a second value, ibc_filter_tpl_shape1 has a first value, and ibc_filter_set_num has a second value.
[1030] Top-only FIBC can be specified when ibc_filter_shape has a second value, ibc_filter_tpl_shape1 has a second value, and ibc_filter_tpl_shape2 has a first value.
[1031] Left-only FIBC can be specified when ibc_filter_shape has a second value, ibc_filter_tpl_shape1 has a second value, and ibc_filter_tpl_shape2 has a second value.
[1032]
[1033] The IBC prediction signal filtering information acquisition unit can signal that it is in IBC merge mode by at least one of pred_mode_ibc_flag, general_merge_flag, or merge_idx.
[1034] In one embodiment, for IBC merge mode, at least one of whether filtering is performed, filter shape, filter template shape, filter coefficients, number of filter coefficient sets, or IBC filter mode may be inherited.
[1035] In one embodiment, for IBC merge mode, at least one of ibc_filter_flag, ibc_filter_shape, ibc_filter_tpl_shape, ibc_filter_set_num, or IBC filter mode may be inherited.
[1036] As an example, in the case of IBC merge mode, if the merge candidate block uses Multi-models, the target block may also use Multi-models.
[1037] As an example, in the case of IBC merge mode, if the merge candidate block uses an L-shape template, the target block may also use an L-shape template.
[1038] As an example, in the case of IBC merge mode, if the merge candidate block uses a top-only template, the target block may also use a top-only template.
[1039] As an example, in the case of IBC merge mode, if the merge candidate block uses a Left-only template, the target block may also use a Left-only template.
[1040]
[1041] Filtering of target blocks can be determined based on IBC merge candidates.
[1042] In one embodiment, if the IBC merge candidate is not filtered in Not IBC-LIC filter mode, the target block may not be filtered either.
[1043] In one embodiment, if the IBC merge candidate is filtered in the L-shaped IBC-LIC filter mode, the target block may also be filtered in the L-shaped IBC-LIC mode.
[1044] In one embodiment, if the IBC merge candidate is filtered in the Multi-model IBC-LIC filter mode, the target block may also be filtered in the Multi-model IBC-LIC mode.
[1045] In one embodiment, if the IBC merge candidate is filtered in Top-only IBC-LIC filter mode, the target block may also be filtered in Top-only IBC-LIC mode.
[1046] In one embodiment, if the IBC merge candidate is filtered in Left-only IBC-LIC filter mode, the target block may also be filtered in Left-only IBC-LIC mode.
[1047] In one embodiment, if the IBC merge candidate is filtered in the L-shaped FIBC filter mode, the target block may also be filtered in the L-shaped FIBC mode.
[1048] In one embodiment, if the IBC merge candidate is filtered in Multi-model FIBC filter mode, the target block may also be filtered in Multi-model FIBC mode.
[1049] In one embodiment, if the IBC merge candidate is filtered in Top-only FIBC filter mode, the target block may also be filtered in Top-only FIBC mode.
[1050] In one embodiment, if the IBC merge candidate is filtered in Left-only FIBC filter mode, the target block may also be filtered in Left-only FIBC mode.
[1051]
[1052] The Dbv of the present disclosure may be denoted as DBV.
[1053] Dbv may be a chroma prediction mode that scales the block vector used in the luma block to generate a chroma prediction signal when the luma block corresponding to the chroma target block is encoded with IBC or intraTMP during chroma block prediction.
[1054] The IBC prediction signal filtering information acquisition unit can inherit luma filter information in Chroma Dbv mode.
[1055] In one embodiment, when a chroma block is encoded with Dbv, the block vector of the luma block is inherited, and at least one of whether filtering is performed, a filter shape, a filter template shape, filter coefficients, the number of filter coefficient sets, or an IBC filter mode may be inherited together.
[1056] In one embodiment, when a chroma block is encoded with Dbv, the block vector of the luma block is inherited, and at least one of ibc_filter_flag, ibc_filter_shape, ibc_filter_tpl_shape, ibc_filter_set_num, or IBC filter mode may be inherited together.
[1057] As an example, if a chroma block is encoded with Dbv, and the corresponding luma block used Multi-models, the target chroma block may also use Multi-models.
[1058] In one embodiment, if a chroma block is encoded with Dbv, and the corresponding luma block used an L-shape template, the target chroma block may also use an L-shape template.
[1059] In one embodiment, if a chroma block is encoded with Dbv, and the corresponding luma block used a top-only template, the target chroma block may also use a top-only template.
[1060] In one embodiment, if a chroma block is encoded with Dbv, and the corresponding luma block used a left-only template, the target chroma block may also use a left-only template.
[1061] In one embodiment, when a chroma block is encoded in the Dbv mode, the block vector of the corresponding luma block is inherited, and at least one of whether filtering is performed, a filter shape, a filter template shape, filter coefficients, the number of filter coefficient sets, an IBC filter mode, ibc_filter_set_num, ibc_filtering_flag, ibc_filter_shape, ibc_filter_tpl_shape, intraTMP_LIC_flag, intraTMP_LIC_index, or IntraTMP_FLM_flag may be inherited together. The intraTMP_LIC_flag may be information indicating that the luma block is in the Intra TMP mode and an L-shaped IntraTMP-LIC filter is applied to the luma block. The intraTMP_LIC_index may be information indicating that at least one of a Multi-model, an L-shaped template, a Top-only template, and a Left-only template is used when the luma block is in the IntraTMP mode and LIC is applied. IntraTMP_FLM_flag may be information indicating that the luma block is in Intra TMP mode and that an IntraTMP-FLM filter is applied to the luma block.
[1062] The “Dbv prediction signal filtering information” described in the present disclosure may include at least one of whether filtering is performed, a filter shape, a filter template shape, a filter coefficient, the number of filter coefficient sets, an IBC filter mode, ibc_filter_set_num, ibc_filtering_flag, ibc_filter_shape, ibc_filter_tpl_shape, intraTMP_LIC_flag, intraTMP_LIC_index, or IntraTMP_FLM_flag.
[1063]
[1064] Filtering of a chroma block can be determined based on filter information of the corresponding luma block.
[1065] In one embodiment, if the corresponding luma block has not been filtered in the Not IBC-LIC filter mode, the chroma target block may not be filtered either.
[1066] In one embodiment, if the corresponding luma block is filtered in the L-shaped IBC-LIC filter mode, the chroma target block may also be filtered in the L-shaped IBC-LIC mode.
[1067] In one embodiment, if the corresponding luma block is filtered in the Multi-model IBC-LIC filter mode, the chroma target block may also be filtered in the Multi-model IBC-LIC mode.
[1068] In one embodiment, if the corresponding luma block is filtered in the Top-only IBC-LIC filter mode, the chroma target block may also be filtered in the Top-only IBC-LIC mode.
[1069] In one embodiment, if the corresponding luma block is filtered in Left-only IBC-LIC filter mode, the chroma target block may also be filtered in Left-only IBC-LIC mode.
[1070] In one embodiment, if the corresponding luma block is filtered in the L-shaped FIBC filter mode, the chroma target block may also be filtered in the L-shaped FIBC mode.
[1071] In one embodiment, if the corresponding luma block is filtered in the Multi-model FIBC filter mode, the chroma target block may also be filtered in the Multi-model FIBC mode.
[1072] In one embodiment, if the corresponding luma block is filtered in the Top-only FIBC filter mode, the chroma target block may also be filtered in the Top-only FIBC mode.
[1073] In one embodiment, if the corresponding luma block is filtered in Left-only FIBC filter mode, the chroma target block may also be filtered in Left-only FIBC mode.
[1074] In one embodiment, when the corresponding luma block is filtered with the L-shaped IntraTMP-LIC filter mode, the chroma target block can also be filtered with the L-shaped IntraTMP-LIC filter mode. The L-shaped IntraTMP-LIC filter mode generates a prediction signal with IntraTMP for the luma block, and T for the generated prediction signal. L-shape , a rectangular filter, a mode that applies filtering with a set of filters. At least one of intraTMP_LIC_flag, or intraTMP_LIC_index can indicate whether the luma block is in L-shaped IntraTMP-LIC filter mode.
[1075] In one embodiment, when the corresponding luma block is filtered with the Multi-model IntraTMP-LIC filter mode, the chroma target block can also be filtered with the Multi-model IntraTMP-LIC filter mode. The Multi-model IntraTMP-LIC filter mode generates a prediction signal with IntraTMP for the luma block, and T for the generated prediction signal. L-shape , a rectangular filter, a mode that performs filtering with two sets of filters. At least one of intraTMP_LIC_flag and intraTMP_LIC_index can indicate whether the luma block is in Multi-model IntraTMP-LIC filter mode.
[1076] In one embodiment, when the corresponding luma block is filtered with the Top-only IntraTMP-LIC filter mode, the chroma target block can also be filtered with the Top-only IntraTMP-LIC filter mode. The Top-only IntraTMP-LIC filter mode generates a prediction signal with IntraTMP for the luma block, and T for the generated prediction signal. Top , a rectangular filter, a mode that performs filtering with a set of filters. At least one of intraTMP_LIC_flag and intraTMP_LIC_index can indicate whether the luma block is in Top-only IntraTMP-LIC filter mode.
[1077] In one embodiment, when the corresponding luma block is filtered with the Left-only IntraTMP-LIC filter mode, the chroma target block can also be filtered with the Left-only IntraTMP-LIC filter mode. The Left-only IntraTMP-LIC filter mode generates a prediction signal with IntraTMP for the luma block, and T for the generated prediction signal. Left, a rectangular filter, a mode that performs filtering with a set of filters. At least one of intraTMP_LIC_flag, or intraTMP_LIC_index can indicate whether the luma block is in Left-only IntraTMP-LIC filter mode.
[1078] In one embodiment, if the corresponding luma block is filtered using the IntraTMP-FLM filter mode, the chroma target block may also be filtered using the IntraTMP-FLM filter mode. The IntraTMP-FLM filter mode may be a mode in which a prediction signal is generated using IntraTMP for the luma block and FLM filtering is performed on the generated prediction signal. Whether the luma block is in the IntraTMP-FLM filter mode may be indicated by intraTMP_FLM_flag.
[1079] In one embodiment, if the corresponding luma block is filtered in the IntraTMP-FLM filter mode, the chroma target block can be filtered in the FIBC filter mode.
[1080]
[1081] In the IBC prediction signal filtering information acquisition unit, the shape of the IBC filter template can be derived from the IBC prediction signal and the values of the surrounding restored pixels of the target block (filter template pixels of the target block).
[1082] All or part of the IBC prediction signal can be used to derive the template shape.
[1083] The ibc_filter_tpl_shape syntax element can derive an IBC filter template shape from the values of the IBC reference block and the surrounding restored pixels of the target block (the filter template pixels of the target block).
[1084] [D2] First, the IBC prediction signal generation section is executed to generate the prediction signal P of the IBC mode. tAfter obtaining the IBC filter template shape, the IBC prediction signal and the surrounding restored pixel values of the target block (filter template pixels of the target block) can be derived.
[1085]
[1086] In the IBC prediction signal filtering information acquisition unit, the shape of the IBC filter template can be derived from the difference between the average of the IBC prediction signal and the average of the filter template of the target block.
[1087] For example, the average of the IBC prediction signal and the top template T of the target block t,Top Difference in Mean (Diff Top m ) is the average of the IBC prediction signal and the target block left template T t,Left Difference in Mean (Diff Left m ) is given, Diff Top m ≤ a1× Diff Left m When + β1 is satisfied, the filter template shape is T Top It could be. Diff Left m ≤ a2× Diff Top m When + β2 is satisfied, the filter template shape is T Left It can be. When all of the above are not satisfied, the filter template shape is T L-shape can be. Here, a1, a2 and β1, β2 can be given values. For example, a1 and a2 can be 1.2, and β1 and β2 can be 0.
[1088] As shown in Fig. 27 (A), the average of the IBC prediction signals above is all of the IBC prediction signals (Area A ) may be the average value.
[1089] As another example, as in Fig. 27 (B), Diff Top mThe average of the IBC prediction signal when obtaining is the upper area of the IBC prediction signal as large as the template size (Area Top ) may be the average value of the pixel coordinates belonging to the above Diff Left m The average of the IBC prediction signal when obtaining is the area to the left of the IBC prediction signal as large as the template size. Left ) may be the average value of the pixel coordinates belonging to the same region.
[1090]
[1091] In the IBC prediction signal filtering information acquisition unit, the shape of the IBC filter template can be derived from the difference between the average of the IBC prediction signal and the average of the filter template of the target block.
[1092] For example, the mean of the IBC prediction signal and the L-shape template T of the target block t,L-shape Difference in Mean (Diff L-shape m ), the average of the IBC prediction signal and the top template T of the target block t,Top Difference in Mean (Diff Top m ) The average of the IBC prediction signal and the target block left template T t,Left Difference in Mean (Diff Left m ) is given, 1) the smallest difference in means Diff L-shape m If so, the filter template shape is T L-shape It can be . Or, 2) The smallest difference between the means Diff Top m If so, the filter template shape is T Top It can be. Or, 3) The smallest difference between the means is Diff Left m If so, the filter template shape is T Left It could be.
[1093] As shown in Fig. 27 (A), the average of the IBC prediction signals above is all of the IBC prediction signals (AreaA ) may be the average value.
[1094] As another example, as in Fig. 27 (B), Diff L-shape m The average of the IBC prediction signal when obtaining is the L-shaped area of the IBC prediction signal as large as the template size (Area L-shape ) may be the average value of the pixel coordinates belonging to the above Diff Top m The average of the IBC prediction signal when obtaining is the upper area of the IBC prediction signal as large as the template size (Area Top ) may be the average value of the pixel coordinates belonging to the above Diff Left m The average of the IBC prediction signal when obtaining is the area to the left of the IBC prediction signal as large as the template size. Top ) may be the average value of the pixel coordinates belonging to the same region.
[1095]
[1096] The IBC prediction signal filtering information acquisition unit can derive the shape of the IBC filter template from the difference between the histogram distribution of the IBC prediction signal and the filter template histogram distribution of the target block.
[1097] Histogram distribution of IBC prediction signal and target block top template T t,Top The average of the differences in histogram distribution (Diff Top h ) Histogram distribution of the IBC prediction signal and the target block left template T t,Left Histogram distribution difference average (Diff Left h ) is given, Diff Top h ≤ a1× Diff Left h When + β1 is satisfied, the filter template shape is T Top It could be. Diff Left h ≤ a2× DiffTop h When + β2 is satisfied, the filter template shape is T Left It can be. When all of the above are not satisfied, the filter template shape is T L-shape can be. Here, a and β can be given values. For example, a can be 1.2, β can be 0. As another example, a can be 1, β can be 20.
[1098] Figure 27 illustrates an example of using all or only part of the block of the Diff calculation.
[1099] As shown in Fig. 27 (A), the average of the IBC prediction signals above is all of the IBC prediction signals (Area A ) may be the average value.
[1100] As another example, as in Fig. 27 (B), Diff Top h The histogram distribution of the IBC prediction signal when obtaining is the upper area of the IBC prediction signal as large as the template size. Top ) can be a histogram distribution value of pixel coordinates belonging to the above Diff Left h The histogram distribution of the IBC prediction signal when obtaining is the left area of the IBC prediction signal as large as the template size (Area Left ) can be a histogram distribution value of pixel coordinates belonging to .
[1101]
[1102] In the IBC prediction signal filtering information acquisition unit, the block vector BV (BV x , BV y ), or at least one of the coordinates (x,y) of the current block can be used to derive the availability of the template.
[1103] When a template is not available, IBC prediction signal filtering may not be performed. Alternatively, when a template is not available, ibc_filtering_flag may be set to a second value.
[1104] In one embodiment, the filter template shape T L-shape About,
[1105] (x+BV x -size T , y+BV y -size T ) If there is no restored pixel value in the coordinates, IBC prediction signal filtering may not be performed.
[1106] Or, (x+BV x -size T , y+BV y -size T ) If there is no restored pixel value in the coordinates, ibc_filtering_flag can be derived as a second value, i.e., IBC prediction signal filtering may not be performed.
[1107] In one embodiment, the filter template shape T Top About,
[1108] (x+BV x -size T , y+BV y ) If there is no restored pixel value in the coordinates, IBC prediction signal filtering may not be performed.
[1109] Or, (x+BV x -size T , y+BV y ) If there is no restored pixel value in the coordinates, ibc_filtering_flag can be derived as a second value, i.e., IBC prediction signal filtering may not be performed.
[1110] In one embodiment, the filter template shape T Left About,
[1111] (x+BV x, y+BV y -size T ) If there is no restored pixel value in the coordinates, IBC prediction signal filtering may not be performed.
[1112] Or, (x+BV x , y+BV y -size T ) If there is no restored pixel value in the coordinates, ibc_filtering_flag can be derived as a second value, i.e., IBC prediction signal filtering may not be performed.
[1113]
[1114] Figure 28 illustrates an example of Intra Block Copy (IBC).
[1115] The IBC prediction signal generation unit generates a prediction signal P through the IBC prediction signal search process. t can be created.
[1116] When using IBC mode for prediction of target block, BV, pred_mode_ibc_flag, general_merge_flag, merge_idx, RRIBC Flag, RRIBC Index, position of target block (x t_lf , y t_lf ), target block width (xCbW), target block height (xCbH), Dbv mode, or at least one of the components of the target block, the prediction signal P of the IBC mode t You can get it.
[1117] IBC reference block Blk in Fig. 28 ref The prediction signal P in IBC mode t It could be.
[1118] P t (x,y) = Rec(x+BV x' y+BV y ) can be. Here, (BV x , BV y) is a block vector, and Rec(a,b) can be the restored pixel value at the (a,b) coordinate.
[1119]
[1120] Figure 29 shows an example of Dbv prediction signal generation.
[1121] The IBC prediction signal generation unit generates the Dbv prediction signal P of the chroma using the BV inherited from the corresponding luma prediction signal when the chroma is in Dbv mode. c_t can be created.
[1122] If the target chroma block is in Dbv mode, at least one of BV, pred_mode_ibc_flag, general_merge_flag, merge_idx, RRIBC Flag, RRIBC Index, intraTMP_LIC_flag, intraTMP_LIC_index, or IntraTMP_FLM_flag inherited from the corresponding luma signal, and the target block position (x) of the current chroma prediction. t_lf , y t_lf ), Dbv prediction signal P of Dbv mode for chroma using at least one of target block width (xCbW), target block height (xCbH). c_t You can get it.
[1123] Dbv reference block Blk in Fig. 29 c_ref It can be a prediction signal _(_) in Dbv mode.
[1124] P c_t (x,y) = Rec(x+BV x' y+BV y ) can be. Here, (BV x , BV y ) is a block vector, and Rec(a,b) can be the restored pixel value at the (a,b) coordinate.
[1125]
[1126] The IBC prediction signal filtering unit uses the IBC prediction signal filtering information obtained from the [D1] IBC prediction signal filtering information obtaining unit to generate the IBC prediction signal P generated from the [D2] IBC prediction signal generating unit. t Filtering is performed on the filtered prediction signal P' t can be obtained.
[1127] Additionally, the IBC prediction signal filtering unit can specify a filter model using IBC prediction signal filtering information.
[1128] Additionally, the IBC prediction signal filtering unit can derive filter coefficients using the filter model and IBC prediction signal filtering information.
[1129] In addition, the IBC prediction signal filtering unit uses the filter model and filter coefficients to filter the IBC prediction signal P t Filtering is performed on the filtered prediction signal P' t can be obtained.
[1130]
[1131] The IBC filter model specification section of the IBC prediction signal filtering section can specify a filter model using IBC prediction signal filtering information.
[1132] A filter model refers to a formula used to perform IBC prediction signal filtering, and the formula can be specified using at least one of an IBC prediction pixel to be filtered, a surrounding pixel of the IBC prediction pixel, a bias, or a filter coefficient.
[1133] Alternatively, the filter model can be specified using at least one of a filter shape or an IBC filter mode.
[1134] Alternatively, the filter model can be specified using at least one of ibc_filter_shape and IBC filter mode.
[1135] As an example, if the filter shape is an MxN rectangle, the filter model can be specified using the surrounding MxN pixels of the rectangle centered on the pixel to be filtered at the (x,y) coordinates, as in Equation [D3-1]-1.
[1136] Formula [D3-1]-1:
[1137]
[1138] Here, m=(M-1)>>2, n=(N-1)>>2. c α,β , c b is the filter coefficient, b can be the bias.
[1139] In one embodiment, when the IBC filter mode is one of L-shaped IBC-LIC, Multi-model IBC-LIC, Top-only IBC-LIC, and Left-only IBC-LIC modes, the filter model can be specified using the surrounding square MxN pixels centered on the pixel to be filtered at the (x,y) coordinates as in Equation [D3-1]-1.
[1140] Figure 30 shows an example of a 1x1 rectangular filter.
[1141] As an example, if the filter shape is a 1x1 square, the filter model can be specified as in Equation [D3-1]-2 using the surrounding 1x1 square pixels centered on the pixel to be filtered, as in FIG. 30.
[1142] Formula [D3-1]-2:
[1143]
[1144] Here, c 0,0 , c b is the filter coefficient, b can be the bias.
[1145] In the present disclosure, a square-shaped filter with M=1 and N=1 may be referred to as the first filter model.
[1146] In one embodiment, when the IBC filter mode is one of the L-shaped IBC-LIC, Multi-model IBC-LIC, Top-only IBC-LIC, and Left-only IBC-LIC modes, the filter model can be specified as in Equation [D3-1]-2 using a 1x1 square pixel surrounding the pixel to be filtered as shown in FIG. 30.
[1147] Figure 31 shows an example of a 3x3 rectangular filter.
[1148] As an example, if the filter shape is a 3x3 square, the filter model can be specified as in Equation [D3-1]-3 using the surrounding 3x3 square pixels centered on the pixel to be filtered, as in FIG. 31.
[1149] Formula [D3-1]-3:
[1150]
[1151]
[1152] Here, c α,β , c b is the filter coefficient, b can be the bias.
[1153] The above equation can be an equation in which m and n of equation [D3-1]-1 are obtained as follows.
[1154] m=(M-1)>>2=(3-1)>>2=1, n=(N-1)>>2=(3-1)>>2=1
[1155]
[1156] In the present disclosure, a square-shaped filter with M=3 and N=3 may be referred to as a second filter model.
[1157] In one embodiment, when the IBC filter mode is one of the L-shaped IBC-LIC, Multi-model IBC-LIC, Top-only IBC-LIC, and Left-only IBC-LIC modes, the filter model can be specified as in Equation [D3-1]-3 using a 3x3 square pixel surrounding the pixel to be filtered as shown in FIG. 30.
[1158] As an example, if the filter shape is an MxN cross, the filter model can be specified using the surrounding MxN cross-shaped pixels centered on the pixel to be filtered at the (x,y) coordinates, as in Equation [D3-1]-4.
[1159] Formula [D3-1]-4:
[1160]
[1161] Here, m=(M-1)>>2, n=(N-1)>>2. c α,β , c b is the filter coefficient, b can be the bias.
[1162] In one embodiment, when the IBC filter mode is one of L-shaped FIBC, Multi-model FIBC, Top-only FIBC, and Left-only FIBC modes, the filter model can be specified using the surrounding cross-shaped MxN pixels centered on the pixel to be filtered at the (x,y) coordinates as in Equation [D3-1]-4.
[1163] Figure 32 shows an example of a 3x3 cross filter.
[1164] As an example, if the filter shape is a 3x3 cross, the filter model can be specified as in Equation [D3-1]-5 using the surrounding 3x3 cross-shaped pixels centered on the pixel to be filtered, as in FIG. 32.
[1165] Formula [D3-1]-5:
[1166]
[1167]
[1168] Here, c α,β , c b is the filter coefficient, b can be the bias.
[1169] The above equation can be an equation in which m and n of equation [D3-1]-4 are obtained as follows.
[1170] m=(M-1)>>2=(3-1)>>2=1, n=(N-1)>>2=(3-1)>>2=1
[1171]
[1172] In the present disclosure, a cross-shaped filter with M=3 and N=3 may be referred to as a third filter model.
[1173] In one embodiment, when the IBC filter mode is one of L-shaped FIBC, Multi-model FIBC, Top-only FIBC, and Left-only FIBC modes, the filter model can be specified using a cross-shaped 3x3 pixel surrounding the pixel to be filtered at the (x,y) coordinate as in Equation [D3-1]-5.
[1174] In one embodiment, when the filter shape is an MxN cross, the surrounding MxN cross-shaped pixels are used as the center of the pixel to be filtered at the (x,y) coordinates as in Equation [D3-1]-6, and the nonlinear term (P t (x,y) 2 ) can be used to specify the filter model.
[1175] Formula [D3-1]-6:
[1176]
[1177] Here, m=(M-1)>>2, n=(N-1)>>2. c α,β , c P , c b is the filter coefficient, b can be the bias.
[1178] In one embodiment, when the IBC filter mode is one of L-shaped FIBC, Multi-model FIBC, Top-only FIBC, and Left-only FIBC modes, the nonlinear term (P) is used as a nonlinear term using MxN pixels in a cross shape centered around the pixel to be filtered in (x,y) coordinates as in Equation [D3-1]-6. t (x,y) 2 ) can be used to specify the filter model.
[1179] As an example, if the filter shape is a 3x3 cross, the surrounding 3x3 cross-shaped pixels are used around the pixel to be filtered as in Fig. 32, and the nonlinear term (P t (x,y) 2 ) can be used to specify the filter model as in Equation [D3-1]-7.
[1180] Formula [D3-1]-7:
[1181]
[1182]
[1183] Here, c α,β , c P , c b is the filter coefficient, b can be the bias.
[1184] The above equation can be an equation in which m and n of equation [D3-1]-6 are obtained as follows.
[1185] m=(M-1)>>2=(3-1)>>2=1, n=(N-1)>>2=(3-1)>>2=1
[1186]
[1187] In the present disclosure, a cross-shaped filter with M=3 and N=3 may be referred to as the fourth filter model.
[1188] When the IBC filter mode is one of L-shaped FIBC, Multi-model FIBC, Top-only FIBC, and Left-only FIBC modes, a cross-shaped 3x3 pixel surrounding the pixel to be filtered at the (x,y) coordinate is used as shown in Fig. 32, and a nonlinear term (P t (x,y) 2 ) can be used to specify the filter model as in Equation [D3-1]-7.
[1189]
[1190] The IBC filtering coefficient acquisition unit of the IBC prediction signal filtering unit is the filter coefficient set FilterSet(c) of the IBC filter model. α,β , c P , c b At least one of the IBC reference block templates T ref The result of applying the IBC filter model to the pixel value is the target block template T of the corresponding coordinates. t It can be induced to have the best correlation (similarity) with pixel values.
[1191] Derivation of filter coefficients can follow the method of deriving filter coefficients for IBC-LIC and FIBC.
[1192]
[1193] The IBC filtering coefficient acquisition unit is a filter coefficient set, one filter coefficient set FilterSet(c α,β , c P , c b At least one) or multiple filter coefficient sets FilterSet n (c α,β n , c P n , c b n At least one of them can be derived.
[1194] For example, if one set of filter coefficients is used, all IBC reference block templates T ref IBC Reference Block Template T for pixel valuesref The result of applying the IBC filter model to the pixel value is the target block template T of the corresponding coordinates. t Filter coefficient c to have the best correlation (similarity) with pixel values α,β , c P , c b At least one of them can be derived.
[1195] For example, when using two filter coefficient sets (FilterSet1, FilterSet2), the filter coefficient c for pixels with small values based on the threshold (Thres) α,β 1 , c P 1 , c b 1 A set containing at least one of the filter coefficients c for pixels with large values α,β 2 , c P 2 , c b 2 A set containing at least one of them can be derived.
[1196] When using two sets of filter coefficients, the threshold can be the average value of the pixels belonging to the filter templates.
[1197] For example, if you use three filter coefficient sets (FilterSet1, FilterSet2, FilterSet3), P is based on two threshold values Thres0, Thres1 (Thres0< Thres1). t Filter coefficient c for pixels satisfying (x,y)≤ Thres0 α,β 1 , c P 1 , c b 1 A set containing at least one of Thres0< P t Filter coefficient c for pixels satisfying (x,y)≤ Thres1 α,β 2 , c P 2, c b 2 A set containing at least one of P t (x,y)> Filter coefficient c for pixels satisfying Thres1 α,β 3 , c P 3 , c b 3 A set containing at least one of them can be derived.
[1198] Thres0 can mean the first threshold value, Thres1 can mean the second threshold value (Thres0< Thres1). When there are a total of N pixels belonging to the filter template, the pixels belonging to the filter template can be sorted in ascending order based on the pixel value size, and then the value of the N / 3-th pixel can be set as Thres0. Then, the value of the 2N / 3-th pixel can be set as Thres1.
[1199]
[1200] The IBC filtering performing unit of the IBC prediction signal filtering unit uses the filter model and filter coefficients (set) to perform the IBC prediction signal P. t Filtering is performed on the filtered prediction signal P' t can be obtained.
[1201] In one embodiment, the IBC filtering performing unit may perform IBC prediction signal filtering using a first filter model and one set of filter coefficients. P t (x,y) represents the IBC prediction signal pixel value at the (x,y) coordinate, and P' t (x,y) is P t It can mean the pixel value with filtering applied to (x,y). As in Equation [D3-1]-2, P' t (x,y) can be obtained. For example, filter coefficient set FilterSet = { c 0,0 , c b} may be.
[1202] In one embodiment, the IBC filtering performing unit may perform IBC prediction signal filtering using a first filter model and two filter coefficient sets. P t (x,y) represents the IBC prediction signal pixel value at the (x,y) coordinate, and P' t (x,y) is P t It can mean the pixel value with filtering applied to (x,y). As in Equation [D3-3]-1, P' t You can get (x,y).
[1203] Formula [D3-3]-1:
[1204]
[1205] Here, c 0,0 1 Wow c b 1 is the first set of filter coefficients, c 0,0 2 Wow c b 2 may mean the second filter coefficient set. For example, the first filter coefficient set FilterSet1= { c 0,0 1 , c b 1}, second filter coefficient set FilterSet2= { c 0,0 2 , c b 2} may be.
[1206] In one embodiment, the IBC filtering performing unit may perform IBC prediction signal filtering using a second filter model and one set of filter coefficients. P t (x,y) represents the IBC prediction signal pixel value at the (x,y) coordinate, and P' t (x,y) is P t It can mean the pixel value with filtering applied to (x,y). As in Equation [D3-1]-3, P' t (x,y) can be obtained. For example, the filter coefficient set FilterSet = {c -1,-1 , c-1,0 , c -1,1 , c 0,-1, c 0,0 , c 0,1 , c 1,-1 , c 1,0 , c 1,1 , c b} can be.
[1207] In one embodiment, the IBC filtering performing unit may perform IBC prediction signal filtering using a second filter model and two sets of filter coefficients. P t (x,y) represents the IBC prediction signal pixel value at the (x,y) coordinate, and P' t (x,y) is P t It can mean the pixel value with filtering applied to (x,y). As in Equation [D3-3]-2, P' t You can get (x,y).
[1208] Formula [D3-3]-2:
[1209]
[1210]
[1211]
[1212]
[1213] [121...
Claims
1. Step of obtaining the initial merge candidate list of the current block; A step of reordering the initial merge candidate list to obtain a reordered merge candidate list of the current block; A step of determining one candidate of the current block among the candidates of the above rearranged merge candidate list; An image decoding method, comprising a step of performing prediction of the current block based on the determined candidate.
2. In paragraph 1, The above initial merge candidate list includes at least one spatial candidate, An image decoding method, characterized in that the spatial candidate is obtained based on a block adjacent to the current block or a non-adjacent block.
3. In paragraph 1, A method for decoding an image, characterized in that the initial merge candidate list includes an Auto Relocated Block Vector Prediction (AR-BVP) candidate.
4. In paragraph 3, An image decoding method, characterized in that the AR-BVP candidate is derived based on a block vector at the upper left, upper right, center, lower left, or lower right position of a reference block of the current block.
5. In paragraph 1, A video decoding method, characterized in that the initial merge candidate list includes at least one Chained MV Prediction (CMVP) candidate.
6. In paragraph 5, A video decoding method, characterized in that the above CMVP candidate is derived based on a Temporal MV Predictor (TMVP) candidate of the initial merge candidate list.
7. In paragraph 5, A video decoding method, characterized in that the above CMVP candidate is derived based on the accumulation of MVs and BVs that are recursively tracked based on the pre-derived motion vectors of the initial merge candidate list.
8. In paragraph 5, A method for decoding an image, characterized in that in response to the initial merge candidate list including a plurality of CMVP candidates, the plurality of CMVP candidates are reordered based on a template cost.
9. In paragraph 8, A video decoding method, characterized in that the template cost is calculated based on the difference between the template of the block pointed to by the CMVP candidate and the template of the current block.
10. In paragraph 9, A video decoding method, characterized in that the above-mentioned rearranged merge candidate list includes only some of the above-mentioned rearranged plurality of CMVP candidates.
11. Step of obtaining the initial merge candidate list of the current block; A step of reordering the initial merge candidate list to obtain a reordered merge candidate list of the current block; A step of determining one candidate of the current block among the candidates of the above rearranged merge candidate list; An image encoding method, comprising a step of performing prediction of the current block based on the determined candidate.
12. In paragraph 11, The above initial merge candidate list includes at least one spatial candidate, An image encoding method, characterized in that the spatial candidate is obtained based on a block adjacent to the current block or a non-adjacent block.
13. In paragraph 11, A video encoding method, characterized in that the initial merge candidate list includes an Auto Relocated Block Vector Prediction (AR-BVP) candidate.
14. In paragraph 13, A video encoding method, characterized in that the AR-BVP candidate is derived based on a block vector at the upper left, upper right, center, lower left, or lower right position of a reference block of the current block.
15. In paragraph 11, A video encoding method, characterized in that the initial merge candidate list includes at least one Chained MV Prediction (CMVP) candidate.
16. In paragraph 15, A video encoding method, characterized in that the CMVP candidate is derived based on a Temporal MV Predictor (TMVP) candidate of the initial merge candidate list.
17. In paragraph 15, A video encoding method, characterized in that the above CMVP candidate is derived based on the accumulation of MVs and BVs that are recursively tracked based on the pre-derived motion vectors of the initial merge candidate list.
18. In paragraph 15, A video encoding method, characterized in that in response to the initial merge candidate list including a plurality of CMVP candidates, the plurality of CMVP candidates are reordered based on a template cost.
19. In paragraph 18, A video encoding method, characterized in that the template cost is calculated based on the difference between the template of the block pointed to by the CMVP candidate and the template of the current block.
20. Step of obtaining the initial merge candidate list of the current block; A step of reordering the initial merge candidate list to obtain a reordered merge candidate list of the current block; A step of determining one candidate of the current block among the candidates of the above rearranged merge candidate list; A step of performing prediction of the current block based on the above-determined candidate; A bitstream transmission method, characterized by comprising a step of transmitting a bitstream generated based on the predicted current block.
Citation Information
Patent Citations
Program of processing a message that provides feedback expression items
KR1020200119428A
Apparatus and method for resource allocation in wireless communication systems
KR1020210019931A
KR20190040476A
KR20200064153A
KR20230101870A