Video coding method and device, and recording medium storing bitstream

Non-separable transformation and inverse transformation methods for video coding on blocks predicted with inter-frame or intra-block copy modes address inefficiencies and distortions, improving encoding and decoding efficiency.

WO2026101203A1PCT designated stage Publication Date: 2026-05-15DIGITALINSIGHTS INC
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
DIGITALINSIGHTS INC
Filing Date
2025-11-05
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing video coding methods face inefficiencies and distortions due to prediction processes, particularly in inter-frame and intra-block copy modes, which are not adequately addressed by current separable transformation techniques.

Method used

Implementing non-separable transformation and inverse transformation methods on blocks predicted using inter-frame or intra-block copy modes, with adaptive selection of non-separable conversion kernels based on specific conditions, to minimize distortion and enhance efficiency.

Benefits of technology

This approach minimizes distortion and improves transformation efficiency by adaptively selecting non-separable conversion kernels, enhancing the overall encoding and decoding process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2025018005_15052026_PF_FP_ABST
    Figure KR2025018005_15052026_PF_FP_ABST
Patent Text Reader

Abstract

A video signal decoding method and device according to the present disclosure may comprise the steps of: generating a prediction block for the current block by performing any one from among inter prediction and prediction using an intra block copy mode; deriving a transform coefficient for the current block on the basis of residual information for the current block; deriving an inverse-quantized transform coefficient by performing inverse quantization on the transform coefficient; deriving a residual block by performing non-separable inverse transform and / or separable inverse transform on the inversely quantized transform coefficient; and reconstructing the current block from the residual block.
Need to check novelty before this filing date? Find Prior Art

Description

Video coding method and device, and a recording medium storing a bitstream

[0001] The present invention relates to a video signal processing method and apparatus. More specifically, it relates to a method and apparatus for performing a quadratic transformation and an inverse transformation on a block for which prediction has been performed using an inter-frame prediction or intra-block copy mode.

[0002] In the encoding process, first-order transformation (separation transformation) can be performed on the residual signal of a block that has been predicted by intra-frame prediction or inter-frame prediction to derive first-order transformation coefficients. Second-order transformation (non-separation transformation) can be performed on all or part of the first-order transformation coefficients to derive second-order transformation coefficients.

[0003] In the decoding process, inverse quantized transform coefficients are obtained from blocks where prediction is performed via intra-frame prediction or inter-frame prediction, and a second-order inverse transform and a first-order inverse transform are performed on them to recover the final residual signal.

[0004] The present disclosure aims to provide a method and apparatus for performing non-separable transformation and inverse transformation on a block for which prediction has been performed using an inter-frame prediction or intra-block copy mode.

[0005] The present disclosure aims to provide a method and apparatus for performing non-separable transformation and inverse transformation on a block on which in-frame prediction has been performed.

[0006] The present disclosure aims to provide a method and apparatus for determining a set of non-separable transformation kernels applied to a prediction block.

[0007] The technical problems to be solved in this disclosure are not limited to those mentioned above, and other technical problems not mentioned will be clearly understood by those skilled in the art to which this disclosure belongs from the description below.

[0008] A video signal decoding method according to the present disclosure may include: a step of generating a prediction block for a current block by performing either inter-frame prediction or prediction using an intra-block copy mode; a step of deriving a transformation coefficient for a current block based on residual information for the current block; a step of deriving a de-quantized transformation coefficient by performing inverse quantization on the transformation coefficient; a step of deriving a residual block by performing at least one of non-separable inverse transformation or separate inverse transformation on the de-quantized transformation coefficient; and a step of restoring the current block from the residual block.

[0009] In the image signal decoding method according to the present disclosure, a first parameter indicating whether a non-separable inverse transform is performed on the current block may be signaled.

[0010] In the image signal decoding method according to the present disclosure, whether a non-separable inverse transformation is performed for the current block is determined based on a first flag, wherein the first flag may be signaled at the sequence level.

[0011] In a video signal decoding method according to the present disclosure, when the first flag is signaled at the sequence level, a second flag and a third flag are signaled at the sequence level, wherein the second flag is information indicating whether non-separable inverse transformation is performed on a prediction block derived based on either an inter-frame prediction mode or an intra-block copy mode, and the third flag may be information indicating whether non-separable inverse transformation is performed on a prediction block derived based on an intra-frame prediction mode.

[0012] In a video signal decoding method according to the present disclosure, when the first flag is signaled at the sequence level, a second flag is signaled at the sequence level, wherein the second flag may be information indicating whether a non-separable inverse transformation is performed on a prediction block derived based on either an inter-frame prediction mode or an intra-block copy mode.

[0013] In a video signal decoding method according to the present disclosure, when at least one of predetermined conditions is satisfied, the first parameter is signaled, wherein the predetermined conditions may include at least one of a first condition in which the End Of Block (EOB) is greater than 3, a second condition in which the value of the first flag is true, a third condition in which the vertical kernel and the horizontal kernel applied to the separation inverse transformation are each DCT, a fourth condition in which the width and height of the current block are each 16 or greater, or a fifth condition in which the EOB is less than or equal to 32.

[0014] In the image signal decoding method according to the present disclosure, when the value of the first parameter is not 0, a non-separable conversion kernel set may be selected.

[0015] In the image signal decoding method according to the present disclosure, the inseparable conversion kernel set includes a plurality of inseparable conversion kernels, and any one of the plurality of inseparable conversion kernels may be selected based on the inseparable conversion kernel set information.

[0016] In the image signal decoding method according to the present disclosure, when either inter-frame prediction or prediction using an intra-block copy mode is performed for the current block, the non-separable conversion kernel set information may be derived to 0.

[0017] A video signal encoding method according to the present disclosure may include: generating a prediction block for a current block by performing either inter-frame prediction or prediction using an intra-block copy mode; deriving a residual block for the current block based on the prediction block; deriving a transformation coefficient for the current block by performing at least one of non-separable transformation or separate transformation based on the residual block; deriving a quantized transformation coefficient by performing quantization on the transformation coefficient; and encoding residual information regarding the quantized transformation coefficient.

[0018] In a digital storage medium for storing a video bitstream according to the present disclosure, the bitstream may be encoded by a video signal encoding method comprising: a step of generating a prediction block for a current block by performing either inter-frame prediction or prediction using an intra-block copy mode; a step of deriving a residual block for the current block based on the prediction block; a step of deriving a transformation coefficient for the current block by performing at least one of non-separable transformation or separate transformation based on the residual block; a step of deriving a quantized transformation coefficient by performing quantization on the transformation coefficient; and a step of encoding residual information regarding the quantized transformation coefficient.

[0019] According to the present disclosure, by providing a method and apparatus for performing non-separable conversion and inverse conversion on blocks for which prediction has been performed using an inter-frame prediction or intra-block copy mode, distortion due to prediction can be minimized and conversion efficiency can be improved.

[0020] According to the present disclosure, by providing a method and apparatus for performing non-separable transformation and inverse transformation on a block on which in-frame prediction has been performed, distortion due to prediction can be minimized and transformation efficiency can be improved.

[0021] According to the present disclosure, by providing a method and apparatus for determining a non-separable conversion kernel set, the prediction mode and the conversion kernel can be mutually adaptively selected and the efficiency of the entire encoding / decoding process can be improved.

[0022] The effects obtainable from the present disclosure are not limited to those mentioned above, and other unmentioned effects will be clearly understood by those skilled in the art to which the present disclosure belongs from the description below.

[0023] FIG. 1 is a block diagram showing an image encoding device according to the present disclosure.

[0024] FIG. 2 is a block diagram showing an image decoding device according to the present disclosure.

[0025] FIG. 3 is a flowchart of an image signal encoding method according to one embodiment of the present disclosure.

[0026] FIG. 4 is a drawing illustrating a directional prediction mode according to the present disclosure.

[0027] FIG. 5 is a drawing illustrating a directional prediction mode according to the present disclosure.

[0028] FIG. 6 is a diagram illustrating an example of deriving a directional prediction mode corresponding to a geometric division mode according to the present disclosure.

[0029] FIG. 7 is a drawing illustrating an example of inducing directionality within a prediction block according to the present disclosure.

[0030] FIG. 8 is a diagram illustrating an example of determining an in-frame prediction mode through a reference line in geometric division-based prediction according to the present disclosure.

[0031] FIG. 9 is a flowchart of an image signal decoding method according to one embodiment of the present disclosure.

[0032] A video signal decoding method according to the present disclosure may include: a step of generating a prediction block for a current block by performing either inter-frame prediction or prediction using an intra-block copy mode; a step of deriving a transformation coefficient for a current block based on residual information for the current block; a step of deriving a de-quantized transformation coefficient by performing inverse quantization on the transformation coefficient; a step of deriving a residual block by performing at least one of non-separable inverse transformation or separate inverse transformation on the de-quantized transformation coefficient; and a step of restoring the current block from the residual block.

[0033] In the image signal decoding method according to the present disclosure, a first parameter indicating whether a non-separable inverse transform is performed on the current block may be signaled.

[0034] In the image signal decoding method according to the present disclosure, whether a non-separable inverse transformation is performed for the current block is determined based on a first flag, wherein the first flag may be signaled at the sequence level.

[0035] In a video signal decoding method according to the present disclosure, when the first flag is signaled at the sequence level, a second flag and a third flag are signaled at the sequence level, wherein the second flag is information indicating whether non-separable inverse transformation is performed on a prediction block derived based on either an inter-frame prediction mode or an intra-block copy mode, and the third flag may be information indicating whether non-separable inverse transformation is performed on a prediction block derived based on an intra-frame prediction mode.

[0036] In a video signal decoding method according to the present disclosure, when the first flag is signaled at the sequence level, a second flag is signaled at the sequence level, wherein the second flag may be information indicating whether a non-separable inverse transformation is performed on a prediction block derived based on either an inter-frame prediction mode or an intra-block copy mode.

[0037] In a video signal decoding method according to the present disclosure, when at least one of predetermined conditions is satisfied, the first parameter is signaled, wherein the predetermined conditions may include at least one of a first condition in which the End Of Block (EOB) is greater than 3, a second condition in which the value of the first flag is true, a third condition in which the vertical kernel and the horizontal kernel applied to the separation inverse transformation are each DCT, a fourth condition in which the width and height of the current block are each 16 or greater, or a fifth condition in which the EOB is less than or equal to 32.

[0038] In the image signal decoding method according to the present disclosure, when the value of the first parameter is not 0, a non-separable conversion kernel set may be selected.

[0039] In the image signal decoding method according to the present disclosure, the inseparable conversion kernel set includes a plurality of inseparable conversion kernels, and any one of the plurality of inseparable conversion kernels may be selected based on the inseparable conversion kernel set information.

[0040] In the image signal decoding method according to the present disclosure, when either inter-frame prediction or prediction using an intra-block copy mode is performed for the current block, the non-separable conversion kernel set information may be derived to 0.

[0041] A video signal encoding method according to the present disclosure may include: generating a prediction block for a current block by performing either inter-frame prediction or prediction using an intra-block copy mode; deriving a residual block for the current block based on the prediction block; deriving a transformation coefficient for the current block by performing at least one of non-separable transformation or separate transformation based on the residual block; deriving a quantized transformation coefficient by performing quantization on the transformation coefficient; and encoding residual information regarding the quantized transformation coefficient.

[0042] In a digital storage medium for storing a video bitstream according to the present disclosure, the bitstream may be encoded by a video signal encoding method comprising: a step of generating a prediction block for a current block by performing either inter-frame prediction or prediction using an intra-block copy mode; a step of deriving a residual block for the current block based on the prediction block; a step of deriving a transformation coefficient for the current block by performing at least one of non-separable transformation or separate transformation based on the residual block; a step of deriving a quantized transformation coefficient by performing quantization on the transformation coefficient; and a step of encoding residual information regarding the quantized transformation coefficient.

[0043] Embodiments of the present invention are described in detail with reference to the drawings attached to this specification so that those skilled in the art can easily implement the invention. However, the present invention may be embodied in various different forms and is not limited to the embodiments described herein. Furthermore, in order to clearly explain the invention in the drawings, parts unrelated to the explanation have been omitted, and similar parts throughout the specification are denoted by similar reference numerals.

[0044] Throughout this specification, when a part is described as being 'connected' to another part, this includes not only cases where they are directly connected, but also cases where they are electrically connected with other elements in between.

[0045] Furthermore, throughout this specification, when a part is described as 'comprising' a certain component, this means that, unless specifically stated otherwise, it does not exclude other components but may include additional components.

[0046] Additionally, terms such as "first," "second," etc., may be used to describe various components, but said components should not be limited by said terms. These terms are used solely for the purpose of distinguishing one component from another.

[0047] Additionally, in the embodiments relating to the device and method described herein, some components of the device or some steps of the method may be omitted. Also, the order of some components of the device or some steps of the method may be changed. Additionally, other components or other steps may be inserted into some components of the device or some steps of the method.

[0048] In addition, some components or steps of the first embodiment of the present invention may be added to or replace some components or steps of the second embodiment of the present invention.

[0049] Furthermore, the components shown in the embodiments of the present invention are depicted independently to represent different characteristic functions and do not imply that each component consists of separate hardware or a single software unit. That is, for convenience of explanation, each component is described by listing it as a separate component, and at least two of the components may be combined to form a single component, or a single component may be divided into multiple components to perform a function. Such integrated and separated embodiments of each component are also included within the scope of the present invention as long as they do not deviate from the essence of the invention.

[0050] FIG. 1 is a block diagram showing an image encoding device according to the present disclosure.

[0051] Referring to FIG. 1, the image encoding device (100) comprises a picture splitting unit (110), a prediction unit (120, 125), a conversion unit (130), a quantization unit (135), a reordering unit (160), and an entropy encoding unit (165).

[0052] It may include an inverse quantization unit (140), an inverse conversion unit (145), a filter unit (150), and a memory (155).

[0053] The picture splitting unit (110) can split the input picture into at least one processing unit. At this time, the processing unit may be a Prediction Unit (PU), a Transform Unit (TU), or a Coding Unit (CU). In the following embodiments of the present invention, the term "coding unit" may be used to mean a unit that performs coding, or a unit that performs decoding.

[0054] A prediction unit may be divided into shapes such as at least one square or rectangle of the same size within a single encoding unit, or it may be divided such that one of the prediction units within a single encoding unit has a different shape and / or size from another prediction unit. When generating a prediction unit that performs intra prediction based on an encoding unit, if it is not the minimum encoding unit, intra prediction can be performed without dividing into multiple prediction units NxN.

[0055] The prediction unit (120, 125) may include an inter prediction unit (120) that performs inter prediction or inter-frame prediction, and an intra prediction unit (125) that performs intra prediction or intra-frame prediction. It may determine whether to use inter prediction or perform intra prediction for a prediction unit, and determine specific information according to each prediction mode (e.g., intra prediction mode, motion vector, reference picture, etc.). The residual value (residual block) between the generated prediction block and the original block may be input to the conversion unit (130). In addition, the prediction mode information, motion vector information, etc. used for prediction may be encoded together with the residual value in the entropy encoding unit (165) and transmitted to the decoder.

[0056] The inter prediction unit (120) may predict a prediction unit based on information of at least one picture among the previous picture or the subsequent picture of the current picture, and in some cases, may predict a prediction unit based on information of a partially encoded area within the current picture. The inter prediction unit (120) may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.

[0057] In the reference picture interpolation unit, reference picture information is received from memory (155), and pixel information of integer pixels or less can be generated from the reference picture. In the case of luminance pixels, a DCT-based 8-tap interpolation filter with different filter coefficients can be used to generate pixel information of integer pixels or less in 1 / 4 pixel units. In the case of chrominance signals, a DCT-based 4-tap interpolation filter with different filter coefficients can be used to generate pixel information of integer pixels or less in 1 / 8 pixel units.

[0058] The motion prediction unit can perform motion prediction based on a reference picture interpolated by the reference picture interpolation unit. Various methods such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), and NTS (New Three-Step Search Algorithm) can be used to calculate motion vectors. Based on the interpolated pixels, the motion vector can have motion vector values ​​in units of 1 / 2 or 1 / 4 pixels. The motion prediction unit can predict the current prediction unit by using different motion prediction methods. Various motion prediction methods such as the Skip method, Merge method, AMVP (Advance Motion Vector Prediction) method, and Intra Block Copy method can be used.

[0059] The intra prediction unit (125) can generate a prediction unit based on reference pixel information around the current block, which is pixel information within the current picture. If the surrounding block of the current prediction unit is a block that has performed inter prediction, and the reference pixel is a pixel that has performed inter prediction, the reference pixel included in the block that has performed inter prediction can be replaced with the reference pixel information of the surrounding block that has performed intra prediction. That is, if the reference pixel is not available, the unavailable reference pixel information can be replaced with at least one of the available reference pixels.

[0060] Additionally, a residual block can be generated that includes residual value information, which is the difference between the prediction unit that performed the prediction based on the prediction unit generated in the prediction unit (120, 125) and the original block of the prediction unit. The generated residual block can be input to the conversion unit (130).

[0061] In the transformation unit (130), the residual block containing residual value information of the prediction unit generated through the original block and the prediction unit (120, 125) can be transformed using a transformation method such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), or KLT. Whether to apply DCT, DST, or KLT to transform the residual block can be determined based on the intra-prediction mode information of the prediction unit used to generate the residual block.

[0062] The quantization unit (135) can quantize the values ​​converted into the frequency domain in the conversion unit (130). The quantization coefficient may vary depending on the block or the importance of the image. The values ​​produced by the quantization unit (135) may be provided to the inverse quantization unit (140) and the reordering unit (160).

[0063] The reordering unit (160) can perform reordering of coefficient values ​​for quantized residual values.

[0064] The reordering unit (160) can convert two-dimensional block-shaped coefficients into one-dimensional vector forms through a coefficient scanning method. For example, the reordering unit (160) can convert the coefficients from DC to high-frequency range coefficients into one-dimensional vector forms by scanning using a Zig-Zag Scan method. Depending on the size of the conversion unit and the intra-prediction mode, a vertical scan that scans two-dimensional block-shaped coefficients in the column direction or a horizontal scan that scans two-dimensional block-shaped coefficients in the row direction may be used instead of the Zig-Zag Scan. That is, depending on the size of the conversion unit and the intra-prediction mode, it can be determined whether to use a Zig-Zag Scan, a vertical scan, or a horizontal scan.

[0065] The entropy encoding unit (165) can perform entropy encoding based on the values ​​calculated by the reordering unit (160). Entropy encoding can use various encoding methods, such as, for example, Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding). In this regard, the entropy encoding unit (165) can encode residual value coefficient information of the encoding unit from the reordering unit (160) and the prediction unit (120, 125).

[0066] In the inverse quantization unit (140) and inverse transformation unit (145), the values ​​quantized in the quantization unit (135) are inverse quantized, and the values ​​transformed in the transformation unit (130) are inverse transformed. The residual value generated in the inverse quantization unit (140) and inverse transformation unit (145) can be combined with the prediction unit predicted through the motion estimation unit, motion compensation unit, and intra prediction unit included in the prediction unit (120, 125) to generate a reconstructed block.

[0067] The filter unit (150) may include at least one of a deblocking filter, an offset correction unit, and an Adaptive Loop Filter (ALF). The deblocking filter can remove block distortion caused by boundaries between blocks in the restored picture. The offset correction unit can correct the offset from the original image on a pixel-by-pixel basis for the image that has undergone deblocking. To perform offset correction for a specific picture, a method may be used in which pixels included in the image are divided into a certain number of regions, the region to be offset is determined, and the offset is applied to that region, or a method may be used in which the offset is applied by considering the edge information of each pixel. Adaptive Loop Filtering (ALF) may be performed based on a value obtained by comparing the filtered restored image with the original image. After dividing the pixels included in the image into a predetermined group, a filter to be applied to that group is determined, and filtering may be performed differentially for each group.

[0068] The memory (155) can store a restored block or picture produced through the filter unit (150), and the stored restored block or picture can be provided to the prediction unit (120, 125) when performing inter-prediction.

[0069] FIG. 2 is a block diagram showing an image decoding device according to the present disclosure.

[0070] Referring to FIG. 2, the image decoder (200) may include an entropy decoder (210), a reordering unit (215), an inverse quantization unit (220), an inverse transformation unit (225), a prediction unit (230, 235), a filter unit (240), and a memory (245).

[0071] When a video bitstream is input to a video encoder, the input bitstream can be decoded using the reverse procedure of the video encoder.

[0072] The entropy decoding unit (210) can perform entropy decoding in the opposite procedure to that which the entropy encoding unit of the image encoder performed. For example, various methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) can be applied in correspondence with the method performed in the image encoder.

[0073] The entropy decoding unit (210) can decode information related to intra-prediction and inter-prediction performed in the encoder.

[0074] The reordering unit (215) can perform reordering based on the method of reordering the entropy-decoded bitstream in the encoding unit in the entropy decoding unit (210). The coefficients expressed in the form of a one-dimensional vector can be reordered by restoring them to the form of two-dimensional block coefficients.

[0075] Inverse quantum figure 2 is a block diagram showing an image decoding device according to the present disclosure.

[0076] Referring to FIG. 2, the image decoder (200) may include an entropy decoder (210), a reordering unit (215), an inverse quantization unit (220), an inverse transformation unit (225), a prediction unit (230, 235), a filter unit (240), and a memory (245).

[0077] When a video bitstream is input to a video encoder, the input bitstream can be decoded using the reverse procedure of the video encoder.

[0078] The entropy decoding unit (210) can perform entropy decoding in the opposite procedure to that which the entropy encoding unit of the image encoder performed. For example, various methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) can be applied in correspondence with the method performed in the image encoder.

[0079] The entropy decoding unit (210) can decode information related to intra-prediction and inter-prediction performed in the encoder.

[0080] The reordering unit (215) can perform reordering based on the method of reordering the entropy-decoded bitstream in the encoding unit in the entropy decoding unit (210). The coefficients expressed in the form of a one-dimensional vector can be reordered by restoring them to the form of two-dimensional block coefficients.

[0081] The inverse quantization unit (220) can perform inverse quantization based on the coefficient values ​​of the rearranged block and the quantization parameters provided by the encoder.

[0082] The inverse transform unit (225) can perform inverse transforms, i.e., inverse DCT, inverse DST, and inverse KLT, on the transforms, i.e., DCT, DST, and KLT, performed by the transform unit on the quantization result performed by the image encoder. The inverse transform can be performed based on the transmission unit determined by the image encoder. In the inverse transform unit (225) of the image decoder, a transformation technique (e.g., DCT, DST, KLT) can be selectively performed according to multiple pieces of information such as a prediction method, the size of the current block, and the prediction direction.

[0083] The prediction unit (230, 235) can generate a prediction block based on the prediction block generation information provided by the entropy decoding unit (210) and the previously decoded block or picture information provided by the memory (245).

[0084] As described above, when performing intra prediction or intra prediction identical to the operation in the video encoder, if the size of the prediction unit and the size of the transform unit are the same, intra prediction for the prediction unit is performed based on the pixels to the left of the prediction unit, the pixels to the top left, and the pixels to the top; however, if the size of the prediction unit and the size of the transform unit are different when performing intra prediction, intra prediction can be performed using reference pixels based on the transform unit. Additionally, intra prediction using NxN partitioning only for the minimum encoding unit may also be used.

[0085] The prediction unit (230, 235) may include a prediction unit determination unit, an inter prediction unit, and an intra prediction unit. The prediction unit determination unit receives various information, such as prediction unit information input from the entropy decoding unit (210), prediction mode information of the intra prediction method, and motion prediction related information of the inter prediction method, distinguishes the prediction unit in the current encoding unit, and can determine whether the prediction unit performs inter prediction or intra prediction.

[0086] The inter prediction unit (230) can perform inter prediction for the current prediction unit based on information included in at least one picture, either a previous picture or a subsequent picture, of the current picture containing the current prediction unit, using information required for inter prediction of the current prediction unit provided by the video encoder. To perform inter prediction, based on the encoding unit, it can determine whether the motion prediction method of the prediction unit included in the corresponding encoding unit is a Skip Mode, Merge Mode, AMVP Mode, or Intra Block Copy Mode.

[0087] The intra prediction unit (235) can generate a prediction block based on pixel information within the current picture. If the prediction unit is a prediction unit that has performed intra prediction, it can perform intra prediction based on the intra prediction mode information of the prediction unit provided by the image encoder. The intra prediction unit (235) may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a part that performs filtering on the reference pixel of the current block, and can determine whether to apply the filter based on the prediction mode of the current prediction unit. AIS filtering can be performed on the reference pixel of the current block using the prediction mode of the prediction unit and the AIS filter information provided by the image encoder. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.

[0088] The reference pixel interpolation unit can generate a reference pixel of an integer value or less by interpolating the reference pixel when the prediction mode of the prediction unit is a prediction unit that performs intra-prediction based on the pixel value interpolated from the reference pixel. If the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. The DC filter can generate a prediction block through filtering when the prediction mode of the current block is DC mode.

[0089] The restored block or picture may be provided to a filter unit (240). The filter unit (240) may include a deblocking filter, an offset correction unit, and an ALF.

[0090] Information regarding whether a deblocking filter has been applied to the corresponding block or picture can be received from the video encoder, and if a deblocking filter has been applied, information regarding whether a strong filter or a weak filter has been applied. The deblocking filter of the video decoder receives information related to the deblocking filter provided by the video encoder and can perform deblocking filtering on the corresponding block.

[0091] The offset correction unit can perform offset correction on the restored image based on the type of offset correction and offset value information applied to the image during encoding. ALF can be applied to the encoding unit based on information on whether ALF is applied and ALF coefficient information provided by the encoder. This ALF information can be provided included in a specific parameter set.

[0092] The memory (245) can store the restored picture or block so that it can be used as a reference picture or reference block, and can also provide the restored picture to the output unit.

[0093] First, the terms used in this disclosure are briefly explained as follows.

[0094] The target prediction block may refer to the block for which a prediction is currently to be performed. The target prediction block can be understood in the same way as a prediction block, prediction unit (PU), etc.

[0095] The conversion target block may refer to a block for which a conversion is to be performed during the encoding process. In this disclosure, the conversion target block may be understood as a conversion block, a conversion unit (TU), etc. In this disclosure, when performing a separate conversion, the conversion target block may correspond to a residual block, and when performing a non-separable conversion, the conversion target block may correspond to a conversion coefficient derived through the separate conversion.

[0096] The inverse transformation target block may refer to the block on which the inverse transformation is to be performed during the decoding process. In the present disclosure, when inseparable inverse transformation is performed, the inverse transformation target block may correspond to (inversely quantized) transformation coefficients derived from residual information. Here, the (inversely quantized) transformation coefficients may be understood as second-order transformation coefficients. As a result of performing inseparable inverse transformation, first-order transformation coefficients may be output. Meanwhile, when separable inverse transformation is performed, the inverse transformation target block may correspond to first-order transformation coefficients.

[0097] In the present disclosure, the current block may indicate a predicted target block according to the steps of the encoding / decoding method, or may indicate a conversion target block or an inverse conversion target block.

[0098] Separation transformation may refer to a method of performing a transformation on a target block by applying a transformation kernel in the vertical and / or horizontal directions. Separation transformation can be understood as a first-order transformation, and the transformation coefficients or separation transformation coefficients derived through the separation transformation can be understood as first-order transformation coefficients.

[0099] An inseparable transformation may refer to a method of performing a transformation on separable transformation coefficients by applying a predetermined inseparable transformation kernel. An inseparable transformation can be understood as a second-order transformation, and the transformation coefficients or inseparable transformation coefficients derived through the inseparable transformation can be understood as second-order transformation coefficients.

[0100] The image signal encoding / decoding method proposed in this disclosure can be performed independently for the luminance block and the chrominance block, respectively. If the color format of the input image is a YUV format (e.g., YUV420, YUV411, YUV422, YUV444, etc.), it may be performed for the chrominance block after being performed for the luminance block. If the color format of the input image is an RGB format, encoding may be performed after performing color conversion to YUV.

[0101] However, the above-disclosed embodiment is merely an example, and image encoding / decoding for luminance blocks and chrominance blocks may be performed in a different manner.

[0102] FIG. 3 is a flowchart of an image signal encoding method according to one embodiment of the present disclosure.

[0103] Referring to FIG. 3, a prediction block for the current block can be generated (S310). Specifically, a prediction block for the current block can be generated by performing any one of intra-frame prediction, inter-frame prediction, or prediction using an intra-block copy mode.

[0104] According to one embodiment of the present disclosure, a prediction target block, i.e., a prediction unit, to be used for performing a prediction can be determined. In the present disclosure, the prediction unit may correspond to the current block. For example, the prediction unit may be determined as a coding block, any one of the sub-blocks into which the coding block is divided, a set of pixels, or the value of a single pixel.

[0105] According to one embodiment of the present disclosure, the prediction unit may be determined dependently or independently of the luminance component and the color difference component.

[0106] The statement that the prediction unit is determined dependently with respect to the luminance component and the chrominance component may mean that the prediction units of the luminance component or the chrominance component are not determined independently for each component, but rather that when the prediction unit of one component is determined, the units of other components or components are determined to have a corresponding size and / or shape. Here, the one component may include one or more of the luminance component and the chrominance component.

[0107] For example, a color difference component can be determined based on information about a luminance component (or luminance components). Alternatively, a luminance component can be determined based on information about a color difference component (or color difference components).

[0108] For example, the prediction unit of the color difference component can be determined as a size corresponding to the prediction unit of the luminance component depending on the color format of the input image or the converted color format.

[0109] When the prediction unit is determined dependently with respect to the luminance component and the chrominance component, information regarding the prediction unit of the other component corresponding to one component, that is, the component determined dependently, may be omitted.

[0110] The fact that the prediction unit is determined independently for the luminance component and the color difference component may mean that the prediction unit of the luminance component or the color difference component is determined individually for each component.

[0111] If the prediction unit is determined independently for the luminance component and the chrominance component, information regarding the prediction unit for each component can be signaled separately.

[0112] The video encoding device can encode information related to the size and / or shape of a determined current block and signal it to the video decoder. Here, the information related to the size and / or shape of the current block may include direct or indirect information necessary to determine the size of the current block.

[0113] For example, information related to the size and / or shape of the current block may include information on the size and / or shape of the current block. Accordingly, the size and / or shape of the current block can be directly determined in the image decoder.

[0114] Alternatively, information related to the size and / or shape of the current block may include information that can influence the determination of the size and / or shape information of the current block, such as size information regarding the number of divisions, division depth, division shape, division direction, minimum division block, etc., division information of previously decoded surrounding blocks, and prediction mode of previously decoded surrounding blocks. Accordingly, the image decoder can derive the size and / or shape of the current block based on information that can influence the determination of the size and / or shape of the current block.

[0115] According to one embodiment of the present disclosure, a prediction can be performed on the current block based on a determined prediction mode. Specifically, the prediction mode may include an intra-frame prediction mode, an inter-frame prediction mode, an Intra Block Copy (IBC) mode, a palette mode, a mode combining an intra-frame prediction mode and an inter-frame prediction mode, etc. Accordingly, any one of the following may be performed on the current block: intra-frame prediction, inter-frame prediction, prediction using an Intra Block Copy (IBC) mode, prediction using a palette mode, or prediction using a mode combining an intra-frame prediction mode and an inter-frame prediction mode. In some cases, the prediction using a mode combining an intra-frame prediction mode and an inter-frame prediction mode may be included in the inter-frame prediction.

[0116] According to one embodiment of the present disclosure, if no in-frame prediction is performed on the current block, a 1-bit flag may be signaled for the current block.

[0117] If the value of the above flag indicates 'skip', the prediction mode of the current block may be determined as merge mode or IBC prediction merge mode. In this case, the transformation may be omitted, and the prediction sample may be used as the restoration sample. Here, 'skip' may indicate a case where motion information (e.g., motion vector, reference picture, reference picture list, etc.) is not signaled, or where motion information is signaled using only at least one syntax information. Additionally, it may indicate a case where the residual block for the current block is not signaled.

[0118] According to one embodiment of the present disclosure, when skip prediction is not performed for the current block, a 1-bit flag may be signaled for the current block to determine the prediction mode for the current block. The prediction mode may include an intra-frame prediction mode, an inter-frame prediction mode, an IBC mode, a palette mode, etc.

[0119] According to one embodiment of the present disclosure, when inter-frame prediction is performed for the current block, the inter-frame prediction mode may be determined as at least one of a plurality of inter-frame prediction modes. In this case, the plurality of inter-frame prediction modes may include a skip mode, a warp or affine mode, a merge mode, a geometric partitioning-based prediction mode, etc. In some cases, the plurality of inter-frame prediction modes may further include a mode in which an intra-frame prediction mode and an inter-frame prediction mode are mixed.

[0120] According to one embodiment of the present disclosure, when inter-frame prediction is performed for a current block, motion compensation can be performed using motion information of the current block. Additionally, a prediction block can be determined through motion compensation. Here, the prediction block may include a sample of a previously decoded region of the same frame as the current block. When at least two prediction blocks are derived through one or more motion compensations, a final prediction block of the current block can be generated by a weighted sum of at least two prediction blocks.

[0121] According to one embodiment of the present disclosure, when inter-frame prediction is performed for the current block, the number of reference pictures and the pixel value of the reference block may be determined according to the determined prediction mode.

[0122] According to one embodiment of the present disclosure, when inter-frame prediction is performed for a current block, a block on which intra-frame prediction has been performed may be used for inter-frame prediction. For example, a final prediction block of the current block may be generated using an intra-frame prediction mode derived using a predetermined restored area around the current block. The predetermined restored area around the current block may be defined as a template, and said template may include areas adjacent to or non-adjacent to the current block.

[0123] According to one embodiment of the present disclosure, when inter-frame prediction is performed for a current block, the inter-frame prediction mode of the current block may be determined as a geometric partition-based prediction mode (Wedge mode). Geometric partition-based prediction or geometric partition-based prediction mode may mean a prediction method that divides a block into multiple partitions through lines having geometric partition angles and offsets. For example, 20 angles and 7 offsets for geometric partitioning may be supported, but this is merely an example and is not limited thereto.

[0124] In a geometric partitioning-based prediction mode, a geometric partitioning mode can be determined based on a combination of geometric partitioning angles and offsets. The geometric partitioning mode may also refer to a geometric partitioning boundary determined based on a combination of geometric partitioning angles and offsets.

[0125] The geometric partitioning angle and offset may each be signaled to determine the geometric partitioning mode, or the combination of the geometric partitioning angle and offset may be formed into a list of candidate geometric partitioning modes, and the index of the list may be signaled to determine the geometric partitioning mode.

[0126] In a geometric partitioning-based prediction mode, the prediction block for the current block may have a size and / or shape determined through geometric partitioning. In this case, the final prediction block may be generated through a weighted sum operation of prediction blocks generated for each of the multiple geometric partitioning block units (or sub-block units) created through geometric partitioning.

[0127] According to one embodiment of the present disclosure, when a geometric partition-based prediction mode is selected as the inter-frame prediction mode of the current block, at least one of the geometric partition blocks (subblocks) within the current block may be a block for which prediction has been performed using inter-frame prediction. Alternatively, when a geometric partition-based prediction mode is selected as the inter-frame prediction mode of the current block, at least one of the geometric partition blocks (subblocks) within the current block may be a block for which prediction has been performed using an IBC mode.

[0128] According to one embodiment of the present disclosure, when intra-frame prediction is performed for the current block, the inter-frame prediction mode may be determined as at least one of a plurality of intra-frame prediction modes. In this case, the plurality of intra-frame prediction modes may include a directional prediction mode, a Paeth mode, a DC mode, a Smooth mode, a Recursive prediction mode, or a prediction mode based on inter-component correlation. A prediction mode based on inter-component correlation may include, for example, CfL (Chroma from luma), CCLM (Cross-component linear model), MHCCP (Multi-hypothesis cross-component prediction), CCCM (Convolutional cross-component model), etc.

[0129] According to one embodiment of the present disclosure, when a directional prediction mode is selected as the in-frame prediction mode of the current block, a prediction mode of a specific directionality may be selected according to the block size. Specifically, the directional prediction mode may be a mode that generates a prediction block through matrix multiplication, etc., using a matrix predefined between an image encoding device and an image decoder according to the directionality and pre-restored reference samples around the current block.

[0130] According to one embodiment of the present disclosure, when in-frame prediction is performed for a current block, an in-frame template matching prediction mode may be selected as the in-frame prediction mode for the current block. The in-frame template matching prediction mode may define a previously restored area around the current block as a template and generate a prediction block by performing template matching on the previously restored area around the current block. At this time, the template may include areas adjacent to or non-adjacent to the current block.

[0131] According to one embodiment of the present disclosure, when in-frame prediction is performed for a current block, a previously restored area surrounding the current block may be defined as a template, and an in-frame prediction mode may be induced using said template. Subsequently, a final predicted block of the current block may be generated using the induced in-frame prediction mode. In this case, the template may include areas adjacent to or non-adjacent to the current block.

[0132] According to one embodiment of the present disclosure, when in-frame prediction is performed on a current block, a geometric partitioning-based in-frame prediction mode may be selected as the in-frame prediction mode of the current block. The geometric partitioning-based in-frame prediction mode may divide the current block into one or more geometric partitioning blocks (also referred to as partitions or subblocks) through geometric partitioning and generate prediction blocks using in-frame prediction modes including different directional prediction modes, Paeth mode, DC mode, Smooth mode, etc. for each region.

[0133] For example, if a geometric partition-based intra-frame prediction mode is selected as the intra-frame prediction mode for the current block, intra-frame prediction can be performed for all geometric partition blocks within the current block.

[0134] For example, if a geometric partitioning-based in-frame prediction mode is selected as the in-frame prediction mode for the current block, a prediction using an in-frame template matching prediction mode may be performed for at least one of the geometric partitioning blocks within the current block. Through the in-frame template matching prediction mode, a previously restored area around the current block may be defined as a template, and a prediction block may be generated by performing template matching on the previously restored area around the current block. In this case, the template may include areas adjacent to or non-adjacent to the current block.

[0135] For example, if a geometric partition-based intra-frame prediction mode is selected as the intra-frame prediction mode of the current block, prediction using the IBC mode can be performed for at least one of the geometric partition blocks within the current block.

[0136] According to one embodiment of the present disclosure, when intra-frame prediction is performed for a current block, a matrix-based intra-frame prediction mode may be selected as the intra-frame prediction mode for the current block. Through the matrix-based intra-frame prediction mode, a prediction block can be generated by signaling the index of a matrix using a matrix that is predefined between a video encoding device and a video decoder.

[0137] According to one embodiment of the present disclosure, when the current block is a chrominance block and intra-frame prediction is performed for the current block, the prediction of the current chrominance block may be performed using a prediction mode identical to the prediction mode of the luminance block at the position corresponding to the current chrominance block, or a prediction mode predefined between the image encoding device and the image decoder. When the current block is a chrominance block and intra-frame prediction is performed for the current block, a prediction mode based on component correlation (e.g., CfL, CCLM, MHCCP, etc.) may be selected as the prediction mode for the current chrominance block. Through a prediction mode based on component correlation, a prediction block for the current chrominance block may be generated by modeling one or more models as linear and / or non-linear models of the relationship between the previously reconstructed chrominance samples around the current chrominance block and the previously reconstructed luminance samples around the luminance block at the position corresponding to the current chrominance block.

[0138] According to one embodiment of the present disclosure, prediction can be performed on the current block using an IBC mode. In the IBC mode, prediction can be performed using block vectors. Specifically, one or more block vectors can be used to generate a prediction block in a previously restored area within the same frame as the current block, and a final prediction block can be generated based thereon. At this time, the information of the block vectors can be encoded by an image encoding device and signaled to an image decoder.

[0139] For example, in an image decoding device, a block vector candidate list is generated according to a predefined position and search order between an image encoding device and an image decoding device, and certain information including an index indicating a candidate within the list may be signaled. Or / and, initial block vector information may be obtained through the signaled certain information, and final block vector information may be obtained by correcting the initial block vector information using a method such as template matching.

[0140] According to one embodiment of the present disclosure, when a prediction using an IBC mode is performed for a current block, an IBC geometric partitioning-based prediction mode (Wedge mode) may be selected as the in-frame prediction mode for the current block. Through the IBC geometric partitioning-based prediction mode (Wedge mode), a final prediction block for the current block can be generated by performing a weighted sum operation of prediction blocks generated for each of the plurality of geometric partitioning blocks. Here, the plurality of geometric partitioning blocks may be regions obtained through geometric partitioning of the current block.

[0141] According to one embodiment of the present disclosure, when the current block is a chrominance block and a prediction using IBC mode is performed for the current block, if a luminance block at a position corresponding to the chrominance block has already been restored during the process of generating a block vector candidate list or obtaining a block vector, the block vector information of the luminance block at the position corresponding to the chrominance block can be used.

[0142] For example, when the block partitioning structure of the luminance component and the chrominance component is the same, the block vector information of the corresponding position luminance block can be scaled according to the color format of the input image and used as the block vector and / or block vector candidate of the current chrominance block.

[0143] For example, when the block partitioning structures of the luminance component and the chrominance component are different from each other, one or more block vectors are obtained according to the position and / or order within the corresponding position luminance block that is predefined between the image encoding device and the image decoder, and the corresponding block vectors are scaled according to the color format of the input image to be used as the block vector and / or block vector candidates of the current chrominance block.

[0144] According to one embodiment of the present disclosure, when a prediction combining an intra-frame prediction mode and an inter-frame prediction mode is performed for a current block, an intra-frame prediction block can be generated by inducing the intra-frame prediction mode. In this case, the intra-frame prediction mode may be generated by defining a previously restored area around the current block as a template and using information on some or all pixels of the template. Alternatively, when a prediction combining an intra-frame prediction mode and an inter-frame prediction mode is performed for a current block, an intra-frame prediction block can be generated by defining a previously restored area around the current block as a template and performing template matching on the previously restored area around the current block. Alternatively, when a prediction combining an intra-frame prediction mode and an inter-frame prediction mode is performed for a current block, a prediction block can be generated using a block vector. Alternatively, when a prediction combining an intra-frame prediction mode and an inter-frame prediction mode is performed for a current block, a prediction block can be generated using template matching and / or a block vector.

[0145] In this case, the template may include areas adjacent to or non-adjacent to the current block. Here, in the case of an area non-adjacent to the current block, it may correspond to an area within a certain pixel line distance from the current block. When an area non-adjacent to the current block is used as a template, information regarding whether an area non-adjacent to the current block is used as a template and / or the distance between the current block and the template may be encoded by the video encoding device and signaled to the video decoder. Alternatively, information regarding the distance between the current block and the template may be predefined between the video encoding device and the video decoder, so that the signaling of the distance information may be omitted. If predefined, the value may be fixed as a specific constant or determined variably by the horizontal and vertical pixel lengths of the current block, or the width, aspect ratio, etc. of the current block.

[0146] According to one embodiment of the present disclosure, a prediction combining an intra-frame prediction mode and an inter-frame prediction mode may be performed on the current block. Alternatively, a geometric partitioning prediction may be performed on the current block, and at least one of intra-frame prediction or inter-frame prediction may be performed on a plurality of geometric partitioning blocks to generate a final prediction block through the weighted sum of the prediction blocks. In this case, the image encoding device may encode the geometric partitioning information and explicitly signal it to the image decoder, or implicitly induce it from the image decoder.

[0147] Referring to FIG. 3, a residual block for the current block can be derived based on the predicted block (S320).

[0148] According to one embodiment of the present disclosure, a residual block can be derived by calculating the difference between the actual pixel value of the current block and the pixel value of the prediction block generated in S310. The residual block may be understood as a residual signal, a residual block, a residual signal, a residual sample, etc.

[0149] Referring to FIG. 3, at least one of non-separable transformation or separable transformation can be performed based on the residual block to derive transformation coefficients for the current block (S330).

[0150] According to one embodiment of the present disclosure, a transform unit (TU) for performing a transformation may be determined. Here, the transform unit may refer to a unit that determines whether to perform a transformation on a residual block and in which information regarding the transformation is encoded and signaled. Here, the transform unit may be a single block or each sub-block formed by dividing the single block into multiple parts. An image encoding device may encode division information, including the division depth and division method of the current transform unit, and signal it to an image decoder.

[0151] According to one embodiment of the present disclosure, a transformation may be performed on a transformation unit based on a transformation kernel. For example, the transformation may be performed on Nth order. Here, N may be an integer greater than or equal to 1. When the transformation is performed on Nth order, the size of the transformation kernel applied to the transformation of each order may be the same for each order or may differ from one another. That is, the transformation may be performed only on some of the residual blocks or the blocks to be transformed.

[0152] According to one embodiment of the present disclosure, at least one conversion of a separable conversion or a non-separable conversion may be performed on the current block. For example, a separable conversion may be performed, and additionally, a non-separable conversion may be performed.

[0153] According to one embodiment of the present disclosure, a conversion kernel applied to the conversion can be determined. For example, at least one conversion kernel may be determined for one TU. The size of the conversion kernel and the size of the conversion unit may be the same or different from each other.

[0154] According to one embodiment of the present disclosure, vertical and horizontal separation conversion kernels (e.g., DCT / DCT or ADST / ADST) can be applied to perform separation conversion in the vertical and horizontal directions, respectively, for coefficients assigned as pixel values ​​of the current TU block.

[0155] According to one embodiment of the present disclosure, after a transformation coefficient is generated through a separation transformation, the transformation coefficient can be mapped from a two-dimensional form to a one-dimensional vector form according to the scanning order to perform a non-separation transformation. At this time, the scanning order may be implicitly determined based on vertical and horizontal separation transformation kernels in the image decoder, or it may be determined by being explicitly signaled from the image encoding device to the image decoder.

[0156] According to one embodiment of the present disclosure, a set of inseparable transformation kernels is determined, and after an inseparable transformation kernel is determined within the set of inseparable transformation kernels, an inseparable transformation can be performed by applying the inseparable transformation kernel. Transformation coefficients can be generated by applying the inseparable transformation kernel to the transformation coefficients. In this case, the number of input transformation coefficients and the number of output transformation coefficients may be different.

[0157] According to one embodiment of the present disclosure, the inseparable conversion kernel may be determined differently depending on the number of conversion coefficients. For example, when the number of conversion coefficients is 8 or less, the inseparable conversion kernel (stx_type) may be selected from a set of inseparable conversion kernels (stx_set_idx) having 16x8 coefficients. For example, when the number of conversion coefficients is greater than 8 and less than or equal to 32, the inseparable conversion kernel (stx_type) may be selected from a set of inseparable conversion kernels having 64x32 coefficients.

[0158] Meanwhile, the above-disclosed embodiment is merely an example, and a different number of transformation coefficients may be used. For example, the number of transformation coefficients that serve as inputs to the inseparable transformation may be 64 or 16. Alternatively, 48 coefficients may be used instead of 64.

[0159] Afterwards, the selected kernel and the transformation coefficients can be computed to perform the inseparable transformation. For example, as shown in Equation 1 below, the transformation coefficients and the inseparable transformation kernel can be computed to output the transformation coefficients.

[0160] [Mathematical Formula 1]

[0161]

[0162] Here, is the output transformation coefficient, is the input transformation coefficient, can mean a non-separable conversion kernel.

[0163] For example, if an inseparable conversion kernel (stx_type) is selected within an inseparable conversion kernel set (stx_set_idx) having 16x8 coefficients, 8 conversion coefficients can be output through Equation 1.

[0164] For example, if an inseparable conversion kernel (stx_type) is selected within a set of inseparable conversion kernels having 64x32 coefficients, 32 conversion coefficients can be output through Equation 1.

[0165] Meanwhile, for example, the number of input transformation coefficients may be 64, 48, or different values.

[0166] For example, when performing a non-separable transformation on blocks of size Nx4 or 4xN, 8 transformation coefficients can be generated from 16 transformation coefficients as input. Here, N can be an integer greater than or equal to 4.

[0167] For example, if the smaller of the width and height is greater than or equal to M, 32 transformation coefficients can be generated from 48 transformation coefficients as input. Here, M can be 8.

[0168] However, the figures disclosed above are merely examples, and different figures may be used.

[0169] Meanwhile, according to one embodiment of the present disclosure, the image encoding device can determine at an upper level whether a non-separable transformation is performed. That is, it can determine at an upper level whether a non-separable inverse transformation is performed during the decoding process.

[0170] For example, the video encoding device may determine at the sequence level whether inseparable conversion is performed and signal a flag at the sequence level indicating whether inseparable conversion is performed. At this time, the video encoding device may separately signal to the video decoder a flag indicating whether inseparable conversion is performed for an inter-frame prediction block and a flag indicating whether inseparable conversion is performed for an intra-frame prediction block.

[0171] For example, the video encoding device may determine whether non-separable transformation is performed and signal a flag regarding whether non-separable transformation is performed. If the flag is true, it may additionally signal a flag indicating whether non-separable transformation is performed for the inter-frame prediction block. That is, if the flag indicating whether non-separable transformation is performed is true and the flag indicating whether non-separable transformation is performed for the inter-frame prediction block is true, it means that non-separable transformation can be performed on both the inter-frame prediction block and the intra-frame prediction block; if only the flag indicating whether non-separable transformation is performed is true, it means that non-separable transformation can be performed only on the intra-frame prediction block. Here, inter-frame prediction can be understood to include prediction using IBC mode.

[0172] According to one embodiment of the present disclosure, whether non-separable transformation is performed may be determined based on at least one of the size of the current TU, the partition depth of the current TU, the location of the EOB, and the prediction mode in the prediction execution process of the current TU. Here, the EOB (End of Block) may represent the location of the last effective transformation coefficient among the transformation coefficients belonging to the current TU. For example, it may mean the location of the transformation coefficient located at the bottom right among the non-zero transformation coefficients within the current TU. The EOB may represent the scan location or scan order of the last effective transformation coefficient among the transformation coefficients belonging to the current TU.

[0173] According to one embodiment of the present disclosure, an image encoding device may signal a parameter (stx_type) indicating whether an inseparable transformation is performed during the decoding process. For example, if stx_type is 0, it may indicate that an inseparable transformation is not performed on the current TU. If stx_type is not 0, it may indicate that an inseparable transformation is performed on the current TU. If an inseparable transformation is not performed on the current TU, stx_type may not be signaled to the image decoding device. That is, if stx_type is not signaled to the image decoding device, an inseparable inverse transformation may not be performed on the current TU during the decoding process.

[0174] Meanwhile, if stx_type is not 0, the inseparable transform kernel set information applied to the current TU during the decoding process may be explicitly signaled from the image encoding device to the image decoding device. Alternatively, the inseparable transform kernel set information applied to the current TU may be implicitly determined by the image decoding device.

[0175] According to one embodiment of the present disclosure, an inseparable transformation may be performed on the current TU only when the transformation unit partition depth of the current TU is 0. A partition depth of 0 may indicate the case where it is at the top of the partition tree. At this time, the image encoding device may signal to the image decoding device whether to perform an inseparable transformation and / or information on the inseparable transformation kernel set.

[0176] According to one embodiment of the present disclosure, a predetermined condition may be determined according to the prediction mode in the prediction execution process of the current TU, and the non-separable conversion kernel set information may be different based on the predetermined condition. For example, the predetermined condition when prediction using inter-frame prediction or IBC mode is performed on the current TU may be different from the predetermined condition when prediction using intra-frame prediction is performed on the current TU.

[0177] For example, if cross-frame prediction or prediction using IBC mode is currently performed on the TU, a predetermined condition may include at least one of the following conditions.

[0178] - If EOB is greater than 3

[0179] - If the current TU's width (W) and height (H) are each 16 or greater

[0180] - If EOB is less than 32

[0181] However, the figures and conditions disclosed above are merely examples, and certain conditions may include conditions different from those described above.

[0182] For example, if cross-frame prediction or prediction using IBC mode is currently performed on the TU, a predetermined condition may include at least one of the following conditions.

[0183] - If at least one of the height or width of the current TU is less than 8 (e.g., a TU of size 4xN or Nx4, where N is an integer greater than or equal to 1)

[0184] - If EOB is less than 8

[0185] However, the figures and conditions disclosed above are merely examples, and certain conditions may include conditions different from those described above.

[0186] For example, if an in-frame prediction is currently performed on the TU, a predetermined condition may include at least one of the following conditions.

[0187] - If EOB is greater than 1

[0188] - If the current TU's width (W) and height (H) are each 8 or greater

[0189] - If EOB is less than 32

[0190] However, the figures and conditions disclosed above are merely examples, and certain conditions may include conditions different from those described above.

[0191] For example, if an in-frame prediction is currently performed on the TU, a predetermined condition may include at least one of the following conditions.

[0192] - If at least one of the height or width of the current TU is less than 8 (e.g., a TU of size 4xN or Nx4, where N is an integer greater than or equal to 1)

[0193] - If EOB is less than 8

[0194] However, the figures and conditions disclosed above are merely examples, and certain conditions may include conditions different from those described above.

[0195] According to one embodiment of the present disclosure, a predetermined condition may be determined according to the prediction mode in the current TU prediction execution process, and whether to signal a parameter (stx_type) based on the predetermined condition may be determined. stx_type may represent a parameter indicating whether a non-separable transformation is performed.

[0196] For example, if cross-frame prediction or prediction using IBC mode is performed on the current TU, stx_type may be signaled if certain conditions are satisfied. The certain conditions may include at least one of the following conditions.

[0197] - If EOB is greater than 3

[0198] - When a first flag indicating whether a non-separable transformation is performed on the current TU at the sequence level is signaled and the value of the first flag is true

[0199] - When both the vertical and horizontal transformation kernels for the separation transformation are DCTs

[0200] - If the current TU's width and height are each 16 or greater

[0201] - When EOB is less than or equal to 32

[0202] If certain conditions are not satisfied, stx_type may be induced to be 0.

[0203] However, the figures and conditions disclosed above are merely examples, and certain conditions may include conditions different from those described above.

[0204] For example, if an in-frame prediction is performed on the current TU, stx_type may be signaled if certain conditions are satisfied and additional conditions are satisfied.

[0205] A specified condition may include at least one of the following conditions.

[0206] - When EOB is not 1

[0207] - When a first flag indicating whether a non-separable transformation is performed on the current TU at the sequence level is signaled and the value of the first flag is true

[0208] - When both vertical and horizontal transformation kernels for separate transformation are DCT or both vertical and horizontal transformation kernels for separate transformation are ADST

[0209] - If the in-frame prediction mode is at least one of DC mode, Smooth mode, Smooth_V mode, Smooth_H mode, or directional prediction mode

[0210] - If EOB is less than 32

[0211] Additional conditions may include at least one of the following conditions.

[0212] - If the current TU size is 8x8 and the vertical and horizontal transformation kernels for the separation transformation are each DCTs, and EOB is less than 20 (1)

[0213] - If the current TU's width and height are each 8 or greater, and the vertical and horizontal conversion kernels for separation conversion are each DCTs, and EOB is less than 32 (2)

[0214] - If the current TU's width and height are each 8 or greater, and the vertical and horizontal conversion kernels for separation conversion are not DCTs, and EOB is less than 20 (3)

[0215] - Cases other than (1) to (3) above where EOB is less than 8

[0216] However, the figures and conditions disclosed above are merely examples, and certain conditions and / or additional conditions may include conditions different from those described above.

[0217] According to one embodiment of the present disclosure, when inter-frame prediction or prediction using IBC mode is performed on the current TU, stx_type may be signaled if a predetermined condition is satisfied.

[0218] - If the current TU's width and height are each 16 or greater

[0219] - When both the vertical and horizontal transformation kernels for the separation transformation are DCTs

[0220] However, the figures and conditions disclosed above are merely examples, and certain conditions may include conditions different from those described above.

[0221] According to one embodiment of the present disclosure, when intra-frame prediction is performed on the current TU, whether to signal stx_type according to the intra-frame prediction mode may be determined. Specifically, stx_type may be signaled according to vertical and horizontal transformation kernels for separation transformation only when intra-frame prediction is performed based on at least one of specific intra-frame prediction modes. At this time, the specific intra-frame prediction modes may include at least one of DC mode, a directional prediction mode including Vertical mode (vertical direction prediction mode), Horizontal mode (horizontal direction prediction mode), D45 (45-degree direction prediction mode), D135 (135-degree direction prediction mode), D113 (113-degree direction prediction mode), D157 (157-degree direction prediction mode), D203 (203-degree direction prediction mode), D67 (67-degree direction prediction mode), Smooth_V mode, Smooth_H mode, and Smooth mode.

[0222] However, the above-disclosed in-screen prediction mode is merely an example, and whether stx_type is signaled may be determined according to an in-screen prediction mode different from this.

[0223] According to one embodiment of the present disclosure, when intra-frame prediction is performed on the current TU, stx_type can be signaled according to vertical and horizontal transformation kernels for separate transformation without a process of determining whether it is an intra-frame prediction mode in which non-separable transformation can be performed. That is, for all intra-frame prediction modes, non-separable transformation can be performed, but whether non-separable transformation is performed can be determined by vertical and horizontal transformation kernels for separate transformation thereafter. At this time, a set of non-separable transformation kernels mapped to the intra-frame prediction mode for the current TU can be determined.

[0224] For example, in the case of a directional prediction mode, a set of non-separable transformation kernels mapped to the directional prediction mode may be used.

[0225] FIG. 4 is a drawing illustrating a directional prediction mode according to the present disclosure.

[0226] In the case of directional prediction modes, each directional prediction mode can be determined by the main direction and the delta direction.

[0227] As illustrated in FIG. 4, the main directionality may include DC mode, Vertical mode (vertical directionality prediction mode), Horizontal mode (horizontal directionality prediction mode), D45 (45-degree directionality prediction mode), D135 (135-degree directionality prediction mode), D113 (113-degree directionality prediction mode), D157 (157-degree directionality prediction mode), D203 (203-degree directionality prediction mode), D67 (67-degree directionality prediction mode), etc. The delta directionality may have an integer value in the form of being added to the main directionality, as illustrated in FIG. 4.

[0228] If prediction for the current TU is performed with non-main directional prediction modes, mapping of the prediction modes to the main directional prediction mode corresponding to that direction can be performed. The mapped main directional prediction mode can be used to determine the non-separable transformation kernel set.

[0229] For example, in the case of a directional prediction mode with a wide angle applied, mapping of the prediction mode is performed and can be used to determine the inseparable transformation kernel set.

[0230] FIG. 5 is a drawing illustrating a directional prediction mode according to the present disclosure.

[0231] A directional prediction mode with a wide angle applied may refer to an extended directional prediction mode by applying a wide angle to a general directional prediction mode. As illustrated in FIG. 5, the wide angle may correspond to an angle between the WIDE_A range and / or the WIDE_B range. That is, a directional prediction mode with a wide angle applied may include all directional prediction modes that fall between the WIDE_A range and / or the WIDE_B range. In this case, the WIDE_A range and / or the WIDE_B range may be determined according to the size and / or aspect ratio of the current block.

[0232] For example, if the aspect ratio of the width to the height of the current block is 1:16, general directional prediction modes as shown in FIG. 4 can be rotated 180 degrees and considered as directional prediction modes belonging to WIDE_B, and this can be used as a directional prediction mode with a wide angle applied.

[0233] In the case of a directional prediction mode with a wide angle applied, the prediction mode can be mapped to the main directional prediction mode closest to the wide angle or to the main directional prediction mode closest to the directional prediction mode prior to conversion to the wide angle, and used in the process of determining the inseparable transformation kernel set. The mapped main directional prediction mode can be signaled for determining the inseparable transformation kernel set in the subsequent decoding process.

[0234] For example, in the case of Paeth mode, the mapping of the prediction mode to DC mode can be performed and used to determine the non-separable transformation kernel set.

[0235] For example, in the case of Recursive mode, recursive_DC, recursive_V, recursive_H, recursive_D157, and recursive_PAETH modes may be applied, and in this case, mapping of the prediction mode to DC, Vertical, Horizontal, D157, and DC modes may be performed and used to determine the non-separable transformation kernel set.

[0236] According to one embodiment of the present disclosure, when intra-frame prediction is performed on the current TU, as described above, the intra-frame prediction mode for the current TU corresponds to an intra-frame prediction mode in which non-separable transformation can be performed, and if the vertical and horizontal transformation kernels for the separable transformation are both DCTs or both ADSTs (Asymmetric DSTs), stx_type can be signaled.

[0237] Meanwhile, as described above, according to one embodiment of the present disclosure, the image encoding device can determine the current TU's conversion kernel as any one of a plurality of inseparable conversion kernels included in an inseparable conversion kernel set.

[0238] According to one embodiment of the present disclosure, an image encoding device can signal stx_type to an image decoding device. If stx_type has a non-zero value, non-separable conversion kernel set information can be obtained based on stx_type.

[0239] Alternatively, the video encoding device may signal stx_type to the video decoding device, and if stx_type has a non-zero value, it may signal stx_set_idx. stx_set_idx may represent inseparable conversion kernel set information indicating one of a plurality of inseparable conversion kernels included in the inseparable conversion kernel set. Based on the inseparable conversion kernel set information, one of a plurality of inseparable conversion kernels included in the inseparable conversion kernel set may be determined as the inseparable conversion kernel of the current TU.

[0240] According to one embodiment of the present disclosure, when an intra-frame prediction is performed and a non-separable transformation is performed for the current TU and stx_type is signaled, reordered_stx_set_idx may be signaled. The reordered_stx_set_idx may represent non-separable transformation kernel set information in a range that varies depending on the intra-frame prediction mode. For example, reordered_stx_set_idx may have a range from 0 to 6. In the decoding process, stx_set_idx may be determined using the reordered_stx_set_idx.

[0241] Table 1 below is an example showing a list of inseparable conversion kernel sets. The above list of inseparable conversion kernel sets can be used identically in the conversion and inverse conversion processes.

[0242] reordered_stx_set_idx0123456In-screen prediction modeDC6105432Vertical1604253Horizontal1604253D452605143D1353461025D1134136052D1574136052D2035062143D675062143Smooth6105432Smooth_V1604253Smooth_H1604253

[0243] Referring to Table 1, when an in-frame prediction is performed for the current TU, stx_set_idx can be determined as any one of the values ​​from 0 to 6 as shown in Table 1, depending on the value of reordered_stx_set_idx.

[0244] According to one embodiment of the present disclosure, the non-separable conversion kernel can be determined according to the separable conversion kernel.

[0245] For example, when the vertical and horizontal conversion kernels for separate conversion are each DCT and when the vertical and horizontal conversion kernels for separate conversion are each ADST, the non-separable conversion kernels may differ. Accordingly, the non-separable conversion kernel may be determined as any one of the conversion kernels shown in Table 1, but for stx_set_idx signaled to the image decoder, the non-separable conversion kernels represented by the same stx_set_idx value may differ.

[0246] For example, if the vertical and horizontal transformation kernels for the separation transformation are each DCT, they may be determined as any one of the non-separable transformation kernels shown in Table 1, and if the vertical and horizontal transformation kernels for the separation transformation are each ADST, the non-separable transformation kernel may be determined using a transformation kernel set list different from Table 1. In this case, the type of transformation kernel set list to be used may be implicitly determined by the vertical and horizontal kernel types for the separation transformation and / or the size of the current block. In some cases, the transformation kernel set list used when the vertical and horizontal transformation kernels for the separation transformation are each ADST and the width and height of the current block are both 8 or greater may be different from the transformation kernel set list used under other conditions.

[0247] As seen in Table 1, the stx_set_idx represented by reordered_stx_set_idx may differ depending on the in-screen prediction mode.

[0248] According to one embodiment of the present disclosure, when stx_type is signaled as a non-zero value for the current TU and inter-frame prediction or prediction using IBC mode is performed for the current TU, the signaling of reordered_stx_set_idx may be omitted. In this case, stx_set_idx may be determined as a specific value regardless of the prediction mode of the current block. For example, stx_set_idx may be determined as 0. stx_set_idx may also be determined as the set indicated by index 0 when DC prediction is in the transformation kernel set list defined as in Table 1, regardless of the prediction mode of the current block.

[0249] According to one embodiment of the present disclosure, when stx_type is signaled as a non-zero value for the current TU and inter-frame prediction or prediction using IBC mode is performed for the current TU, stx_set_idx can be determined using the prediction mode and / or reordered_stx_set_idx. In this case, reordered_stx_set_idx may or may not be signaled.

[0250] According to one embodiment of the present disclosure, in the process of performing prediction of the current TU, at least one intra-frame prediction mode is used to perform intra-frame prediction, and if the intra-frame prediction mode is a D45 directional prediction mode, reordered_stx_set_idx can be determined to be 0, i.e., stx_set_idx can be determined to be 2, as shown in Table 1. That is, based on the intra-frame prediction mode used in the process of performing prediction of the current TU, the intra-frame prediction mode and the inseparable transformation kernel set with an index of 0 can be determined. Alternatively, the inseparable transformation kernel set may be determined by signaling reordered_stx_set_idx and the stx_set_idx indicated by the corresponding index.

[0251] Meanwhile, according to one embodiment of the present disclosure, when geometric partitioning-based prediction is performed on the current TU, an intra-frame prediction mode can be determined based on a geometric partitioning mode for a plurality of geometric partitioning blocks. A non-separable transformation kernel set can be determined from the intra-frame prediction mode. Additionally, as shown in Table 1, a non-separable transformation kernel set can be determined.

[0252] At this time, based on the geometric division angle information of the line for geometric division, a directional in-frame prediction mode corresponding to the angle may be used. Here, the corresponding directional in-frame prediction mode or directional prediction mode may refer to at least one of a directional prediction mode in a direction horizontal (parallel) to the angle of the line or a directional prediction mode in a direction perpendicular to the angle of the line. Alternatively, if the corresponding directional in-frame prediction mode corresponds to a direction in which a delta direction is added to the main direction, the main direction may be considered as a horizontal (parallel) or perpendicular directional prediction mode.

[0253] According to one embodiment of the present disclosure, a non-separable transformation kernel set can be determined from a directional prediction mode corresponding to the angle of a geometric division line. In this case, a list of non-separable transformation kernel sets can be defined between an image encoding device and an image decoding device, and a non-separable transformation kernel set can be determined from the list. For example, the list of non-separable transformation kernel sets can be defined as shown in Table 1. In this case, the non-separable transformation kernel set can be determined as the first kernel set candidate of the list of non-separable transformation kernel sets. In this case, through signaling of a 1-bit flag, it may be determined whether to use a vertical directional prediction mode or a horizontal directional prediction mode.

[0254] According to one embodiment of the present disclosure, for a direction prediction mode corresponding to the angle of a geometric division line, if the direction prediction mode considers delta directionality in addition to main directionality, a non-separable transformation kernel set can be determined based on the direction prediction mode of the main directionality closest to the directionality.

[0255] FIG. 6 is a diagram illustrating an example of deriving a directional prediction mode corresponding to a geometric division mode according to the present disclosure.

[0256] As shown in Fig. 6, for a direction prediction mode corresponding to the angle of a geometric division line, if the direction prediction mode considers delta directionality in addition to main directionality, a non-separable transformation kernel set can be determined based on the D45 direction prediction mode, which is the direction prediction mode of the closest main directionality.

[0257] Meanwhile, according to one embodiment of the present disclosure, a directional intra-frame prediction mode mapped by an agreement between an image encoding device and an image decoder may be predefined according to the angle of the geometric partitioning mode, and a non-separable conversion kernel set may be determined. In this case, the directional prediction mode mapped may include a direction horizontal to the geometric partitioning mode and / or a direction perpendicular to the geometric partitioning mode and / or other directions.

[0258] According to one embodiment of the present disclosure, in the process of performing a prediction on the current TU, a directionality is derived within the prediction block, and a directionality prediction mode corresponding to the derived directionality is determined, and then a non-separable transformation kernel set can be determined using this.

[0259] FIG. 7 is a drawing illustrating an example of inducing directionality within a prediction block according to the present disclosure.

[0260] The prediction block can have a size of WxH.

[0261] For example, after deriving directionality at the sub-block level within a prediction block, it can be accumulated in a histogram along with the strength of the directionality to determine the directionality prediction mode corresponding to the directionality with the greatest strength as the in-frame prediction mode.

[0262] Referring to FIG. 7(a), directionality can be derived in units of axb sub-blocks within a prediction block and accumulated in a histogram along with the strength of the directionality to determine the directionality prediction mode corresponding to the directionality with the greatest strength as the in-frame prediction mode. Here, a and b can be integers greater than or equal to 1. For example, a and b can each be 3. At this time, the directionality can be derived through at least one of the Sobel operation, the Prewitt operation, or the Roberts operation (when a and b are each 2). At this time, the strength can be calculated as the sum of the absolute value of the directionality magnitude in the x-direction and the absolute value of the directionality magnitude in the y-direction.

[0263] For example, when inducing directionality within a prediction block, directionality may be induced for all sub-blocks within the prediction block, or directionality may be induced only for specific sub-blocks.

[0264] Referring to FIG. 7(b), directionality can be derived only for sub-blocks of a specific area within a prediction block and accumulated in a histogram along with the strength of the directionality, thereby determining the directionality prediction mode corresponding to the directionality with the greatest strength as the in-frame prediction mode. For example, the sub-blocks of a specific area may include at least one of the sub-blocks of the top-left (1), top-right (2), center (3), bottom-left (4), or bottom-right (5). The number and / or location of the sub-blocks of a specific area may be determined based on the size and / or aspect ratio of the current block. As the calculation of directionality and strength is as described with reference to FIG. 7(a), a detailed explanation is omitted here.

[0265] For example, directionality can be derived only for specific subblocks of the current TU. In this case, the position of each specific subblock can be determined based on at least one of the geometric partitioning mode, the size of the current block, or the aspect ratio of the current block.

[0266] As illustrated in FIG. 7(c), a specific subblock of the current block may include subblocks that cross a geometric division line and each subblock separated by a vertical or horizontal direction from the said subblock.

[0267] However, the above-disclosed embodiment is merely an example, and the number and / or location of sub-blocks can be set in a different way to induce directionality within the prediction block.

[0268] According to an embodiment, when geometric partitioning-based prediction is performed on the current TU and intra-frame prediction is performed on at least one of a plurality of geometric partitioning blocks, the aforementioned intra-frame prediction mode determination process and non-separable transformation kernel set determination process may be performed. In another embodiment, when geometric partitioning-based prediction is performed on the current TU and intra-frame prediction is performed on at least one of a plurality of geometric partitioning blocks, an intra-frame prediction mode used for determining the non-separable transformation kernel set may be determined according to the relationship between the geometric partitioning mode and the intra-frame prediction mode used for prediction of at least one geometric partitioning block.

[0269] According to one embodiment of the present disclosure, if the intra-frame prediction mode used for predicting geometric partitioning blocks is not a directional prediction mode, the intra-frame prediction mode used for determining the non-separable transformation kernel set may be determined according to the geometric partitioning mode.

[0270] According to one embodiment of the present disclosure, when the in-frame prediction mode used for predicting a geometric partitioning block is a directional prediction mode, the relationship between the directional prediction mode and the geometric partitioning mode may be considered. Here, the relationship may mean whether the directional prediction mode and the geometric partitioning mode are in a horizontal relationship or a vertical relationship.

[0271] The relationship between the directional prediction mode and the geometric division mode can be defined based on the angular difference (θ) between the directional prediction mode corresponding to the geometric division mode and the intra-frame prediction mode used for prediction of the geometric division block.

[0272] For example, a vertical relationship may refer to the case where, for two angles α and β, the relationship is α < θ < β. In this case, α and β may be fixed values ​​or values ​​determined by the aspect ratio of the current block. For example, α can be determined as 45° and β as 135°. In this case, if it is not a vertical relationship, it may be defined as a horizontal relationship.

[0273] For example, in the case of a vertical relationship, the intra-frame prediction mode for determining the non-separable transformation kernel set can be determined as either DC mode or Smooth mode. This can be predefined between the image encoding device and the image decoder.

[0274] For example, in the case of a horizontal relationship, it can be determined as any one of the directional prediction mode corresponding to the geometric division mode, the main directional in-frame prediction mode of the corresponding directional prediction mode, the directional prediction mode used for prediction of the geometric division block, or the main directional in-frame prediction mode of the directional prediction mode used for prediction of the geometric division block.

[0275] According to one embodiment of the present disclosure, when intra-frame prediction is performed on at least one of a plurality of geometric partition blocks, for the geometric partition blocks on which intra-frame prediction is performed, an intra-frame prediction mode for determining a non-separable transformation kernel set may be determined based on the intra-frame prediction mode of the geometric partition block with the largest area not adjacent to the reference line of the current block.

[0276] FIG. 8 is a diagram illustrating an example of determining an in-frame prediction mode through a reference line in geometric division-based prediction according to the present disclosure.

[0277] Referring to FIG. 8, when geometric partitioning-based prediction is performed and sub-block A and sub-block B are predicted in an intra-frame prediction mode, an intra-frame prediction mode for determining a non-separable transformation kernel set can be determined based on the intra-frame prediction mode of sub-block B, which has the most areas not adjacent to the reference line of the current block.

[0278] However, the above-disclosed embodiment is merely an example, and the position of the geometric division block (subblock) for determining the in-screen prediction mode according to the position of the geometric division boundary and / or the reference line of the current block may differ.

[0279] According to one embodiment of the present disclosure, when any one of the following is performed during the current TU prediction process: unidirectional inter-frame prediction, bidirectional prediction, prediction in which a weighted sum of intra-frame prediction signals and inter-frame prediction signals is performed rather than geometric partitioning, or prediction using an IBC mode, the intra-frame prediction mode for determining the non-separable transformation kernel set may be determined as either a DC mode or a Smooth mode. Alternatively, as seen with reference to FIGS. 7(a) and (b), the intra-frame prediction mode may be determined according to the induced directionality.

[0280] Meanwhile, according to one embodiment of the present disclosure, with reference to FIG. 3, quantization of the transformation coefficients can be performed to derive quantized transformation coefficients (S340).

[0281] According to one embodiment of the present disclosure, quantized transform coefficients can be derived by performing quantization on transform coefficients. At this time, the image encoding device can signal information such as a quantization method and quantization parameter information to an image decoder.

[0282] Referring to FIG. 3, residual information regarding quantized transformation coefficients can be encoded (S350).

[0283] According to one embodiment of the present disclosure, entropy coding can be performed on residual information regarding quantized transformation coefficients.

[0284] FIG. 9 is a flowchart of an image signal decoding method according to one embodiment of the present disclosure.

[0285] Referring to FIG. 9, a prediction block for the current block can be generated (S910). Specifically, a prediction block for the current block can be generated by performing any one of intra-frame prediction, inter-frame prediction, or prediction using an intra-block copy mode.

[0286] According to one embodiment of the present disclosure, a prediction target block, i.e., a prediction unit, on which a prediction is to be performed may be determined. In the present disclosure, the prediction unit may correspond to the current block.

[0287] According to one embodiment of the present disclosure, the prediction unit may be determined dependently or independently of the luminance component and the color difference component.

[0288] According to one embodiment of the present disclosure, information related to the size and / or shape of a current block may be signaled to an image decoder. Here, the information related to the size and / or shape of the current block may include direct or indirect information necessary to determine the size of the current block.

[0289] Regarding the determination of the prediction unit, as examined with reference to Figure 3, a detailed explanation will be omitted here.

[0290] According to one embodiment of the present disclosure, a prediction can be performed on the current block based on a determined prediction mode. Specifically, the prediction mode may include an intra-frame prediction mode, an inter-frame prediction mode, an Intra Block Copy (IBC) mode, a palette mode, a mode combining an intra-frame prediction mode and an inter-frame prediction mode, etc. Accordingly, any one of the following may be performed on the current block: intra-frame prediction, inter-frame prediction, prediction using an Intra Block Copy (IBC) mode, prediction using a palette mode, or prediction using a mode combining an intra-frame prediction mode and an inter-frame prediction mode. In some cases, the prediction using a mode combining an intra-frame prediction mode and an inter-frame prediction mode may be included in the inter-frame prediction.

[0291] According to one embodiment of the present disclosure, if no in-frame prediction is performed on the current block, a 1-bit flag may be signaled for the current block.

[0292] If the value of the above flag indicates 'skip', the prediction mode of the current block may be determined as merge mode or IBC prediction merge mode. In this case, the transformation may be omitted, and the prediction sample may be used as the restoration sample. Here, 'skip' may indicate a case where motion information (e.g., motion vector, reference picture, reference picture list, etc.) is not signaled, or where motion information is signaled using only at least one syntax information. Additionally, it may indicate a case where the residual block for the current block is not signaled.

[0293] According to one embodiment of the present disclosure, when skip prediction is not performed for the current block, a 1-bit flag is signaled for the current block to determine the prediction mode for the current block. The prediction mode may include an intra-frame prediction mode, an inter-frame prediction mode, an IBC mode, a palette mode, etc.

[0294] According to one embodiment of the present disclosure, when inter-frame prediction is performed for the current block, the inter-frame prediction mode may be determined as at least one of a plurality of inter-frame prediction modes. At this time, the plurality of inter-frame prediction modes are as described with reference to FIG. 3.

[0295] According to one embodiment of the present disclosure, when inter-frame prediction is performed for a current block, motion compensation can be performed using motion information of the current block. Additionally, a prediction block can be determined through motion compensation. When inter-frame prediction is performed for a current block, the number of reference pictures and the pixel value of the reference block can be determined according to the determined prediction mode.

[0296] According to one embodiment of the present disclosure, when inter-frame prediction is performed for a current block, a block on which intra-frame prediction has been performed may be used for inter-frame prediction. For example, a final prediction block of the current block may be generated using an intra-frame prediction mode derived using a predetermined restored area around the current block. The predetermined restored area around the current block may be defined as a template, and said template may include areas adjacent to or non-adjacent to the current block.

[0297] According to one embodiment of the present disclosure, when inter-frame prediction is performed for the current block, the inter-frame prediction mode of the current block may be determined as a geometric partition-based prediction mode (Wedge mode). As the geometric partition-based prediction or geometric partition-based prediction mode has been examined with reference to FIG. 3, a redundant description will be omitted here.

[0298] According to one embodiment of the present disclosure, when a geometric partition-based prediction mode is selected as the inter-frame prediction mode of the current block, at least one of the geometric partition blocks (subblocks) within the current block may be a block for which prediction has been performed using inter-frame prediction. Alternatively, when a geometric partition-based prediction mode is selected as the inter-frame prediction mode of the current block, at least one of the geometric partition blocks (subblocks) within the current block may be a block for which prediction has been performed using an IBC mode.

[0299] According to one embodiment of the present disclosure, when intra-frame prediction is performed for the current block, the inter-frame prediction mode may be determined as at least one of a plurality of intra-frame prediction modes. At this time, the plurality of intra-frame prediction modes are as described with reference to FIG. 3.

[0300] According to one embodiment of the present disclosure, when a directional prediction mode is selected as the in-screen prediction mode of the current block, a prediction mode of a specific directionality may be selected according to the block size. The directional prediction mode is as described with reference to FIG. 3.

[0301] According to one embodiment of the present disclosure, when in-frame prediction is performed for a current block, an in-frame template matching prediction mode may be selected as the in-frame prediction mode of the current block. The in-frame template matching prediction mode is as described with reference to FIG. 3.

[0302] According to one embodiment of the present disclosure, when in-frame prediction is performed for a current block, a previously restored area surrounding the current block may be defined as a template, and an in-frame prediction mode may be induced using said template. Subsequently, a final predicted block of the current block may be generated using the induced in-frame prediction mode. In this case, the template may include areas adjacent to or non-adjacent to the current block.

[0303] According to one embodiment of the present disclosure, when intra-frame prediction is performed for the current block, a geometric partitioning-based intra-frame prediction mode may be selected as the intra-frame prediction mode of the current block. The geometric partitioning-based intra-frame prediction mode is as described with reference to FIG. 3 and can be applied in the same way during the decoding process, so a detailed explanation is omitted here.

[0304] According to one embodiment of the present disclosure, when the current block is a chrominance block and intra-frame prediction is performed for the current block, the prediction of the current chrominance block may be performed using a prediction mode identical to the prediction mode of the luminance block at the position corresponding to the current chrominance block, or a prediction mode predefined between the image encoding device and the image decoder. When the current block is a chrominance block and intra-frame prediction is performed for the current block, a prediction mode based on component correlation (e.g., CfL, CCLM, MHCCP, etc.) may be selected as the prediction mode for the current chrominance block. Through a prediction mode based on component correlation, a prediction block for the current chrominance block may be generated by modeling one or more models as linear and / or non-linear models of the relationship between the previously reconstructed chrominance samples around the current chrominance block and the previously reconstructed luminance samples around the luminance block at the position corresponding to the current chrominance block.

[0305] According to one embodiment of the present disclosure, prediction using an IBC mode can be performed for the current block. In the IBC mode, prediction can be performed using a block vector. The IBC mode is as described with reference to FIG. 3. At this time, information of the block vector can be signaled to an image decoder, and since this is as described with reference to FIG. 3, a detailed explanation is omitted here.

[0306] According to one embodiment of the present disclosure, when a prediction using an IBC mode is performed for a current block, an IBC geometric partitioning-based prediction mode (Wedge mode) may be selected as the in-frame prediction mode for the current block. The IBC geometric partitioning-based prediction mode (Wedge mode) has been described with reference to FIG. 3.

[0307] According to one embodiment of the present disclosure, when the current block is a chrominance block and a prediction using IBC mode is performed on the current block, if a block vector candidate list is generated or a luminance block corresponding to the chrominance block is restored during the process of obtaining the block vector, the block vector information of the luminance block corresponding to the chrominance block can be used.

[0308] For example, when the block partitioning structure of the luminance component and the chrominance component is the same, the block vector information of the corresponding position luminance block can be scaled according to the color format of the input image and used as the block vector and / or block vector candidate of the current chrominance block.

[0309] For example, when the block partitioning structures of the luminance component and the chrominance component are different from each other, one or more block vectors are obtained according to the position and / or order within the corresponding position luminance block that is predefined between the image encoding device and the image decoder, and the corresponding block vectors are scaled according to the color format of the input image to be used as the block vector and / or block vector candidates of the current chrominance block.

[0310] According to one embodiment of the present disclosure, when a prediction combining an intra-frame prediction mode and an inter-frame prediction mode is performed for a current block, an intra-frame prediction block can be generated by inducing the intra-frame prediction mode. In this case, the intra-frame prediction mode may be generated by defining a previously restored area around the current block as a template and using information on some or all pixels of the template. Alternatively, when a prediction combining an intra-frame prediction mode and an inter-frame prediction mode is performed for a current block, an intra-frame prediction block can be generated by defining a previously restored area around the current block as a template and performing template matching on the previously restored area around the current block. Alternatively, when a prediction combining an intra-frame prediction mode and an inter-frame prediction mode is performed for a current block, a prediction block can be generated using a block vector. Alternatively, when a prediction combining an intra-frame prediction mode and an inter-frame prediction mode is performed for a current block, a prediction block can be generated using template matching and / or a block vector.

[0311] In this case, the template may include areas adjacent to or non-adjacent to the current block. Here, in the case of an area non-adjacent to the current block, it may correspond to an area within a certain pixel line distance from the current block. When an area non-adjacent to the current block is used as a template, information regarding whether an area non-adjacent to the current block is used as a template and / or the distance between the current block and the template may be signaled to the image decoder. Alternatively, information regarding the distance between the current block and the template may be predefined between the image encoder and the image decoder, so that the signaling of the distance information may be omitted. If predefined, the value may be fixed as a specific constant or determined variably by the horizontal and vertical pixel lengths of the current block, or the width, aspect ratio, etc. of the current block.

[0312] According to one embodiment of the present disclosure, a prediction combining an intra-frame prediction mode and an inter-frame prediction mode may be performed on the current block. Alternatively, a geometric partitioning prediction may be performed on the current block, and at least one of intra-frame prediction or inter-frame prediction may be performed on a plurality of geometric partitioning blocks to generate a final prediction block through the weighted sum of the prediction blocks. In this case, the geometric partitioning information may be explicitly signaled to an image decoder or implicitly derived by the image decoder.

[0313] Referring to FIG. 9, a transformation coefficient for the current block can be derived based on residual information for the current block (S920).

[0314] According to one embodiment of the present disclosure, the transformation coefficient for the current block can be restored by performing entropy decoding on the signaled residual information.

[0315] Referring to FIG. 9, inverse quantization can be performed on the transformation coefficients to derive inverse quantized transformation coefficients (S930).

[0316] According to one embodiment of the present disclosure, inverse quantization can be performed on the transform coefficients restored in S920 to derive inverse quantized transform coefficients. At this time, information such as a quantization method and quantization parameter information can be signaled from an image encoding device to an image decoder.

[0317] Referring to FIG. 9, a residual block can be derived by performing at least one of a non-separable inverse transform or a separated inverse transform on the inverse quantized transform coefficients (S940).

[0318] According to one embodiment of the present disclosure, an inverse transformation unit (TU) for performing an inverse transformation may be determined. Here, the inverse transformation unit may refer to a unit that determines whether to perform an inverse transformation on a residual block and signals information regarding the inverse transformation to be decoded. Here, the transformation unit may be a single block or each sub-block formed by dividing the single block into multiple parts. Division information, including the division depth and division method of the current transformation unit, may be signaled to an image decoding device to be decoded.

[0319] According to one embodiment of the present disclosure, an inverse transform may be performed on an inverse transform unit based on a transform kernel. For example, the inverse transform may be performed on Nth order. Here, N may be an integer greater than or equal to 1. When the inverse transform is performed on Nth order, the size of the transform kernel applied to the inverse transform of each order may be the same for each order or different from one another. That is, the inverse transform may be performed only on some of the inverse quantized transform coefficients.

[0320] According to one embodiment of the present disclosure, at least one inverse transformation, either a separate inverse transformation or a non-separable inverse transformation, may be performed on the current block. For example, a separate inverse transformation may be performed, and if a non-separable transformation is performed during the encoding process, a non-separable inverse transformation may be additionally performed during the decoding process.

[0321] According to one embodiment of the present disclosure, a transformation kernel applied to the inverse transformation can be determined. For example, at least one transformation kernel may be determined for a single TU. The size of the transformation kernel and the size of the inverse transformation unit may be the same or different from each other.

[0322] According to one embodiment of the present disclosure, whether inseparable inverse transformation is performed can be determined at a higher level. That is, whether inseparable inverse transformation is performed during the decoding process can be determined at a higher level.

[0323] For example, a flag indicating whether inseparable inverse transformation is performed during the decoding process may be signaled at the sequence level. In this case, a flag indicating whether inseparable inverse transformation is performed for inter-frame prediction blocks and a flag indicating whether inseparable inverse transformation is performed for intra-frame prediction blocks may be signaled separately.

[0324] For example, a flag regarding whether inseparable inversion is performed during the decoding process may be signaled. If the flag is true, an additional flag indicating whether inseparable inversion is performed for the inter-frame prediction block may be signaled. That is, if the flag indicating whether inseparable inversion is performed is true and the flag indicating whether inseparable inversion is performed for the inter-frame prediction block is true, it means that inseparable inversion can be performed on both the inter-frame prediction block and the intra-frame prediction block; if only the flag indicating whether inseparable inversion is performed is true, it means that inseparable inversion can be performed only on the intra-frame prediction block. Here, inter-frame prediction can be understood to include prediction using IBC mode.

[0325] According to one embodiment of the present disclosure, whether non-separable transformation is performed may be determined based on at least one of the size of the current TU, the partitioning depth of the current TU, the location of the EOB, and the prediction mode in the prediction execution process of the current TU. The EOB (End of Block) may indicate the location of the last effective transformation coefficient among the transformation coefficients belonging to the current TU. For example, it may mean the location of the transformation coefficient located at the bottom right among the non-zero transformation coefficients within the current TU. The EOB may mean the scan location or scan order of the last effective transformation coefficient among the transformation coefficients belonging to the current TU.

[0326] According to one embodiment of the present disclosure, a parameter (stx_type) indicating whether inseparable inverse transformation is performed during the decoding process may be signaled. For example, if stx_type is 0, it may indicate that inseparable inverse transformation is not performed on the current TU. If stx_type is not 0, it may indicate that inseparable inverse transformation is performed on the current TU. If inseparable transformation is not performed on the current TU, stx_type may not be signaled to the image decoding device.

[0327] Meanwhile, if stx_type is not 0, the inseparable transform kernel set information applied to the current TU during the decoding process may be explicitly signaled from the image encoding device to the image decoding device. Alternatively, the inseparable transform kernel set information applied to the current block may be implicitly determined by the image decoding device.

[0328] According to one embodiment of the present disclosure, inseparable inverse transformation may be performed on the current TU only when the inverse transformation unit partition depth of the current TU is 0. A partition depth of 0 may indicate the case where it is at the top of the partition tree. At this time, information regarding whether to perform the inverse transformation and / or the inseparable transformation kernel set may be signaled to an image decoder.

[0329] According to one embodiment of the present disclosure, non-separable conversion kernel set information may vary based on predetermined conditions. For example, the predetermined conditions when inter-frame prediction or prediction using IBC mode is performed on the current TU may be different from the predetermined conditions when intra-frame prediction is performed on the current TU.

[0330] When cross-frame prediction or prediction using IBC mode is performed on the current TU, the specified conditions are as seen with reference to Fig. 3, so a detailed explanation is omitted here.

[0331] When cross-frame prediction or prediction using IBC mode is performed on the current TU, the specified conditions are as seen with reference to Fig. 3, so a detailed explanation is omitted here.

[0332] As the conditions for when in-screen prediction is currently performed on the TU are as described with reference to Fig. 3, a detailed explanation will be omitted here.

[0333] According to one embodiment of the present disclosure, whether a parameter (stx_type) is signaled can be determined based on a predetermined condition. stx_type may represent a parameter indicating whether a non-separable inverse transformation is performed during the decoding process.

[0334] When cross-frame prediction or prediction using IBC mode is performed on the current TU, stx_type may be signaled if certain conditions are satisfied, and stx_type may be induced to 0 if certain conditions are not satisfied. Since the certain conditions are as described with reference to FIG. 3, a detailed explanation is omitted here.

[0335] When an in-frame prediction is performed on the current TU, stx_type may be signaled if a predetermined condition is satisfied and an additional condition is satisfied. Since the predetermined condition and the additional condition are as described with reference to Fig. 3, a detailed explanation is omitted here.

[0336] According to one embodiment of the present disclosure, when inter-frame prediction or prediction using IBC mode is performed on the current TU, stx_type may be signaled if a predetermined condition is satisfied.

[0337] According to one embodiment of the present disclosure, when intra-frame prediction is performed on the current TU, whether stx_type is signaled can be determined according to the intra-frame prediction mode. Specifically, stx_type may be signaled according to vertical and horizontal transformation kernels for separate inverse transformation only when intra-frame prediction is performed based on at least one of specific intra-frame prediction modes. At this time, since the specific intra-frame prediction modes are as described with reference to FIG. 3, a detailed description thereof is omitted here.

[0338] According to one embodiment of the present disclosure, when intra-frame prediction is performed on the current TU, stx_type can be signaled according to vertical and horizontal transformation kernels for separate inverse transformation for all intra-frame prediction modes without a process of determining whether it is an intra-frame prediction mode in which inseparable inverse transformation can be performed. That is, for all intra-frame prediction modes, inseparable inverse transformation can be performed, but whether inseparable inverse transformation is performed can be determined by vertical and horizontal transformation kernels for separate inverse transformation thereafter. At this time, a set of inseparable transformation kernels mapped to the intra-frame prediction mode for the current TU can be determined.

[0339] Regarding the determination of the non-separable transformation kernel set mapped to the in-frame prediction mode, as described with reference to FIGS. 3 and FIGS. 4, the same can be applied during the decoding process, so a detailed explanation is omitted here.

[0340] According to one embodiment of the present disclosure, when intra-frame prediction is performed on the current TU, as described above, the intra-frame prediction mode for the current TU corresponds to an intra-frame prediction mode in which non-separable inverse transformation can be performed, and when both the vertical and horizontal transformation kernels for the separable inverse transformation are DCT or ADST (Asymmetric DST), stx_type may be signaled.

[0341] Meanwhile, according to one embodiment of the present disclosure, the inseparable conversion kernel of the current TU may be determined as any one of a plurality of inseparable conversion kernels included in the inseparable conversion kernel set.

[0342] According to one embodiment of the present disclosure, an image encoding device can signal stx_type to an image decoding device. If stx_type has a non-zero value, non-separable conversion kernel set information can be obtained based on stx_type.

[0343] Alternatively, after stx_type is signaled in the video decoding device, if stx_type has a non-zero value, stx_set_idx may be signaled. stx_set_idx may represent inseparable conversion kernel set information indicating one of a plurality of inseparable conversion kernels included in the inseparable conversion kernel set. Based on the inseparable conversion kernel set information, one of a plurality of inseparable conversion kernels included in the inseparable conversion kernel set may be determined as the inseparable conversion kernel of the current TU.

[0344] According to one embodiment of the present disclosure, when an intra-frame prediction is performed for the current TU and a non-separable transformation is performed and stx_type is signaled, reordered_stx_set_idx may be signaled. For example, reordered_stx_set_idx may have a range from 0 to 6. In the decoding process, stx_set_idx may be determined using the reordered_stx_set_idx.

[0345] For example, the non-separable conversion kernel can be determined based on the separable conversion kernel.

[0346] For example, when the vertical and horizontal transformation kernels for separate inverse transformation are each DCT and when the vertical and horizontal transformation kernels for separate inverse transformation are each ADST, the non-separable transformation kernels may be different. Accordingly, the non-separable transformation kernel may be determined as any one of the transformation kernels shown in Table 1 above, but for stx_set_idx signaled to the image decoder, the non-separable transformation kernels represented by the same stx_set_idx value may be different.

[0347] For example, when the vertical and horizontal transformation kernels for the separate inverse transformation are each DCT, they may be determined as any one of the inseparable transformation kernels shown in Table 1 above, and when the vertical and horizontal transformation kernels for the separate inverse transformation are each ADST, the inseparable transformation kernel may be determined using a transformation kernel set list different from Table 1 above. In this case, the type of transformation kernel set list to be used may be implicitly determined based on the vertical and horizontal transformation kernel types for the separate inverse transformation and / or the size of the current block. In some cases, the transformation kernel set list used when the vertical and horizontal transformation kernels for the separate inverse transformation are each ADST and the width and height of the current block are both 8 or greater may be different from the transformation kernel set list used under other conditions.

[0348] As seen in Table 1, the stx_set_idx represented by reordered_stx_set_idx may differ depending on the in-screen prediction mode.

[0349] According to one embodiment of the present disclosure, when stx_type is signaled as a non-zero value for the current TU and inter-frame prediction or prediction using IBC mode is performed for the current TU, the signaling of reordered_stx_set_idx may be omitted. In this case, stx_set_idx may be determined as a specific value regardless of the prediction mode of the current block. For example, stx_set_idx may be determined as 0. Stx_set_idx may also be determined as the set indicated by index 0 when DC prediction is in the transformation kernel set list defined identically to Table 1 above, regardless of the prediction mode of the current block.

[0350] According to one embodiment of the present disclosure, when stx_type is signaled as a non-zero value for the current TU and inter-frame prediction or prediction using IBC mode is performed for the current TU, stx_set_idx may be determined using the prediction mode and / or reordered_stx_set_idx. In this case, reordered_stx_set_idx may or may not be signaled.

[0351] According to one embodiment of the present disclosure, in the process of performing prediction of the current TU, at least one intra-frame prediction mode is used to perform intra-frame prediction, and if the intra-frame prediction mode is a D45 directional prediction mode, reordered_stx_set_idx can be determined to be 0, i.e., stx_set_idx can be determined to be 2, as shown in Table 1. That is, based on the intra-frame prediction mode used in the process of performing prediction of the current TU, the intra-frame prediction mode and the inseparable transformation kernel set with an index of 0 can be determined. Alternatively, the inseparable transformation kernel set may be determined by signaling reordered_stx_set_idx and the stx_set_idx indicated by the corresponding index.

[0352] Meanwhile, according to one embodiment of the present disclosure, when geometric partitioning-based prediction is performed on the current TU, an intra-frame prediction mode may be determined based on a geometric partitioning mode for a plurality of geometric partitioning blocks. A non-separable transformation kernel set may be determined from the intra-frame prediction mode. Additionally, a non-separable transformation kernel set may be determined as shown in Table 1 above.

[0353] At this time, based on the geometric division angle information of the line for geometric division, a directional in-frame prediction mode corresponding to the angle can be used. Here, the corresponding directional in-frame prediction mode or directional prediction mode is as described with reference to FIG. 3.

[0354] According to one embodiment of the present disclosure, a non-separable transformation kernel set can be determined from a directional prediction mode corresponding to the angle of a geometric division line. In this case, a list of non-separable transformation kernel sets can be defined between an image encoding device and an image decoding device, and a non-separable transformation kernel set can be determined from said list. For example, the list of non-separable transformation kernel sets can be defined as shown in Table 1. In this case, the non-separable transformation kernel set can be determined as the first kernel set candidate of the list of non-separable transformation kernel sets. In this case, through signaling of a 1-bit flag, it may be determined whether to use a vertical directional prediction mode or a horizontal directional prediction mode.

[0355] According to one embodiment of the present disclosure, for a direction prediction mode corresponding to the angle of a geometric division line, if the direction prediction mode considers delta directionality in addition to main directionality, a non-separable transformation kernel set can be determined based on the direction prediction mode of the main directionality closest to the directionality.

[0356] Regarding the derivation of a directional prediction mode corresponding to a geometric partitioning mode, as described with reference to FIGS. 3 and FIGS. 6, the same method can be applied in the decoding process, so a detailed explanation will be omitted here.

[0357] Meanwhile, according to one embodiment of the present disclosure, a directional intra-frame prediction mode mapped by an agreement between an image encoding device and an image decoder may be predefined according to the angle of the geometric partitioning mode. A set of non-separable transformation kernels may be determined based on the directional intra-frame prediction mode mapped to the angle of the geometric partitioning mode. In this case, the directional prediction mode mapped may include a direction horizontal to the geometric partitioning mode and / or a direction perpendicular to the geometric partitioning mode and / or other directions.

[0358] According to one embodiment of the present disclosure, in the process of performing a prediction on the current TU, a directionality is derived within the prediction block, and after a directionality prediction mode corresponding to the derived directionality is determined, a non-separable transformation kernel set can be determined using this.

[0359] Regarding the induction of directionality within the prediction block, as examined with reference to FIGS. 3 and FIGS. 7, the same can be applied during the decoding process, so a detailed explanation will be omitted here.

[0360] According to an embodiment, when geometric partitioning-based prediction is performed on the current TU and intra-frame prediction is performed on at least one of a plurality of geometric partitioning blocks, the aforementioned intra-frame prediction mode determination process and non-separable transformation kernel set determination process may be performed. In another embodiment, when geometric partitioning-based prediction is performed on the current TU and intra-frame prediction is performed on at least one of a plurality of geometric partitioning blocks, an intra-frame prediction mode used for determining the non-separable transformation kernel set may be determined according to the relationship between the geometric partitioning mode and the intra-frame prediction mode used for prediction of at least one geometric partitioning block.

[0361] According to one embodiment of the present disclosure, if the intra-frame prediction mode used for predicting geometric partitioning blocks is not a directional prediction mode, the intra-frame prediction mode used for determining the non-separable transformation kernel set may be determined according to the geometric partitioning mode.

[0362] According to one embodiment of the present disclosure, when the in-frame prediction mode used for predicting geometric division blocks is a directional prediction mode, the relationship between the directional prediction mode and the geometric division mode can be considered. Here, the relationship may mean whether the directional prediction mode and the geometric division mode have a horizontal relationship or a vertical relationship. As the horizontal or vertical relationship between the directional prediction mode and the geometric division mode has been examined with reference to FIG. 3, a detailed explanation is omitted here.

[0363] According to one embodiment of the present disclosure, when intra-frame prediction is performed on at least one of a plurality of geometric partition blocks, an intra-frame prediction mode for determining a non-separable transformation kernel set may be determined for the geometric partition blocks on which intra-frame prediction was performed, based on the intra-frame prediction mode of the geometric partition block having the largest area not adjacent to the reference line of the current block. As this has been examined with reference to FIGS. 3 and FIGS. 8, a detailed explanation is omitted here.

[0364] According to one embodiment of the present disclosure, when any one of the following is performed during the current TU prediction process: unidirectional inter-frame prediction, bidirectional prediction, prediction in which a weighted sum of an intra-frame prediction signal and an inter-frame prediction signal is performed rather than geometric division, or prediction using an IBC mode, the intra-frame prediction mode may be determined as either a DC mode or a Smooth mode. Alternatively, as seen with reference to FIGS. 7(a) and (b), the intra-frame prediction mode may be determined according to the induced directionality.

[0365] According to one embodiment of the present disclosure, a set of inseparable transformation kernels is determined, and after a inseparable transformation kernel is determined within the set of inseparable transformation kernels, an inseparable inverse transformation can be performed by applying the inseparable transformation kernel. Transform coefficients can be generated by applying the inseparable transformation kernel to the indefinitely quantized transformation coefficients. In this case, the number of input indefinitely quantized transformation coefficients and the number of output transformation coefficients may be different.

[0366] According to one embodiment of the present disclosure, the inseparable transformation kernel may be determined differently depending on the number of input inversely quantized transformation coefficients. For example, when the number of transformation coefficients is 16 or less, the inseparable transformation kernel (stx_type) may be selected from a set of inseparable transformation kernels (stx_set_idx) having 8x16 coefficients. For example, when the number of transformation coefficients is greater than 16 and less than or equal to 64, the inseparable transformation kernel (stx_type) may be selected from a set of inseparable transformation kernels having 32x64 coefficients.

[0367] Subsequently, the selected kernel and the inverse quantized transform coefficients can be computed to perform the inseparable inverse transform. For example, as shown in Equation 2 below, the inverse quantized transform coefficients and the inseparable transform kernel can be computed to output the transform coefficients.

[0368] [Mathematical Formula 2]

[0369]

[0370] Here, is the output transformation coefficient, is the input inverse quantized transform coefficient, can mean a non-separable conversion kernel.

[0371] For example, if an inseparable conversion kernel (stx_type) is selected within an inseparable conversion kernel set (stx_set_idx) having 8x16 coefficients, 16 conversion coefficients can be output through Equation 2.

[0372] For example, if an inseparable conversion kernel (stx_type) is selected within a set of inseparable conversion kernels having 64x32 coefficients, 64 conversion coefficients can be output through Equation 2.

[0373] Meanwhile, for example, the number of output conversion coefficients may be 64, 48, or different.

[0374] For example, when performing an inseparable inverse transform on a block of size Nx4 or 4xN, 16 transform coefficients can be generated from 8 inversely quantized transform coefficients as input. Here, N can be an integer greater than or equal to 4.

[0375] For example, if the smaller value between width and height is greater than or equal to M, 48 transform coefficients can be generated using 32 inversely quantized transform coefficients as input. Here, M can be 8.

[0376] However, the figures disclosed above are merely examples, and different figures may be used.

[0377] According to one embodiment of the present disclosure, after generating transformation coefficients through non-separable inverse transformation, the transformation coefficients can be rearranged from a one-dimensional vector form to a two-dimensional form according to the scanning order to perform a separable inverse transformation. At this time, the scanning order may be implicitly determined based on vertical and horizontal separable transformation kernels in the image decoder, or may be determined by being explicitly signaled to the image decoder. Subsequently, the area outside the region filled with 16 or 64 transformation coefficients within a WxH size inverse transformation unit may be filled with 0s.

[0378] According to one embodiment of the present disclosure, a vertical and horizontal separation conversion kernel (e.g., DCT / DCT or ADST / ADST) can be applied to the conversion coefficients currently assigned to the TU to perform a separation inverse conversion in the vertical and horizontal directions.

[0379] Referring to FIG. 9, the current block can be restored from the residual block (S950).

[0380] According to one embodiment of the present disclosure, a final restored block for the current block can be generated by combining the residual block restored in S940 and the prediction block generated in S910.

[0381] The various embodiments of the present disclosure are not intended to list all possible combinations but to describe representative aspects of the present disclosure, and the matters described in the various embodiments may be applied independently or in combination of two or more.

[0382] In addition, various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof. In the case of implementation by hardware, it may be implemented by one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSPDs (Digital Signal Processing Devices), PLDs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays), general processors, controllers, microcontrollers, microprocessors, etc.

[0383] The scope of the present disclosure includes software or machine-executable instructions (e.g., operating system, application, firmware, program, etc.) that enable an operation according to a method of various embodiments to be executed on a device or computer, and a non-transitory computer-readable medium on which such software or instructions, etc. are stored and executable on a device or computer.

[0384] The various embodiments of the present disclosure are not intended to list all possible combinations but to describe representative aspects of the present disclosure, and the matters described in the various embodiments may be applied independently or in combination of two or more.

[0385] In addition, various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof. In the case of implementation by hardware, it may be implemented by one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSPDs (Digital Signal Processing Devices), PLDs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays), general processors, controllers, microcontrollers, microprocessors, etc.

[0386] The scope of the present disclosure includes software or machine-executable instructions (e.g., operating system, application, firmware, program, etc.) that enable an operation according to a method of various embodiments to be executed on a device or computer, and a non-transitory computer-readable medium on which such software or instructions, etc. are stored and executable on a device or computer.

[0387] The present invention can be used to encode / decode images.

Claims

1. A step of generating a prediction block for the current block by performing either cross-frame prediction or prediction using an intra-block copy mode; A step of deriving a transformation coefficient for the current block based on residual information for the current block; A step of deriving inversely quantized transformation coefficients by performing inverse quantization on the above transformation coefficients; A step of inducing a residual block by performing at least one of a non-separable inverse transform or a separated inverse transform on the above-mentioned inverse quantized transform coefficients; and A video signal decoding method comprising the step of restoring the current block from the above residual block.

2. In Paragraph 1, A video signal decoding method in which a first parameter indicating whether a non-separable inverse transform is performed for the current block is signaled.

3. In Paragraph 2, Whether a non-separable inverse transformation is performed on the above current block is determined based on the first flag, but, The above first flag is a video signal decoding method that is signaled at the sequence level.

4. In Paragraph 3, When the first flag is signaled at the sequence level, the second flag and the third flag are signaled at the sequence level, The second flag above is information indicating whether a non-separable inverse transformation is performed on a prediction block derived based on either an inter-frame prediction mode or an intra-block copy mode, and A video signal decoding method, wherein the third flag is information indicating whether a non-separable inverse transform is performed on a prediction block derived based on an in-frame prediction mode.

5. In Paragraph 3, When the first flag is signaled at the sequence level, the second flag is signaled at the sequence level, A video signal decoding method, wherein the second flag is information indicating whether a non-separable inverse transformation is performed on a prediction block derived based on either an inter-frame prediction mode or an intra-block copy mode.

6. In Paragraph 3, If at least one of the specified conditions is satisfied, the first parameter is signaled, A method for decoding an image signal, wherein the above predetermined conditions include at least one of a first condition in which the End Of Block (EOB) is greater than 3, a second condition in which the value of the first flag is true, a third condition in which the vertical kernel and the horizontal kernel applied to the separation inverse transformation are each DCTs, a fourth condition in which the width and height of the current block are each 16 or greater, or a fifth condition in which the EOB is less than or equal to 32.

7. In Paragraph 2, A video signal decoding method in which a non-separable conversion kernel set is selected when the value of the first parameter above is not 0.

8. In Paragraph 7, The above inseparable transformation kernel set includes a plurality of inseparable transformation kernels, and A video signal decoding method in which one of the plurality of inseparable conversion kernels is selected based on inseparable conversion kernel set information.

9. In Paragraph 8, A video signal decoding method in which, when either inter-frame prediction or prediction using an intra-block copy mode is performed for the current block, the non-separable conversion kernel set information is derived to 0.

10. A step of generating a prediction block for the current block by performing either cross-frame prediction or prediction using an intra-block copy mode; A step of deriving a residual block for the current block based on the above prediction block; A step of deriving a transformation coefficient for the current block by performing at least one of a non-separable transformation or a separable transformation based on the above residual block; A step of deriving quantized transformation coefficients by performing quantization on the above transformation coefficients; and A video signal encoding method comprising the step of encoding residual information regarding the above-mentioned quantized transform coefficients.

11. In a digital storage medium for storing a video bitstream, A digital storage medium encoded by an image signal encoding method comprising: a step of generating a prediction block for a current block by performing either inter-frame prediction or prediction using an intra-block copy mode on the bitstream; a step of deriving a residual block for the current block based on the prediction block; a step of deriving a transformation coefficient for the current block by performing at least one of non-separable transformation or separate transformation based on the residual block; a step of deriving a quantized transformation coefficient by performing quantization on the transformation coefficient; and a step of encoding residual information regarding the quantized transformation coefficient.