Method, device, and bitstream storage medium for image encoding / decoding including affine prediction mode
By utilizing affine transformation candidates and template matching costs for motion information prediction in sub-block units, the method enhances encoding efficiency for high-resolution images, addressing inefficiencies in conventional video encoding/decoding processes and reducing data-related costs.
Patent Information
- Application Number
- PCT/KR2025/004625
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-04
- Filing Date
- 2025-04-04
- Publication Date
- 2025-10-09
AI Technical Summary
Conventional video encoding/decoding processes are limited by subblock-level prediction methods, leading to inefficiencies in encoding efficiency, especially for high-resolution and high-quality images, which result in increased transmission and storage costs due to the large amount of data involved.
The method employs a motion information candidate list that includes affine transformation candidates, using template matching costs and motion vector offsets to improve motion information prediction, particularly for sub-block units, enhancing encoding efficiency.
This approach improves encoding efficiency by optimizing motion information prediction for sub-blocks, reducing data volume and associated costs in transmission and storage for high-resolution images.
Smart Images

Figure KR2025004625_09102025_PF_FP_ABST
Abstract
Description
Image encoding / decoding method, device, and bitstream storage medium including affine prediction mode
[0001] The present disclosure relates to a method and device for encoding / decoding video, and more specifically, may relate to inter-screen prediction.
[0002] Recently, the demand for high-resolution, high-quality images, such as HD (High Definition) and UHD (Ultra High Definition) images, is increasing across various application fields. As image data becomes higher in resolution and quality, the relative amount of data increases compared to conventional image data. Therefore, transmitting image data using existing media such as wired or wireless broadband lines or storing it using existing storage media leads to increased transmission and storage costs. To address these issues arising as image data becomes higher in resolution and quality, high-efficiency image encoding / decoding technologies for images with higher resolution and quality may be required.
[0003] There are various technologies for image compression, such as inter-picture prediction technology that predicts pixel values included in the current picture from pictures before or after the current picture, intra-picture prediction technology that predicts pixel values included in the current picture using pixel information in the current picture, transformation and quantization technology for compressing the energy of the residual signal, and entropy coding technology that assigns short codes to values with high frequency of appearance and long codes to values with low frequency of appearance. Using these image compression technologies, image data can be effectively compressed and transmitted or stored.
[0004] In conventional video encoding / decoding processes, encoding / decoding methods utilizing subblock-level prediction are limited, and thus, there are limitations in improving encoding efficiency. The present invention may aim to overcome these limitations.
[0005] The video encoding / decoding method, device, and recording medium of the present disclosure may include the steps of: obtaining a motion information candidate list of a current block; determining at least one candidate of the motion information candidate list; improving motion information of the determined at least one candidate; and performing prediction of the current block based on the improved motion information.
[0006] In the video encoding / decoding method, device, and recording medium of the present disclosure, the motion information candidate list of the current block may include a first affine transformation candidate using N CPMVs (control point motion vectors).
[0007] In the video encoding / decoding method, device, and recording medium of the present disclosure, the motion information candidate list of the current block may include a second affine transformation candidate obtained by calculating a template matching cost based on the first affine transformation candidate.
[0008] In the video encoding / decoding method, device, and recording medium of the present disclosure, the template used for calculating the template matching cost may be at least one of the left or upper templates of the current block.
[0009] In the video encoding / decoding method, device, and recording medium of the present disclosure, the calculation of the template matching cost can be performed by assigning the same motion vector offsets to the N CPMVs of the first affine transformation candidates.
[0010] In the video encoding / decoding method, device, and recording medium of the present disclosure, the CPMV of the second affine transformation candidate can be obtained by assigning a motion vector offset having a minimum template matching cost among the motion vector offsets to the N CPMVs of the first affine transformation candidate.
[0011] In the video encoding / decoding method, device, and recording medium of the present disclosure, the first affine transformation candidate of the motion information candidate list can be obtained from a spatially adjacent block of the current block.
[0012] In the video encoding / decoding method, device, and recording medium of the present disclosure, the first affine transformation candidate of the motion information candidate list can be obtained from a spatially non-adjacent block of the current block.
[0013] In the video encoding / decoding method, device, and recording medium of the present disclosure, the first affine transformation candidate of the motion information candidate list can be obtained from a temporally surrounding block of the current block.
[0014] In the video encoding / decoding method, device, and recording medium of the present disclosure, improvement of motion information of at least one determined candidate can be performed in units of sub-blocks of the current block.
[0015] In the video encoding / decoding method, device, and recording medium of the present disclosure, in response to the determined candidate being an affine transform candidate, improvement of motion information of the determined candidate can be performed in units of sub-blocks to which CPMVs of the affine transform candidate belong.
[0016] In the video encoding / decoding method, device, and recording medium of the present disclosure, the improvement of the motion information can be achieved by improving only the translation coefficients among the non-translational coefficients and translational coefficients of the affine transformation candidate.
[0017] The present disclosure can provide a method, a device, and a recording medium storing a bitstream using sub-block unit prediction to improve encoding efficiency.
[0018] FIG. 1 is a block diagram showing a configuration according to one embodiment of an encoding device to which the present disclosure is applied.
[0019] FIG. 2 is a block diagram showing a configuration according to one embodiment of a decryption device to which the present disclosure is applied.
[0020] Figure 3 is a diagram schematically showing the division structure of an image when encoding and decoding an image.
[0021] Figure 4 is a diagram illustrating the form of a prediction unit that a coding unit can include.
[0022] Figure 5 is a diagram illustrating the form of a transformation unit that can be included in a coding unit.
[0023] Figure 6 illustrates the division of blocks according to an example.
[0024] Figure 7 is a diagram for explaining an embodiment of an intra prediction process.
[0025] Figure 8 is a diagram for explaining reference samples used in the intra prediction process.
[0026] Figure 9 is a diagram for explaining an embodiment of an inter prediction process.
[0027] Figure 10 shows spatial candidates according to an example.
[0028] Figure 11 shows the order of adding motion information of spatial candidates to the merge list according to an example.
[0029] Figure 12 illustrates the process of transformation and quantization according to an example.
[0030] Figure 13 illustrates diagonal scanning according to an example.
[0031] Figure 14 illustrates horizontal scanning according to an example.
[0032] Figure 15 illustrates vertical scanning according to an example.
[0033] Fig. 16 is a structural diagram of an encoding device according to one embodiment.
[0034] Fig. 17 is a structural diagram of a decryption device according to one embodiment.
[0035] Fig. 18 is a diagram illustrating an affine transformation model according to one embodiment.
[0036] FIG. 19 and FIG. 20 are flowcharts showing encoding and decoding processes of an image encoding method and device including sub-block unit prediction according to one embodiment, respectively.
[0037] Figure 21 illustrates an example of spatial and temporal adjacent blocks.
[0038] Figure 22 illustrates an example of non-adjacent blocks.
[0039] Figure 23 is an example diagram showing the locations of temporally adjacent blocks for deriving affine transformation candidates according to some embodiments.
[0040] Figures 24 and 25 illustrate embodiments in which prediction of sub-blocks is performed in the same manner in all affine blocks in which affine transformation is performed.
[0041] Figures 26 and 27 illustrate first and second embodiments, respectively, when a prediction method of a sub-block is adaptively determined in an affine block in which affine transformation is performed (when a second determination method is performed).
[0042] Figures 28 and 29 illustrate third and fourth embodiments, respectively, when a prediction method of a sub-block is adaptively determined in an affine block in which affine transformation is performed (when the second determination method is performed).
[0043] Figures 30 and 31 illustrate embodiments 5 and 6, respectively, of when a prediction method of a sub-block is adaptively determined in an affine block in which affine transformation is performed (when the third determination method is performed).
[0044] Figure 32 is a diagram of one embodiment of template matching.
[0045] Figures 33 and 34 are drawings illustrating target templates that can be used in the target block.
[0046] FIG. 35 is a drawing of an exemplary embodiment showing a target template of each subblock in a template matching mode at the subblock level.
[0047] FIG. 36 is a diagram for another exemplary embodiment showing the target template of each subblock in a template matching mode at the subblock level.
[0048] Figure 37 is an example diagram for explaining how to configure the first template (target template) in affine mode.
[0049] Figures 38 and 39 are exemplary diagrams for explaining a method of configuring a second template (reference template) in affine mode.
[0050] Figure 40 is a drawing for explaining two-sided matching according to one embodiment of the present invention.
[0051] Figure 41 shows an example of a surrounding block of a target block.
[0052] Figures 42 and 43 show examples of the location of CPMV.
[0053] 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.
[0054] 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.
[0055] 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.
[0056] 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.
[0057] 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.
[0058] 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.
[0059] 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.
[0060] 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.
[0061] 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.
[0062] 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.
[0063]
[0064] 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."
[0065] Hereinafter, the terms “video” and “motion picture(s)” may be used interchangeably and have the same meaning.
[0066] 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.
[0067] Hereinafter, the terms “image”, “picture”, “frame” and “screen” may be used interchangeably and have the same meaning.
[0068] 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.
[0069] Hereinafter, the terms "block" and "unit" may be used interchangeably and have the same meaning. Alternatively, "block" may refer to a specific unit.
[0070] Hereinafter, the terms “region” and “segment” may be used interchangeably.
[0071] 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.
[0072] 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.
[0073] 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."
[0074] Below, the terms used in the examples are explained.
[0075] Encoder: An encoder can refer to a device that performs encoding. In other words, an encoder can refer to an encoding device.
[0076] Decoder: A decoder can refer to a device that performs decoding. In other words, a decoder can refer to a decoding device.
[0077] 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.
[0078] - 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.
[0079] - 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.
[0080] - In encoding and decoding of images, predefined processing can be performed on units depending on the type of unit.
[0081] - 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.
[0082] - 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.
[0083] - 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.
[0084] - 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.
[0085] - A unit can be further divided into sub-units of smaller size compared to the unit.
[0086] 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.
[0087] - 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.
[0088] - 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.
[0089] - 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.
[0090] 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.
[0091] - 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.
[0092] - A node with a depth of level n can represent a unit generated as the initial unit is split n times.
[0093] 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.
[0094] - 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.
[0095] 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.
[0096] - Samples can be pixels or pixel values.
[0097] - Hereinafter, the terms “pixel”, “pixels” and “samples” may be used interchangeably and have the same meaning.
[0098] 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.
[0099] - 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.
[0100] - 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.
[0101] 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.
[0102] 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.
[0103] - Hereinafter, the terms “neighboring block” and “adjacent block” may be used interchangeably and have the same meaning.
[0104] - A neighbor block may also mean a reconstructed neighbor block.
[0105] 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.
[0106] - The target block and spatial neighboring blocks can be included within the target picture.
[0107] - 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.
[0108] - 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.
[0109] 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.
[0110] - Temporal neighboring blocks may contain co-located blocks (col blocks).
[0111] - 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.
[0112] - A temporal neighboring block may be a block that is temporally adjacent to a spatial neighboring block of the target block.
[0113] Prediction mode: The prediction mode can be information indicating the mode used for intra prediction or the mode used for inter prediction.
[0114] 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.
[0115] - 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.
[0116] Prediction unit partition: Prediction unit partition can mean the form in which a prediction unit is divided.
[0117] 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.
[0118] - The reconstructed neighboring unit can be a spatial neighboring unit or a temporal neighboring unit to the target unit.
[0119] - The reconstructed spatial neighboring unit may be a unit within the target picture that has already been reconstructed through encoding and / or decoding.
[0120] - 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.
[0121] 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.
[0122] - 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.
[0123] - A sub-picture can be a rectangular area of one or more slices within a picture.
[0124] - A sub-picture may contain one or more tiles, one or more bricks, and / or one or more slices.
[0125] Tile: A tile can be a square or rectangular (i.e. non-square) area within a picture.
[0126] - A tile may contain one or more CTUs.
[0127] - A tile can be split into one or more bricks.
[0128] Brick: A brick can represent one or more rows of CTUs within a tile.
[0129] - A tile can be divided into one or more bricks. Each brick can contain one or more CTU rows.
[0130] - A tile that cannot be divided into two or more pieces can also mean a brick.
[0131] Slice: A slice may contain one or more tiles within a picture. Alternatively, a slice may contain one or more bricks within a tile.
[0132] - 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.
[0133] Parameter set: A parameter set may correspond to header information among the structures within a bitstream.
[0134] - 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).
[0135] 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.
[0136] A parameter set can reference a higher-level parameter set. For example, a PPS can reference an SPS, which can reference a VPS.
[0137] - 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.
[0138] 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.
[0139] - 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.
[0140] - 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.
[0141] - R can represent the rate. R can represent the bit rate using related context information.
[0142] - λ 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.
[0143] - 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.
[0144] Bitstream: A bitstream can mean a string of bits containing encoded image information.
[0145] Parsing: Parsing can mean entropy decoding a bitstream to determine the values of syntax elements. Alternatively, parsing can mean entropy decoding itself.
[0146] 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.
[0147] 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.
[0148] Hereinafter, the terms “reference picture” and “reference image” may be used interchangeably and have the same meaning.
[0149] Reference picture list: A reference picture list may be a list containing one or more reference pictures used for inter prediction or motion compensation.
[0150] - The types of reference picture lists can include List Combined (LC), List 0 (L0), List 1 (L1), List 2 (L2), and List 3 (L3).
[0151] - One or more reference picture lists can be used for inter prediction.
[0152] 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.
[0153] 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.
[0154] - 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.
[0155] Reference picture index: The reference picture index may be an index indicating a specific reference picture in the reference picture list.
[0156] Picture Order Count (POC): The POC of a picture can indicate the display order of the picture.
[0157] 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.
[0158] - 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.
[0159] 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.
[0160] 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.
[0161] - Motion vector candidates can be included in the motion vector candidate list.
[0162] Motion vector candidate list: A motion vector candidate list may mean a list constructed using one or more motion vector candidates.
[0163] 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.
[0164] 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.
[0165] Merge candidate list: A merge candidate list may refer to a list constructed using one or more merge candidates.
[0166] 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.
[0167] Merge index: A merge index can be an indicator pointing to a merge candidate within the merge candidate list.
[0168] - 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.
[0169] - The merge index can indicate at least one of the movement information of the merge candidate.
[0170] 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.
[0171] Scaling: Scaling can mean the process of multiplying the transform coefficient levels by a factor.
[0172] - As a result of scaling on the transform coefficient level, transform coefficients can be generated. Scaling may also be referred to as dequantization.
[0173] 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.
[0174] 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.
[0175] 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.
[0176] 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.
[0177] - 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.
[0178] 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.
[0179] - The quantized transform coefficient level, which is the result of transformation and quantization, can also be included in the meaning of the quantized level.
[0180] 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.
[0181] 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.
[0182] Quantization matrix coefficient: Quantization matrix coefficient can mean each element in the quantization matrix. Quantization matrix coefficient can also be called matrix coefficient.
[0183] Default matrix: The default matrix may be a quantization matrix predefined in the encoder and decoder.
[0184] 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.
[0185] Most Probable Mode (MPM): MPM can indicate the intra prediction mode that is likely to be used for intra prediction of the target block.
[0186] - 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.
[0187] - 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.
[0188] - 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.
[0189] MPM List: An MPM list may contain one or more MPMs. The number of MPMs in an MPM list may be predefined.
[0190] 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.
[0191] - 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.
[0192] - 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.
[0193] 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.
[0194] - MPM usage indicators can be signaled from the encoding device to the decoding device.
[0195] 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.
[0196] - 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.
[0197] 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.
[0198] 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.
[0199] 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.
[0200]
[0201] FIG. 1 is a block diagram showing a configuration according to one embodiment of an encoding device to which the present disclosure is applied.
[0202] 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.
[0203] 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).
[0204] 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.
[0205] 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.
[0206] 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.
[0207] 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.
[0208] 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.
[0209] 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.
[0210] 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.
[0211] 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.
[0212] The inter prediction unit (110) may include a motion prediction unit and a motion compensation unit.
[0213] 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.
[0214] 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).
[0215] As the decoded picture is stored, the reference picture buffer (190) may be a decoded picture buffer (DPB).
[0216] 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.
[0217] 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.
[0218] 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.
[0219] 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.
[0220] 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.
[0221] The conversion unit (130) can use one of a plurality of predefined conversion methods to perform the conversion.
[0222] 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).
[0223] 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).
[0224] When the transform skip mode is applied, the transform unit (130) may omit the transformation for the residual block.
[0225] 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.
[0226] 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.
[0227] 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.
[0228] 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.
[0229] 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 coding.
[0230] 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.
[0231] 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.
[0232] 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.
[0233] 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.
[0234] The primary transformation selection information can indicate the primary transformation applied to the target block.
[0235] Secondary transformation selection information can indicate a secondary transformation to be applied to the target block.
[0236] 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.
[0237] 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.
[0238] 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.
[0239] 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.
[0240] 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.
[0241] 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.
[0242] 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.
[0243] 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.
[0244] 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.
[0245] 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.
[0246] Additionally, when vertical filtering and horizontal filtering are performed on the target block, the horizontal filtering and vertical filtering can be processed in parallel.
[0247] 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.
[0248] 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.
[0249] 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.
[0250] 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.
[0251]
[0252] FIG. 2 is a block diagram showing a configuration according to one embodiment of a decryption device to which the present disclosure is applied.
[0253] The decoding device (200) may be a decoder, a video decoding device, or an image decoding device.
[0254] 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).
[0255] 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.
[0256] 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.
[0257] 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.
[0258] 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.
[0259] 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.
[0260] 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.
[0261] 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.
[0262] 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.
[0263] 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.
[0264] 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.
[0265] 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).
[0266] 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.
[0267] 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.
[0268] 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.
[0269] The filter unit (260) can output a reconstructed image.
[0270] 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.
[0271]
[0272] Figure 3 is a diagram schematically showing the division structure of an image when encoding and decoding an image.
[0273] Figure 3 can schematically represent an example in which one unit is divided into multiple sub-units.
[0274] 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."
[0275] 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.
[0276] Additionally, a CU can be a basis unit for prediction, transformation, quantization, inverse transformation, inverse quantization, and encoding and / or decoding of transform coefficients.
[0277] 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).
[0278] 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.
[0279] 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.
[0280] 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.
[0281] 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.
[0282] 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.
[0283] 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.
[0284] The partitioning of a CU can be done recursively up to a predefined depth or a predefined size.
[0285] 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.
[0286] 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.
[0287] 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.
[0288] 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.
[0289] 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.
[0290] 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.
[0291] 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.
[0292] 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.
[0293] 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.
[0294] In the LCU (310) of Fig. 3, both quad-tree type division and binary-tree type division were applied.
[0295] 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.
[0296] Through recursive partitioning of CU, the optimal partitioning method that produces the minimum rate-distortion ratio can be selected.
[0297] 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.
[0298] 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.
[0299] 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.
[0300] 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).
[0301] 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.
[0302] 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.
[0303] 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.
[0304] 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.
[0305] 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.
[0306] 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.
[0307] 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.
[0308] 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).
[0309] 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.
[0310] 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.
[0311] 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.
[0312] 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.
[0313] 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.
[0314] 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.
[0315] 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.
[0316] 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.
[0317] 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.
[0318] 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.
[0319] 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.
[0320] 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.
[0321] 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.
[0322] 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.
[0323] 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).
[0324] For example, when the pipeline buffer size is 64X64, the following partitions may be limited.
[0325] - Ternary tree partitioning for NxM (N and / or M are 128) CUs
[0326] - Horizontal binary tree partitioning for 128xN (N <= 64) CUs
[0327] - Vertical binary tree partitioning for Nx128 (N <= 64) CUs
[0328] 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.
[0329] 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.
[0330] 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.
[0331] 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.
[0332]
[0333] Figure 4 is a diagram illustrating the form of a prediction unit that a coding unit can include.
[0334] Among the CUs split from the LCU, a CU that is no longer split can be split into one or more prediction units (PUs).
[0335] 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 divided 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.
[0336] 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.
[0337] 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.
[0338] 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.
[0339] In intra mode, 2Nx2N mode (410) and NxN mode (425) can be supported.
[0340] 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.
[0341] In NxN mode (425), a PU of size NxN can be encoded.
[0342] 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.
[0343] When a PU is encoded by an intra mode, the PU may be encoded using one intra prediction mode among 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 intra prediction mode among the 35 intra prediction modes.
[0344] Whether a PU will be encoded in 2Nx2N mode (410) or NxN mode (425) can be determined by the rate-distortion cost.
[0345] 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.
[0346] 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.
[0347] 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.
[0348] A CU can be divided into one or more PUs, and a PU can also be divided into multiple PUs.
[0349] 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.
[0350] 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.
[0351]
[0352] Figure 5 is a diagram illustrating the form of a transformation unit that can be included in a coding unit.
[0353] 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.
[0354] 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.
[0355] 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.
[0356] 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.
[0357] 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.
[0358] 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.
[0359] 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.
[0360] A CU can be divided into one or more TUs, and a TU can also be divided into multiple TUs.
[0361] 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.
[0362] 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.
[0363] The CU may be partitioned in other ways than those shown in Figure 5.
[0364] 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.
[0365] 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.
[0366] 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.
[0367]
[0368] Figure 6 illustrates the division of blocks according to an example.
[0369] 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.
[0370] 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.
[0371] 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”).
[0372] 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.
[0373] 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.
[0374] 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.
[0375] 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.
[0376] 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.
[0377] 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.
[0378] quadtree_flagbinarytree_flagBtype_flag1011001010000000000101100000
[0379] 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.
[0380] split_flagQB_flagBtype_flag10111001011000000110110000
[0381] The splitting method may be limited to only a quad tree or only a binary tree, depending on the size and / or shape of the block. When such a restriction 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 depth information of the block, and the depth information may be signaled from the encoding device (100) to the decoding device (200). When the size of the block falls within a specific range, only a quad tree-type splitting may be possible. For example, the specific range may be defined by at least one of a maximum block size and a minimum block size within which only a quad tree-type splitting is possible.
[0382] 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).
[0383] 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.
[0384] 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.
[0385] In this case, split_flag can be a flag indicating whether to split into a quad tree form.
[0386] 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.
[0387] 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).
[0388] 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.
[0389] 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.
[0390] 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.
[0391] 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.
[0392]
[0393] Figure 7 is a diagram for explaining an embodiment of an intra prediction process.
[0394] 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.
[0395] 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.
[0396] 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.
[0397] For example, intra encoding and / or decoding can be performed using values or coding parameters of reference samples contained in reconstructed neighboring blocks.
[0398] 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.
[0399] 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.
[0400] 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.
[0401] 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.
[0402] 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.
[0403] 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.
[0404] The intra prediction mode can be non-directional or directional.
[0405] 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.
[0406] 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.
[0407] The two non-directional modes may include DC mode and Planar mode.
[0408] 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.
[0409] 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.
[0410] 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.
[0411] 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.
[0412] Alternatively, the number of intra prediction modes may vary depending on the shape, size and / or type of color components of the block.
[0413] For example, in Fig. 7, the directional prediction modes shown by the dotted lines can only be applied to predictions for non-square blocks.
[0414] 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.
[0415] 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.
[0416] 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.
[0417] 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.
[0418] 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.
[0419] 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.
[0420] 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.
[0421] 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.
[0422] 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.
[0423] 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.
[0424] 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.
[0425] 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.
[0426] 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.
[0427] 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.
[0428] 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.
[0429] Real-valued interpolation may also be performed to generate the aforementioned prediction samples.
[0430] 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.
[0431] 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.
[0432] 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.
[0433] 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.
[0434]
[0435] Figure 8 is a diagram for explaining reference samples used in the intra prediction process.
[0436] 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.
[0437] 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.
[0438] 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.
[0439] 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.
[0440] 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.
[0441] 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.
[0442] 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.
[0443] 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.
[0444] 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.
[0445] 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.
[0446] 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.
[0447] The number of reference samples used to determine the pixel value of one pixel of a prediction block may be one or more.
[0448] 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.
[0449] 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.
[0450] 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.
[0451] Hereinafter, the terms "difference", "error" and "residual" may be used interchangeably and with the same meaning.
[0452] 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.
[0453] 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.
[0454] As illustrated in FIG. 8, for intra prediction of a target block, at least one of reference lines 0 to 3 may be used.
[0455] 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.
[0456] 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.
[0457] 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.
[0458] 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.
[0459] 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.
[0460] For example, the first color component may be a luma component, and the second color component may be a chroma component.
[0461] 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.
[0462] 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.
[0463] 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.
[0464] 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.
[0465] 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.
[0466] Whether intra prediction is performed between color components and / or the range of templates can be signaled as an intra prediction mode.
[0467] The target block can be divided into two or four sub-blocks in the horizontal and / or vertical directions.
[0468] 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.
[0469] 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.
[0470] Information regarding whether intra prediction is performed based on these sub-blocks and / or the segmentation direction (horizontal or vertical) may be signaled.
[0471] 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.
[0472] A final prediction block can be generated by performing filtering on the prediction block generated by intra prediction.
[0473] 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.
[0474] 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.
[0475] 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).
[0476] 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.
[0477] 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.
[0478] 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.
[0479] 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.
[0480] 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.
[0481]
[0482] Figure 9 is a diagram for explaining an embodiment of an inter prediction process.
[0483] 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.
[0484] 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.
[0485] 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.
[0486] 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.
[0487] 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.
[0488] 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.
[0489] Below, inter prediction in inter mode according to an embodiment is specifically described.
[0490] Inter prediction or motion compensation can be performed using reference images and motion information.
[0491] 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.
[0492] 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.
[0493] 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.
[0494] A spatial candidate may be a reconstructed block that is spatially adjacent to the target block.
[0495] A temporal candidate may be a reconstructed block corresponding to a target block within an already reconstructed collocated picture (col picture).
[0496] 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.
[0497] 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.
[0498] Inter prediction can be performed using reference pictures.
[0499] 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.
[0500] 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.
[0501] 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.
[0502] Motion information can be derived during inter prediction by each of the encoding device (100) and the decoding device (200).
[0503] 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."
[0504] 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.
[0505] 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.
[0506] 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.
[0507] 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.
[0508] 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.
[0509] 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.
[0510] 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.
[0511] 1) AMVP mode
[0512] 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.
[0513] 1-1) Creating a list of predicted motion vector candidates
[0514] 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.
[0515] Hereinafter, the terms "predicted motion vector (candidate)" and "motion vector (candidate)" may be used interchangeably and have the same meaning.
[0516] Hereinafter, the terms “predicted motion vector candidate” and “AMVP candidate” may be used interchangeably and have the same meaning.
[0517] Hereinafter, the terms “predicted motion vector candidate list” and “AMVP candidate list” may be used interchangeably and have the same meaning.
[0518] 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.
[0519] 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.
[0520] The zero vector can be a (0, 0) motion vector.
[0521] 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.
[0522] 1-2) Motion vector search using the predicted motion vector candidate list
[0523] 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.
[0524] The motion vector to be used for encoding the target block may be a motion vector that can be encoded at the minimum cost.
[0525] Additionally, the encoding device (100) can determine whether to use the AMVP mode in encoding the target block.
[0526] 1-3) Transmission of inter prediction information
[0527] 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.
[0528] 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.
[0529] Hereinafter, the terms “predicted motion vector index” and “AMVP index” may be used interchangeably and have the same meaning.
[0530] Additionally, the inter prediction information may include residual signals.
[0531] 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.
[0532] 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.
[0533] 1-4) Inter prediction in AMVP mode using inter prediction information
[0534] 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.
[0535] 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.
[0536] 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.
[0537] 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.
[0538] 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.
[0539] 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.
[0540] 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.
[0541] 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.
[0542] 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.
[0543] 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.
[0544] 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.
[0545] 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.
[0546] 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.
[0547] 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.
[0548] The motion vector of the target block can be derived by the predicted motion vector index, MVD, reference direction, and reference picture index.
[0549] 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.
[0550] 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.
[0551] 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.
[0552] 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.
[0553] 2) Merge mode
[0554] 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.
[0555] 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.
[0556] 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.
[0557] 2-1) Creating a merge candidate list
[0558] 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.
[0559] 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.
[0560] 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.
[0561] 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.
[0562] 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.
[0563] Additionally, the merge candidate list may include a merge candidate based on the average of two merge candidates.
[0564] 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.
[0565] 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.
[0566] 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.
[0567] 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.
[0568] 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.
[0569] 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.
[0570] The merge candidate list can be generated before prediction by merge mode is performed.
[0571] 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.
[0572] 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.
[0573] 2-2) Searching for motion vectors using the merge candidate list
[0574] 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.
[0575] Additionally, the encoding device (100) can determine whether to use merge mode in encoding the target block.
[0576] 2-3) Transmission of inter prediction information
[0577] 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.
[0578] The decoding device (200) can perform inter prediction on a target block using inter prediction information of a bitstream.
[0579] Inter prediction information may include 1) mode information indicating whether merge mode is used, 2) merge index, and 3) correction information.
[0580] Additionally, the inter prediction information may include residual signals.
[0581] The decryption device (200) can obtain the merge index from the bitstream only when the mode information indicates that the merge mode is used.
[0582] 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.
[0583] 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.
[0584] 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.
[0585] 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.
[0586] 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.
[0587] 2-4) Inter prediction in merge mode using inter prediction information
[0588] 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.
[0589] 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.
[0590] 3) Skip mode
[0591] 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.
[0592] 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.
[0593] 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.
[0594] 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).
[0595] 3-1) Creating a list of merge candidates
[0596] 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."
[0597] 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.
[0598] The merge candidate list can be generated before prediction is performed in skip mode.
[0599] 3-2) Searching for motion vectors using the merge candidate list
[0600] 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.
[0601] Additionally, the encoding device (100) can determine whether to use skip mode in encoding the target block.
[0602] 3-3) Transmission of inter prediction information
[0603] 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.
[0604] Inter prediction information may include 1) mode information indicating whether skip mode is used and 2) a skip index.
[0605] The skip index may be identical to the merge index described above.
[0606] 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.
[0607] 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.
[0608] 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.
[0609] 3-4) Inter prediction in skip mode using inter prediction information
[0610] 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.
[0611] 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.
[0612] 4) Current picture reference mode
[0613] 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.
[0614] A motion vector may be used to specify the reconstructed region. Whether the target block is encoded in the current picture reference mode may be determined using the reference picture index of the target block.
[0615] 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.
[0616] 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.
[0617] For example, the fixed position can be the position where the reference picture index value is 0 or the last position.
[0618] 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).
[0619] 5) Subblock merge mode
[0620] Sub-block merge mode may refer to a mode that derives motion information for a sub-block of a CU.
[0621] 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.
[0622] 6) Triangle partition mode
[0623] 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.
[0624] 7) Inter-intra joint prediction mode
[0625] 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.
[0626] 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.
[0627] In the aforementioned modes, the decoding device (200) can perform compensation for prediction samples derived through inter prediction using optical flow.
[0628] 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.
[0629] 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.
[0630] 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.
[0631]
[0632] Figure 10 shows spatial candidates according to an example.
[0633] In Fig. 10, the locations of spatial candidates are shown.
[0634] The large block in the middle can represent the target block. The five smaller blocks can represent spatial candidates.
[0635] The coordinates of the target block can be (xP, yP), and the size of the target block can be (nPSW, nPSH).
[0636] 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).
[0637] 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).
[0638] 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).
[0639] 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).
[0640] 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).
[0641]
[0642] Determination of availability of spatial and temporal candidates
[0643] 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.
[0644] Hereinafter, the candidate block may include spatial candidates and temporal candidates.
[0645] For example, the above judgment can be made by sequentially applying steps 1) to 4) below.
[0646] 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."
[0647] 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.
[0648] 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.
[0649] 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.
[0650]
[0651] Figure 11 shows the order of adding motion information of spatial candidates to the merge list according to an example.
[0652] 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.
[0653]
[0654] How to derive a merge list in merge mode and skip mode
[0655] 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.
[0656] Motion information (i.e., merge candidates) can be added to the merge list in the order of steps 1) to 4) below.
[0657] 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."
[0658] The number of additional movement information can be up to N.
[0659] 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.
[0660] 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.
[0661] The target slice may be a slice that contains the target block.
[0662] 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.
[0663] 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.
[0664] 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 will 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.
[0665] 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.
[0666] 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.
[0667] 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.
[0668] Zero vector motion information may be motion information whose motion vector is a zero vector.
[0669] 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.
[0670] The number of zero vector motion information may be equal to the number of reference pictures in the reference picture list.
[0671] 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.
[0672] 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.
[0673] 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.
[0674] 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.
[0675]
[0676] A method for deriving a list of predicted motion vector candidates in AMVP mode
[0677] 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.
[0678] 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.
[0679] 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.
[0680] 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.
[0681] 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.
[0682] The number of additional movement information can be up to N.
[0683] 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.
[0684] 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.
[0685] 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.
[0686] 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.
[0687] 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.
[0688] 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.
[0689] 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.
[0690]
[0691] Figure 12 illustrates the process of transformation and quantization according to an example.
[0692] As illustrated in Fig. 12, a quantized level can be generated by performing a transformation and / or quantization process on the residual signal.
[0693] 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.
[0694] The residual signal can be converted to the frequency domain through a transform process that is part of the quantization process.
[0695] 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.
[0696] 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.
[0697] 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.
[0698] Transformation set Transformation candidates 0 DST-VII, DCT-VIII 1 DST-VII, DST-I 2 DST-VII, DCT-V
[0699] 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
[0700] As shown in Tables 3 and 4, a transform set can be used to derive a DCT type or DST type to be used for transformation. Each transform set can include multiple transform candidates. Each transform candidate can be a DCT type or a DST type, etc. Table 5 below shows an example of a transform set applied in the horizontal direction and a transform set applied in the vertical direction according to the intra prediction mode.
[0701] 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
[0702] 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. As illustrated in Table 5, transformation sets applied to the horizontal direction and the vertical direction can be predefined according to the intra prediction mode of the target block. The encoding device (100) can perform transformation and inverse transformation on the residual signal using the transformation included in the transformation set corresponding to the intra prediction mode of the target block. In addition, the decoding device (200) can perform inverse transformation on the residual signal using the transformation included in the transformation set corresponding to the intra prediction mode of the target block.
[0703] 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.
[0704] 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.
[0705] 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.
[0706] The method using various transformations as described above can be applied to the residual signal generated by intra prediction or inter prediction.
[0707] 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.
[0708] 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).
[0709] 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).
[0710] 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.
[0711] Additionally, the primary transform can be a transform with various transform types depending on the kernel function defining the DCT or DST.
[0712] 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)).
[0713] For example, the primary 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).
[0714] 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.
[0715] Conversion type conversion kernel function DCT-2 DST-7 DCT-5 DCT-8 DST-1
[0716] In Table 6, i and j can be integer values greater than or equal to 0 and less than or equal to N-1. A secondary transform can be performed on the transform coefficients generated by performing the primary transform.
[0717] 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.
[0718] Primary and secondary transformations can be determined for a given target.
[0719] 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.
[0720] 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.
[0721] 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.
[0722] 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.
[0723] Alternatively, conversion information indicating a conversion method for a specific target may be signaled from the encoding device (100) to the decoding device (200).
[0724] 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.
[0725] 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.
[0726]
[0727] Figure 13 illustrates diagonal scanning according to an example.
[0728] Figure 14 illustrates horizontal scanning according to an example.
[0729] Figure 15 illustrates vertical scanning according to an example.
[0730] 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.
[0731] Each scan can start at a specific starting point and end at a specific ending point.
[0732] 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.
[0733] 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.
[0734] 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.
[0735] As illustrated in FIGS. 13, 14 and 15, the quantized transform coefficients can be scanned along the diagonal, horizontal or vertical directions.
[0736] 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.
[0737] 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.
[0738] 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.
[0739] 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.
[0740] 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.
[0741] 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.
[0742] For the luma component reconstructed via intra prediction or inter prediction, inverse mapping of the dynamic range can be performed before in-loop filtering.
[0743] 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.
[0744] A reverse mapping function for performing reverse mapping can be derived based on the mapping function.
[0745] In-loop filtering, storage of reference pictures and motion compensation can be performed in the reverse mapped area.
[0746] 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.
[0747] 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.
[0748] Whether scaling is available can be signaled at the slice level or the tile group level.
[0749] 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.
[0750] 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.
[0751] 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.
[0752] 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.
[0753] 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.
[0754] 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.
[0755] 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.
[0756] 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.
[0757] 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.
[0758] 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.
[0759] 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.
[0760]
[0761] Fig. 16 is a structural diagram of an encoding device according to one embodiment.
[0762] The encoding device (1600) may correspond to the encoding device (100) described above.
[0763] 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).
[0764] 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.
[0765] 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).
[0766] 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).
[0767] 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.
[0768] 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).
[0769] 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.
[0770] The program modules may be composed of instructions or codes that are executed by at least one processor of the encoding device (1600).
[0771] 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).
[0772] 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).
[0773] 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.
[0774] For example, the storage unit can store pictures, blocks, lists, motion information, inter prediction information, and bitstreams.
[0775] The encoding device (1600) can be implemented in a computer system including a recording medium that can be read by a computer.
[0776] 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).
[0777] Functions related to communication of data or information of the encoding device (1600) can be performed through the communication unit (1620).
[0778] For example, the communication unit (1620) can transmit the bitstream to a decryption device (1700) to be described later.
[0779]
[0780] Fig. 17 is a structural diagram of a decryption device according to one embodiment.
[0781] The decryption device (1700) can correspond to the decryption device (200) described above.
[0782] 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).
[0783] 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.
[0784] 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).
[0785] 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).
[0786] 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.
[0787] 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).
[0788] 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.
[0789] The program modules may be composed of instructions or codes that are executed by at least one processor of the decryption device (1700).
[0790] 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).
[0791] 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).
[0792] 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.
[0793] For example, the storage unit can store pictures, blocks, lists, motion information, inter prediction information, and bitstreams.
[0794] The decryption device (1700) can be implemented in a computer system including a recording medium that can be read by a computer.
[0795] 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).
[0796] Functions related to communication of data or information of the decryption device (1700) can be performed through the communication unit (1720).
[0797] For example, the communication unit (1720) can receive a bitstream from the encoding device (1600).
[0798] 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).
[0799]
[0800] 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.
[0801] 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).
[0802] 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.
[0803] The shape of the block to which the above embodiments are applied may have a square shape or a non-square shape.
[0804] 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.
[0805] 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.
[0806] 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.
[0807] 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.
[0808] 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.
[0809] 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.
[0810] 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.
[0811] 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.
[0812] 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.
[0813] 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.
[0814] 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.
[0815] 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.
[0816]
[0817] Definitions of terms in this disclosure may be as follows.
[0818] Neighboring block: A neighboring block can refer to a block adjacent to the target block. Neighboring blocks can include spatial and temporal neighboring blocks. A neighboring block can also refer to a reconstructed neighboring block within the reference image. A neighboring block does not necessarily have to be adjacent to the target block.
[0819] Spatial neighboring blocks: Spatial neighboring blocks can be blocks that are spatially adjacent to the target block.
[0820] The target block and spatial neighboring blocks may be included within the target image.
[0821] A spatial neighboring block may include a block whose boundary touches at least a portion of the boundary of the target block. Alternatively, a spatial neighboring block may include a block whose distance from the target block is less than or equal to a reference value.
[0822] A spatial neighboring block may include a block diagonally adjacent to a vertex of the target block.
[0823] Spatial neighboring blocks may include an upper left block adjacent to the upper left of the target block, an upper block adjacent to the upper right of the target block, an upper right block entered at the upper right of the target block, a left block adjacent to the left of the target block, a right block adjacent to the right of the target block, a lower left block adjacent to the lower left of the target block, a lower block adjacent to the bottom of the target block, and a lower right block adjacent to the lower right of the target block.
[0824] Temporal neighboring blocks: Temporal neighboring blocks can be blocks that are temporally adjacent to the target block.
[0825] A temporal neighboring block may include a collocated block (col block). A collocated block may be a block within a reconstructed image within a reference image buffer. A collocated picture (col picture) may refer to an image that includes a collocated block. A collocated picture may be an image included in a reference image list.
[0826] A call block can be determined based on the location of the target block within the target image. Two blocks being "temporally adjacent" may mean that the locations of the two blocks satisfy certain conditions.
[0827] The location of a call block within a call image may be the same as the location of the target block within the target image. Alternatively, the location of a call block within a call image may correspond to the location of the target block within the target image. Here, the correspondence of the locations of blocks may mean that the areas of the blocks are identical, that the area of one block is included in the area of another block, or that one block occupies a specific location of another block.
[0828] For example, the location of a call block within a call image may be identical to the location of a target block within the target image. Alternatively, a call block may be a block within a call image that contains a call pixel. A call pixel may be a pixel having coordinates identical to the coordinates of a specific pixel in the target block.
[0829] A temporal neighboring block may be a block that is temporally adjacent to a spatial neighboring block of the target block.
[0830] Neighbor sample: A neighbor sample may refer to a sample within a neighboring block. Neighbor samples may include predicted samples, reconstructed samples, residual samples, and decoded samples.
[0831] Below, terms listed on a single line may be used with the same meaning in the embodiments and may be used interchangeably in the embodiments.
[0832] “Motion information”, “Motion vector”, “Block vector”
[0833] “Bidirectional prediction”, “Bidirectional prediction”, “Inter-screen bidirectional prediction”, “Inter-screen bidirectional prediction”
[0834] Predefined value: A predefined value may refer to a value commonly used by an encoding device and a decoding device. For example, a predefined value may be interpreted as a fixed value. Alternatively, the predefined value may be a value shared by an encoding device and a decoding device through signaling. Alternatively, the predefined value may be a value derived through the same procedure in an encoding device and a decoding device so that the encoding device and the decoding device have a common value. Alternatively, the predefined value may be a common value in an encoding device and a decoding device.
[0835] The values derived through the same procedure in the encoding device and the decoding device may include values derived through the same procedure for the same value and / or the same information in the encoding device and the decoding device.
[0836] The values derived through the same procedure in the encoding device and decoding device may include values derived using the same conditional statement for the same value and / or the same information in the encoding device and decoding device.
[0837] The above description of predefined values can also be applied to predefined information. In the above descriptions, "value" can be replaced with "information."
[0838] 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, a block vector, a block vector candidate, or a block vector candidate index.
[0839] In this specification, “when an indicator indicating whether to perform a specific method is true” may mean when the indicator indicates whether to perform the specific method in a prediction mode; motion information; coding parameter; and / or location; as indicated by the indicator.
[0840] For example, an indicator indicating whether a specific mode is performed can have a value from 0 to 3, and the specific mode can be performed only when the indicator has a value of 1 or 3. In this case, when the indicator indicating whether a specific mode is performed is true, it can mean when the indicator indicating whether a specific mode is performed has a value of 1 or 3.
[0841] In this specification, “when an instruction indicating whether to perform a specific method is false” may mean a case where the instruction indicating whether to perform a specific method is not true.
[0842] In this specification, “if an indicator indicating a specific state is true” may mean a case where the specific state is true in the prediction mode; motion information; coding parameter; and / or location indicated by the indicator.
[0843] In this specification, “when an indicator indicating whether something is certain is false” may mean when the indicator indicating whether something is certain is not true.
[0844] In this specification, “an instruction indicating whether to perform a specific mode (or method)” may include an instruction indicating whether to perform a mode (or method) including the specific mode (or method).
[0845] In this specification, “when a specific method / mode is performed” may mean when an indicator indicating whether a specific method / mode is performed has a first value. The first value may be true or 1.
[0846] In this specification, “when a specific block is a specific method / mode” may mean when a specific method / mode is performed in a specific block.
[0847] In a particular unit, if a particular mode (or, a particular method) is not activated, signaling / encoding / decoding of at least one of the syntax elements for the particular mode (or, a particular method) may be omitted in the particular unit and its subunits.
[0848] The above unit may mean at least one of a parameter set, a header, a brick, a CTU, a CU, a PU, a TU, a CB, a PB, or a TB, or at least one of a video parameter set, a decoding parameter set, a sequence parameter set, an adaptation parameter set, a picture parameter set, a picture header, a sub-picture header, a slice header, a tile group header, a tile header, a brick, a coding tree unit (CTU), a coding unit (CU), a prediction unit (PU), a transform unit (TU), a coding block (CB), a prediction block (PB), or a transform block (TB).
[0849] To say that a particular mode (or, a particular method) is performed only under certain conditions may mean that the particular mode (or, a particular method) is activated only under those conditions.
[0850] In this specification, “motion information improvement” and “motion information compensation” may be used interchangeably and may be replaced with each other.
[0851] In this specification, “motion information improvement value” and “motion information correction vector” may be used interchangeably and may be replaced with each other.
[0852] In this specification, deriving second motion information from first motion information may mean obtaining second motion information by correcting the first motion information.
[0853] The coding parameters may include at least one of the type of the target picture or the type of the target slice.
[0854] The type of the target picture can be one of an I-picture, a B-picture, and a P-picture. The type of the target slice can be one of an I-slice, a B-slice, and a P-slice.
[0855] When the target image to be encoded is an I-slice, the target image can be encoded using data within the image itself without inter-prediction referring to other images. For example, an I-slice can be encoded only with intra-prediction.
[0856] When the target image is a P-slice, the target image can be encoded through inter prediction using only reference slices existing in one direction. Here, the one-way direction can be forward or backward.
[0857] When the target image is a B slice, the target image can be encoded through inter prediction using reference slices existing in both directions or inter prediction using reference slices existing in one of the forward and backward directions. Here, the bidirectional directions can be forward and backward.
[0858] P slices and B slices that are encoded and / or decoded using reference slices can be considered as images in which inter prediction is used.
[0859] When the target block is a chrominance component block, the surrounding samples of the target block may include luminance component samples corresponding to the surrounding chrominance component samples of the target block.
[0860] The surrounding blocks of the target block may refer to adjacent blocks of the target block. Alternatively, the surrounding blocks of the target block may include adjacent blocks of the target block. Alternatively, the surrounding blocks of the target block may be blocks whose distance from the target block is less than or equal to a reference value. Here, the distance may be a larger value among the horizontal distance and the vertical distance. Alternatively, the distance may be a smaller value among 1) the horizontal distance, 2) the vertical distance, 3) the diagonal distance, or 4) the horizontal distance and the vertical distance. Here, the unit of the distance may be a pixel or a block.
[0861]
[0862] Movement Information Table
[0863] In the present disclosure, the motion information table may include at least one of: 1) a motion shift information table; 2) an affine transformation information table; or 3) a translational motion information table.
[0864] The motion shift information table may include a first motion shift information table and / or a second motion shift information table.
[0865] The affine transformation information table can be constructed / updated using affine transformation information from blocks encoded / decoded using affine transformation.
[0866] The translational motion information table can be constructed / updated using motion information (e.g., motion vectors, information about reference pictures, whether local illumination compensation is performed, etc.) of blocks encoded / decoded using a prediction method other than affine transformation. The motion information of blocks encoded / decoded using a prediction method other than affine transformation can be accumulated and stored in the translational motion information table. Alternatively, in addition, the translational motion information table can be constructed / updated using motion shift information of blocks on which sub-block unit prediction using motion (or block) shift is performed. The motion shift information of blocks on which sub-block unit prediction using motion (or block) shift is performed can be accumulated and stored in the translational motion information table.
[0867] The number of candidates included in the translational motion information table may be predefined in the encoder and decoder. Alternatively, the number of candidates may be signaled through the bitstream. The translational motion information table may be initialized with predefined units. Here, the predefined units may be CTUs, CTU rows, tiles, slices, CTU rows, or subpictures.
[0868] Alternatively, what is stored in the translational motion information table may not be motion information, but rather blocks encoded / decoded using a prediction method other than affine transform.
[0869] When constructing a list of motion information candidates, a translational motion information table may also be used.
[0870] For example, if the number of motion information candidates included in the merge candidate list is less than a threshold, the motion shift information stored in the translational motion information table can be inserted into the merge candidate list as a new motion information candidate. The threshold can be 1, 2, MAX_NUM_CAND, or a positive integer.
[0871]
[0872] Subblock unit prediction
[0873] The following disclosure may relate to sub-block unit prediction for a target block. The sub-block-based prediction mode according to the present disclosure may include a sub-block unit prediction mode using an affine transform mode and a motion shift (or block shift).
[0874] Affine transformations can be used to predict various motions in the real world. For example, they can be used to predict zooming in / out, rotation, and irregular motions.
[0875] Affine transformation can be performed using multiple CPMVs. Multiple transformation models can exist, depending on the number of CPMVs to be used. The number of CPMVs to be used can include 2, 4, 6, 8, etc. This can be explicitly determined by information signaled in the bitstream or implicitly determined by related information.
[0876] Fig. 18 is a diagram illustrating an affine transformation model according to one embodiment.
[0877] Figure 18 (A) may represent a 4-parameter affine transformation model, and Figure 18 (B) may represent a 6-parameter affine transformation model.
[0878] In Fig. 18, v0, v1, and v2 can represent CPMVs corresponding to the upper left corner, upper right corner, and lower left corner of the target block, respectively.
[0879] The affine transformation mode may include an affine merge mode and an affine AMVP (Advanced Motion Vector Prediction) mode, depending on how control point motion information is derived.
[0880] When sub-block unit prediction is performed on a target block, information indicating whether the target block is in affine merge mode or affine AMVP mode may be signaled / encoded / decoded or predefined. Based on the above information, affine transform merge mode or affine transform AMVP mode may be performed on the target block.
[0881] When an affine transformation mode is applied to a target block, information indicating whether the type of affine transformation model to be applied to the target block is a 4-parameter affine transformation model or a 6-parameter affine transformation model may be signaled / encoded / decoded or predefined. Based on the above information, an affine transformation using a 4-parameter affine transformation model or an affine transformation using a 6-parameter affine transformation model may be performed on the target block.
[0882] In some embodiments, when the mode of the target block is the affine transform AMVP mode, information indicating whether the affine transform model is a 4-parameter affine transform model or a 6-parameter affine transform model may be signaled / encoded / decoded.
[0883] In some embodiments, when the mode of the target block is an affine transform merge mode, an affine mode using motion information offset, or a sub-block-by-sub-block prediction mode using motion shift, information indicating whether the affine transform model used in the target block is a 4-parameter affine transform model or a 6-parameter affine transform model may be determined based on at least one motion information among candidates specified from a motion information candidate list based on signaled / encoded / decoded information and / or a predefined rule for the target block (e.g., whether the candidate is a 4-parameter affine transform model or a 6-parameter affine transform model).
[0884] For example, if the affine transformation model used for a specific candidate selected from the motion information candidate list of the target block is a 4-parameter affine transformation model, prediction can be performed using the 4-parameter affine transformation model for the target block as well, and if it is a 6-parameter affine transformation model, prediction can be performed using the 6-parameter affine transformation model for the target block as well.
[0885] Information indicating whether to allow or enable sub-block unit prediction may be signaled / encoded / decoded or predefined in at least one of a video parameter set, a decoding parameter set, a sequence parameter set, an adaptation parameter set, a picture parameter set, a picture header, a sub-picture header, a slice header, a tile group header, a tile header, a brick, a coding tree unit (CTU), a coding unit (CU), a prediction unit (PU), a transform unit (TU), a coding block (CB), a prediction block (PB), or a transform block (TB).
[0886] If sub-block unit prediction is not performed in a specific unit, information indicating whether sub-block unit prediction is performed in the unit may be set to a first value (e.g., 0), and information indicating whether sub-block unit prediction is performed in a lower unit of the unit may not be signaled / decoded / decoded.
[0887] When sub-block unit prediction is performed in a specific unit, information indicating whether sub-block unit prediction is performed in the unit may be set to a second value (e.g., 1), and information indicating whether sub-block unit prediction is performed in a lower unit of the unit may be signaled / decoded / decoded. Based on the above information, sub-block unit prediction may or may not be performed for the target block.
[0888] In addition, the subblock unit prediction mode may include a subblock unit prediction mode to which a motion information offset is applied. The motion information offset may refer to a value added to a base motion vector. When the motion information offset is applied to a subblock unit prediction mode using a motion shift (or block shift), the base motion vector may refer to the motion shift. In addition, when applied to an affine transform mode, the base motion vector may be a control point motion vector (CPMV).
[0889] When sub-block unit prediction is performed on a target block, information indicating whether the target block is in affine transform merge mode or affine transform AMVP mode may be signaled / encoded / decoded or predefined. Based on the above information, affine transform merge mode or affine transform AMVP mode may be performed on the target block.
[0890] FIG. 19 and FIG. 20 are flowcharts showing encoding and decoding processes of an image encoding method and device including sub-block unit prediction according to one embodiment, respectively.
[0891]
[0892] Subblock unit prediction using motion shift (or block shift)
[0893] In the subblock unit prediction mode using motion shift, prediction information of the target block can be obtained in subblock units.
[0894] A subblock-level prediction mode using motion shift can be applied to at least one of inter prediction, IBC mode, and intra prediction. For example, for each of inter prediction, IBC mode, and intra prediction, the prediction information obtained on a subblock-by-subblock basis can be motion information, a block vector, or an intra prediction mode.
[0895] In the subblock unit prediction mode using motion shift, the target block is divided into subblock units of size NxM, and prediction information can be determined for each subblock. Then, by predicting each subblock using the prediction information corresponding to each subblock, a predicted block of the target block can be obtained.
[0896] N and M can be 2, 4, 8, 16, 32, 64, or any positive integer.
[0897] For example, N and M can be predefined values.
[0898] As another example, information about at least one of N or M may be signaled / encoded / decoded and at least one of N and M may be determined based on this information.
[0899] As another example, at least one of N or M may be determined based on at least one of the size of the target block, motion information of the target block, intra encoding method information of the target block, or coding parameters of the target block.
[0900] The term 'intra encoding method' used in this specification may include regular intra prediction modes (directional mode and non-directional mode), matrix-based intra prediction mode, IBC mode, intra template matching mode, etc. In addition, the term 'intra encoding method information' may include information (indicator) indicating whether each intra encoding method is performed and / or information required to perform each intra encoding method. For example, in the case of the IBC mode, it may be a block vector, a block vector candidate list configured to derive a block vector, etc.
[0901] A motion shift for sub-block unit prediction can be derived from a block encoded or decoded before the target block. For example, the motion shift can be derived from at least one of an adjacent block of the target block, a non-adjacent block of the target block, a motion shift candidate list derived from an adjacent or non-adjacent block, or a motion information table (e.g., a motion shift information table and / or a translational motion information table) storing motion information of an inter-predicted block that has already been encoded or decoded.
[0902] A motion shift may be a motion vector. Alternatively, the motion shift may be information including a motion vector and a reference picture index. For example, the reference picture index of the motion shift may be set to the reference picture index of a block for which encoding or decoding has already been completed.
[0903] In some embodiments, the motion shift may be derived based on motion information of an adjacent block or non-adjacent block at a particular location of at least one of FIG. 20.
[0904] In some other embodiments, information (e.g., candidate index) for specifying a motion shift may be signaled / encoded / decoded from a motion shift candidate list or a motion information table (e.g., a motion shift information table and / or a translational motion information table). The information may be binarized by a Rice code having a specific parameter, such as a base motion information index of 1.
[0905] In some other embodiments, the motion shift may be determined based on motion information of the target block (e.g., a motion shift candidate list of the target block, an index of a candidate in the motion shift candidate list, etc.), a template matching cost of each candidate in the motion shift candidate list, a position indicated by the motion shift (or a sample or block at that position), a neighboring block (or sample) of the position indicated by the motion shift (or a sample or block at that position), intra encoding method information of the target block, coding parameters of the neighboring blocks, a neighboring sample of the target block, or at least one neighboring sample of a reference block of the target block. When the target block is a chrominance component block, a luminance component sample of the target block (at least one sample in a luminance component block or region corresponding to the target block) may be additionally considered.
[0906] For example, motion information corresponding to at least one candidate having a predefined specific index within a motion shift candidate list may be determined as a motion shift. The specific index may mean an index whose value is odd or even, or an index whose value is lower than or equal to a predefined threshold.
[0907] As another example, a motion shift can be derived by performing template matching on a target block. That is, the motion shift can be determined based on the displacement between the target block and the searched reference block by searching for a reference block having a reference template that is most similar (i.e., provides the lowest matching cost) to the target template of the target block. Through template matching on the target block, one or more motion shifts can be determined in the order of lowest matching cost.
[0908] As another example, a motion shift may be selected from a candidate list derived from adjacent blocks of a target block, non-adjacent blocks of the target block, etc., based on a template matching cost for each candidate in the candidate list. That is, a matching cost between a reference template at a location indicated by the motion information of each candidate and the target template of the target block may be calculated, and a motion shift may be set based on at least one candidate that provides the lowest matching cost. For example, one or more motion shifts may be determined in the order of providing the lowest matching cost.
[0909] When at least one motion shift is determined, prediction information of each sub-block within the target block can be determined based on prediction information of a reference block indicated by the motion shift. The size of the reference block indicated by the motion shift for the target block can be the same as the size of the target block.
[0910] Prediction information (motion information, block vector, or intra prediction mode) of a specific subblock within a target block can be determined based on prediction information of a reference subblock at a location corresponding to the specific subblock within a reference block indicated by a motion shift. An invalid reference subblock can be replaced with a reference subblock at a central location. Here, an invalid reference subblock may mean a case where required prediction information does not exist. For example, when inter prediction is applied to a target block, a reference subblock without motion information may be considered invalid.
[0911] For example, when inter prediction is applied to a target block, the motion information of a specific subblock within the target block can be derived from the motion information of a corresponding reference subblock within a reference block at a position indicated by a motion shift within a reference picture (or, a call picture) other than the target picture.
[0912] For example, the motion vector of a specific subblock within a target block can be derived based on the motion vector of the corresponding reference subblock.
[0913] For example, the reference pictures of specific subblocks within a target block can always be fixed, regardless of the reference pictures of the corresponding reference subblocks. For example, it can be set to the first reference picture within the reference picture list (the reference picture with a reference picture index of 0).
[0914] A call picture may refer to a picture in which a reference block exists, which is determined based on a motion shift to determine motion information of a sub-block within a target block. That is, the motion information of a sub-block within a target block may be determined by using a block at a position indicated by a motion shift (or a motion vector of the motion shift) from the call block of the target block within the call picture as a reference block.
[0915] At least one call picture can be selected.
[0916] For example, a call picture can be determined as at least one reference picture having the smallest reference picture index among the reference pictures in the reference picture list.
[0917] Alternatively, the call picture may be set to at least one reference picture among the reference pictures in the reference picture list that has the smallest POC difference with the target picture.
[0918] Alternatively, the call picture can be set to the picture indicated by the reference picture index of the motion shift.
[0919] Alternatively, information to indicate the call picture may be signaled / encoded / decoded.
[0920] Meanwhile, if there is an inter-unpredicted sub-block within a reference block within a call picture, the motion information of the sub-block can be replaced with the motion information of the sub-block at the center position within the reference block.
[0921] In some embodiments, after motion information of subblocks within a target block is determined from a reference block within a call picture, the motion information of the subblocks may be further improved.
[0922] For example, a specific offset vector may be added to the motion vectors of subblocks. Information about the offset vector may be signaled / encoded / decoded. Information about the offset vector may be an index for specifying one from a list containing a plurality of predefined offset vector candidates. That is, the offset vector may be selected from among a plurality of predefined offset vector candidates.
[0923] Meanwhile, information related to the combination of prediction information of sub-blocks within the target block induced by the motion shift may be included in a candidate list related to the prediction information.
[0924] For example, in the case of inter prediction, a candidate related to the combination of motion information of subblocks within a target block induced by motion shift (hereinafter referred to as a "subblock-based motion information candidate") may be included as a candidate in the motion information candidate list for the target block. In this case, one or more subblock-based motion information candidates may be included as candidates in the motion information candidate list.
[0925] The subblock-based motion information may be a motion shift used to derive a combination of motion information of subblocks, or a combination of motion information of subblocks derived from the motion shift.
[0926] When a candidate from the motion information candidate list is sub-block-based motion information, the target block can be predicted on a sub-block basis using the motion shift corresponding to the candidate. Alternatively, the target block can be predicted on a sub-block basis using a combination of motion information of the sub-blocks corresponding to the candidate.
[0927] Here, the motion information candidate list may include at least one of an affine merge candidate list, an affine AMVP list, an affine transformation candidate list, a subblock unit motion information candidate list, a merge candidate list, or an AMVP list.
[0928]
[0929] Subblock-level prediction using motion information offset
[0930] Sub-block unit prediction using motion information offset may include at least one of a sub-block unit prediction mode using motion (or block) shift using motion information offset, or an affine mode using motion information offset.
[0931] Subblock-level prediction mode using motion (or block) shift using motion information offset
[0932] If the target block is a sub-block-level prediction mode using a motion (or block) shift that uses a motion information offset, the motion (or block) shift of the target block may be changed (or determined) based on the motion information offset. For example, the motion information offset may be added to the motion (or block) shift of the target block.
[0933] Information indicating whether to perform a sub-block-level prediction mode using a motion (or, block) shift using a motion information offset in the target block may be signaled / encoded / decoded or predefined. Based on the above information, a sub-block-level prediction mode using a motion (or, block) shift using a motion information offset in the target block may be performed.
[0934] At this time, it can be predefined whether to signal / encode / decode information indicating whether to perform a sub-block unit prediction mode using a motion (or, block) shift that uses a motion information offset in the target block. For example, signaling / encoding / decoding information indicating whether to perform a sub-block unit prediction mode using a motion (or, block) shift that uses a motion information offset in the target block can be performed only when the target block is in affine transform merge mode.
[0935] Base movement information content
[0936] A base motion information candidate list can be constructed based on at least one of an adjacent block of the target block, a non-adjacent block of the target block, or a motion information table.
[0937] Information for specifying at least one piece of base motion information (e.g., a base motion information index) may be signaled / encoded / decoded or predefined. Based on the information, at least one piece of base motion information in the target block may be specified from a base motion information candidate list.
[0938] Alternatively, at least one base motion information may be determined based on motion information of a target block, a coding parameter of the target block, motion information of a surrounding block, a coding parameter of the surrounding block, an index of a base motion information candidate, and a matching cost of the base motion information candidate.
[0939] The number or maximum number of base motion information candidates may be determined based on at least one of the size of the target block, the coding parameters of the target block, whether affine transformation is performed on neighboring blocks of the target block, or information indicating whether affine transformation is performed on neighboring blocks of the target block. Alternatively, the number or maximum number of base motion information candidates may always be the same. For example, the number of base motion information candidates may be 1, 2, or 3.
[0940] The base motion information index can be binarized by a rice code with a specific parameter such as 1.
[0941]
[0942] Affine mode using motion information offset
[0943] When the target block is in affine mode using a motion information offset, at least one of the control point motion vectors (CPMVs) of the target block may be changed (or determined) based on the motion information offset. For example, the motion information offset may be added to at least one of the control point motion vectors of the target block. As another example, the motion information offset may be added to at least one control point motion vector for at least one of the affine transform control point predictor or the affine transform merge candidate.
[0944] If the target block is in an affine mode using a motion information offset, at least one of the affine models of the target block may be modified based on the motion information offset. For example, the motion information offset may be added to at least one of the coefficients of the affine model of the target block.
[0945] Information indicating whether to perform an affine mode using a motion information offset in the target block may be signaled / encoded / decoded or predefined. Based on the above information, an affine mode using a motion information offset in the target block may be performed.
[0946] At this time, whether to signal / encode / decode information indicating whether to perform affine mode using motion information offset in the target block can be predefined.
[0947] For example, signaling / encoding / decoding of information indicating whether to perform affine mode using motion information offset in the target block may be performed only when the target block is in affine transform merge mode.
[0948] Base movement information content
[0949] A base motion information candidate list can be constructed based on at least one of an adjacent block of the target block, a non-adjacent block of the target block, or a motion information table.
[0950] Information for specifying at least one piece of base motion information (e.g., a base motion information index) may be signaled / encoded / decoded or predefined. Based on the information, at least one piece of base motion information in the target block may be specified from a base motion information candidate list.
[0951] Alternatively, at least one base motion information may be determined based on motion information of a target block, a coding parameter of the target block, motion information of a surrounding block, a coding parameter of the surrounding block, an index of a base motion information candidate, and a matching cost of the base motion information candidate.
[0952] The number or maximum number of base motion information candidates may be determined based on at least one of the size of the target block, the coding parameters of the target block, whether affine transformation is performed on neighboring blocks of the target block, or information indicating whether affine transformation is performed on neighboring blocks of the target block. Alternatively, the number or maximum number of base motion information candidates may always be the same. For example, the number of base motion information candidates may be 1, 2, or 3.
[0953] The base motion information index can be binarized by a rice code with a specific parameter such as 1.
[0954]
[0955] Motion information offset
[0956] The motion information offset can be a motion vector.
[0957] For example, the motion information offset may be determined by combinations of angles within a predefined angle list and distance offsets within a predefined distance offset list.
[0958] Angle list
[0959] The predefined list of angles can represent the angles between the motion vector and the axis of the motion information offset. Here, the axis can be the X-axis (i.e., the horizontal axis or the vertical axis) or the Y-axis (i.e., the vertical axis or the vertical axis).
[0960] The angle list can be structured to contain angles with values of i_ANGLE×π / NUM_ANGLE.
[0961] i_ANGLE can be one of the integer values from 0 to (2×NUM_ANGLE - 1).
[0962] NUM_ANGLE can be a predefined value, such as 4, 8, 16, or a positive integer.
[0963] The angles constituting the aforementioned NUM_ANGLE and / or predefined angle list can be determined based on at least one of 1) motion information of the target block or 2) coding parameters.
[0964] Distance Offset List
[0965] The list of predefined distance offsets can represent a relative distance to the motion vector of the target block or a relative position to the motion vector of the target block.
[0966] The list of predefined distance offsets can be configured to include at least one of 0, 1, 2, 4, or 8.
[0967] The list of predefined distance offsets can be configured to contain values corresponding to Multioffset-pels. Multioffset can be 1 / 8, 1 / 4, 1 / 2, 1, 2, 4, 8, 16, 32, or a positive integer.
[0968] The distance offsets constituting the predefined distance offset list and / or the size of the distance offset list can be determined based on at least one of 1) motion information of the target block or 2) coding parameters.
[0969] Combination of angle and distance offset
[0970] Combining a specific angle ANGLE and a specific distance offset OFFSET may mean determining a motion vector using ANGLE and OFFSET. Here, the angle between the determined motion vector and the axis may be ANGLE. The magnitude of the determined motion vector may be OFFSET. The axis may be the X-axis or the Y-axis.
[0971] The magnitude of the motion vector can be determined based on the absolute value of the x-direction component and the absolute value of the y-direction component of the motion vector.
[0972] Alternatively, combining a specific angle ANGLE and a specific distance offset OFFSET may mean determining the position to which the aforementioned determined motion vector points.
[0973] Information for determining at least one of an angle list or a distance offset list in a target block may be signaled / encoded / decoded or predefined. Based on the information, at least one of an angle list or a distance offset list in a target block may be determined.
[0974] For example, at least one of the angle list and / or offset list in the target block may be determined based on a motion information offset index of an affine mode using motion information offset.
[0975] For example, in the target block, based on the quotient obtained by dividing the motion information offset index of the affine mode using the motion information offset by a predetermined value, if the quotient is odd, the first distance offset list can be used, and if the quotient is even, the second distance offset list can be used.
[0976] The above given value may be 1, 2, 4, 8, 16, 32, 48, 96 or a positive integer.
[0977] For example, the components constituting the first distance offset list and the second distance offset list may not overlap.
[0978] For example, the first distance offset list may be composed of 1 / 16-pel and 1 / 8-pel, and the second distance offset list may be composed of 1 / 4-pel and 1 / 2-pel.
[0979]
[0980] Application of motion information offset
[0981] The MV0 below may be base motion information of the target block in the L0 direction. The MV1 may be base motion information of the target block in the L1 direction.
[0982] The MV0' below may be corrected motion information for the L0 direction. The MV1' may be corrected motion information for the L1 direction.
[0983] MVoff may be a motion information offset specified from the motion information offset candidate list or one of the motion information offset candidates.
[0984] Information (e.g., a motion information offset index) for specifying at least one motion information offset may be signaled / encoded / decoded or predefined. Based on the information, at least one motion information offset in the target block may be specified from a motion information offset candidate list.
[0985] Alternatively, at least one motion information offset may be determined based on motion information of the target block, coding parameters of the target block, motion information of a surrounding block, coding parameters of the surrounding block, an index of a motion information offset candidate, and a matching cost of the motion information offset candidate.
[0986] The number or maximum number of motion information offset candidates may be determined based on at least one of information indicating whether to perform affine transformation on neighboring blocks of the target block and information indicating whether to perform affine transformation on neighboring blocks of the target block.
[0987] The motion information offset index can be binarized by a rice code with a specific parameter such as 1.
[0988]
[0989] When bidirectional inter prediction is used for a target block, a motion information offset MVoff may be added to at least one of the base motion information of the target block. (Method 1 for applying motion information offset to method 5 for applying motion information offset)
[0990] How to apply motion information offset 1
[0991] At this time, MVoff can be added in the same way for the L0 and L1 directions. In other words, the processes according to Equations 1 and 2 below can be performed.
[0992] [Formula 1]
[0993] MV0' = MV0 + MVoff
[0994] [Formula 2]
[0995] MV1' = MV1 + MVoff
[0996] Method 2 of applying motion information offset
[0997] Alternatively, at this time, MVoff may be added in the L0 direction, and -MVoff may be added in the L1 direction. In other words, the processes according to Equations 3 and 4 below may be performed.
[0998] [Formula 3]
[0999] MV0' = MV0 + MVoff
[1000] [Formula 4]
[1001] MV1' = MV1 - MVoff
[1002] Method 3: Applying Motion Information Offset
[1003] Alternatively, at this time, MVoff may be added in the L0 direction, and SCALED_MVoff may be added in the L1 direction. In other words, the processes according to Equations 5 and 6 below may be performed.
[1004] [Formula 5]
[1005] MV0' = MV0 + MVoff
[1006] [Formula 6]
[1007] MV1' = MV1 + SCALED_MVoff
[1008] Here, SCALED_MVoff can be a motion vector derived by applying scaling in the L1 direction to MVoff in the L0 direction.
[1009] For example, MVoff and SCALED_MVoff may be in opposite directions.
[1010] How to apply motion information offset 4
[1011] Alternatively, at this time, MVoff may be added in the L1 direction, and SCALED_MVoff may be added in the L0 direction. In other words, the processes according to Equations 7 and 8 below may be performed.
[1012] [Formula 7]
[1013] MV1' = MV1 + MVoff
[1014] [Formula 8]
[1015] MV0' = MV0 + SCALED_MVoff
[1016] How to apply motion information offset 5
[1017] Alternatively, at this time, MVoff can be added only for the LX direction. That is, for example, when X is 0, the processes according to Equations 9 and 10 below can be performed. At this time, it can also be considered that a zero motion vector is added for the L(1-X) direction.
[1018] [Formula 9]
[1019] MV0' = MV0 + MVoff
[1020] [Formula 10]
[1021] MV1' = MV1
[1022] How to decide X
[1023] X can be 0, 1, or a positive integer.
[1024] Information representing X can be determined through signaling / encoding / decoding, or can be predefined.
[1025] For example, X can be determined based on at least one of a matching cost for L0 direction motion information or a matching cost for L1 direction motion information.
[1026] For example, LX may be a direction with a lower matching cost between the L0 direction and the L1 direction. Or, for example, LX may be a direction with a higher matching cost between the L0 direction and the L1 direction.
[1027] For example, X can be determined based on a base motion information index and a motion information offset index.
[1028] For example, X can be determined based on the remainder of a division operation that divides the motion information offset index by a given integer value (e.g., 2 or 3).
[1029] For example, X can be determined based on the quotient of a division operation that divides the motion information offset index by a given integer value (e.g., 2 or 3).
[1030] Multiple base motion information indices and multiple base motion information may be used in the target block.
[1031] Multiple motion information offset indices and multiple motion information offsets may be used in the target block.
[1032] When bidirectional inter prediction is used for a target block, at least one of the motion information offset application methods 1 to 5 may be used in which a motion information offset MVoff is added to at least one of the base motion information of the target block.
[1033] At this time, information regarding which method among the motion information offset application methods 1 to 5 is used to add the motion information offset to the base motion information may be signaled / encoded / decoded or predefined. The motion information offset may be added to the base motion information using at least one method among the motion information offset application methods 1 to 5 determined based on the above information.
[1034] For example, information on which method among motion information offset application method 1 to motion information offset application method 5 is used to add a motion information offset to the base motion information can be determined based on at least one of the POC of the target image, the POC of the L0 direction reference image of the target block, or the POC of the L1 direction reference image of the target block.
[1035] The direction of the motion information offset added to the L0 direction and the L1 direction can be determined based on the first direction and the second direction.
[1036] For example, when the first direction and the second direction are the same, the directions of the motion information offsets added to the L0 direction and the L1 direction are the same, and when the first direction and the second direction are opposite, the directions of the motion information offsets added to the L0 direction and the L1 direction may be opposite.
[1037] The size of the motion information offset added in the L0 direction and the L1 direction can be determined based on the first POC interval and the second POC interval.
[1038] For example, MVoff may be added in the LX direction, and the result of multiplying MVoff by (the (2-X)th POC interval / the (1+X)th POC interval) or a value based on this may be added in the L(1-X) direction.
[1039] For example, if the second POC interval is greater than the first POC interval, X may be 1, otherwise X may be 0. The above X may be 0 or 1.
[1040] The first direction may be a direction from the target image to the L0-direction reference image. The second direction may be a direction from the target image to the L1-direction reference image. The first POC interval may be the difference between the POC of the target image and the POC of the L0-direction reference image. The second POC interval may be the difference between the POC of the target image and the POC of the L1-direction reference image.
[1041] When unidirectional inter prediction is used for the target block, a motion information offset MVoff may be added to at least one of the base motion information of the target block.
[1042] When unidirectional inter prediction is used for the target block, the motion information offset can be added to the base motion information of the target block as in [Formula 1] (when the target block is unidirectional inter-screen prediction in the L0 direction) or [Formula 2] (when the target block is unidirectional inter-screen prediction in the L1 direction).
[1043] When a sub-block unit prediction mode using a motion (or block) shift using a motion information offset in the target block is performed, the motion information offset MVoff may be added to at least one of the base motion information of the target block.
[1044] When a sub-block unit prediction mode using a motion (or, block) shift using a motion information offset for a target block is performed, the motion information offset can be added to the base motion information of the target block as in [Formula 1] (when the motion (or, block) shift of the target block is motion information in the L0 direction) or [Formula 2] (when the motion (or, block) shift of the target block is motion information in the L1 direction).
[1045]
[1046] Affine mode using one-sided motion information offset, affine mode using two-sided motion information offset
[1047] An affine mode using a motion information offset may include at least one of an affine mode using a one-sided motion information offset or an affine mode using a two-sided motion information offset.
[1048] When an affine mode using a one-sided motion information offset is performed in the target block, the motion information offset can be added to the base motion information using the motion information offset application method 5 described above in the target block.
[1049] When an affine mode using a two-sided motion information offset is performed in a target block, a motion information offset can be added to the base motion information using at least one of the motion information offset application methods 1 to 4 described above in the target block.
[1050] Information indicating whether an affine mode using a one-sided motion information offset or an affine mode using a two-sided motion information offset is to be performed in the target block may be signaled / encoded / decoded or predefined. Based on the information, either an affine mode using a one-sided motion information offset or an affine mode using a two-sided motion information offset may be performed in the target block.
[1051] When an affine mode using a one-way motion information offset is performed in the target block, information for specifying the direction in which the motion information offset is to be added in the target block can be signaled / encoded / decoded.
[1052] In the target block, an affine mode using a one-sided motion information offset or an affine mode using a two-sided motion information offset can be performed based on a motion information offset index of an affine mode using a motion information offset.
[1053] For example, in a target block, based on a quotient obtained by dividing a motion information offset index of an affine mode using a motion information offset by a predetermined value (e.g., 8), if the quotient is a first value (e.g., 0), an affine mode using a one-sided motion information offset in which the LX direction is the L0 direction may be performed, if the quotient is a second value (e.g., 1), an affine mode using a one-sided motion information offset in which the LX direction is the L1 direction may be performed, and if the quotient is a third value (e.g., 2), an affine mode using a two-sided motion information offset may be performed.
[1054]
[1055] Motion information offset for control point motion vectors
[1056] When affine mode is used for the target block, adding a motion information offset Mvoff in the LX direction may mean that Mvoff is added to at least one of the CPMVs in the LX direction of the affine mode, or that a motion vector determined based on Mvoff is added.
[1057] Here, X can be 0, 1, or a positive integer.
[1058] Among the CPMVs of the base motion information, the CPMV to which Mvoff or the motion information offset determined based on Mvoff is added can be determined based on at least one of the motion information of the target block, the coding parameters of the target block, the motion information of the surrounding blocks, the coding parameters of the surrounding blocks, the target template of the target block, the reference template for the reference block of the target block, the base motion information index, the base motion information, the motion information offset index, or the motion information offset.
[1059] For example, a motion information offset may be added to all CPMVs of the target block or to all CPMVs of at least one base motion information of the target block.
[1060] In this specification, when it is said that specific information is predefined, it may mean that the information is determined based on at least one of motion information of a target block, coding parameters of the target block, motion information of a surrounding block, coding parameters of a surrounding block, a target template of the target block, a reference template for a reference block of the target block, a base motion information index, base motion information, a motion information offset index, or a motion information offset.
[1061] The matching cost for a specific motion information offset may mean the matching cost for motion information that is the sum of the base motion information and the specific motion information offset.
[1062] Composition and sorting of the motion information offset candidate list
[1063] In an affine mode using motion information offsets, a candidate list of motion information offsets can be constructed using at most N motion information offsets, each pointing to at most N positions having the lowest matching cost among all possible positions based on base motion information.
[1064] The order of motion information offset candidates within the motion information offset candidate list can be sorted in ascending order of matching cost.
[1065] Possible locations based on base movement information
[1066] The possible positions based on the base motion information may include at least one of two horizontal directions or two vertical directions having at least one distance offset included in a specific distance offset list.
[1067] For example, a list of specific distance offsets could be {1-pel, 2-pel, 4-pel, 8-pel, 12-pel, 16-pel, 24-pel, 32-pel, 40-pel, 48-pel, 56-pel, 64-pel, 72-pel, 80-pel, 88-pel, 96-pel, 104-pel, 112-pel, 120-pel, 128-pel}.
[1068] The possible locations may be a subset of the motion vector search region.
[1069] According to the steps below, a list of motion information offset candidates with a maximum size of N can be constructed and / or sorted.
[1070] [Step 1] The largest distance offset can be represented as L-pel. (L can be one of the values described in the embodiments, for example, 128.) The number of directions can be D. (For example, D can be 4, in which case the directions can be left, right, up, and down.) The starting search interval can be M-pel. (For example, M can be 8.) The maximum number of candidates in the motion information offset candidate list can be N. (For example, N can be 8.) L, D, M, and N are not limited to the values described above, and can each be an integer greater than or equal to 1.
[1071] At this time, at least one of L, M or N may be determined differently based on at least one of D or the direction of exploration.
[1072] [Step 2] For each direction, a matching cost may be calculated for a motion information offset determined from the distance offsets of all M-th positions that do not exceed L (i.e., M, 2×M, 3×M, etc.). At this time, based on the matching cost calculated for the determined motion information offset, the motion information offset may be added to a motion information candidate list. In addition, when a specific motion information offset is added to the motion information candidate list, the order of each motion information offset candidate in the motion information candidate list may be added so as to be sorted in ascending order of the matching cost. N candidates having the lowest matching cost(s) may be maintained in the list.
[1073] [Step 3] For each motion information offset candidate in the list, the matching cost of two motion information offsets having an offset equal to +-M / 2 from the motion information offset along the direction of the motion information offset can be calculated. At this time, the motion information offset can be added to the motion information candidate list based on the matching cost calculated for the determined motion information offset. In addition, when a specific motion information offset is added to the motion information candidate list, the order of each motion information offset candidate in the motion information candidate list can be added so as to be sorted in ascending order of the matching cost. N candidates having the lowest matching cost(s) can be maintained in the list.
[1074] [Step 4] Step 3 can be repeated until the interval M reaches a first value (e.g., 1), while reducing the interval M by half.
[1075] The first value may be determined based on at least one of the motion information offset candidates in the motion information offset candidate list for which step 3 is performed, the direction, or D. For example, the first value may be determined based on the quotient of the size of the motion information offset candidate in the motion information offset candidate list for which step 3 is performed divided by the second value (e.g., 8).
[1076] The first value may be a positive real number. The second value may be a positive integer.
[1077] As the steps progress, the interval M may decrease. In other words, the resolution of the search may become increasingly smaller as the steps progress.
[1078] Among the detected motion information offsets, N candidates with the lowest matching cost(s) can be stored in a list. The final motion information of the target block can be determined by signaling / encoding / decoding the indices for the candidates in the list.
[1079] The starting search interval can be determined based on the size of the base motion information.
[1080]
[1081] Reconstruction and reordering of the motion information offset candidate list
[1082] The order of motion information offset candidates within the motion information offset candidate list can be rearranged in ascending order of matching cost.
[1083] The list of motion information offset candidates can be reconstructed.
[1084] For example, the motion information offset candidate list can be reconstructed to include only the N motion information having the lowest index.
[1085]
[1086] An embodiment of an affine mode using two-sided motion information offsets
[1087] When the target block is an affine mode using a two-way motion information offset, in order to rearrange the order of the motion information offset candidates in the motion information offset candidate list of the target block, when adding each motion information offset candidate (or motion information offset) to the base motion information, if the sign of (POC of the target image - POC of the L0 direction reference image of the target block) and the sign of (POC of the target image - POC of a specific image) are the same, the motion information offset application method 1 may be used, and if the signs are different, the motion information offset application method 2 may be used.
[1088] The above specific image may mean an image corresponding to a reference image index in the L0 direction in the reference block list in the L1 direction.
[1089] In addition, when determining the final motion information of the target block, when adding a motion information offset to the base motion information of the target block, if the sign of (POC of the target image - POC of the L0 direction reference image of the target block) and the sign of (POC of the target image - POC of the L1 direction reference image of the target block) are the same, the motion information offset application method 1 may be used, and if the signs are different, the motion information offset application method 2 may be used.
[1090] Alternatively, when the target block is an affine mode using a two-way motion information offset, 1) in adding each motion information offset candidate (or motion information offset) to the base motion information to rearrange the order of the motion information offset candidates in the motion information offset candidate list of the target block, and 2) in adding the motion information offset to the base motion information of the target block, if the sign of (POC of the target image - POC of the L0 direction reference image of the target block) and the sign of (POC of the target image - POC of the L1 direction reference image of the target block) are the same, the motion information offset application method 1 may be used, and if the signs are different, the motion information offset application method 2 may be used.
[1091] When the motion information candidate list of the target block includes sub-block-based motion information candidates, each candidate in the motion information candidate list may include information on whether the candidate represents sub-block-based motion information. Alternatively, based on signaling / encoding / decoding information and / or implicit rules, it may be determined whether a candidate selected from the motion information candidate list is used for sub-block-based prediction using motion shift.
[1092] Information about sub-block unit prediction using motion shift in the target block can be signaled / encoded / decoded.
[1093] For example, an indicator indicating whether to perform sub-block unit prediction using motion shift in the target block can be signaled / encoded / decoded.
[1094] Alternatively, whether to perform sub-block-by-block prediction using motion shift in the target block can be determined based on at least one of motion information of the target block (e.g., a motion information candidate list, a merge index in merge mode, an MV candidate index in AMVP mode), intra coding method information of the target block (e.g., an indicator indicating whether the IBC mode or the intra template matching mode is applied to the target block), coding parameters of the target block, intra coding method information of a neighboring block, coding parameters of the neighboring block, a neighboring sample of the target block, or at least one neighboring sample of a reference block of the target block, without signaling / encoding / decoding information. When the target block is a chrominance component block, a luminance component sample of the target block (at least one sample in a luminance component block or region corresponding to the target block) can be additionally considered.
[1095] Alternatively, whether to perform signaling / encoding / decoding for information on whether to perform sub-block unit prediction using motion shift in the target block may be determined based on at least one of an encoding mode of the target block, motion information of the target block, intra encoding method information of the target block, coding parameters of the target block, intra encoding method information of a neighboring block, coding parameters of a neighboring block, a neighboring sample of the target block, or at least one neighboring sample of a reference block of the target block. When the target block is a chrominance component block, a luminance component sample of the target block (at least one sample in a luminance component block or region corresponding to the target block) may be additionally considered.
[1096] For example, sub-block unit prediction using motion shift may be performed on the target block only when the size of the target block is greater than or equal to a threshold value, and information about the sub-block unit prediction using motion shift may be signaled / encoded / decoded. The threshold value may be 4, 8, 16, 32, 64, 128, or a positive integer.
[1097] Regarding the movement shift information table (First embodiment: First movement shift information table)
[1098] Motion shift information of a block for which sub-block unit prediction using motion (or block) shift is performed can be accumulated and stored in a first motion shift information table.
[1099] In this case, the motion shift information may be information including at least one of a motion vector (or block vector) or information about a reference picture.
[1100] For example, if sub-block unit prediction is performed using motion (or block) shift in a block, the first motion shift information table can be updated with the motion shift information of the corresponding block.
[1101] The number of candidates included in the first motion shift information table may be predefined in the encoder and decoder. The first motion shift information table may be initialized with a predefined unit. Here, the predefined unit may be a CTU, a CTU row, a tile, a slice, a CTU row, or a subpicture.
[1102] Alternatively, what is stored in the first motion shift information table may not be motion shift information, but rather a block in which sub-block unit prediction using motion (or block) shift is performed.
[1103] When constructing a list of motion information candidates, the first motion shift information table may be used.
[1104] For example, if the number of motion information candidates included in the motion information candidate list for affine transformation is less than a threshold, the motion shift information stored in the first motion shift information table can be inserted into the motion information candidate list as a new motion information candidate.
[1105] The above threshold can be 1, 2, MAX_NUM_CAND or a positive integer.
[1106] Alternatively, the first motion shift information table itself can be used as a motion information candidate list.
[1107] For example, information indicating whether the first motion shift information table itself is to be used as a motion information candidate list can be signaled / encoded / decoded.
[1108] When the motion information candidate list includes multiple candidates, information specifying one of the multiple candidates may be encoded and signaled.
[1109] In the target block, information indicating whether the first motion shift information table is enabled can be encoded and signaled.
[1110] The above information may be a...
Claims
A step of obtaining a candidate list of movement information of the current block; A step of determining at least one candidate of the above movement information candidate list; A step of improving the motion information of at least one candidate determined above; and An image decoding method, comprising a step of performing prediction of the current block based on the improved motion information. In the first paragraph, An image decoding method, characterized in that the motion information candidate list of the current block includes a first affine transformation candidate using N CPMVs (control point motion vectors). In the second paragraph, An image decoding method, characterized in that the motion information candidate list of the current block includes a second affine transformation candidate obtained by calculating a template matching cost based on the first affine transformation candidate. In the third paragraph, A method for decoding an image, characterized in that the template used for calculating the template matching cost is at least one of the left or upper templates of the current block. In paragraph 4, A video decoding method, characterized in that the calculation of the template matching cost is performed by assigning identical motion vector offsets to the N CPMVs of the first affine transformation candidates. In paragraph 5, A video decoding method, characterized in that the CPMV of the second affine transformation candidate is obtained by assigning a motion vector offset with a minimum template matching cost among the motion vector offsets to the N CPMVs of the first affine transformation candidate. In the second paragraph, An image decoding method, characterized in that the first affine transformation candidate of the above motion information candidate list is obtained from a spatially adjacent block of the current block. In the second paragraph, An image decoding method, characterized in that the first affine transformation candidate of the above motion information candidate list is obtained from a spatially non-adjacent block of the current block. In the second paragraph, An image decoding method, characterized in that the first affine transformation candidate of the above motion information candidate list is obtained from a temporally surrounding block of the current block. In the first paragraph, An image decoding method, characterized in that the improvement of motion information of at least one candidate determined above is performed in units of sub-blocks of the current block. In the first paragraph, A video decoding method, characterized in that, in response to the above-determined candidate being an affine transform candidate, improvement of motion information of the above-determined candidate is performed in units of sub-blocks to which CPMVs of the above-determined affine transform candidate belong. In Article 11, An image decoding method characterized in that the improvement of the above motion information is achieved by improving only the translation coefficients among the non-translational coefficients and translational coefficients of the affine transformation candidate. A step of obtaining a candidate list of movement information of the current block; A step of determining at least one candidate of the above movement information candidate list; A step of improving the motion information of at least one candidate determined above; and An image encoding method, comprising a step of performing prediction of the current block based on the improved motion information. In Article 13, A video encoding method, characterized in that the motion information candidate list of the current block includes a first affine transformation candidate using N CPMVs (control point motion vectors). In Article 14, A video encoding method, characterized in that the motion information candidate list of the current block includes a second affine transformation candidate obtained by calculating a template matching cost based on the first affine transformation candidate. In Article 15, A video encoding method, characterized in that the template used for calculating the template matching cost is at least one of the left or upper templates of the current block. In Article 16, A video encoding method, characterized in that the calculation of the template matching cost is performed by assigning identical motion vector offsets to the N CPMVs of the first affine transformation candidates. In Article 17, A video encoding method, characterized in that the CPMV of the second affine transformation candidate is obtained by assigning a motion vector offset having a minimum template matching cost among the motion vector offsets to the N CPMVs of the first affine transformation candidate. In Article 14, A video encoding method, characterized in that the first affine transformation candidate of the above motion information candidate list is obtained from a spatially adjacent block of the current block. A step of obtaining a candidate list of movement information of the current block; A step of determining at least one candidate of the above movement information candidate list; A step of improving the motion information of at least one candidate determined above; A step of performing prediction of the current block based on the improved motion information; and A bitstream transmission method, comprising the step of transmitting a bitstream generated based on the predicted current block.
Citation Information
Patent Citations
Video signal processing method and apparatus using adaptive motion vector resolution
JP2022185121A
Motion vector prediction method and apparatus, encoder, and decoder
JP2023065393A
Anti-loosening Fastener for Nut
KR1020250035227A
Printed circuit board
KR1020250118159A
KR20220009947A